Package limn.testing
Class TestRulers
java.lang.Object
limn.testing.TestRulers
The text rulers headless tests lay out against, so that a layout measured on one machine is
the layout measured on every other.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TextRulerTen points per code point whatever the font, ascent eight, descent two, line height twelve: ellipsis math and every width assertion become exact integers.static final TextRulerA ruler that scales with the font, for control-size assertions. -
Method Summary
-
Field Details
-
FIXED
Ten points per code point whatever the font, ascent eight, descent two, line height twelve: ellipsis math and every width assertion become exact integers. Seven test classes across four modules declared exactly this lambda; a transcript taken under one of them has to be the transcript taken under the others. -
SCALED
A ruler that scales with the font, for control-size assertions. It uses the embedded Roboto's real vertical ratios, which its four faces share (em 2048, ascent 1900, descent -500, line gap 0): ascent 0.927734em, descent 0.244141em, line height 1.171875em, with a flat 0.6em advance per code point.FIXEDis font-blind, so a MEDIUM control measured under it was never the shipped MEDIUM; every "MEDIUM is the identity" baseline has to be captured under this one.
-