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
33
votes
9 answers

How to set kerning in iPhone UILabel

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 =…
kz00011
  • 331
  • 1
  • 3
  • 3
30
votes
12 answers

How to adjust text kerning in Android TextView?

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.
emmby
  • 99,783
  • 65
  • 191
  • 249
23
votes
6 answers

Kerning in iOS UITextView

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…
Anthony Mattox
  • 7,048
  • 6
  • 43
  • 59
21
votes
4 answers

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

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…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
21
votes
2 answers

Cocoa (OS X) small font - kerning looks awful

I have a Cocoa OS X application that creates PDFs for printing. I'm having a problem that when I use small font sizes, the kerning seems all wrong. Here is a screen shot. This is an enlargement from a PDF output by my app, using Helvetica at 6…
Wouldchux
  • 284
  • 1
  • 8
17
votes
4 answers

How to set kerning (spacing between characters) on UINavigationBar title - Swift or Objective-C

I've got my nav bar mostly customized to my liking, but I'm trying to increase the kerning using NSKernAttributeName. I'm using the appearance proxy to set the nav bar to white text and a custom font, but when I try to add kerning it doesn't take…
Kyle Clegg
  • 38,547
  • 26
  • 130
  • 141
12
votes
5 answers

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

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…
brandonscript
  • 68,675
  • 32
  • 163
  • 220
11
votes
2 answers

java.awt.font letter spacing

Is it possible to increase letter spacing when using java.awt.font ? Something like this: Font font = new Font("serif", Font.PLAIN, 21); //Increase the spacing - perhaps with deriveFont()? BufferedImage image = new BufferedImage(400, 600,…
user1031054
  • 205
  • 1
  • 3
  • 7
10
votes
4 answers

Android 4.2.1 wrong character kerning (spacing)

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…
Seraphim's
  • 12,559
  • 20
  • 88
  • 129
9
votes
1 answer

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

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…
Lake
  • 4,072
  • 26
  • 36
8
votes
2 answers

How to change character spacing in XAML in a textbox?

How do I change the character spacing in a WPF application within a textblock. Also known as kerning or tracking for characters.
anton2g
  • 923
  • 6
  • 12
  • 29
8
votes
1 answer

kerning problem in GD and php 5.3

Knowing this problem has been adressed before at PHP update kerning problem with imagettftext() and imagefttext() functions but witout solution; PHP5.3 seem to have kerning problems when printing text: Look at the 'x' in the following examples…
Teson
  • 6,644
  • 8
  • 46
  • 69
8
votes
1 answer

Wrong height for UILabel when using custom lineSpacing and kern

I am getting wrong height for an UILabel if I use NSAttributedString that has custom kern and lineSpacing. Here is how I set the custom kern and line spacing: override func viewDidLoad() { super.viewDidLoad() let shortText = "Single line" …
itskoBits
  • 435
  • 4
  • 13
8
votes
2 answers

CSS Kerning for Large Numbers

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…
jcuenod
  • 55,835
  • 14
  • 65
  • 102
7
votes
7 answers

.NET library for typesetting documents (PDF or similar)?

EDIT: Better explanation: Before setting a bounty for this question I want to state clearer what I need: I need .NET library for generating printable documents. Users should be able to print exactly the same document that they see either using my…
Rasto
  • 17,204
  • 47
  • 154
  • 245
1
2 3
9 10