Deploying .otf font family to FMX application


I’m trying to implement a custom font family (multiple .otf files for different weights such as heavy, light, regular, ultralight…) for my Firemonkey application, which will be deployed for both Android and iOS.
Implementing the font family on iOS was pretty simple, all I had to do was include them in the info.plist file. When applying font to label, under Font > Family I only need to type "Font name" and it gets applied. Keep in mind that there is no actual "Font name" file, only "Font name Heavy" and other weights.

However, when doing the same thing in Android, it’s a completely different outcome. I include the fonts in deployment, and entering "Font name" doesn’t apply it at all, but if I enter "Font name Ultralight" for example, then that font with that weight gets applied (while on iOS, adding " Ultralight" has no effect).
To make things worse, adding styles to font such as italic and bold do not apply on Android at all, while they do get applied on iOS.
Why are these two acting so differently, and how can one overcome the differences so they both display the same thing?

Comments are closed.