

The reason for this step is because iOS and Android handle custom fonts differently. If the filename of your custom font already matches the PostScript name, you can skip this step. Rename font (if necessary) to match PostScript name To see detailed info about this font, press ⌘ + iĢ. To do this on Mac OS, double click on your custom font to install it and open it in Font Book. If you already know the PostScript name of your font, you can skip this step. Determine the PostScript name of your custom font. With just a simple easy steps, you can easily add the custom font of your choice to your Titanium mobile app (and be able to reference them from iOS and Android with the same code)!ġ. How can I do this without using different code for each platform?Īdding fonts to your mobile app is a great way to customize your iOS or Android mobile app to match your brand or style. Android Studio will add the correct signature for you.I have built a mobile app for iOS and Android using Titanium and I want to embed a custom font that I can use with both iOS and Android. Sample queries: name=Lobster # Lobster, 400 weight name=Lato&weight=100 # Lato, 100 weight name=Open Sans&weight=800&italic=1 # Open Sans, 800 weight, italic Security For security you must specify the signature of the application exposing the provider you want to request fonts from. For example, a request for at weight 900 would return Oswald at weight 700. Query Format To request a font from the Google Fonts provider use the following query format: Parameter Required? Range Data Type Default value name Yes Any family from string width No 0 float 100 weight No (0, 1000) exclusive int 400 italic No 0, 1 inclusive float 0 besteffort No true/false boolean true If besteffort is true and your query specifies a valid family name but the requested width/weight/italic value is not supported we will return the best match we can find within the family. Use Google Fonts declaratively or programmatically as shown in.
