public class CFontProvider
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
long |
fontProviderPtr |
| Constructor and Description |
|---|
CFontProvider() |
CFontProvider(java.lang.String defaultFontFamily) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addDirectory(java.lang.String dir)
Add all fonts from a directory
|
boolean |
addFont(byte[] fontData)
Add a font from raw font data
|
boolean |
addFont(byte[] fontData,
java.lang.String encoding)
Add a font from raw font data
|
boolean |
addFont(java.lang.String fontPath)
Add a font from a file path
|
boolean |
addFont(java.lang.String fontPath,
java.lang.String encoding)
Add a font from a file path
|
int |
addSystemFonts()
Add system fonts.
|
void |
clear()
Clear all loaded fonts
|
int |
getFontCount()
Get the number of fonts currently loaded
|
byte[] |
getFontData(int index)
Get font data by index
|
void |
release()
Release the CFontProvider object.
|
public CFontProvider()
public CFontProvider(java.lang.String defaultFontFamily)
public void release()
public boolean addFont(byte[] fontData)
fontData - Array containing the raw font data bytespublic boolean addFont(byte[] fontData,
java.lang.String encoding)
fontData - Array containing the raw font data bytesencoding - Font encodingpublic boolean addFont(java.lang.String fontPath)
fontPath - Path to the font filepublic boolean addFont(java.lang.String fontPath,
java.lang.String encoding)
fontPath - Path to the font fileencoding - Font encodingpublic boolean addDirectory(java.lang.String dir)
dir - Path to the directory containing font filespublic int getFontCount()
public byte[] getFontData(int index)
index - Index of the font (0-based)public void clear()
public int addSystemFonts()