HTML and CSS Reference
In-Depth Information
Now let's add a font-size-adjust property:
p {
font-size: 32px;
padding: 0.5em;
font-family: "Yanone Kaffeesatz", sans-serif;
Again, everything is fine if the
font is available.
But this time, if the font isn't
available, the fallback font takes
up a similar height.
Note that font-size-adjust only impacts the x-height—the width is still
different. The property's main advantage is that it preserves the verti-
cal rhythm of your blocks of text.
Advanced font control
This section looks at some of the
advanced features offered by mod-
ern fonts and how they can be con-
trolled from CSS . We'll start with
ligatures : the replacement of
sequences of separate characters
with a single, joined glyph (the typo-
graphical term for the elements of a
font) and then explore some fea-
tures available for numbers before
finishing with fancy text options
known as contextual swashes .
(Win/Linux only)
All of these features are attributes of the font being used.
CSS doesn't create additional glyphs—they have to be present
in the font—but it lets you control when they're used.
Search WWH ::

Custom Search