struct Tessell::Text::FontMetrics

Overview

字体度量(issue #6):设备像素单位,与 measure 的 size 口径一致。 ascent/descent 以 baseline 为界(ascent 向上为正),line_height 为 推荐行距(FT size metrics height,回退 (ascent-descent))。

Defined in:

tessell/text/measurer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ascent : Float32, descent : Float32, line_height : Float32) #

[View source]

Instance Method Detail

def ascent : Float32 #

[View source]
def descent : Float32 #

[View source]
def line_height : Float32 #

[View source]