SourceForge.net Logo
aXSL API 0.2

org.axsl.fo.fo.prop
Interface CommonFontPa

All Known Subinterfaces:
BidiOverride, Block, CharacterSequence, InitialPropertySet, Inline, Leader, PageNumber, PageNumberCitation, PageNumberCitationLast, ScalingValueCitation, Title

public interface CommonFontPa

The XSL-FO Common Font properties.

Note that the methods for the font-family, font-selection-strategy, font-style, font-weight, font-stretch, and font-variant properties have been moved to CommonFontExcludedPa. They are not included in this client-facing interface, being replaced by the getPrimaryFont(FoContext) and getSecondaryFont(FoContext, int) methods, which return resolved font objects instead of the properties used to select them.

Note also that font-size and font-size-adjust are moved to CommonFontExcludedPa, being needed only as factors in computing the actual font-size in traitFontSizeActual(FoContext, Font).

See Also:
"XSL-FO 1.1, Section 7.9."

Method Summary
 FontUse getPrimaryFont(FoContext context)
          Provides a resolved font to be used as the primary font for this object.
 FontUse getSecondaryFont(FoContext context, int codePoint)
          Provides a resolved font that can be used as the secondary font for a specific character in this object.
 int traitFontSizeActual(FoContext context, Font font)
          Returns the "actual" value for font-size, as distinguished from the "computed" value.
 

Method Detail

traitFontSizeActual

int traitFontSizeActual(FoContext context,
                        Font font)
Returns the "actual" value for font-size, as distinguished from the "computed" value. The difference between these two values is specified by the "font-size-adjust" property.

Parameters:
context - An object that knows how to resolve FO Tree context issues.
font - The "available font", as defined in XSL-FO 1.1, Section 7.9.6, that is, the font actually used. This must be passed to this method because both the font-size and font-size-adjust properties are inherited, and apply to the fo:character object. Since the selected font can change from one character to the next, when it does, the actual font-size can change also.
Returns:
The actual font-size to be used, in millipoints.

getPrimaryFont

FontUse getPrimaryFont(FoContext context)
Provides a resolved font to be used as the primary font for this object. Specifically, the font is selected as the best font for the first fo:character found in the object.

Parameters:
context - An object that knows how to resolve FO Tree context issues.
Returns:
The primary resolved FontUse instance for this object.

getSecondaryFont

FontUse getSecondaryFont(FoContext context,
                         int codePoint)
Provides a resolved font that can be used as the secondary font for a specific character in this object.

Parameters:
context - An object that knows how to resolve FO Tree context issues.
codePoint - The character for whom a secondary font should be found. This char is really the content of an fo:character object, and presumably has no glyph in the font returned by getPrimaryFont(FoContext).
Returns:
The best secondary FontUse instance that has a glyph for codePoint.

SourceForge.net Logo
aXSL API 0.2

This documentation was created August 8 2007 by The aXSL Group and may be freely copied. See license for details.