class Tessell::Text::StubMeasurer

Overview

确定性桩:width = chars * size * 0.6,height = size * 1.2,尊重 max_width 换行 仅用于布局与单测;不得当真实度量

Defined in:

tessell/text/measurer.cr

Instance Method Summary

Instance methods inherited from class Tessell::Text::Measurer

font_metrics(font_id : Int32, size : Float32) : FontMetrics font_metrics, measure(text : String, font_id : Int32, size : Float32, max_width : Float32) : Size
measure(key : MeasureKey) : Size
measure
, shape_run(text : String, font_id : Int32, size : Float32) : ShapeRun | Nil shape_run

Instance Method Detail

def measure(text : String, font_id : Int32, size : Float32, max_width : Float32) : Size #
Description copied from class Tessell::Text::Measurer

主接口:按文本内容、字体、字号、可用宽测量


[View source]