Re: iOS 7 downloadable fonts
Re: iOS 7 downloadable fonts
- Subject: Re: iOS 7 downloadable fonts
- From: Tualatrix Chou <email@hidden>
- Date: Tue, 21 Jan 2014 15:33:23 +0800
After downloading the font, if you want to use it offline (or do not
call the download API again), you can try to save the font URL and
next time of launching, use "CTFontManagerRegisterFontsForURL" to
register the font.
This file is what you want:
https://github.com/fdstevex/FDSFontDownloader/blob/master/FDSFontDownloader.m
I try to use this on my app, everything works file on simulator, but
register failed on device on iOS 7.1 Beta. Not sure if it is an bug of
iOS 7.1.
The article worth to read:
http://blog.stevex.net/2013/09/downloadable-fonts-in-ios-7/
On Sun, Jan 19, 2014 at 1:26 PM, Gideon King <email@hidden> wrote:
> Hi, I am trying to use CTFontDescriptorMatchFontDescriptorsWithProgressHandler to download a font. It appears to download fine, and I can display it in my application. [UIFont familyNames] includes that font.
>
> I restart my application, and [UIFont familyNames] does not include the downloaded font, and I can’t create the font using fontWithName:size:.
>
> I have tested this on both my iPad and the simulator, and it always forgets the downloaded font on restart of the application.
>
> On the simulator, if I go to Library/Assets/com_apple_MobileAsset_Font I can see the folder with the downloaded font in it, and there is a com_apple_MobileAsset_Font.plist file which includes all the information about the downloaded font. So it knows about the font, and the font is really there, but when I try to use it in my application it isn’t there until I download it again during that session.
>
> Is there something I am doing wrong? Do I need to initialize something to get it to include the downloaded fonts in the search?
>
>
> Regards
>
> Gideon
>
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
Tualatrix Chou
http://imtx.me
@tualatrix
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden