zui docs v0.0.5
GitHub ↗
Display, content, and media Native Qt

Text Metrics

Text Metrics is a native Zui component in the display, content, and media catalog, with 10 component-specific properties.

Usage

Ruby example

Paste this complete Builder example inside the app surface from the Quickstart. Replace illustrative asset paths with files from your project.

Ruby
text_metrics "Native Ruby UI", font_family: "Roboto Mono", font_size: 18, bold: true
API

Component properties

10 component-specific values, plus shared item and layout properties.

textText configuration for Text Metrics.property
font_familyFont family configuration for Text Metrics.property
font_sizeFont size configuration for Text Metrics.property
boldBold configuration for Text Metrics.property
italicItalic configuration for Text Metrics.property
letter_spacingLetter spacing configuration for Text Metrics.property
word_spacingWord spacing configuration for Text Metrics.property
elideElide configuration for Text Metrics.property
elide_widthElide width configuration for Text Metrics.property
visibleVisible configuration for Text Metrics.property
Show 16 shared item properties
enabledopacityscalerotationzwidthheightfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

Subscribe with on widget, :event and keep behavior in Ruby.

metricsNative event payload