Is it possible to embed a custom font on ios with our app?
I can't remember hearing anything about this.
Is it possible to embed a custom font on ios with our app?
I can't remember hearing anything about this.
I recall iOS supports only certain fonts, so I guess it's possible to choose only between those. Someone can correct me if I'm wrong.
What could be used, though, but is not yet available (afaik), is a 'Text Blitter' (or 'Character Image' optimized and without the bugs) type of an extension for iOS which can import bitmap fonts or convert fonts to bitmap/raster images. That would be very useful indeed.
I will post an answer on how to pull this off with any TrueType font later today.
Okay, first of all you can do this but the first thing you need to realize is that you must have a license for the font. If it's a font in the public domain be darn sure as fonts are protected IP. Dafont.com is a great site to find fonts where you can use them commericially without licensing, but not all fonts there are under those terms. Free for personal use does not apply to you when you are distributing apps.
Here are the steps:
1. Use the custom TrueType Font as you normally would within your Windows environment
2. Build your project to export to iOS
3. On the Mac, add the TTF file into your Resources directory like you would any other resource with Copy selected
4. Open your app's AppName-Info.plist file in the Resources directory
5. Add a Rownamed UIAppFonts of type Array (it should default to this)
6. This will now show up as Fonts provided by application
7. Enter the full filename of your font e.g. SomeFont_Bold.ttf
8. Build and run ... you should be golden
Lastly, I want to stress that you do not want to use any fonts unless you can demonstrate the provenience of them legally.
Great instructions, thanks Keith.
Just thinking about MMF updates, when we need to send the complete project to the Mac. Are these modified files and folders overwritten?
Yes. But you do not need to build a project everytime! If you are in normal ios build (not final), you can save as a ios application with no problem. You only need to build as a final project at the end when you want to build the final version. Any other time, just build as a ios application.
Just building the application is what I do, but I read that after updating MMF and the iOS exporter we should export the whole project again, so the changes take effect. Have I misunderstood this?
i always build a final project. it feels cleaner...
is there any reason NOT to do this?