Package com.dua3.utility.text
Enum Class StandardFontMapper
- All Implemented Interfaces:
Serializable
,Comparable<StandardFontMapper>
,Constable
,Function<@Nullable String,
@Nullable String>
public enum StandardFontMapper
extends Enum<StandardFontMapper>
implements Function<@Nullable String,@Nullable String>
Enum class with entries for standard font mappers. This class implements the
Function interface to provide a mapping from one font family name to another.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDo not map the font family name.Remove subset prefixes from partially embedded fonts invPDF-files.Remove subset prefixes from font names, then map known font name aliases to the corresponding standard font.Map known font name aliases to the corresponding standard font. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
static StandardFontMapper
Returns the enum constant of this class with the specified name.static StandardFontMapper[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDENTITY
Do not map the font family name. -
IGNORE_SUBSETS
Remove subset prefixes from partially embedded fonts invPDF-files.Example usage:
String input = "ABCDEF+Arial"; String result = IGNORE_SUBSETS.apply(input); System.out.println(result); // Output: "Arial"
-
KNOWN_ALIASES
Map known font name aliases to the corresponding standard font.Example usage:
String fontAlias = "ArialMT"; String fontName = KNOWN_ALIASES.apply(fontAlias); System.out.println(fontName); // Output: Arial
-
IGNORE_SUBSETS_AND_KNOWN_ALIASES
Remove subset prefixes from font names, then map known font name aliases to the corresponding standard font.Example usage:
String fontAlias = "ABCDEF+ArialMT"; String fontName = KNOWN_ALIASES.apply(fontAlias); System.out.println(fontName); // Output: Arial
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
apply
-