Sub topic 13
OpenType and variable font features
This chapter covers the OpenType and variable font controls in Photoshop. It assumes you can create type layers, use the Character panel to set font, size and tracking, and open the Properties panel. It also assumes you know what glyphs and font families are.
What OpenType adds to a font
OpenType is a font format that can hold thousands of glyphs (the individual character shapes) in one file. It also stores rules for choosing between them. The rules are called features. A feature might replace "fi" with a single joined shape (a ligature) or swap lining numerals for old-style numerals.
Photoshop applies features to the selected characters. Features you turn on are stored in the type layer, so the text stays editable. If you share the file, the recipient needs the same font. Otherwise Photoshop substitutes a font and the features may disappear.
A font only offers the features its designer built in. A control that is greyed out means the current font does not support that feature.
Where the controls are
There are two places to work.
- Character panel, OpenType buttons. Open Window > Character. The row of icons near the bottom holds toggles for common features. Hover over an icon to see its name.
- Properties panel. With a type layer selected, open Window > Properties. The Character section has an OpenType area with the same toggles. Some versions also show a glyph search, a Glyphs panel link, and sliders for variable fonts.
The Glyphs panel (Type > Panels > Glyphs Panel) lists every glyph in the current font. Use it for alternates, symbols and accented forms that no toggle reaches.
Common features
The toggles you will use most are listed below. Each works on the current selection. If no text is selected, it applies to the text you type next.
| Feature | What it does | Typical use |
|---|---|---|
| Standard Ligatures | Joins pairs such as fi, fl, ff | Body text and headlines |
| Discretionary Ligatures | Adds decorative joins such as ct or st | Display type, logos |
| Contextual Alternates | Swaps letter shapes depending on neighbors | Script fonts that should connect |
| Stylistic Alternates | Replaces letters with alternate designs | Branding, titles |
| Titling Alternates | Uses shapes drawn for large sizes | Posters and headings |
| Ordinals | Sets raised letters, as in 1st or 2nd | Dates, lists |
| Fractions | Builds true fractions from 1/2 | Recipes, specs |
| Swash | Adds decorative extended strokes | Initials and display text |
| Oldstyle figures | Numerals with varied heights | Running text in books |
Numerals also come in lining and tabular forms. Lining figures are all cap height. Tabular figures have equal widths so columns of numbers line up. Proportional figures vary in width and look more even in a sentence. Choose tabular for tables and prices, and proportional for prose.
Ligatures and when to turn them off
Standard ligatures are normally on by default. They improve fit between letters that would otherwise collide. Turn them off in two cases. One is when the tracking is very loose, because a joined "fi" then looks odd beside spaced letters. The other is when you are matching text from a system that does not use ligatures.
Do not mix. If you add letterspacing to a selection, the app disables ligatures for that selection in many layouts. Check the result at 100% zoom.
Worked example: a price list
Suppose you have a menu with prices and a fraction.
- Create a paragraph text layer with the lines
Soup 4.50,Salad 12.00andHalf portion 1/2. - Choose a font with OpenType features, such as Source Serif or Adobe Garamond Pro.
- Select the numbers. In the OpenType controls, choose Tabular Lining figures so the decimal points align when the lines use a right tab.
- Select
1/2and click Fractions. It becomes a single fraction glyph. - Select a title word like "Specials" and turn on Discretionary Ligatures or a Stylistic Alternate to compare. Undo if it looks cluttered.
Check that the figures still align after you change the font size. Tabular widths scale with the type, but the columns stay aligned as long as the whole column uses one size.
Variable fonts
A variable font stores a whole family in one file. Instead of separate Regular, Bold and Condensed files, it defines axes. An axis is a continuous range along one design property. Moving along the axis smoothly changes the glyph shapes.
Common axes:
| Axis | Tag | Controls |
|---|---|---|
| Weight | wght | Thin to Black |
| Width | wdth | Condensed to Expanded |
| Slant | slnt | Angle of the letters |
| Italic | ital | Switch between upright and italic designs |
| Optical size | opsz | Details tuned to the point size |
Each font defines its own axes. Many have only weight. Photoshop shows variable fonts in the font menu with a variable icon. Select a type layer, choose the font, then open the Properties panel to see sliders for its axes. The Character panel's style menu also lists named instances, which are preset positions on the axes such as "Bold".
Moving a slider changes the glyph outlines continuously. You can set a weight such as 540 that no static file contains.
Optical size
The opsz axis changes detail with size. At small sizes the letters become wider, with heavier thin strokes and looser spacing. At display sizes they become finer and tighter. Photoshop may set this automatically when the font supports it. If the text looks too light at 10 pt, check whether the axis is fixed at a display value.
Choosing variable or static fonts
| Situation | Better choice |
|---|---|
| You need precise intermediate weights or widths | Variable |
| You want a single file for a whole family | Variable |
| The file goes to a printer or another team with unknown software | Static, or outline the text |
| You need to match a brand font that is only supplied as static files | Static |
Variable fonts can also differ between Photoshop versions and between operating systems. If you open a document on a machine with an older version, the axis settings may be ignored or snapped to the nearest named instance. Test on the target machine before delivering.
Common errors
- Buttons are greyed out. The font has no such feature, or the selection mixes fonts. Select one font run.
- Feature seems to do nothing. The text may not contain the pattern. Fractions need a form like
1/2, and ligatures need pairs such as "fi". - Layout changes after a font swap. A different font has different features and widths. Re-check line breaks and numeral alignment.
- Variable weight differs on another machine. The recipient lacks the font or uses an app that handles axes differently. Embed or outline for final output.
- Text looks different after rasterizing. Rasterizing freezes the current look. Set features first.
Checking features with a script
You can read a layer's font and size from ExtendScript. The script below lists what the active text layer is using, so you can confirm the font before you share the file.
// ExtendScript: report the font and size of the active type layer
var layer = app.activeDocument.activeLayer;
if (layer.kind == LayerKind.TEXT) {
var item = layer.textItem;
alert("Font: " + item.font + "\nSize: " + item.size);
} else {
alert("The active layer is not a type layer.");
}Here item.font returns the PostScript name of the font. Many OpenType toggles and variable font axes are not exposed through the standard textItem properties. For those, use the interface, or work through Action Manager code, which is a lower-level interface.
Exercise
A catalogue uses a column of prices such as 9.99, 10.50 and 125.00 in a proportional font. The decimal points do not line up. What OpenType setting would you apply, and why?
Show answer
Apply Tabular Lining figures to the numbers. Tabular figures all have the same width, so digits stack in columns and the decimal points align. Proportional figures vary in width, which causes the misalignment.
Exercise
You set a variable font to weight 540 and send the PSD to a colleague. What can go wrong, and how can you reduce the risk?
Show answer
The colleague may lack the font, or may use a version that ignores axis values and snaps to a named instance, so the weight changes. Share the font file where licensing allows, test on the target machine, or convert a duplicate of the text to shapes for the final output.