The Perfect Fit
Chapter 11 looks at the textLength
attribute and font-size-adjust
property, which can be used to standardize text layout when you don’t have full control over the fonts used; the chapter also describes decorative uses for textLength
.
The links below will open the live example files or high-res PNG or JPEG screenshots in a new browser tab. Alternatively, you can download the entire collection as a zip archive or fork it as a GitHub repository. Be sure to read the O’Reilly Media policy on the use of example code.
- Figure 11-1 (comparing web fonts versus a fallback font):
- screenshot collage
- See also the original files in Chapter 11
- Example 11-1 & Figure 11-2 (using
textLength
andfont-size-adjust
to constrain layout when using fallback fonts): - Example 11-2 & Figure 11-3 (using
textLength
andlengthAdjust
for graphical effect):
Return to the main table of contents.