kerning

CSS Kerning for Large Numbers

半城伤御伤魂 提交于 2019-12-01 16:09:28
I realise that in the states large numbers are formatted with a , between thousands so you would write $1,000,000.00 . In South Africa a , is non-standard and could be used as a decimal point instead of the . . We would write $1000000.00 which is horrible to read. The typical solution is to use a bit of whitespace: $1 000 000.00 . The problem with that solution is that it still looks terrible. If I assume values are currency formatted in a particular DOM element (i.e. the numbers are suffixed with .00 even if it's double zero), the ideal solution would be to use CSS to somehow manipulate the

CSS Kerning for Large Numbers

我只是一个虾纸丫 提交于 2019-12-01 15:08:23
问题 I realise that in the states large numbers are formatted with a , between thousands so you would write $1,000,000.00 . In South Africa a , is non-standard and could be used as a decimal point instead of the . . We would write $1000000.00 which is horrible to read. The typical solution is to use a bit of whitespace: $1 000 000.00 . The problem with that solution is that it still looks terrible. If I assume values are currency formatted in a particular DOM element (i.e. the numbers are suffixed

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

北慕城南 提交于 2019-11-30 07:29:42
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 other aspects that greatly slow things down, as in this manner of drawing to the screen: https://github

Kerning in iOS UITextView

丶灬走出姿态 提交于 2019-11-29 19:34:41
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 to fix this? One simple workaround I have discovered is to add css styles to the UITextView which

Android 4.2.1 wrong character kerning (spacing)

人走茶凉 提交于 2019-11-27 08:44:02
When using Canvas and drawText() method I see a different rendering on Android 4.2.1. Below 4.2: For Android 4.2.1 (Nexux 7) I get: As you can see the text Consumption is very tight. Seems to be a kerning problem introduced in 4.2.1. The Paint used to draw text is nothing special: titlePaint = new Paint(); titlePaint.setAntiAlias(true); titlePaint.setColor(0xffffffff); titlePaint.setTextSize(0.125f); titlePaint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); titlePaint.setTextAlign(Align.CENTER); titlePaint.setLinearText(true); If I don't use titlePaint.setLinearText(true) I get a

How to adjust text kerning in Android TextView?

最后都变了- 提交于 2019-11-27 06:21:09
Is there a way to adjust the spacing between characters in an Android TextView ? I believe this is typically called "kerning". I'm aware of the android:textScaleX attribute, but that compresses the characters along with the spacing. AFAIK, you cannot adjust kerning in TextView . You may be able to adjust kerning if you draw the text on the Canvas yourself using the 2D graphics APIs. I built a custom class that extends TextView and adds a method "setSpacing". The workaround is similar to what @Noah said. The method adds a space between each letter of the String and with SpannedString changes

How to set kerning in iPhone UILabel

只谈情不闲聊 提交于 2019-11-27 03:34:49
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 frame1 = CGRectMake(0, 0, 100, 40); UILabel *label1 = [[UILabel alloc] initWithFrame:frame1]; label1

Android 4.2.1 wrong character kerning (spacing)

倾然丶 夕夏残阳落幕 提交于 2019-11-26 14:16:37
问题 When using Canvas and drawText() method I see a different rendering on Android 4.2.1. Below 4.2: For Android 4.2.1 (Nexux 7) I get: As you can see the text Consumption is very tight. Seems to be a kerning problem introduced in 4.2.1. The Paint used to draw text is nothing special: titlePaint = new Paint(); titlePaint.setAntiAlias(true); titlePaint.setColor(0xffffffff); titlePaint.setTextSize(0.125f); titlePaint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); titlePaint.setTextAlign

How to adjust text kerning in Android TextView?

こ雲淡風輕ζ 提交于 2019-11-26 11:57:44
问题 Is there a way to adjust the spacing between characters in an Android TextView ? I believe this is typically called \"kerning\". I\'m aware of the android:textScaleX attribute, but that compresses the characters along with the spacing. 回答1: AFAIK, you cannot adjust kerning in TextView . You may be able to adjust kerning if you draw the text on the Canvas yourself using the 2D graphics APIs. 回答2: I built a custom class that extends TextView and adds a method "setSpacing". The workaround is