AliSoftware/OHAttributedLabel — Issue #53: Use of 3rdParty fonts
Author: saeros
Created: 2011-12-12 21:52:23+00:00
State: open

Hi, great work so far.

I'm encountering crashes while trying to use some non-iOS fonts.

According to Frank Zheng's blog some work has to be done with CoreText (usually done for us with UIFont).

If I replace this line:
CTFontRef aFont = CTFontCreateWithName((CFStringRef)fontName, size, NULL);
with this one:
CTFontRef font = CTFontCreateWithName(CFSTR("myOwnFontName"), fontSize,NULL);
my code works.

But here the font name is hardcoded, I'm still looking for a way to use the fontName given to the method.

Help would be appreciated.

Thanks.