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§
Structs§
Em
is relative length unit relative toPixel
. We stipulate Em(1.) equal to Pixel(16.)- Encapsulates the font properties of font face.
- Specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.
- `Pixels is an absolute length unit and relative to the view device
- Encapsulates the text style for painting.
- Do simple text typography and cache it.
Enums§
- A font family.
- The size of font.
Pixels is an absolute length unit and relative to the view device, and
Emis relative length unit relative to
Pixel`. We stipulate FontSize::Em(1.) equal to FontSize::Pixel(16.) - A face width.
- Allows italic or oblique faces to be selected.
- 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.
Constants§
- Unit for convert between pixel and em.
Traits§
Functions§
- draw the glyphs with the given brush, font_size and path style
- draw the text glyphs within the box_rect, with the given brush font_size and path style