org.foray.font
Class FontSelectorCBC
java.lang.Object
org.foray.font.FontSelector
org.foray.font.FontSelectorCBC
public class FontSelectorCBC
- extends FontSelector
The standard character-by-character font selector.
XSL-FO 1.0, Section 7.8.3, described the character-by-character strategy as
being "the same as the strategy used to select fonts in CSS."
Therefore, the CSS documentation should be consulted.
The algorithm for font selection is described in the CSS 2 standard at
Section 15.5.
Even though there are now versions of CSS past version 2, we still use CSS 2.
CSS 2.1 removed the font-stretch property, but XSL-FO 1.1 requires it, so,
until given more clear guidance, we use the 2.0 algorithm.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FontSelectorCBC
public FontSelectorCBC(FontConsumer4a consumer)
- Constructor.
- Parameters:
consumer
- The font consumer for whom this selector is being
created.
selectFont
public RegisteredFontDesc selectFont(List<String> familyList,
org.axsl.font.Font.Style style,
org.axsl.font.Font.Weight weight,
org.axsl.font.Font.Variant variant,
org.axsl.font.Font.Stretch stretch,
int size,
int codePoint)
throws org.axsl.font.FontException
- Description copied from class:
FontSelector
- Selectes a font.
- Specified by:
selectFont
in class FontSelector
- Parameters:
familyList
- The list of families that are eligible for selection.style
- The font style (normal, italic, etc.).weight
- The font weight (100, 200, normal, bold, etc.).variant
- The font variant (normal, small-caps).stretch
- The font stretch (normal, condensed, etc.).size
- The font size, in millipoints. This is used only for
bitmapped fonts.codePoint
- The Unicode code point which must be encodable by the
selected font.
- Returns:
- The best registered font description matching the selection
criteria.
- Throws:
org.axsl.font.FontException
- For invalid input.
getFontServer
public FontServer4a getFontServer()
- Returns the font server.
- Returns:
- The font server.
Copyright © 2017. All rights reserved.