TextWidth
org.appliedtopology.tda4j.plot.TextWidth
object TextWidth
How wide a text is, estimated. The renderer writes SVG for whatever font the reader's browser or tool picks and has no font metrics, so a width is the advance widths of the stock face of a generic family: Helvetica (the faces sans-serif, system-ui, Arial and Liberation Sans stand for), Times (serif) or a fixed width (monospace), letter by letter, so that a row of Ws is wider than a row of is. Exact for those faces and the faces with their metrics (Arial, Liberation Sans, Liberation Serif); a font with other proportions is further off (Inter, which system-ui is on some systems, is about 6% wider).
Used to cut a long text at a limit (TextFace) and to size a legend.
Attributes
- Experimental
- true
- Source
- TextWidth.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TextWidth.type
Members list
In this article