Custom fonts in the Builder interface

So, we are in 2014, is there a way to install custom fonts in the Builder interface? Those. do not do this programmatically, except for the "Fonts provided by the application" in the application.

+47
ios fonts interface-builder
Feb 26 '14 at 8:43
source share
5 answers

Yes, Marrius is right. In Xcode 6, you do not need to use additional software or install a font in code files. Just add font files to your project along with other files. And Interface Builder will display the added fonts in the user font list.

And the most amazing thing is that xcode 6 instantly displays the application font in IB. This is a great addition from Apple.

Also, be sure to add this key “Fonts provided by the application” to your info.plist project and specify the font file names to see the effect on the devices.

+69
Jun 17 '14 at 12:37
source share

In Xcode 6, we have custom fonts available in the interface constructor.

No need for additional software. Thanks Apple!

+13
Jun 04 '14 at 21:19
source share

In Xcode 6, just add the ttf file to your project and use it in the storyboard via custom fonts. If you directly want to use it in your code without using it in the storyboard, then you need to add the key "UIAppFonts" to projectName-Info.plist.

Example:

<key>UIAppFonts</key> <array> <string>Signika-Bold.ttf</string> <string>Signika-Regular.ttf</string> <string>Signika-Light.ttf</string> <string>Signika-Semibold.ttf</string> </array> 

immediately before the line </dict> in the projectName-Info.plist file.

 UIFont* font = [UIFont fontWithName:@"Signika-Regular" size:25]; 
+9
Oct. 16 '14 at 16:59
source share

Looks like someone was working on this. You can look at MoarFonts :

Moarfonts

Use custom fonts for your iOS projects directly in Interface Builder, in the WYSIWYG way

by Cédric Luthi " 0xced "

It costs $ 10 , but:

With iOS 3.2, you can use custom fonts in iOS applications by adding the UIAppFonts Info.plist Key. Unfortunately, custom fonts are not available when editing xib files in Interface Builder. MoarFonts makes your custom fonts available right in Interface Builder.

MoarFonts is compatible with both Xcode 4 and Xcode 5.

+1
Feb 26 '14 at 8:50
source share

This is my decision, nothing worked for me

 #import "UILabelEx.h" #import "Constants.h" @implementation UILabelEx //- (void)layoutSubviews //{ // [super layoutSubviews]; // // Implement font logic depending on screen size // self.font = [UIFont fontWithName:@"CustomFont" size:self.font.pointSize]; //} - (void) traitCollectionDidChange: (UITraitCollection *) previousTraitCollection { [super traitCollectionDidChange: previousTraitCollection]; self.font = [UIFont fontWithName:APP_FONT size:self.font.pointSize]; } @end 
+1
Nov 13 '15 at 9:10
source share



All Articles