font

Responsive Font Size

匿名 (未验证) 提交于 2019-12-03 02:09:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've created a site using the Zurb Foundation 3 grid. Each page has a large h1. CSS body {font-size:100%} /* Headers */ h1 { font-size:6.2em;font-weight:500; } HTML <div class="row"> <div class="twelve columns text-center"> <h1> LARGE HEADER TAGLINE </h1> </div><!-- End Tagline --> </div><!-- End Row --> When I resize the browser to mobile size the large font doesn't adjust and causes the browser to include a horizontal scroll to accomodate for the large text. I've noticed that on the Zurb Foundation 3 Typography example page , the headers

UITextView - setting font not working with iOS 6 on XCode 5

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using storyboards for my UI. I was previously using XCode 4.6 and released on iOS 6. I have since updated to iOS 7 using XCode 5 and updated the Storyboard to work nicely with XCode 5. I have one issue though: UITextView doesn't want to display font changes within code. Text colour changes work fine. Any other property changes are fine. Font, not at all. I was using a custom font, so I checked different fonts with different sizes (i.e. systemFontOfSize: ) but that didn't work. The text view only shows the font that's set in the

How to use Font Awesome from webjars.org with JSF

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to use Font Awesome icons with my JSF application. I have had some success by following the getting started instructions and adding the following to my view's <h:head> section: <link href = "//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel = "stylesheet" /> This gives me a nice home icon when I use the icon-home class: However, I don't want to be dependent on the bootstrap server to provide the Font Awesome resources, so I am trying to bundle these with my war, and configure my views to use the

Google warning: Resource interpreted as Font but transferred with MIME type application/octet-stream

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a warning in Google for my font-face: Resource interpreted as Font but transferred with MIME type application/octet-stream: ".../Content/Fonts/iconFont.ttf". It works even if I have this warning but I prefer avoid this warning. Here is my declaration: @font-face { font-family: 'iconFont'; src: url('../Fonts/iconFont.eot?#iefix') format('embedded-opentype'), url('../Fonts/iconFont.svg#iconFont') format('image/svg+xml'), url('../Fonts/iconFont.woff') format('font/x-woff'), url('../Fonts/iconFont.ttf') format('truetype'); font-weight:

WPF Blurry fonts issue- Solutions

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Problem is described and demonstrated on the following links: Paul Stovell WPF: Blurry Text Rendering www.gamedev.net forum Microsoft Connect: WPF text renderer produces badly blurred text on small font sizes Explanation: Text Clarity in WPF . This link has font comparison. I would like to collect all possible solutions for this problem. Microsoft Expression Blend uses WPF but fonts look readable. Dark background as in Microsoft Expression Blend Increasing the font size and changing the font (Calibri ... ) [link] Embed windows forms [link]

How to calculate the width of a text string of a specific font and font-size?

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a UILabel that displays some chars. Like "x", "y" or "rpm". How can I calculate the width of the text in the label (it does not ues the whole available space)? This is for automatic layouting, where another view will have a bigger frame rectangle if that UILabel has a smaller text inside. Are there methods to calculate that width of the text when a UIFont and font size is specified? There's also no line-break and just one single line. 回答1: You can do exactly that via the various sizeWithFont: methods in NSString UIKit

UIButton custom font vertical alignment

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've got a UIButton which uses a custom font, which is set when my view loads: - (void)viewDidLoad { [super viewDidLoad]; self.searchButton.titleLabel.font = [UIFont fontWithName: @"FONTNAME" size: 15.0 ]; } The problem I've got is that the font is appearing to float up of the center line. If I comment out this line, the default font appears vertically centered fine. But changing to the custom font breaks the vertical alignment. I'm getting the same issue on a Table Cell with a custom font too. Do I need to tell the view somewhere that the

Issue when using a custom font - “native typeface cannot be made”

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use a font I found on the internet, but the problem is that I get an FC with "native typeface cannot be made". Here is the code in the getView of my ListVIew: holder.tv_SuraName =(TextView)convertView.findViewById(R.id.Start_Name); holder.tv_SuraName.setTypeface(Typeface.createFromAsset(mContext.getAssets(), "suralist_font.ttf")); Can anyone tell me why can I use the custom rom? You can get it HERE .. the file is .ttf 回答1: The font file is either corrupt or unsupported for some reason. You can drop it on the SD card and load it

What does “a” stand for in font: 0/0 a;

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was referring a video tutorial where the designer used font: 0/0 a; for image replacement, so I get that 0 is the font-size , another 0 is the line-height but designer skips the a part just by saying that's an hack. So what does that a exactly do there? 回答1: http://nicolasgallagher.com/another-css-image-replacement-technique/ 回答2: The a is a font name, and of course it's very unlikely that anyone has a font by that name installed. It's just used to satisfy the CSS syntax, and what font the browser thinks it should use from that is not

How to calculate UILabel height dynamically?

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to calculate number of lines and height of UILabel dynamically from given text for same. 回答1: Try this // UILabel *myLabel; CGSize labelSize = [myLabel.text sizeWithFont:myLabel.font constrainedToSize:myLabel.frame.size lineBreakMode:NSLineBreakByWordWrapping]; CGFloat labelHeight = labelSize.height; int lines = [myLabel.text sizeWithFont:myLabel.font constrainedToSize:myLabel.frame.size lineBreakMode:NSLineBreakByWordWrapping].height/16; // '16' is font size or int lines = labelHeight/16; NSLog(@"lines count : %i \n\n",lines); or int