custom-font

Custom font not being set, iPhone

核能气质少年 提交于 2019-12-23 05:04:49
问题 I am trying to change the font of a label to "Museo_500italic.otf" I have imported it to my project and added it to the p-list, but it doesn't recognize the font. I've done it with other fonts, a couple of months ago, but this one for some reason isn't working. Am I forgetting something? This is what I've got: This gives me Museo-500 for a font: self.createAccTxt.font = [UIFont fontWithName:@"Museo-500" size:17.5]; These give me the default font: self.createAccTxt.font = [UIFont fontWithName:

iOS Font loading problem

Deadly 提交于 2019-12-23 04:45:52
问题 Helle every one ! I have added din.otf font in my iOS project. Then in my plist I have : Now when I want to use it I juste have to write this line : lalel.font = [UIFont fontWithName:@"din" size:12.f]; Am I right ? It doen't work at all ... Thanks ! 回答1: Try to list all fonts that are available on your device after importing by adding this piece of code : (taken from : http://ajnaware.wordpress.com/2008/10/24/list-of-fonts-available-on-the-iphone/) Legacy Answer // List all fonts on iPhone

Using custom font in viewpagerindicator

℡╲_俬逩灬. 提交于 2019-12-22 10:52:24
问题 In my project I am using the font android: fontFamily = "sans-serif-light", and working properly. I am also using the library viewpagerindicator. I want to use the font android: fontFamily = "sans-serif-light" also in the viewpagerindicator, but can not find how to do it I've tried using android:fontFamily = "sans-serif-light" in <com.viewpagerindicator.TitlePageIndicator ... and in style, but without success. I have also tried: PageIndicator mIndicator = (TitlePageIndicator) findViewById (R

UITextView with custom font not working when text set to “attributed”

青春壹個敷衍的年華 提交于 2019-12-20 12:28:23
问题 I have a UITextView with some text that came from a .rtf (pasted directly onto Xcode) The context contain only one custom font (Futura Book BT 11.0) If I set the "text(attributed)" property to "plain"= The custom font appear properly from the storyboard and from the app If I set the "text" property to "attributed"=. The custom font appear properly from the storyboard BUT not from the app. As my goal was to have a text with multiple font working, how to have the attributed property to work

Adding a UIFont and looking for the fontfamily crashes with EXC_BAD_ACCESS

不打扰是莪最后的温柔 提交于 2019-12-20 07:32:10
问题 My problem is, that when I add a font which is described here and when I want to retrieve the font family names with [UIFont familyNames] it crashes. I did it the same way described in the example, but for me it doesn't work. This is my stack trace: 0x314b9ebe in CFDictionaryGetValue 0x33d79be4 in copy_localized_value 0x33d79bd4 in CGFontNameTableCopyRootName 0x33d796f2 in CGFontNameTableCreate 0x33d79e86 in CGFontCopyFamilyName 0x3414ca00 in AddFontsFromCGFontAndPath 0x3414cb7e in

Cross browser @font-face use

匆匆过客 提交于 2019-12-20 01:58:09
问题 I've been having a lot of difficulties with using custom fonts and @font-face . I'm trying to get a font consistent across the latest versions of Chrome, Safari & Firefox (shown in that order in the screenshot below: I'm using the following to generate this: @font-face { font-family: 'dineng'; src: url('fonts/dineng.eot'); src: url('fonts/dineng.eot?#iefix') format('embedded-opentype'), url('fonts/dineng.woff') format('woff'), url('fonts/dineng.ttf') format('truetype'), url('fonts/dineng.svg

How to set a TypeFace to PagerTabStrip text views

只愿长相守 提交于 2019-12-19 09:19:35
问题 In my app I'm using a ViewPager with a PagerTabStrip and I need to set custom fonts to my widgets. To set a font for a Button or a TextView I just extend the class and set a typeface. public class MyButton extends Button { public MyButton(Context context) { super(context); initCustomFont(); } public MyButton(Context context, AttributeSet attrs) { super(context, attrs); initCustomFont(); } public MyButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle);

How to set a TypeFace to PagerTabStrip text views

走远了吗. 提交于 2019-12-19 09:19:14
问题 In my app I'm using a ViewPager with a PagerTabStrip and I need to set custom fonts to my widgets. To set a font for a Button or a TextView I just extend the class and set a typeface. public class MyButton extends Button { public MyButton(Context context) { super(context); initCustomFont(); } public MyButton(Context context, AttributeSet attrs) { super(context, attrs); initCustomFont(); } public MyButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle);

How to use custom fonts in a mac application?

僤鯓⒐⒋嵵緔 提交于 2019-12-18 16:47:11
问题 I try to use custom fonts in my swift app, but they don't load. I copy the fonts.ttf in my resources folder, and I added the names in Info.plist under "Fonts provided by application " key. I've try with "Application fonts resource path" key from .plist , but no results. Here is the code I used to apply my font. I've try with : "MyFont.ttf" , and "MyFont" @IBOutlet weak var label:NSTextField! override func awakeFromNib() { label.font = NSFont(name: "MyFont.ttf", size: 15) } 回答1: First add the

UIFont with custom font fails with Nil

南笙酒味 提交于 2019-12-18 13:13:45
问题 I'm trying to add a custom font to my project in Xcode 4.2, but whenever I try to use it, I get a error that the object is nil. I have done the following: 1) Added a row to my .plist 'Fonts provided by application' value: "LCDMono2 Ultra.ttf" 2) Added the font to my Supporting Files and showed it in XCode to verify it was added. 3) Verified using Get Info that the Full Name is "LCDMono2 Ultra" 4) Created the font in my project with: UIFont *myFont = [UIFont fontWithName:@"LCDMono2 Ultra" size