Skip to main content

Module text

Module text 

Source

Structs§

DeterministicTextMeasurer
TextMetrics
TextStyle
VendoredFontMetricsTextMeasurer

Enums§

WrapMode

Traits§

TextMeasurer

Functions§

ceil_to_1_64_px
flowchart_apply_mermaid_string_whitespace_height_parity
flowchart_apply_mermaid_styled_node_height_parity
flowchart_html_has_inline_style_tags
flowchart_html_line_height_px
measure_html_with_flowchart_bold_deltas
measure_markdown_svg_like_precise_width_px
Computes an SVG getBBox().width-like measurement for Mermaid Markdown labels while keeping a tighter ~1/1024px lattice (closer to Chromium’s getBBox() behavior) rather than the 1/64px lattice used by measure_markdown_with_flowchart_bold_deltas for strict-XML stability.
measure_markdown_with_flowchart_bold_deltas
mermaid_default_bold_width_delta_px
mermaid_default_italic_width_delta_px
replace_fontawesome_icons
round_to_1_64_px
split_html_br_lines
Splits a Mermaid label into lines using Mermaid’s <br>-style line breaks.
wrap_label_like_mermaid_lines
Wraps a label using Mermaid’s wrapLabel(...) logic, producing wrapped lines.
wrap_label_like_mermaid_lines_floored_bbox
A variant of wrap_label_like_mermaid_lines that floors width probes instead of rounding.
wrap_label_like_mermaid_lines_relaxed
A variant of wrap_label_like_mermaid_lines that uses TextMeasurer::measure(...) widths (advance-like) rather than SVG bbox widths for wrap decisions.
wrap_text_lines_measurer
Wraps SVG-like text into lines using the provided TextMeasurer for width decisions.
wrap_text_lines_px