Enum FontGroup
- java.lang.Object
-
- java.lang.Enum<FontGroup>
-
- org.apache.poi.common.usermodel.fonts.FontGroup
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FontGroup>
public enum FontGroup extends java.lang.Enum<FontGroup>
Text runs can contain characters which will be handled (if configured) by a different font, because the default font (latin) doesn't contain corresponding glyphs.- Since:
- POI 3.17-beta2
- See Also:
- Office Open XML Themes, Schemes, and Fonts
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FontGroup.FontGroupRange
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPLEX_SCRIPT
type for complex scripts - see https://msdn.microsoft.com/en-us/library/windows/desktop/dd317698EAST_ASIAN
type for east asian charsets - usually set as fallback for the latin font, e.g.LATIN
type for latin charset (default) - also used for unicode fonts like MS Arial UnicodeSYMBOL
type for symbol fonts
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FontGroup
getFontGroupFirst(java.lang.String runText)
static java.util.List<FontGroup.FontGroupRange>
getFontGroupRanges(java.lang.String runText)
Try to guess the font group based on the codepointstatic FontGroup
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FontGroup[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LATIN
public static final FontGroup LATIN
type for latin charset (default) - also used for unicode fonts like MS Arial Unicode
-
EAST_ASIAN
public static final FontGroup EAST_ASIAN
type for east asian charsets - usually set as fallback for the latin font, e.g. something like MS Gothic or MS Mincho
-
SYMBOL
public static final FontGroup SYMBOL
type for symbol fonts
-
COMPLEX_SCRIPT
public static final FontGroup COMPLEX_SCRIPT
type for complex scripts - see https://msdn.microsoft.com/en-us/library/windows/desktop/dd317698
-
-
Method Detail
-
values
public static FontGroup[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FontGroup c : FontGroup.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FontGroup valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getFontGroupRanges
public static java.util.List<FontGroup.FontGroupRange> getFontGroupRanges(java.lang.String runText)
Try to guess the font group based on the codepoint- Parameters:
runText
- the text which font groups are to be analyzed- Returns:
- the FontGroup
-
getFontGroupFirst
public static FontGroup getFontGroupFirst(java.lang.String runText)
-
-