Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom fonts in iOS with Phonegap Canvas
    primarykey
    data
    text
    <p>I'm trying to make a custom font work in Phonegap under iOS. I followed several tutorials and read all the related question on Stack Overflow and I still can't get it right, even if I double checked everything.</p> <p>This is the font: <a href="http://www.dafont.com/m04fatal-fury.font">http://www.dafont.com/m04fatal-fury.font</a> (<strong>the black version</strong>)</p> <p>Step I've taken</p> <p>Add your custom font files into your project using Xcode as a resource Add a key to your Info.plist file called UIAppFonts. Make this key an array For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array Save Info.plist Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:12] to get the custom font to use with your UILabels and UITextViews, etc…</p> <ol> <li>Added font into resource folder m04b.ttf</li> <li>Added UIAppFonts array. [0] => 'm04b.ttf'</li> <li>Checked that the actual font file was in the build phase resources</li> <li>ctx.font = '16px M04_FATAL FURY BLACK';</li> </ol> <p>Didn't work.</p> <p>Tried the postscript name M04_FATAL-FURY-BLACK still no luck. I'm completely lost here I really don't know what to do to debug this error.</p> <p>Thank you very much for any help. What could be the problem? What could I do to check if everything is getting loaded?</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;UIAppFonts&lt;/key&gt; &lt;array&gt; &lt;string&gt;m04b.ttf&lt;/string&gt; &lt;/array&gt; &lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt; &lt;string&gt;English&lt;/string&gt; ..... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload