Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't set certain fonts in Interface Builder Xcode 6

I'm trying to select certain fonts (American Typewriter, Arial) as custom fonts for a plain UILabel in a Storyboard, but it doesn't work in Xcode6. It simply reverts to the previous selected font. I've Verified the behavior on two systems. Is there something specific about these fonts that won't allow it to be selected, or is there something that needs to be 'turned on'/installed for this to work?

like image 782
svarrall Avatar asked Aug 19 '14 15:08

svarrall


1 Answers

This was confusing for me too. Here is what I had to do to work around it.

  1. In the Text Field Attributes, select "Attributed" from the text drop down.
  2. Select all of the text that is displayed right under the Font Text Box. This should be the text you would like displayed.
  3. Right click the selection and select "Font > Show Fonts" from the context menu. This should bring up the Font selection dialog.
  4. Select the font that you desire.
  5. Close the font dialog.

It could be that this is intentional since you may what different parts of the attributed text to use different fonts. Either way, select a Font in the Font Text box should apply the style to the entire text region.

like image 90
pan-and-scan Avatar answered Nov 15 '22 14:11

pan-and-scan