XSL Support

XSL Properties Mapped to PangoAttribute Types

The following XSL properties can be mapped to corresponding Pango attributes:

XSL Property Property Description PangoAttribute Type
font-family Font family name family
font-size Size of the font when set solid size
font-weight Weight of the font weight
font-style Requests faces within a font family style
font-stretch Selects a normal, condensed, or extended face from a font family stretch
font-variant Selects a small-caps font for a bicameral script variant
baseline-shift Allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent area rise
color Describes the foreground color of an element's text content foreground
background-color Sets the background color of an element background
content-height, content-width Specifies the content-height and content-width of some object shape

XSL Properties Mapped to New PangoAttribute Types

The PangoPDF library adds PangoAttribute types to the PDF backend for the following XSL properties:

  • keep-together.within-line – Imposes keep-together conditions within a line.

  • keep-with-next.within-line – Imposes keep-with-next conditions within a line.

  • keep-with-previous.within-line – Imposes keep-with-previous conditions within a line.

  • line-height – Sets the half-leading trait that determines the space between adjacent lines.

  • line-stacking-strategy – Selects the strategy for positioning adjacent lines relative to each other.

Other New PangoAttribute Types

The following PangoAttribute types that do not directly map to XSL properties have also been added to the PDF backend:

Pango Attribute Description
callback Added to support the external-graphic formatting object