What font is this font?

What are common problems (or mistakes) that would prevent a font from being displayed properly in a webpage inside of an iOS app?

  • We have one info webpage that I built out in HTML5 and CSS3. I added the @font-face within the <style> at the <head> (for our purposes I am not using external stylesheets). The exact font I was adding was BigNoodleTilting Oblique. Tried various hacks but nothing has worked. To make sure I was not writing incorrect syntax, I tested the Chunkfive font and it worked perfectly. However that was in .otf rather than .ttf format(that BigNoodle was in). Also I was given the font named BigNoodle which added the Oblique to it. So that this is relevant to more people. Please include not only what might fix this, but what may cause problems for anyone else who is using a custom web font mobile applications.

  • Answer:

    Working with custom fonts in the past- I usually do one of three things when a font isn't working. Make sure the font is actually being included in the app bundle. Sometimes when a file is dragged in to XCode the "add to target" option isn't checked. So while the file is included in the project, it is not included in the app bundle. How to Fix: Go to Target->Build Phases->Copy Bundle Resources. This will display all your resources, make sure your font is being properly included. Then Clean & Build. Make sure your app knows about your fonts. How to Fix: Go to your application-info.plist. Add the key "Fonts provided by application" to a new row and make it an array. Then add one string item per font. The string is the font's filename w/ extension. Make sure you are using the correct font name. Many fonts have filenames that are different from their actual font name. This probably doesn't apply in your case, as the font is being used in the @fontface manner, but you asked for a general solution, so I figured this should be included.   How to Fix: Lookup the proper font name or run this snippet. for (NSString* family in [UIFont familyNames]) { NSLog(@"%@", family); for (NSString* name in [UIFont fontNamesForFamilyName: family]) { NSLog(@" %@", name); } } This will log all the family and font names.

Nick Locascio at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.