VelloText

Module: elide.VelloText Support: Experimental

Type Aliases

  • VelloFontFamilyId
  • VelloFontWeight
  • VelloFontWidth
  • VelloFontStyle
  • VelloLineHeight

Interface VelloFontContext

13 members: 13 undocumented

Constructors

⚪ constructor()
Not documented

Methods

⚪ loadSystemFonts()
Not documented
⚪ loadFontsFromPath(path)
string
⚪ registerFont(data, options)
→ VelloFontFamily?
⚪ unregisterFont(familyId)
VelloFontFamilyId
⚪ familyNames()
→ sequence
⚪ familyId(name)
→ VelloFontFamilyId?
⚪ familyName(id)
→ string?
⚪ family(id)
→ VelloFontFamilyInfo?
⚪ familyByName(name)
→ VelloFontFamilyInfo?
⚪ genericFamilies(generic)
→ sequence
⚪ setGenericFamilies(generic, families)
VelloGenericFamily, sequence
⚪ clear()
Not documented

---

Dictionary VelloFontRegistrationOptions

4 members: 4 undocumented

Properties

⚪ familyName
→ string?
⚪ weight
→ VelloFontWeight?
⚪ width
→ VelloFontWidth?
⚪ style
→ VelloFontStyle?

---

Interface VelloFontFamilyInfo

3 members: 3 undocumented

Methods

⚪ fonts()
→ sequence

Properties

⚪ id
→ VelloFontFamilyId
⚪ name
→ string

---

Dictionary VelloAxisInfo

4 members: 4 undocumented

Properties

⚪ tag
→ string
⚪ min
→ f32
⚪ max
→ f32
⚪ defaultValue
→ f32

---

Enum VelloFontStyleKeyword

ValueDescription
normal
italic

Dictionary VelloFontStyleDescriptor

2 members: 2 undocumented

Properties

⚪ style
→ string
⚪ angle
→ f32

---

Enum VelloGenericFamily

ValueDescription
serif
sans-serif
monospace
cursive
fantasy
system-ui
ui-serif
ui-sans-serif
ui-monospace
ui-rounded
emoji
math
fangsong

Interface VelloLayoutContext

3 members: 3 undocumented

Constructors

⚪ constructor()
Not documented

Methods

⚪ rangedBuilder(fontContext, text, displayScale, quantize)
→ VelloRangedBuilder
⚪ treeBuilder(fontContext, displayScale, quantize, rootStyle)
→ VelloTreeBuilder

---

Interface VelloRangedBuilder

4 members: 4 undocumented

Methods

⚪ pushDefault(property)
VelloStyleProperty
⚪ push(property, start, end)
VelloStyleProperty, u32, u32
⚪ pushInlineBox(box)
VelloInlineBox
⚪ build()
→ VelloTextLayout

---

Interface VelloTreeBuilder

7 members: 7 undocumented

Methods

⚪ pushStyleSpan(style)
VelloTextStyle
⚪ pushStyleModification(properties)
sequence
⚪ popStyleSpan()
Not documented
⚪ pushText(text)
string
⚪ pushInlineBox(box)
VelloInlineBox
⚪ setWhiteSpaceCollapse(mode)
VelloWhiteSpaceCollapse
⚪ build()
→ VelloTreeBuildResult

---

Dictionary VelloTreeBuildResult

2 members: 2 undocumented

Properties

⚪ layout
→ VelloTextLayout
⚪ text
→ string

---

Enum VelloWhiteSpaceCollapse

ValueDescription
collapse
preserve

Dictionary VelloInlineBox

4 members: 4 undocumented

Properties

⚪ id
→ u64
⚪ index
→ u32
⚪ width
→ f32
⚪ height
→ f32

---

Dictionary VelloTextStyle

23 members: 23 undocumented

Properties

⚪ fontFamily
→ string
⚪ fontSize
→ f32
⚪ fontWeight
→ VelloFontWeight
⚪ fontWidth
→ VelloFontWidth
⚪ fontStyle
→ VelloFontStyle
⚪ fontVariations
→ sequence
⚪ fontFeatures
→ sequence
⚪ locale
→ string?
⚪ brush
→ VelloColor
⚪ underline
→ boolean
⚪ underlineOffset
→ f32?
⚪ underlineSize
→ f32?
⚪ underlineBrush
→ VelloColor?
⚪ strikethrough
→ boolean
⚪ strikethroughOffset
→ f32?
⚪ strikethroughSize
→ f32?
⚪ strikethroughBrush
→ VelloColor?
⚪ lineHeight
→ VelloLineHeight
⚪ wordSpacing
→ f32
⚪ letterSpacing
→ f32
⚪ wordBreak
→ VelloWordBreak
⚪ overflowWrap
→ VelloOverflowWrap
⚪ textWrapMode
→ VelloTextWrapMode

---

Dictionary VelloStyleProperty

23 members: 23 undocumented

Properties

