Note that there are some explanatory texts on larger screens.

plurals
  1. POCoreText: Invalid 'kern' Subtable In CTFont
    text
    copied!<p>I am using a custom font applied to a CATextLayer. I am using the tutorial and sample code found here. <a href="http://www.freetimestudios.com/2010/09/13/custom-fonts-on-the-ipad-and-ios-4/" rel="noreferrer">http://www.freetimestudios.com/2010/09/13/custom-fonts-on-the-ipad-and-ios-4/</a></p> <p>However, every so often, I get the following error. Nothing in particular seems to trigger it. Can someone shed some light as to what this means? What to check for?</p> <pre><code>CoreText: Invalid 'kern' Subtable In CTFont &lt;name: Intellect, size: 20.000000, matrix: 0x0&gt; CTFontDescriptor &lt;attributes: &lt;CFDictionary 0xac07a80 [0x38295d98]&gt;{type = mutable, count = 1, capacity = 3, pairs = ( 0 : &lt;CFString 0x3833f750 [0x38295d98]&gt;{contents = "NSFontNameAttribute"} = &lt;CFString 0x159af0 [0x38295d98]&gt;{contents = "Intellect"} </code></pre> <p>I load the font using the following code. This code is taken from the project in the link above.</p> <pre><code>- (CTFontRef)newCustomFontWithName:(NSString *)fontName ofType:(NSString *)type attributes:(NSDictionary *)attributes { NSString *fontPath = [[NSBundle mainBundle] pathForResource:fontName ofType:type]; NSData *data = [[NSData alloc] initWithContentsOfFile:fontPath]; CGDataProviderRef fontProvider = CGDataProviderCreateWithCFData((CFDataRef)data); [data release]; CGFontRef cgFont = CGFontCreateWithDataProvider(fontProvider); CGDataProviderRelease(fontProvider); CTFontDescriptorRef fontDescriptor = CTFontDescriptorCreateWithAttributes((CFDictionaryRef)attributes); CTFontRef font = CTFontCreateWithGraphicsFont(cgFont, 0, NULL, fontDescriptor); CFRelease(fontDescriptor); CGFontRelease(cgFont); return font; } </code></pre>
 

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