FontKerning

From Inkscape Wiki
Jump to: navigation, search

Kerning pairs

from http://desktoppub.about.com/library/glossary/bldef-kerning.htm

Definition: Kerning is the adjustment of space between pairs of letters to make them more visually appealing. It is normally applied to individual letter pairs in headlines or other large type.

Examples: The default spacing between some characters leaves gaps that can be adjusted by kerning the two letters to achieve a more visually balanced appearance. Decreasing space is negative kerning. Some commonly kerned pairs include Wa, To, and Ya. Sometimes kerning involves increasing the space between characters or positive kerning to keep them from running together, such as the l's in "Godzilla."

http://desktoppub.about.com/library/graphics/a-kerning.gif

Letterspacing

Letterspacing refers to the uniform spacing between all characters in the string, not specific pairs. We need both letterspacing and kerning pairs. When we link up with Pango, we'll probably get the kerning pairs stored in the font, but manual kerning of pairs (via the dx attribute) as well as letterspacing adjustments (via the letter-spacing CSS property) still need to be implemented in the text tool.

I want the write_transform method of SPText to have three modes, selectable (via top panel) for each object:

  • Mode 0 (same as now): add transform=, do not touch anything inside the object
  • Mode 1 (default): uniform scaling is propagated into a font size change, non-uniform scaling is divided into a font size change plus some transform=
  • Mode 2: uniform scaling is propagated into a font size change, non-uniform scaling is divided into a font size change and letterspacing change (i.e. "aa" scaled horizontally becomes "a a" but the aspect of letters is not changed), no transform= ever