custom-font

Custom Fonts Xcode 4.3

一个人想着一个人 提交于 2019-11-27 12:51:06
问题 I'm trying to use this font in my project but it won't work. I added the .ttf file in my project and added its name in the MyApp-Info.plist under the key: Fonts provided by application. Then I tried this: [_titleLabel setFont:[UIFont fontWithName:@"chalkboard" size:_titleLabel.font.pointSize]]; I also checked if the name of the font is really "chalkboard" and it is. The displayed font is still Helvetica, only smaller. Where could the problem be? Thanks in advance. 回答1: You need to use font

Custom Arabic font in iOS

前提是你 提交于 2019-11-27 07:20:51
I am trying to make an iphone application that displays mainly Arabic language content. I want to use a custom Arabic font for displaying that content, not the iPhone default Arabic font. I used the following code: - (void)viewDidLoad { [super viewDidLoad]; [arabicLabel setFont: [UIFont fontWithName: @"Simple Indust Shaded" size: 20]]; arabicLabel.text = @"السلام عليكم"; } where arabicLabel is an IBOutlet UILabel. I put the label in the App resources and add it to the info.plist file as UIAppFont array item. Also the font is Unicode . When I run this code on the simulator, the label displayed

How do I set a custom font for the whole application?

橙三吉。 提交于 2019-11-27 05:45:43
问题 Is there any way to How to Apply global font [new custom font] to whole application in iphone objective-c. I know that we can use below method to set font for each label [self.titleLabel setFont:[UIFont fontWithName:@"FONOT_NAME" size:FONT_SIZE]]; But I want to change for whole application. Please help me if anyone know. 回答1: Apparently to change ALL UILabels altogether you will need to setup a category on UILabel and change the default font. So here's a solution for you: Create a file

Custom Font in ios not working

♀尐吖头ヾ 提交于 2019-11-27 05:18:52
问题 I want to use HelveticaNeue-UltraLight in my ios application. I'm adding the font file as a resource to my project and adding the "Fonts provided by application" key in the plist file. The file name is HelveticaNeue.dfont and I've added it to the key array. When I check for the available fonts I can see it now... NSArray *fonts = [UIFont fontNamesForFamilyName:@"Helvetica Neue"]; for(NSString *string in fonts){ NSLog(@"%@", string); } 1-07-08 17:32:57.866 myApp[5159:207] HelveticaNeue-Bold

Custom Fonts in Android PhoneGap

夙愿已清 提交于 2019-11-27 03:51:15
I tried to make custom fonts for my application. For that, I wrote this code in my html file: <style type="text/css" media="screen"> @font-face { font-family: centurySchoolbook; src: url(/fonts/arial.ttf); } body { font-family: centurySchoolbook; font-size:30px; } </style> In my Html Body: <body onload="init();"> <h>Custom Fonts</h> <div>This is for sample</div> </body> But, these styles are not applied to my html body.. Any help to solve this..?? I made it work after doing the following steps: -Put your CSS in a file, for example my_css.css : @font-face { font-family: "customfont"; src: url("

Bottom of custom font cut off in Opera and webkit

半城伤御伤魂 提交于 2019-11-27 01:55:19
问题 I'm using a custom font in a page I'm developing, Droid Sans, and at certain font sizes, the bottom is cut off, but only in Opera and webkit browsers. It's easy to reproduce on Google's own webfonts page looking for Droid Sans and showing the whole alphabet at 18px: http://www.google.com/webfonts It's especially clear for the lower case g . Is there some css trick / hack I can use to increase the line height / show the whole character or am I really limited to only certain sizes of the font?

Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4

此生再无相见时 提交于 2019-11-26 22:33:54
问题 I am doing assets pre-compile, and running the application in production mode. After compilation when I load the my index page I got followings warnings in the chrome console: Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.ttf?v=2.0.0 prospects:1 OTS parsing error: invalid version tag Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.woff?v=2.0.0 prospects:1 OTS parsing error: invalid version tag The issue is its not loading icons instead of that

Check if custom font can display character

纵然是瞬间 提交于 2019-11-26 22:01:27
问题 I have a custom font which is displaying the box character. The font I am using does not support all languages apparently. I want to check if the String I am about to display can be displayed by my custom font. If it cannot then I want to use the standard Android font (which I know can display the characters). I can't find a method to check if my Typeface can display a particular String though. I am sure I have seen a method around that does this somewhere. Anyone know? 回答1: As of Android

Add custom font for complete android application

风流意气都作罢 提交于 2019-11-26 19:37:18
In my application I need to use helvetica font for all the textviews and edit-text fields. Is there any way to do this other than using settypeface method for every textview ? Any suggestion would be a great help. Thanks in advance ! Chrishan I figured it out by my self. This is the code I used. I create custom TextView which has custom font as default font. public class MyTextView extends TextView { public MyTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } public MyTextView(Context context, AttributeSet attrs) { super(context, attrs);

Xcode 8 custom font doesn't show up in interface builder

我的未来我决定 提交于 2019-11-26 18:11:13
问题 I am trying to use custom font (Bebas Neue) in my iOS application. The steps I took are: Copy the .otf files to the project. Confirm the .otf files have set the project as target. Added the .otf files in 'Fonts provided by application' in plist. In Build Phases, the .otf files are in 'Copy Bundle Resources'. Install the font on my Mac. Try to print out all fonts available but I can't see my custom font. The code I used: for name in UIFont.familyNames() { println(name) if let nameString = name