Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attributed string with custom fonts in storyboard does not load correctly

We are using custom fonts in our project. It works well in Xcode 5. In Xcode 6, it works in plain text, attributed string in code. But those attributed strings set in storyboard all revert to Helvetica when running on simulator or device, although they look all right in storyboard.

I'm not sure if it's a bug of Xcode 6 or iOS 8 SDK, or the way to use custom fonts is changed in Xcode 6 / iOS 8?

like image 250
Allen Hsu Avatar asked Sep 19 '14 03:09

Allen Hsu


1 Answers

The simplest answer that worked for is to drag the fonts into FontBook. If the fonts are in your project but not in your computer's FontBook, IB sometimes has trouble finding it. Weird, but has worked for me on several occasions.

like image 129
Alan Scarpa Avatar answered Sep 28 '22 04:09

Alan Scarpa