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§
Structs§
- Em
Emis relative length unit relative toPixel. We stipulate Em(1.) equal to Pixel(16.)- Font
Face - Encapsulates the font properties of font face.
- Font
Weight - Specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.
- Glyph
- Glyph
Bound - Grapheme
Cursor - Pixel
- `Pixels is an absolute length unit and relative to the view device
- Substr
- Text
Style - Encapsulates the text style for painting.
- Text
Writer - Typography
Store - Do simple text typography and cache it.
- Visual
Glyphs
Enums§
- Font
Family - A font family.
- Font
Size - The size of font.
Pixels is an absolute length unit and relative to the view device, andEmis relative length unit relative toPixel`. We stipulate FontSize::Em(1.) equal to FontSize::Pixel(16.) - Font
Stretch - A face width.
- Font
Style - Allows italic or oblique faces to be selected.
- Text
Align - 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.
- Text
Direction
Constants§
- PIXELS_
PER_ EM - Unit for convert between pixel and em.
Traits§
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