Chapter 8. Styling at the Character Level

XSL-FO provides a number of features aimed at formatting text and dealing with characters, which provide fine-grained control over presentation. You can manage content on a character-by-character basis, or you can apply properties to larger chunks of text.

In this chapter, I discuss the options available for formatting at the character level and when you should use this level of formatting. I also introduce font usage.

Warning

Be aware that, as formatters are introduced, the available fonts are not likely to match those available for desktop publishing packages or word processors. Most packages allow you to add fonts, either purchased or downloaded. See the vendor literature for instructions on adding new fonts and for the list of included fonts.

General Character Properties

In many cases, what can be done at the character level could also be done at the inline level. This gives the stylesheet designer the choice of using either one. In some cases, the choice will be very clear. If you need to style only a single character, it makes sense to use the fo:character element. If it’s necessary to style a block of text that is all inline, use the fo:inline element. Many of the characteristics available at the inline level are equally applicable at the character level, so the number of them to remember doesn’t increase dramatically! The only properties unique to fo:character are treat-as-word-space, character, glyph-orientation-horizontal, glyph-orientation-vertical ...

Get XSL-FO now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.