How can i use A Jannat LT Arabic font in my working ios application .I am working with objective c in xcode 8 .I need to use these fonts through out in myProject and from where i get (.ttf) file ? .I Searched a lot but i couldnt find a proper answer ,Kindly help me to fix this.
Asked
Active
Viewed 516 times
-4
-
Possible duplicate of [Custom Arabic font in iOS](http://stackoverflow.com/questions/3691567/custom-arabic-font-in-ios) – Olaia Apr 03 '17 at 12:21
-
What have you tried already that needs a fix? Please share some code. – koen Apr 03 '17 at 12:23
-
its duplicate question :::check this link : http://stackoverflow.com/questions/27730658/change-default-font-to-custom-fonts-in-whole-app – NAVEEN KUMAR Apr 03 '17 at 12:29
-
@ olaia A Jannat LT i need this font . but from where i get .ttf of A Jannat LT font – islahul Apr 03 '17 at 13:00
-
That is a completely different question. – koen Apr 03 '17 at 14:54
2 Answers
1
My question is do you need the font or do you need the way to implement it I think this is a nice explanation on how to add a custom font
If you need the font itself let me google it for you
Update
Not always the file name will coincide with the font family/font name, in order to check what Font families you have in your code you can use
Swift3
for family: String in UIFont.familyNames {
print("\(family)")
for names: String in UIFont.fontNames(forFamilyName: family) {
print("== \(names)")
}
}
Obj-C
for (NSString* family in [UIFont familyNames]) {
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family]) {
NSLog(@" %@", name);
}
}
Please use the link i gave to you in order to check if it works as expected

sken3r
- 414
- 1
- 4
- 10
-
I need this font A Jannat LT , this is one arabic font name , UIFont* font = [UIFont fontWithName:@"A Jannat LT " size:24];but it is not working – islahul Apr 03 '17 at 13:14
-
I updated my response, most likely the file name and the font name are not the same – sken3r Apr 03 '17 at 13:34
1
Follow these steps
1.) Drag fonts into your project.
2.) Define your fonts name in your plist. Open plist > right click > add row > type : Fonts provided by application
> press + > yourFontName.ttf.
It look like this in info plist
Fonts provided by application : Array : (2 items)
item 0 : fontNameOne.ttf
item 1 : fontNameTwo.ttf
3.) Either you can check it from storyboard or you can do programmatically.
yourLabel.font=[UIFont fontWithName:@"yourFont" size:16.0f];//do not use .ttf here

Dishant Rajput
- 1,329
- 1
- 10
- 20