Crate ribir_text

Crate ribir_text 

Source
Expand description

A tiny low level text processing library dedicate to Ribir, use to reorder, shape and do simple layout for text. It’s focus

Some detail processing learn from usvg

Re-exports§

pub use text_reorder::TextReorder;
pub use typography::Overflow;

Modules§

font_db
shaper
text_reorder
typography
unicode_help

Structs§

Em
Em is relative length unit relative to Pixel. We stipulate Em(1.) equal to Pixel(16.)
FontFace
Encapsulates the font properties of font face.
FontWeight
Specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.
Glyph
GlyphBound
GraphemeCursor
Pixel
`Pixels is an absolute length unit and relative to the view device
Substr
TextStyle
Encapsulates the text style for painting.
TextWriter
TypographyStore
Do simple text typography and cache it.
VisualGlyphs

Enums§

FontFamily
A font family.
FontSize
The size of font. Pixels is an absolute length unit and relative to the view device, and Emis relative length unit relative toPixel`. We stipulate FontSize::Em(1.) equal to FontSize::Pixel(16.)
FontStretch
A face width.
FontStyle
Allows italic or oblique faces to be selected.
TextAlign
Text-align relative to the horizontal or vertical, not caring about whether the text is left-to-right or right-to-left, In the horizontal the left is the start, and in vertical the top is the start.
TextDirection

Constants§

PIXELS_PER_EM
Unit for convert between pixel and em.

Traits§

CharacterCursor
VisualText

Functions§

draw_glyphs
draw the glyphs with the given brush, font_size and path style
draw_glyphs_in_rect
draw the text glyphs within the box_rect, with the given brush font_size and path style
select_next_word
select_prev_word
select_word