0

enter image description here

as you can see in the above i'm trying to change my textView's font , but it didn't changing i searched some related terms on changing for like this one

and this , but nothing worked for me

i'm also not sure if this is the correct name of my desired font or not

titleTextView.font = UIFont(name: "Myriad-Condensed", size: 25)

even in this site they dont have anything related to my desired font which is Myriad pro Condensed according to storyboard's attribute inspector

anyone faced anything similar to this before ?? or any clue what i should do ? then please let me know

Community
  • 1
  • 1
remy boys
  • 2,928
  • 5
  • 36
  • 65
  • 1
    Are you sure you have installed the font properly? – Rashwan L Aug 22 '16 at 14:28
  • @RashwanL installed ? what you mean ? where to install it ? – remy boys Aug 22 '16 at 14:33
  • For custom fonts installations, check this: http://stackoverflow.com/questions/4969329/how-to-include-and-use-new-fonts-in-iphone-sdk – pedrouan Aug 22 '16 at 14:52
  • @pedrouan hey man thanks for responding , but your link's question says ***But I dont see it in the font list in Property inspector*** which is not in my case my desired font is there but after selecting that font nothing happening.. , do correct me if i'm wrong – remy boys Aug 22 '16 at 14:58
  • @remy boys Yes, it was purposely: You say you are using custom font. So first check if your font is embedded correctly and ios renders it. If it is not, it displays default font instead. The link I posted in comment has great answer that explain what to check and set. If your are done, let me know if it doesn't help. – pedrouan Aug 22 '16 at 15:44
  • @pedrouan do i have to check in info.plist ? – remy boys Aug 22 '16 at 15:45
  • @remy boys Yes, follow that answer, you have to have your fonts typed there. And also, sometimes. Be sure you type correct names, as sometimes, the font your are using has different name as its filename. Try it and send screenshot if you want. – pedrouan Aug 22 '16 at 15:47

1 Answers1

0

First you need a font to use. Download any of them in you cass its right here : http://ufonts.com/fonts/myriadpro-cond.html

After downloading drag & drop the font file (otf or ttf) into your project

Make sure you check the box next to your target or the font won’t actually get included in your app (even though it’ll probably show in Interface Builder).

Open up the Info.plist . Add a new array of strings to it: “Fonts provided by application”. Add the filenames for each font you want to use as String entries in the array. (That one ttf file you just added to your project )

Now you're good to go , select that font once again like you did in the attached image.

For more detail see this article https://grokswift.com/custom-fonts/