[Wish] Selecting a Default Font Unit

Roger Garstang

Well-Known Member
Licensed User
Longtime User
Recent thread showed an issue in Font Scaling which I'd seen myself in a few apps that thought my Galaxy Note was a Tablet and applied some of their own Font Scaling or attempting to reverse scaling thinking it was applied. This resulted in really tiny text or huge text where all that could be seen was the bottom of it.

I usually design my layouts in code and set precise sizes matching the size needed. The Designer would show the app with the Font Scale of the Device which would help in some cases, but it the current device is a font scale of 1 and you run it on one that is .85 or 1.3 then it will either be too small or clipped with text going outside the bounds of the control just like if designed by hand.

In another forum and Google Docs it appears there are units of DP/DIP and SP. It looks like B4A uses the recommended option of DP for views and SP for Fonts. SP sizes the font like DP, but also applies the Font Scale. For those making a precise layout it may be better/easier to ignore the scale and have fonts use DP. Having an option for this either per Project or like Activity.FontUnit would be a big plus.
 
Top