FEATURE REQUEST: A font "size" attribute within StandardXMLAttributesResolver would be immensely useful.

#141 · open · 0 comments

View on GitHub ↗

pkclsoft

I've tried to implement this in my own subclass of StandardXMLAttributesResolver, however we don't seem to have enough access to the information required. Originally, I was going to implement it as a string point size (which would be normal), but given the font size of the active style, when the attribute is parsed may provide something specific to a device class, I thought it would be more useful to add an attribute called "fontScale" so that you could scale the font up or down. For this to work, I think we also need the ability to apply an attribute to whatever the "current" or "active" style is. e.g. "This is normal, <activeStyle fontScale=\"1.5\">but this text is larger by half</activeStyle >, and < activeStyle fontScale=\"0.5\">this is smaller by half.</activeStyle >; returning to normal size now". Would render something like: ![image](https://user-images.githubusercontent.com/729197/155450524-2b52ea8d-2e0c-4321-a301-a7bc74a7c629.png)

Comments