kerning

Cannot get the kerning of some specific .ttf fonts with freetype

不想你离开。 提交于 2019-12-21 09:35:05
问题 I am trying to extract kerning information out of some .ttf fonts with freetype 2.6 library. This is how I get kerning informations (looping through characters): if( FT_HAS_KERNING(face->getFace()) && previous ){ FT_Vector delta; FT_UInt glyph_index = FT_Get_Char_Index( face->getFace(), character ); FT_UInt prev_index = FT_Get_Char_Index( face->getFace(), previous ); FT_Get_Kerning( face->getFace(), prev_index, glyph_index, FT_KERNING_DEFAULT, &delta ); kerning = delta.x >> 6; } I tried the

How do you adjust text kerning using Interface Builder in Xcode 7?

点点圈 提交于 2019-12-21 04:04:51
问题 There are a myriad of settings for NSAttributedParagraphStyle that I can see in Interface Builder: But none of these are for text kerning. Is there a way to adjust the text kerning in Xcode 7's Interface Builder for attributed text? (Please don't answer with how to do this in code - I already know how to do that!) 回答1: You can actually do this without the use of a subclass through an extension. import UIKit @IBDesignable extension UILabel { @IBInspectable public var kerning:CGFloat { set{ if

Most performant way to draw text on a curve, and animate it?

久未见 提交于 2019-12-18 12:38:11
问题 I'm guessing that it's to make a string out of individual CATextLayers and then position them as required along the curve, then animate. Because that's what's I've got working now, but it loses Kerning. Here's how: Why isn't my curved text centering itself? But is Core Text more performant and able to avoid the whole "drawing into a context" nonsense that slows everything down compared to the lean, mean Core Animation way of doing things, and respect kerning? i.e. avoiding drawRect: and all

Kerning in iOS UITextView

别说谁变了你拦得住时间么 提交于 2019-12-18 10:03:11
问题 For what apparently is a 'bug,' UITextView does not seem to support kerning like other UIKit Elements. Is there a workaround to get kerning working? To be clear, I'm talking about the spacing in between pairs of characters that are defined in the font file, not the general spacing between all characters. Using an NSAttributedString with the NSKernAttributeName will adjust the spacing between all characters, but the built in character pairs still don't work. For Example: Is there a workaround

How to change character spacing in XAML in a textbox?

*爱你&永不变心* 提交于 2019-12-17 20:45:44
问题 How do I change the character spacing in a WPF application within a textblock. Also known as kerning or tracking for characters. 回答1: An answer on social.msdn suggests the use of Glyphs. Other than that FontStretch allows for some adjustment. 回答2: Maybe you can add a Behavior for that TextBox that would go over every character and add a space after it. Alternatively, If you're using DataBinding, use a Converter with the same logic. And if you want to go for an overkill, you can make a custom

How can I specify letter spacing or kerning, in a WPF TextBox?

大城市里の小女人 提交于 2019-12-17 15:57:22
问题 I'd like to modify the spacing between characters in a WPF TextBox. Something like the letter-spacing: 5px thing that is available in CSS. I think it is possible in XAML; what's the simplest way? I found the "Introduction to the GlyphRun Object and Glyphs Element" document, and found it to be exceedingly unhelpful. This is a code example from that page: <!-- "Hello World!" with explicit character widths for proportional font --> <Glyphs FontUri = "C:\WINDOWS\Fonts\ARIAL.TTF"

How to set kerning in iPhone UILabel

允我心安 提交于 2019-12-17 07:14:23
问题 I am developing an iPhone app, and I want to set kerning in UILabel. The code I've written (possibly around kCTKernAttributeName ) seems to be in error. How might I approach fixing this? NSMutableAttributedString *attStr; NSString *str = @"aaaaaaa"; CFStringRef kern = kCTKernAttributeName; NSNumber *num = [NSNumber numberWithFloat: 2.0f]; NSDictionary *attributesDict = [NSDictionary dictionaryWithObject:num forKey:(NSString*)kern]; [attStr initWithString:str attributes:attributesDict]; CGRect

ffmpeg drawtext support for Hindi fonts

丶灬走出姿态 提交于 2019-12-11 18:51:39
问题 We are trying to use ffmpeg drawtext to support hindi fonts. But the ordering of the data is not correct. The unicode for Hindi text is passed like this 1. पिता माता िस्रफ But output renders as Output of code Have used the following code for generating the output ffmpeg -framerate 30 -t 10 -i /opt/test.png drawtext=text_shaping=1:fontcolor=white:fontsize=60:fontfile=/usr/share/xx.ttf:text='1. पिता माता िस्रफ':y='max(550,700-t*200)':x=40,format=yuv420p[v] /usr/share/nginx/html/hello_v.mp4 Had

webfont has incorrect kerning in IE10, IE11

梦想与她 提交于 2019-12-11 11:07:09
问题 I am working on a project for a client that uses a custom created webfont. The webfont displays with correct kerning in Chrome, Safari, Firefox and Opera when I implement the following styles: text-rendering: optimizeLegibility; font-feature-settings: "kern"; In IE10/IE11, the font does not display with correct kerning with or without the above styles. I have tried a variety of options without success. Per MDN, the font-feature-settings property is supported in IE10+. In fact, when I inspect

Kerning on font between chrome and firefox

这一生的挚爱 提交于 2019-12-11 10:28:28
问题 I am working on a menu with a custom font and in chrome (and safari) it is spaced exactly how I want it. http://american-motorsports.net/2012/ When I view it in firefox, the kerning of the font is a little different causing a little black gap on the far right menu item. I can see the difference between the F and A in FABRICATION The HTML is very simple right now: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="resources