Crate luminance_glyph

Crate luminance_glyph 

Source
Expand description

A fast text renderer for luminance, powered by glyph_brush.

Initially forked and modified from glow_glyph by hecrj. Many thanks to hecrj!

Modules§

ab_glyph
Re-exported ab_glyph types.

Structs§

Extra
Default extra field type. Non-layout data for vertex generation.
FontId
Id for a font.
GlyphBrush
Object allowing glyph drawing, containing cache state. Manages glyph positioning cacheing, glyph draw caching & efficient GPU texture cache updating and re-sizing on demand.
GlyphBrushBuilder
Builder for a GlyphBrush.
GlyphVertex
Data used to generate vertex information for a single glyph
Instance
LeftTop
Vertex attribute type (representing #repr_ty_name).
Region
A region of the screen.
RightBottom
Vertex attribute type (representing #repr_ty_name).
Section
An object that contains all the info to render a varied section of text. That is one including many parts with differing fonts/scales/colors bowing to a single layout.
SectionGeometry
SectionGlyph
A positioned glyph with info relating to the SectionText (or glyph_brush Section::text) from which it was derived.
SectionText
Text to layout together using a font & scale.
TexLeftTop
Vertex attribute type (representing #repr_ty_name).
TexRightBottom
Vertex attribute type (representing #repr_ty_name).
Text
SectionText + extra.
VertexColor
Vertex attribute type (representing #repr_ty_name).

Enums§

BuiltInLineBreaker
Built-in linebreaking logic.
HorizontalAlign
Describes horizontal alignment preference for positioning & bounds.
Layout
Built-in GlyphPositioner implementations.
LineBreak
Indicator that a character is a line break, soft or hard. Includes the offset (byte-index) position.
VerticalAlign
Describes vertical alignment preference for positioning & bounds. Currently a placeholder for future functionality.

Traits§

GlyphBrushBackend
GlyphCruncher
Common glyph layout logic.
GlyphPositioner
Logic to calculate glyph positioning using Font, SectionGeometry and SectionText.
LineBreaker
Producer of a LineBreak iterator. Used to allow to the Layout to be line break aware in a generic way.

Functions§

orthographic_projection
Helper function to generate a generate a transform matrix.

Type Aliases§

SectionGlyphIter
SectionGlyph iterator.