Skip to main content

Crate blinc_text

Crate blinc_text 

Source
Expand description

High-quality text rendering for Blinc UI framework

This crate provides:

  • Font loading and parsing (TTF/OTF via ttf-parser)
  • Text shaping (HarfBuzz via rustybuzz)
  • Glyph rasterization
  • Glyph atlas management
  • Text layout engine (line breaking, alignment)

§Shared Font Registry

To minimize memory usage (Apple Color Emoji is 180MB!), use the global shared font registry instead of creating new FontRegistry instances:

use blinc_text::global_font_registry;

// All components share this single registry
let registry = global_font_registry();

Re-exports§

pub use atlas::AtlasRegion;
pub use atlas::ColorGlyphAtlas;
pub use atlas::GlyphAtlas;
pub use atlas::GlyphInfo;
pub use emoji::contains_emoji;
pub use emoji::is_emoji;
pub use emoji::EmojiRenderer;
pub use emoji::EmojiSprite;
pub use font::Font;
pub use font::FontFace;
pub use font::FontMetrics;
pub use font::FontStyle;
pub use font::FontWeight;
pub use layout::LayoutOptions;
pub use layout::LineBreakMode;
pub use layout::PositionedGlyph;
pub use layout::TextAlignment;
pub use layout::TextAnchor;
pub use layout::TextLayout;
pub use layout::TextLayoutEngine;
pub use rasterizer::GlyphFormat;
pub use rasterizer::GlyphRasterizer;
pub use rasterizer::RasterizedGlyph;
pub use registry::FontRegistry;
pub use registry::GenericFont;
pub use renderer::ColorSpan;
pub use renderer::GlyphInstance;
pub use renderer::PreparedText;
pub use renderer::TextRenderer;
pub use shaper::ShapedGlyph;
pub use shaper::ShapedText;
pub use shaper::TextShaper;

Modules§

atlas
Glyph atlas management
emoji
Emoji detection and rendering utilities
font
Font loading and management
layout
Text layout engine
rasterizer
Glyph rasterization using swash
registry
Font registry for system font discovery and caching
renderer
Text renderer
shaper
Text shaping using rustybuzz (HarfBuzz)

Enums§

TextError
Text rendering errors

Functions§

decode_html_entities
Decode html entities in a given string.
global_font_registry
Get the global shared font registry.

Type Aliases§

Result