Class HTMLScaleSupport
java.lang.Object
org.vanted.scaling.scalers.component.HTMLScaleSupport
public class HTMLScaleSupport extends Object
It handles several HTML tags, see HTMLScaleSupport.Tags.ALL for detailed list.
These are problematic, because they do not respect a font change on its own
and are replaced by a calculated font size, e.g. <font size="-1">. With
the help of a
HTMLScaleSupport.TextListener
we dynamic changes are tracked.- Author:
- D. Garkov
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HTMLScaleSupport.Tags
-
Method Summary
-
Method Details
-
scaleText
Scales hard-sized HTML tags, such as small, big, code, etc. by replacing them with a an equivalent scaled fontsize tag. No tags are stored, as this is thought to be a one-time non-reversible (on new instance) scaling.- Parameters:
text
- the HTML textcomponent
- component to infer font size from- Returns:
- DPI-scaled HTML text
- Since:
- 2.7.0
-