public class PhysicalFonts extends Object
Modifier and Type | Field and Description |
---|---|
protected static FontCache |
fontCache |
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
PhysicalFonts() |
Modifier and Type | Method and Description |
---|---|
static void |
addPhysicalFont(URL fontUrl)
Add a physical font's EmbedFontInfo object.
|
static void |
addPhysicalFonts(String nameAsInFontTablePart,
URL fontUrl)
Add a physical font's EmbedFontInfo object.
|
static void |
discoverPhysicalFonts()
Autodetect fonts available on the system.
|
static PhysicalFont |
get(String key)
Get a PhysicalFont
by case-insensitive name.
|
static PhysicalFont |
getBoldForm(PhysicalFont pf) |
static PhysicalFont |
getBoldItalicForm(PhysicalFont pf) |
static PhysicalFont |
getItalicForm(PhysicalFont pf) |
static String |
getPhysicalFont(OpcPackage wmlPackage,
String fontName) |
static List<PhysicalFont> |
getPhysicalFont(String nameAsInFontTablePart,
URL fontUrl)
Get a physical font's EmbedFontInfo object.
|
static Map<String,PhysicalFont> |
getPhysicalFonts()
Deprecated.
|
static String |
getRegex() |
static void |
main(String[] args) |
static void |
put(String key,
PhysicalFont pf)
Put a PhysicalFont
by case-insensitive name.
|
static void |
setRegex(String regex)
Set a regex to limit to the common fonts in order to lower memory use.
|
protected static org.slf4j.Logger log
protected static FontCache fontCache
@Deprecated public static Map<String,PhysicalFont> getPhysicalFonts()
public static PhysicalFont get(String key)
key
- public static void put(String key, PhysicalFont pf)
key
- pf
- public static String getRegex()
public static void setRegex(String regex)
public static final void discoverPhysicalFonts() throws Exception
Exception
public static void addPhysicalFont(URL fontUrl)
fontUrl
- eg new java.net.URL("file:" + path)public static void addPhysicalFonts(String nameAsInFontTablePart, URL fontUrl)
fontUrl
- eg new java.net.URL("file:" + path)public static List<PhysicalFont> getPhysicalFont(String nameAsInFontTablePart, URL fontUrl)
fontUrl
- eg new java.net.URL("file:" + path)public static PhysicalFont getBoldForm(PhysicalFont pf)
public static PhysicalFont getBoldItalicForm(PhysicalFont pf)
public static PhysicalFont getItalicForm(PhysicalFont pf)
public static String getPhysicalFont(OpcPackage wmlPackage, String fontName)
Copyright © 2007-2019. All Rights Reserved.