⚪ fontFamily
→ string?
⚪ fontSize
→ f32?
⚪ fontWeight
→ VelloFontWeight?
⚪ fontWidth
→ VelloFontWidth?
⚪ fontStyle
→ VelloFontStyle?
⚪ fontVariations
→ sequence?
⚪ fontFeatures
→ sequence?
⚪ locale
→ string?
⚪ brush
→ VelloColor?
⚪ underline
→ boolean?
⚪ underlineOffset
→ f32?
⚪ underlineSize
→ f32?
⚪ underlineBrush
→ VelloColor?
⚪ strikethrough
→ boolean?
⚪ strikethroughOffset
→ f32?
⚪ strikethroughSize
→ f32?
⚪ strikethroughBrush
→ VelloColor?
⚪ lineHeight
→ VelloLineHeight?
⚪ wordSpacing
→ f32?
⚪ letterSpacing
→ f32?
⚪ wordBreak
→ VelloWordBreak?
⚪ overflowWrap
→ VelloOverflowWrap?
⚪ textWrapMode
→ VelloTextWrapMode?

---

Dictionary VelloFontVariation

2 members: 2 undocumented

Properties

⚪ tag
→ string
⚪ value
→ f32

---

Dictionary VelloFontFeature

2 members: 2 undocumented

Properties

⚪ tag
→ string
⚪ value
→ u16

---

Dictionary VelloLineHeightDescriptor

2 members: 2 undocumented

Properties

⚪ mode
→ VelloLineHeightMode
⚪ value
→ f32

---

Enum VelloLineHeightMode

ValueDescription
metrics-relative
font-size-relative
absolute

Enum VelloWordBreak

ValueDescription
normal
break-all
keep-all

Enum VelloOverflowWrap

ValueDescription
normal
anywhere
break-word

Enum VelloTextWrapMode

ValueDescription
wrap
nowrap

Dictionary VelloContentWidths

2 members: 2 undocumented

Properties

⚪ min
→ f32
⚪ max
→ f32

---

Dictionary VelloIndentOptions

2 members: 2 undocumented

Properties

⚪ eachLine
→ boolean
⚪ hanging
→ boolean

---

Enum VelloAlignment

ValueDescription
start
end
left
center
right
justify

Dictionary VelloAlignmentOptions

1 members: 1 undocumented

Properties

⚪ alignWhenOverflowing
→ boolean

---

Interface VelloBreakLines

1 members: 1 undocumented

Methods

⚪ breakRemaining(maxWidth)
f32

---

Dictionary VelloLineMetrics

10 members: 10 undocumented

Properties

⚪ ascent
→ f32
⚪ descent
→ f32
⚪ leading
→ f32
⚪ lineHeight
→ f32
⚪ baseline
→ f32
⚪ offset
→ f32
⚪ advance
→ f32
⚪ trailingWhitespace
→ f32
⚪ minCoord
→ f32
⚪ maxCoord
→ f32

---

Enum VelloBreakReason

ValueDescription
none
regular
explicit
emergency

Enum VelloPositionedItemType

ValueDescription
glyph-run
inline-box

Dictionary VelloPositionedInlineBox

5 members: 5 undocumented

Properties

⚪ x
→ f32
⚪ y
→ f32
⚪ width
→ f32
⚪ height
→ f32
⚪ id
→ u64

---

Dictionary VelloGlyphRunStyle

3 members: 3 undocumented

Properties

⚪ brush
→ VelloColor
⚪ underline
→ VelloDecoration?
⚪ strikethrough
→ VelloDecoration?

---

Dictionary VelloDecoration

3 members: 3 undocumented

Properties

⚪ brush
→ VelloColor
⚪ offset
→ f32?
⚪ size
→ f32?

---

Dictionary VelloRunMetrics

10 members: 10 undocumented

Properties

⚪ ascent
→ f32
⚪ descent
→ f32
⚪ leading
→ f32
⚪ underlineOffset
→ f32
⚪ underlineSize
→ f32
⚪ strikethroughOffset
→ f32
⚪ strikethroughSize
→ f32
⚪ lineHeight
→ f32
⚪ xHeight
→ f32?
⚪ capHeight
→ f32?

---

Dictionary VelloGlyph

4 members: 4 undocumented

Properties

⚪ id
→ u32
⚪ x
→ f32
⚪ y
→ f32
⚪ advance
→ f32

---

Dictionary VelloHitTestResult

2 members: 2 undocumented

Properties

⚪ cluster
→ VelloCluster
⚪ side
→ VelloClusterSide

---

Enum VelloClusterSide

ValueDescription
left
right

Enum VelloAffinity

ValueDescription
downstream
upstream

Dictionary VelloSelectionRect

2 members: 2 undocumented

Properties

⚪ rect
→ VelloBoundingBox
⚪ lineIndex
→ u32

---

Dictionary VelloBoundingBox

4 members: 4 undocumented

Properties

⚪ x0
→ f64
⚪ y0
→ f64
⚪ x1
→ f64
⚪ y1
→ f64

---

Namespace VelloTextMeasure

1 members: 1 undocumented

Static Methods

⚪ measureText(fontContext, layoutContext, text, style, maxWidth, displayScale)
→ VelloTextMetrics

---

Dictionary VelloTextMetrics

6 members: 6 undocumented

Properties

⚪ width
→ f32
⚪ height
→ f32
⚪ fullWidth
→ f32
⚪ lineCount
→ u32
⚪ minContentWidth
→ f32
⚪ maxContentWidth
→ f32

---