Converting Tracking and Leading from Photoshop to CSS
by Paul MooneyFriday, February 22nd, 2008
In reviewing the style guide for a client, we realized that Photoshop and CSS use different units for controlling the tracking and leading for text. So, how do you make sure that the typography on the site that’s built matches the designer’s intent as closely as possible? You could tinker with a simple HTML file and play with the CSS styles until they match the PSDs, but that could be tedious.
Fortunately, Doctor Hogue did a bit of research and found some simple conversion formulas. Thanks Dave! We’re posting the information here for reference for anyone who may need it.
TRACKING & KERNING
“Tracking and kerning are both measured in 1/1000 em, a unit of measure that is relative to the current type size. In a 6-point font, 1 em equals 6 points; in a 10-point font, 1 em equals 10 points. Kerning and tracking are strictly proportional to the current type size.”
Source: Adobe LiveDocs
———————————————————————————
Tracking Conversion CSS “letter-spacing”
———————————————————————————
1 =1/1000 em
100 =100/1000 em =0.10 em
200 =200/1000 em =0.20 em
———————————————————————————
LEADING
“The vertical space between lines of type is called leading. Leading is measured from the baseline of one line of text to the baseline of the line above it. Baseline is the invisible line on which most letters sit—that is, those without descenders.
“The default auto-leading option sets the leading at 120% of the type size (for example, 12‑point leading for 10‑point type). When auto-leading is in use, InDesign displays the leading value in parentheses in the Leading menu of the Character panel.”
Source: Adobe LiveDocs