public abstract class PrismFontFile extends java.lang.Object implements FontResource, FontConstants
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
PrismFontFile.DirectoryEntry |
(package private) static class |
PrismFontFile.FileDisposer |
| Modifier and Type | Field and Description |
|---|---|
(package private) char[] |
advanceWidths |
private float |
ascent |
(package private) java.util.HashMap<java.lang.Integer,int[]> |
bbCache |
private float |
descent |
(package private) int |
directoryCount |
(package private) static int[] |
EMPTY_BOUNDS |
static int |
FAMILY_NAME_ID |
(package private) java.lang.String |
familyName |
(package private) java.lang.String |
filename |
(package private) FontFileReader |
filereader |
(package private) int |
filesize |
(package private) int |
fontIndex |
private int |
fontInstallationType |
private static int |
fsSelectionBoldBit |
private static int |
fsSelectionItalicBit |
static int |
FULL_NAME_ID |
(package private) java.lang.String |
fullName |
(package private) short |
indexToLocFormat |
private boolean |
isBold |
(package private) boolean |
isCFF |
(package private) boolean |
isCopy |
(package private) boolean |
isDecoded |
(package private) boolean |
isEmbedded |
private boolean |
isItalic |
(package private) boolean |
isRegistered |
(package private) boolean |
isTracked |
private static java.util.Map<java.lang.String,java.lang.Short> |
lcidMap
BEGIN LOCALE_ID MAPPING
|
private float |
linegap |
(package private) java.lang.String |
localeFamilyName |
(package private) java.lang.String |
localeFullName |
(package private) java.lang.String |
localeStyleName |
static int |
MAC_PLATFORM_ID |
static int |
MACROMAN_ENGLISH_LANG |
static int |
MACROMAN_SPECIFIC_ID |
private static int |
MACSTYLE_BOLD_BIT |
private static int |
MACSTYLE_ITALIC_BIT |
private OpenTypeGlyphMapper |
mapper |
static short |
MS_ENGLISH_LOCALE_ID |
static int |
MS_PLATFORM_ID |
(package private) static short |
nameLocaleID |
(package private) int |
numGlyphs |
private int |
numHMetrics |
(package private) int |
numTables |
private java.lang.Object |
peer |
static int |
PS_NAME_ID |
(package private) java.lang.String |
psName |
(package private) java.util.Map<FontStrikeDesc,java.lang.ref.WeakReference<PrismFontStrike>> |
strikeMap |
static int |
STYLE_NAME_ID |
private float[] |
styleMetrics |
(package private) java.lang.String |
styleName |
(package private) PrismFontFile.DirectoryEntry[] |
tableDirectory |
private float |
upem |
AA_GREYSCALE, AA_LCD, AFRC, CLIG, CSWH, DLIG, FRAC, HLIG, KERN, LIGA, LIGATURES, NALT, RLIG, RUBY, SALT, SMCP, SS01, SS02, SS03, SS04, SS05, SS06, SS07, SWSH, ZEROcmapTag, DIRECTORYENTRYSIZE, DIRECTORYHEADERSIZE, headTag, hheaTag, hmtxTag, maxpTag, nameTag, os_2Tag, ottoTag, postTag, trueTag, ttcfTag, TTCHEADERSIZE, v1ttTag, WOFFDIRECTORYENTRYSIZE, WOFFHEADERSIZE, woffTag| Modifier | Constructor and Description |
|---|---|
protected |
PrismFontFile(java.lang.String name,
java.lang.String filename,
int fIndex,
boolean register,
boolean embedded,
boolean copy,
boolean tracked) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
addLCIDMapEntry(java.util.Map<java.lang.String,java.lang.Short> map,
java.lang.String key,
short value) |
private void |
checkCMAP() |
(package private) java.lang.ref.WeakReference<PrismFontFile> |
createFileDisposer(PrismFontFactory factory) |
protected abstract int[] |
createGlyphBoundingBox(int gc) |
private static void |
createLCIDMap() |
protected abstract PrismFontStrike |
createStrike(float size,
BaseTransform transform,
int aaMode,
FontStrikeDesc desc) |
protected void |
disposeOnShutdown() |
boolean |
equals(java.lang.Object obj) |
float |
getAdvance(int glyphCode,
float ptSize) |
int |
getDefaultAAMode() |
(package private) PrismFontFile.DirectoryEntry |
getDirectoryEntry(int tag) |
java.lang.String |
getFamilyName() |
int |
getFeatures() |
java.lang.String |
getFileName() |
protected int |
getFileSize() |
int |
getFontCount() |
protected int |
getFontIndex() |
PrismMetrics |
getFontMetrics(float ptSize) |
java.lang.String |
getFullName() |
float[] |
getGlyphBoundingBox(int gc,
float size,
float[] retArr) |
CharToGlyphMapper |
getGlyphMapper() |
short |
getIndexToLocFormat() |
private static short |
getLCIDFromLocale(java.util.Locale locale) |
java.lang.String |
getLocaleFamilyName() |
java.lang.String |
getLocaleFullName() |
java.lang.String |
getLocaleStyleName() |
(package private) int |
getNumGlyphs() |
int |
getNumHMetrics()
per the OT spec.
|
java.lang.Object |
getPeer() |
java.lang.String |
getPSName() |
FontStrike |
getStrike(float size,
BaseTransform transform) |
FontStrike |
getStrike(float size,
BaseTransform transform,
int aaMode) |
java.util.Map |
getStrikeMap() |
(package private) float[] |
getStyleMetrics(float ptSize) |
java.lang.String |
getStyleName() |
private static short |
getSystemLCID() |
(package private) byte[] |
getTableBytes(int tag) |
int |
getUnitsPerEm()
per the OT spec.
|
int |
hashCode() |
private void |
init(java.lang.String name,
int fIndex) |
(package private) void |
initNames() |
boolean |
isBold() |
protected boolean |
isCFF() |
boolean |
isDecoded() |
boolean |
isEmbeddedFont() |
boolean |
isInstalledFont() |
boolean |
isItalic() |
boolean |
isRegistered() |
(package private) FontFileReader.Buffer |
readTable(int tag) |
(package private) void |
setIsDecoded(boolean decoded) |
void |
setPeer(java.lang.Object peer) |
private void |
setStyle() |
private int fontInstallationType
java.lang.String familyName
java.lang.String fullName
java.lang.String psName
java.lang.String localeFamilyName
java.lang.String localeFullName
java.lang.String styleName
java.lang.String localeStyleName
java.lang.String filename
int filesize
FontFileReader filereader
int numGlyphs
short indexToLocFormat
int fontIndex
boolean isCFF
boolean isEmbedded
boolean isCopy
boolean isTracked
boolean isDecoded
boolean isRegistered
java.util.Map<FontStrikeDesc,java.lang.ref.WeakReference<PrismFontStrike>> strikeMap
java.util.HashMap<java.lang.Integer,int[]> bbCache
static final int[] EMPTY_BOUNDS
private java.lang.Object peer
int directoryCount
int numTables
PrismFontFile.DirectoryEntry[] tableDirectory
private static final int fsSelectionItalicBit
private static final int fsSelectionBoldBit
private static final int MACSTYLE_BOLD_BIT
private static final int MACSTYLE_ITALIC_BIT
private boolean isBold
private boolean isItalic
private float upem
private float ascent
private float descent
private float linegap
private int numHMetrics
public static final int MAC_PLATFORM_ID
public static final int MACROMAN_SPECIFIC_ID
public static final int MACROMAN_ENGLISH_LANG
public static final int MS_PLATFORM_ID
public static final short MS_ENGLISH_LOCALE_ID
public static final int FAMILY_NAME_ID
public static final int STYLE_NAME_ID
public static final int FULL_NAME_ID
public static final int PS_NAME_ID
private static java.util.Map<java.lang.String,java.lang.Short> lcidMap
static short nameLocaleID
private OpenTypeGlyphMapper mapper
char[] advanceWidths
private float[] styleMetrics
protected PrismFontFile(java.lang.String name,
java.lang.String filename,
int fIndex,
boolean register,
boolean embedded,
boolean copy,
boolean tracked)
throws java.lang.Exception
java.lang.Exceptionjava.lang.ref.WeakReference<PrismFontFile> createFileDisposer(PrismFontFactory factory)
void setIsDecoded(boolean decoded)
protected void disposeOnShutdown()
public int getDefaultAAMode()
getDefaultAAMode in interface FontResourcepublic boolean isInstalledFont()
public java.lang.String getFileName()
getFileName in interface FontResourceprotected int getFileSize()
protected int getFontIndex()
public java.lang.String getFullName()
getFullName in interface FontResourcepublic java.lang.String getPSName()
getPSName in interface FontResourcepublic java.lang.String getFamilyName()
getFamilyName in interface FontResourcepublic java.lang.String getStyleName()
getStyleName in interface FontResourcepublic java.lang.String getLocaleFullName()
getLocaleFullName in interface FontResourcepublic java.lang.String getLocaleFamilyName()
getLocaleFamilyName in interface FontResourcepublic java.lang.String getLocaleStyleName()
getLocaleStyleName in interface FontResourcepublic int getFeatures()
getFeatures in interface FontResourcepublic java.util.Map getStrikeMap()
getStrikeMap in interface FontResourceprotected abstract PrismFontStrike createStrike(float size, BaseTransform transform, int aaMode, FontStrikeDesc desc)
public FontStrike getStrike(float size, BaseTransform transform, int aaMode)
getStrike in interface FontResourceprotected abstract int[] createGlyphBoundingBox(int gc)
public float[] getGlyphBoundingBox(int gc,
float size,
float[] retArr)
getGlyphBoundingBox in interface FontResourceint getNumGlyphs()
protected boolean isCFF()
public java.lang.Object getPeer()
getPeer in interface FontResourcepublic void setPeer(java.lang.Object peer)
setPeer in interface FontResourceFontFileReader.Buffer readTable(int tag)
public int getFontCount()
PrismFontFile.DirectoryEntry getDirectoryEntry(int tag)
private void init(java.lang.String name,
int fIndex)
throws java.lang.Exception
java.lang.Exceptionprivate void setStyle()
public boolean isBold()
isBold in interface FontResourcepublic boolean isItalic()
isItalic in interface FontResourcepublic boolean isDecoded()
public boolean isRegistered()
public boolean isEmbeddedFont()
isEmbeddedFont in interface FontResourcepublic int getUnitsPerEm()
public short getIndexToLocFormat()
public int getNumHMetrics()
void initNames()
throws java.lang.Exception
java.lang.Exceptionprivate void checkCMAP()
throws java.lang.Exception
java.lang.Exceptionprivate static void addLCIDMapEntry(java.util.Map<java.lang.String,java.lang.Short> map,
java.lang.String key,
short value)
private static void createLCIDMap()
private static short getLCIDFromLocale(java.util.Locale locale)
private static short getSystemLCID()
public CharToGlyphMapper getGlyphMapper()
getGlyphMapper in interface FontResourcepublic FontStrike getStrike(float size, BaseTransform transform)
getStrike in interface FontResourcepublic float getAdvance(int glyphCode,
float ptSize)
getAdvance in interface FontResourcepublic PrismMetrics getFontMetrics(float ptSize)
float[] getStyleMetrics(float ptSize)
byte[] getTableBytes(int tag)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object