title: xcode custom ttf font not working
body: <p>ok so I've been reading through SO and doing all sorts of googling but I cant figure out why my font isn't working. </p>
  
  <p>I think I've done everything right, but when I run the app, the text on my button appears with the standard system font instead of the one I imported. I added <code>NSLog(@"%@",[UIFont familyNames]);</code> to see if it was in the list but it isnt. Which makes me think I've set it up wrong.</p>
  
  <p>Im hoping someone can <strong>help me display the text in my label in my custom font.</strong>
  Thanks to anyone who thinks they might have any suggestions!</p>
  
  <p><strong><em>Step-by-step this is what I've done.</em></strong></p>
  
  <p><strong>Step 1:</strong> I downloaded .ttf file from the internet. In my finder it looks like:
  <img src="https://i.stack.imgur.com/NPLC7.png" alt="enter image description here"></p>
  
  <p><strong>Step 2:</strong> I dragged the font file into XCode from finder and check the "copy file to project folder" option. So in my project I can see:</p>
  
  <p><img src="https://i.stack.imgur.com/Pe4WD.png" alt="enter image description here"></p>
  
  <p><strong>Step 3:</strong> I opened the font in font book to see what the real filename is and I see this:
  <img src="https://i.stack.imgur.com/3o68b.png" alt="enter image description here"></p>
  
  <p><strong>Step 4:</strong> I added a key to my MyApp-Info.plist file with the filename from XCode including the file type. It looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/3iIHX.png" alt="enter image description here"></p>
  
  <p><strong>Step 5:</strong> And then in my code I write this:</p>
  
  <pre><code>UIButton *thisLevelButton = [UIButton buttonWithType:UIButtonTypeCustom];
  
  [thisLevelButton setBackgroundImage:[UIImage imageNamed:@"ccLSButtonPlayed"] forState:UIControlStateNormal];
  thisLevelButton.frame = CGRectMake(x, y, BUTTON_WIDTH, BUTTON_HEIGHT);
  thisLevelButton.tag = j;
  [thisLevelButton addTarget:self action:@selector(userSelectedButton:) forControlEvents:UIControlEventTouchUpInside];
  [thisLevelButton.titleLabel setFont:[UIFont fontWithName:@"PressStartK" size:24]];
  [thisLevelButton setTitle:[NSString stringWithFormat:@"%i",(j+1)] forState:UIControlStateNormal];
  
  // add the button to the panel
  [subScroll addSubview:thisLevelButton];
  </code></pre>
  
  <p>For reference, this is what's printed in the list of font families:</p>
  
  <pre><code>(
      Thonburi,
      "Snell Roundhand",
      "Academy Engraved LET",
      "Marker Felt",
      "Geeza Pro",
      "Arial Rounded MT Bold",
      "Trebuchet MS",
      Arial,
      Marion,
      "Gurmukhi MN",
      "Malayalam Sangam MN",
      "Bradley Hand",
      "Kannada Sangam MN",
      "Bodoni 72 Oldstyle",
      Cochin,
      "Sinhala Sangam MN",
      "Hiragino Kaku Gothic ProN",
      Papyrus,
      Verdana,
      "Zapf Dingbats",
      Courier,
      "Hoefler Text",
      "Euphemia UCAS",
      Helvetica,
      "Hiragino Mincho ProN",
      "Bodoni Ornaments",
      "Apple Color Emoji",
      Optima,
      "Gujarati Sangam MN",
      "Devanagari Sangam MN",
      "Times New Roman",
      Kailasa,
      "Telugu Sangam MN",
      "Heiti SC",
      "Apple SD Gothic Neo",
      Futura,
      "Bodoni 72",
      Baskerville,
      "Chalkboard SE",
      "Heiti TC",
      Copperplate,
      "Party LET",
      "American Typewriter",
      "Bangla Sangam MN",
      Noteworthy,
      Zapfino,
      "Tamil Sangam MN",
      "DB LCD Temp",
      "Arial Hebrew",
      Chalkduster,
      Georgia,
      "Helvetica Neue",
      "Gill Sans",
      Palatino,
      "Courier New",
      "Oriya Sangam MN",
      Didot,
      "Bodoni 72 Smallcaps"
  )
  </code></pre>