Questions tagged [kerning]

The inter-glyph distance of two characters rendered with a font

In typography, kerning (less commonly mortising) is the process of adjusting the spacing between characters in a proportional font, usually to achieve a visually pleasing result.

Kerning is the adjustment of the space between individual letter forms vs. tracking which is the uniform adjustment of spacing applied over a range of characters. In a well-kerned font, the two-dimensional blank spaces between each pair of characters all have similar area. The related term kern denotes a part of a type letter that overhangs the edge of the type block.

141 questions
5
votes
1 answer

.ttf kerning in iOS: how read kerning info?

I use custom font in iOS application (cocos2d, OpenGL) and there is no kerning. Font already have kerning info (on my Mac in TextEdit and Pages kerning pairs looks fine), but when I use this font in application — kerning don't apply. Is there some…
4
votes
0 answers

Get kerning offset value for given character pair and font in .NET

How can I get kerning adjustment of space between 2 given chars in .NET? In WPF application? For example, lets say I have font Times New Roman of size 22 that is bold. What kerning will be used for characters A and v ? How can I get this value in…
Rasto
  • 17,204
  • 47
  • 154
  • 245
4
votes
2 answers

Inconsistent behavior of kerning in NSAttributedString

I need to use Kern attribute of NSAttributedString. As I can see in the documentation, default value of that attribute is 0.0. But I faced with strange behaviour for phrase Hello, world (for phrase "Hello" all fine): NSDictionary*…
Andrew Romanov
  • 4,774
  • 3
  • 25
  • 40
4
votes
0 answers

Prevent hint text use letterspacing in Android

I have some issue in spacing/kerning with EditText in android. I want to use android:letterSpacing that already added in SDK 21, but i don't want to use the spacing in hint, just for the actual text only, is there any other way to do that? Before I…
4
votes
1 answer

How can I set the kerning on just one combination of characters in swift?

I'm using a font in my app that results in terrible kerning whenever a 4 appears after a . In a dynamic UI label that sometimes shows the .4, is it possible to programmatically increase the kerning only if those characters show up side by side?
Nate
  • 333
  • 3
  • 11
4
votes
1 answer

Modifying the kerning in System.Drawing.Graphics.DrawString()

I'm rendering text onto an image using the System.Drawing.Graphics class, and the DrawString() method. I need to generate the text for this image in a very specific way so that it exactly - pixel for pixel - matches an existing image. The problem is…
awj
  • 7,482
  • 10
  • 66
  • 120
4
votes
2 answers

Why are iOS Monospaced fonts not behaving like that?

I am using SpriteKit and have a timer in my iOS app rendered through an SKLabelNode and which is updated in the update function. I didn't want the digits moving left and right as the count increased, so I tried using Courier New. It worked much…
mike663
  • 623
  • 5
  • 12
4
votes
1 answer

NSString drawInRect:withAttributes: not correctly centered when using NSKernAttributeName

When I use drawInRect:withAttributes: and pass in both a paragraph style with NSTextAlignmentCenter and a non-zero value for NSKernAttributeName, the string does not get centered correctly. Am I doing something wrong or is this expected behavior? Is…
Johannes Fahrenkrug
  • 42,912
  • 19
  • 126
  • 165
4
votes
1 answer

Is it possible to use NSMutableAttributedString with SKLabelNode?

I'm trying to change the kerning on a couple of SKLabelNodes. I tried to use some code from another answer: NSMutableAttributedString *attributedString; attributedString = [[NSMutableAttributedString alloc] initWithString:@"Please get…
Nick Barr
  • 554
  • 1
  • 7
  • 20
4
votes
2 answers

How do I enable kerning in WPF?

I am trying to enable kerning in my WPF TextBlock as in Table
user248284
  • 41
  • 3
4
votes
1 answer

iOS 7 Applying kerning and line spacing to text

I have the following code which works flawlessly in iOS 6, problem is it has no effect whatsoever in iOS 7. How do I apply kerning and line spacing in iOS 7? + (NSAttributedString *)attributedText:(NSString *)text inFont:(UIFont *)font { …
ifeins
  • 869
  • 1
  • 9
  • 20
4
votes
1 answer

Android Font Kerning: Nexus 7 vs. Galaxy Tab 2

I'm currently developing an application that was originally meant to be run solely on Nexus 7 and Android 4.2. However, there was a change of plans and now it is meant to run on the Galaxy Tab 2, Android 4.1.1 instead. I am using a custom font that…
MikeS
  • 3,891
  • 6
  • 35
  • 51
4
votes
3 answers

Uniscribe Kerning

At work, I have been tasked with improving the text rendering of our application to better support text character kerning. Our application generates images that appear on Television, so image quality is paramount. Therefore, even small improvements…
Ali Parr
  • 4,737
  • 3
  • 31
  • 35
4
votes
2 answers

Obtaining kerning information

How can I obtain kerning information for GDI to then use in GetKerningPairs? The documentation states that The number of pairs in the lpkrnpair array. If the font has more than nNumPairs kerning pairs, the function returns an error. However, I…
chadb
  • 1,138
  • 3
  • 13
  • 36
4
votes
1 answer

Apache FOP, custom fonts, kerning?

I've just used Apache FOP to produce a PDF/X photobook to be submitted to a photo print service. Everything seems fine, but kerning. With a custom serif font, e.g. the word "portfolio" isn't properly rendered (the problem lies with f-o, as o should…
Fabrizio Giudici
  • 532
  • 3
  • 15
1 2
3
9 10