struct Tessell::Text::GlyphPlacement

Overview

Placement of one shaped glyph in atlas space. uv in [0,1] over atlas page: (u0,v0)=top-left, (u1,v1)=bottom-right of glyph rect. page: atlas page index for drawable glyphs, -1 for zero-bitmap/non-atlas placements. color: true = placement lives in an RGBA atlas page (COLR/CPAL color glyph, premultiplied RGBA texel); false = R8 coverage page (default, backward compatible).

Defined in:

tessell/text/rasterizer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(key : GlyphKey, glyph_id : UInt32, advance_px : Float32, offset_x : Int32, offset_y : Int32, w : Int32, h : Int32, u0 : Float32, v0 : Float32, u1 : Float32, v1 : Float32, page : Int32 = -1, color : Bool = false) #

[View source]

Instance Method Detail

def advance_px : Float32 #

[View source]
def color : Bool #

[View source]
def glyph_id : UInt32 #

[View source]
def h : Int32 #

[View source]
def key : GlyphKey #

[View source]
def offset_x : Int32 #

[View source]
def offset_y : Int32 #

[View source]
def page : Int32 #

[View source]
def u0 : Float32 #

[View source]
def u1 : Float32 #

[View source]
def v0 : Float32 #

[View source]
def v1 : Float32 #

[View source]
def w : Int32 #

[View source]