Class ScreenMeasurer
java.lang.Object
com.codename1.wordprocessing.ScreenMeasurer
- All Implemented Interfaces:
Measurer
Measures text with the platform fonts DocumentView draws it in.
The view's default. A layout measured with one font and drawn with another puts every
run where the first font would have ended the previous one, so wider glyphs run into the
next word. PdfMeasurer measures the PDF's fonts; use it on a view only when its pages
must break exactly where the exported PDF's do.
Widths are measured at PIXELS_PER_POINT pixels per point and scaled back, so they do
not depend on the size the view happens to draw at.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatThe distance from the top of a line of this style to its baseline.floatThe distance from the baseline to the bottom of a line of this style.The platform font a style is drawn in, at a pixel size.floatThe advance width of text drawn in a style.
-
Constructor Details
-
ScreenMeasurer
public ScreenMeasurer()
-
-
Method Details
-
font
-
width
-
ascent
-
descent
-