|
aXSL API 0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axsl.fontR.FontUtility
Class containing font-related utility methods.
References to CSS2 are to the Cascading Style Sheet standard, version 2.0, found at:
http://www.w3.org/TR/REC-CSS2/
References to XSL-FO refer to the eXtensible Stylesheet Language Formatting Objects standard, version 1.0, found at:
http://www.w3.org/TR/2001/REC-xsl-20011015/
Field Summary | |
static java.lang.String |
INPUT_BACKSLANT
String value for input "backslant". |
static java.lang.String |
INPUT_CONDENSED
String value for input "condensed". |
static java.lang.String |
INPUT_EXPANDED
String value for input "expanded". |
static java.lang.String |
INPUT_EXTRA_CONDENSED
String value for input "extra-condensed". |
static java.lang.String |
INPUT_EXTRA_EXPANDED
String value for input "extra-expanded". |
static java.lang.String |
INPUT_INVALID
String value for invalid input. |
static java.lang.String |
INPUT_ITALIC
String value for input "italic". |
static java.lang.String |
INPUT_NORMAL
String value for input "normal". |
static java.lang.String |
INPUT_OBLIQUE
String value for input "oblique". |
static java.lang.String |
INPUT_SEMI_CONDENSED
String value for input "semi-condensed". |
static java.lang.String |
INPUT_SEMI_EXPANDED
String value for input "semi-expanded". |
static java.lang.String |
INPUT_SMALL_CAPS
String value for input "small-caps". |
static java.lang.String |
INPUT_ULTRA_CONDENSED
String value for input "ultra-condensed". |
static java.lang.String |
INPUT_ULTRA_EXPANDED
String value for input "ultra-expanded". |
Method Summary | |
static java.lang.String[] |
cssFontFamily(java.lang.String input)
Converts a CSS2-style String input for font-family into a value expected by FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int) . |
static byte |
cssFontStretch(java.lang.String input,
boolean lowerCaseOnly)
Converts a CSS2-style String input for font-stretch into a value expected by FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int) . |
static byte |
cssFontStyle(java.lang.String input,
boolean lowerCaseOnly)
Converts a CSS2-style String input for font-style into a value expected by FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int) . |
static byte |
cssFontVariant(java.lang.String input,
boolean lowerCaseOnly)
Converts a CSS2-style String input for font-variant into a value expected by FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int) . |
static short |
cssFontWeight(java.lang.String input,
boolean lowerCaseOnly)
Converts a CSS2-style String input for font-weight into a value expected by FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int) . |
static java.lang.String[] |
foFontFamily(java.lang.String input)
Same as cssFontFamily(String) , except input is an
XSL-FO-style String. |
static byte |
foFontSelectionStrategy(java.lang.String input,
boolean lowerCaseOnly)
Converts XSL-FO String input for font-selection-strategy into a value expected by FontConsumer.selectFontXSL(int, String[], int, int,
int, int, int, int) . |
static byte |
foFontStretch(java.lang.String input,
boolean lowerCaseOnly)
Same as cssFontStretch(String, boolean) , except input is an
XSL-FO-style String. |
static byte |
foFontStyle(java.lang.String input,
boolean lowerCaseOnly)
Same as cssFontStyle(String, boolean) , except input is an
XSL-FO-style String. |
static byte |
foFontVariant(java.lang.String input,
boolean lowerCaseOnly)
Same as cssFontVariant(String, boolean) , except input is an
XSL-FO-style String. |
static short |
foFontWeight(java.lang.String input,
boolean lowerCaseOnly)
Same as cssFontWeight(String, boolean) , except input is an
XSL-FO-style String. |
static java.lang.String |
fontStretchName(int fontStretch)
Returns a String description for a numeric font-weight value, suitable for using in user messages. |
static java.lang.String |
fontStyleName(int fontStyle)
Returns a String description for a numeric font-style value, suitable for using in user messages. |
static java.lang.String |
fontVariantName(int fontVariant)
Returns a String description for a numeric font-weight value, suitable for using in user messages. |
static java.lang.String |
fontWeightName(int fontWeight)
Returns a String description for a numeric font-weight value, suitable for using in user messages. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String INPUT_INVALID
public static final java.lang.String INPUT_NORMAL
public static final java.lang.String INPUT_ITALIC
public static final java.lang.String INPUT_OBLIQUE
public static final java.lang.String INPUT_BACKSLANT
public static final java.lang.String INPUT_SMALL_CAPS
public static final java.lang.String INPUT_ULTRA_CONDENSED
public static final java.lang.String INPUT_EXTRA_CONDENSED
public static final java.lang.String INPUT_CONDENSED
public static final java.lang.String INPUT_SEMI_CONDENSED
public static final java.lang.String INPUT_SEMI_EXPANDED
public static final java.lang.String INPUT_EXPANDED
public static final java.lang.String INPUT_EXTRA_EXPANDED
public static final java.lang.String INPUT_ULTRA_EXPANDED
Method Detail |
public static byte foFontSelectionStrategy(java.lang.String input, boolean lowerCaseOnly)
FontConsumer.selectFontXSL(int, String[], int, int,
int, int, int, int)
.
input
- The XSL-FO-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
Font.FONT_SELECTION_CBC
or
Font.FONT_SELECTION_AUTO
.
For invalid input, -1.public static byte cssFontStyle(java.lang.String input, boolean lowerCaseOnly)
FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int)
.
input
- The CSS2-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether CSS is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_STYLE_NORMAL
,
Font.FONT_STYLE_ITALIC
, Font.FONT_STYLE_OBLIQUE
,
or Font.FONT_STYLE_BACKSLANT
.
For invalid input, -1.FontConsumer.selectFontCSS(String[], int, int, int, int, int, int)
public static byte foFontStyle(java.lang.String input, boolean lowerCaseOnly)
cssFontStyle(String, boolean)
, except input is an
XSL-FO-style String.
input
- The XSL-FO-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether XSL-FO is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_STYLE_NORMAL
,
Font.FONT_STYLE_ITALIC
, Font.FONT_STYLE_OBLIQUE
,
or Font.FONT_STYLE_BACKSLANT
.
For invalid input, -1.cssFontStyle(String, boolean)
public static short cssFontWeight(java.lang.String input, boolean lowerCaseOnly)
FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int)
.
input
- The CSS2-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether CSS is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_WEIGHT_100
, Font.FONT_WEIGHT_200
,
Font.FONT_WEIGHT_300
, Font.FONT_WEIGHT_400
,
Font.FONT_WEIGHT_500
, Font.FONT_WEIGHT_600
,
Font.FONT_WEIGHT_700
, Font.FONT_WEIGHT_800
,
Font.FONT_WEIGHT_900
, Font.FONT_WEIGHT_NORMAL
,
and Font.FONT_WEIGHT_BOLD
.
For invalid input, -1.FontConsumer.selectFontCSS(String[], int, int, int, int, int, int)
public static short foFontWeight(java.lang.String input, boolean lowerCaseOnly)
cssFontWeight(String, boolean)
, except input is an
XSL-FO-style String.
input
- The XSL-FO-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether XSL-FO is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_WEIGHT_100
, Font.FONT_WEIGHT_200
,
Font.FONT_WEIGHT_300
, Font.FONT_WEIGHT_400
,
Font.FONT_WEIGHT_500
, Font.FONT_WEIGHT_600
,
Font.FONT_WEIGHT_700
, Font.FONT_WEIGHT_800
,
Font.FONT_WEIGHT_900
, Font.FONT_WEIGHT_NORMAL
,
and Font.FONT_WEIGHT_BOLD
.
For invalid input, -1.cssFontWeight(String, boolean)
public static byte cssFontVariant(java.lang.String input, boolean lowerCaseOnly)
FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int)
.
input
- The CSS2-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether CSS is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_VARIANT_NORMAL
or
Font.FONT_VARIANT_SMALL_CAPS
.
For invalid input, -1.FontConsumer.selectFontCSS(String[], int, int, int, int, int, int)
public static byte foFontVariant(java.lang.String input, boolean lowerCaseOnly)
cssFontVariant(String, boolean)
, except input is an
XSL-FO-style String.
input
- The XSL-FO-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether XSL-FO is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_VARIANT_NORMAL
or
Font.FONT_VARIANT_SMALL_CAPS
.
For invalid input, -1.cssFontVariant(String, boolean)
public static byte cssFontStretch(java.lang.String input, boolean lowerCaseOnly)
FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int)
.
input
- The CSS2-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether CSS is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_STRETCH_ULTRA_CONDENSED
,
Font.FONT_STRETCH_EXTRA_CONDENSED
,
Font.FONT_STRETCH_CONDENSED
,
Font.FONT_STRETCH_SEMI_CONDENSED
,
Font.FONT_STRETCH_NORMAL
,
Font.FONT_STRETCH_SEMI_EXPANDED
,
Font.FONT_STRETCH_EXPANDED
,
Font.FONT_STRETCH_EXTRA_EXPANDED
,
Font.FONT_STRETCH_ULTRA_EXPANDED
.
For invalid input, -1.FontConsumer.selectFontCSS(String[], int, int, int, int, int, int)
public static byte foFontStretch(java.lang.String input, boolean lowerCaseOnly)
cssFontStretch(String, boolean)
, except input is an
XSL-FO-style String.
input
- The XSL-FO-style String to be converted.lowerCaseOnly
- Set to true to insist that all input values be
lowercase.
There is some ambiguity about whether XSL-FO is case-sensitive or not. If
it is, all input should be lower case.
Font.FONT_STRETCH_ULTRA_CONDENSED
,
Font.FONT_STRETCH_EXTRA_CONDENSED
,
Font.FONT_STRETCH_CONDENSED
,
Font.FONT_STRETCH_SEMI_CONDENSED
,
Font.FONT_STRETCH_NORMAL
,
Font.FONT_STRETCH_SEMI_EXPANDED
,
Font.FONT_STRETCH_EXPANDED
,
Font.FONT_STRETCH_EXTRA_EXPANDED
,
Font.FONT_STRETCH_ULTRA_EXPANDED
.
For invalid input, -1.cssFontStretch(String, boolean)
public static java.lang.String[] cssFontFamily(java.lang.String input)
FontConsumer.selectFontCSS(String[], int, int, int, int, int,
int)
.
input
- The CSS2-style font-family String to be converted.
This is a comma-delimited String containing one or more potential
font-family items to be selected. Consult the CSS2 standard for
details.
FontConsumer.selectFontCSS(String[], int, int, int, int, int, int)
public static java.lang.String[] foFontFamily(java.lang.String input)
cssFontFamily(String)
, except input is an
XSL-FO-style String.
input
- The XSL-FO font-family String to be converted.
This is a comma-delimited String containing one or more potential
font-family items to be selected. Consult the XSL-FO standard for
details.
cssFontFamily(String)
public static java.lang.String fontStyleName(int fontStyle)
fontStyle
- One of Font.FONT_STYLE_NORMAL
,
Font.FONT_STYLE_ITALIC
, Font.FONT_STYLE_OBLIQUE
,
or Font.FONT_STYLE_BACKSLANT
.
public static java.lang.String fontWeightName(int fontWeight)
fontWeight
- One of
Font.FONT_WEIGHT_100
,
Font.FONT_WEIGHT_200
,
Font.FONT_WEIGHT_300
,
Font.FONT_WEIGHT_400
,
Font.FONT_WEIGHT_500
,
Font.FONT_WEIGHT_600
,
Font.FONT_WEIGHT_700
,
Font.FONT_WEIGHT_800
, or
Font.FONT_WEIGHT_900
.
public static java.lang.String fontVariantName(int fontVariant)
fontVariant
- One of Font.FONT_VARIANT_NORMAL
or
Font.FONT_VARIANT_SMALL_CAPS
.
public static java.lang.String fontStretchName(int fontStretch)
fontStretch
- One of
Font.FONT_STRETCH_ULTRA_CONDENSED
,
Font.FONT_STRETCH_EXTRA_CONDENSED
,
Font.FONT_STRETCH_CONDENSED
,
Font.FONT_STRETCH_SEMI_CONDENSED
,
Font.FONT_STRETCH_NORMAL
,
Font.FONT_STRETCH_SEMI_EXPANDED
,
Font.FONT_STRETCH_EXPANDED
,
Font.FONT_STRETCH_EXTRA_EXPANDED
, or
Font.FONT_STRETCH_ULTRA_EXPANDED
.
|
aXSL API 0.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation was created September 6 2006 by The aXSL Group and may be freely copied. See license for details.