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
7
votes
1 answer

Font File Parser with GPos Kerning Table Support for rendering Glyphs

I am looking for a way to extract glyph bitmaps, glyph metrics and kerning data from font files (.ttf, .otf) with a support for GPos Kerning Tables. I have used the FreeType Library before, but it does not support GPos Tables.
stimulate
  • 1,199
  • 1
  • 11
  • 30
6
votes
2 answers

Accessing font kerning information in Java2D

Little background.. I'm in the process of making an OpenGL game using Java and LWJGL. I've written a TextRenderer-class that renders text using cached pages of glyphs. The glyphs itself are rendered in Java2D to BufferedImages and packed into…
MH114
  • 975
  • 1
  • 9
  • 13
6
votes
0 answers

Font ligatures and kerning break under selection in Swings text based components

Ligatures Playing around with swing on java 17 I encountered some funky glitches: When enabling font ligatures and switching to a ligature heavy font, like Fira Code, selecting part of the ligated Text has following effect: The selected text seems…
calaedo
  • 313
  • 1
  • 3
  • 15
6
votes
2 answers

Simulate kerning for a bitmapped font with Fabric JS

I am trying to create an effect with Fabric JS where letters appear to be "embroidered" on a sweater like this: I can achieve this effect in Photoshop by using this action. My idea for getting it into a is to render out a png from…
Tom Lehman
  • 85,973
  • 71
  • 200
  • 272
6
votes
2 answers

Bad character spacing (kerning) in JavaFX's font rendering (in Linux)

I've started developing an application in JavaFX and I've run in an issue, I could find very little helpful information about: The spacing of between characters in Linux is very uneven. I'm not talking about the width of different characters but of…
Customizer
  • 665
  • 2
  • 7
  • 20
6
votes
2 answers

How to control the font kerning for Canvas fillText() in Chrome?

I'm trying to create a decent cross-browser rendering engine of canvas text. I have noticed that kerning pairs don't render properly in Chrome, but in Safari and Firefox they work fine. Chrome: Firefox: Safari: Try the fiddle here:…
David Hellsing
  • 106,495
  • 44
  • 176
  • 212
6
votes
1 answer

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

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…
Confused
  • 6,048
  • 6
  • 34
  • 75
6
votes
3 answers

NSString padding / space between characters

I'm looking for an easy way in Obj.C to do add a space between each character of my string. So "1234" would come out looking like "1 2 3 4". I've found a perfect javascript example here: https://stackoverflow.com/a/7437422/949538 Does anyone know…
Drew
  • 1,422
  • 1
  • 18
  • 29
5
votes
1 answer

Qt kerning issue

In my application I'm using a QTextEdit to display some text, using HTML for formatting. The displayed document can be printed. And here's the issue: while on screen the kerning is correct, when printed the document has a very bad looking (mainly:…
gregseth
  • 12,952
  • 15
  • 63
  • 96
5
votes
3 answers

Kerning problems when drawing text character by character

I'm trying to draw strings character by character to add lighting effects to shapes composed of text. while (i != line.length()) { c = line.substring(i, i + 1); cWidth = g.getFontMetrics().stringWidth(c); g.drawString(c, xx += cWidth,…
pkinsky
  • 1,718
  • 2
  • 23
  • 28
5
votes
0 answers

Extracting Font 'kern' table information via fontforge and making it accessible offline for JavaScript

i had to calculate the horizontal width of a given text, using a given font including kerning information. The glyphs name and width as well as his kerning pairs information should be accessible by the unicode value of the texts characters like…
Richard Gantz
  • 321
  • 1
  • 8
5
votes
3 answers

Continue kerning at tag boundaries

I've got an application that uses the tag to interactively highlight text. As the user drags the mouse, it wraps and unwraps the text nodes in the document to show the user the selection. When the selected range ends in the middle of a word,…
scottb
  • 1,135
  • 11
  • 17
5
votes
1 answer

Unable to enable letter spacing (kerning) on UITabBarItem

I am trying to enable Text Kerning (increase Letter spacing) on UITabBarItem title labels. But providing the NSKernAttributeName attribute for the UITabBarItem does not make any difference. The other two attributes, however, are working:…
5
votes
2 answers

Letter Spacing in EditText for Android

I am trying to have a custom EditText based on the background that i am using for. The Background image has some spaces between the entry areas so i need to have some space between the characters(kerning) to fit them right in. So for example after…
koraxis
  • 801
  • 2
  • 12
  • 22
5
votes
1 answer

How is kerning encoded on embedded Adobe Type 1 fonts in PDF files?

Adobe PDF reference talks about /Widths array and /FontFile stream, but Adobe Type 1 font programs (.pfb or .pfa files) don't include font metrics; they are included in font metric files (.afm or .pfm files) but these are not embedded in PDF…
1
2
3
9 10