Get a function to scale font size proportionally to text box size changes.
Initial box as a Group
font-size change ratio. Default is 1.
a function where input parameter is a new box, and returns the new font size value
Create a heuristic text width estimate function. It will be less accurate but faster.
a reference function that can measure text width accurately
a list of string samples. Default is ["M", "n", "."]
a list of the samples' probability distribution. Default is [0.06, 0.8, 0.14].
a function that can estimate text width
Truncate text to fit width
a function that can measure text width
text to truncate
width to fit
text to indicate overflow such as "...". Default is empty "".
Generated using TypeDoc
Various functions to support typography