Package limn.testing

Class TestRulers

java.lang.Object
limn.testing.TestRulers

public final class TestRulers extends Object
The text rulers headless tests lay out against, so that a layout measured on one machine is the layout measured on every other.
  • Field Details

    • FIXED

      public static final TextRuler 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

      public static final TextRuler 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. FIXED is 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.