[Enhancement] Add an API to handle font families properly #1018
Labels
area-fonts
Custom fonts and Font related API's
proposal/open
t/enhancement ☀️
New feature or request
Projects
Milestone
Summary
Right now, the font system is pretty basic: fonts are registered and then used. This is fine for typical cases where there is just one font, but there are a few platform differences:
Android
The main reason for the way things are now is that Android does not have a font lookup system and fonts are just loaded via the literal typeface that was created around the data stream.
iOS
iOS has a font registration system where all fonts to be used are added to the system, and then using the OS-level lookups we get styles.
Windows
Unknowns
Idea
When registering a font, there should be a way to build up the font family for the OS:
For iOS, this doesn't have to do anything, let the OS do the filtering.
For Android, we can use the new font API and fall back to basic checks and select the best match.
For Windows, using custom filtering to select the font as well as influencing the weight/slant properties of the control. For example, setting bold and a non-bold font, we can use the OS bold. But if there is a bold font, then we can use that. It seems that a bold font does not go bolder than the bold.
Pictures
Looking at the iages below, you can see they are not consistent. There are 5 "fonts", each with a change in weight/slant:
The text was updated successfully, but these errors were encountered: