public abstract class FontImpl extends Object implements Font
These objects are immutable.
| Constructor and Description |
|---|
FontImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEmbedForEditting() |
boolean |
canEmbedForPrintAndPreview() |
Subset |
createSubset()
Create a subset for this font.
|
abstract boolean |
equals(Object obj) |
abstract Object |
getCachedFontDescription(String key) |
abstract Map<String,Object> |
getCachedFontDescriptionMap() |
CacheSupportInfo |
getCacheSupportInfo()
The new font cache support code starts here, though some code above here has been reworked also.
|
abstract String |
getCanonicalPath() |
Rect |
getCoolTypeGlyphBBox(int glyphID)
Emulates the CoolType API CCTFontInstance::GetBBox.
|
Rect |
getCoolTypeIcfBox()
Emulates the CoolType API CTFontDict:GetICFBox.
|
Rect |
getCoolTypeIdeoEmBox()
Emulates the CoolType API CTFontDict:GetIdeoEmBox.
|
LineMetrics |
getCoolTypeLineMetrics()
Emulates the CoolType API CTFontDict:GetHorizontalMetrics.
|
CoolTypeScript |
getCoolTypeScript()
Emulates the CoolType API CCTFontDict::GetWritingScript.
|
UnderlineMetrics |
getCoolTypeUnderlineMetrics()
Emulates the CoolType API CTFontDict:GetUnderlineInfo.
|
CSS20FontDescription[] |
getCSS20FontDescription()
Get the CSS20FontDescriptions for this font.
|
FontData |
getFontData() |
FXGFontDescription[] |
getFXGFontDescription()
Get all of the FXG descriptions for the font.
|
FXGFontDescription[] |
getFXGFontDescription(Platform platform)
Get all of the FXG descriptions for this font on the given platform.
|
FXGFontDescription[] |
getFXGFontDescription(Platform platform,
ULocale locale)
Get all of the FXG descriptions for this font on the given platform
and for the given locale.
|
abstract long |
getLastModified() |
abstract long |
getLength() |
LineMetrics |
getLineMetrics()
Return the line metrics for this font.
|
PDFFontDescription |
getPDFFontDescription()
Get the PDFFontDescription for this font.
|
PlatformFontDescription[] |
getPlatformFontDescription()
Get all of the Platform descriptions for the font.
|
PlatformFontDescription[] |
getPlatformFontDescription(Platform platform)
Get all of the Platform descriptions for this font on the given platform.
|
PlatformFontDescription[] |
getPlatformFontDescription(Platform platform,
ULocale locale)
Get all of the Platform descriptions for this font on the given platform
and for the given locale.
|
PostscriptFontDescription[] |
getPostscriptFontDescription()
Get the PostscriptFontDescriptions for this font.
|
CSS20FontDescription |
getPreferredCSS20FontDescription()
Get the preferred CSS20FontDescriptions for this font.
|
SWFFont4Description |
getSWFFont4Description()
Fetch data needed to construct a DefineFont4 tag in SWF.
|
SWFFontDescription |
getSWFFontDescription()
Fetch data needed to construct a DefineFont2 or 3 tag in SWF.
|
double |
getUnitsPerEmX()
Return the units per em in the X direction.
|
double |
getUnitsPerEmY()
Return the units per em in the Y direction.
|
XDCFontDescription |
getXDCFontDescription()
Get the XDCFontDescription for this font.
|
boolean |
hasCoolTypeProportionalRoman()
Emulates the CoolType API CTFontDict::hasPropRoman.
|
abstract int |
hashCode() |
boolean |
isSymbolic()
Tell whether the font is symbolic.
|
abstract void |
setCachedFontDescription(String key,
Object value) |
abstract String |
toString() |
boolean |
wasEmbedded()
Tells whether this font originally was embedded in a document.
|
public double getUnitsPerEmX()
throws UnsupportedFontException,
InvalidFontException,
FontLoadingException
FontUnless otherwise specified, horizontal metrics returned by AFE are expressed in a metric space, and must be divided by the units per em in the X direction to get em values.
getUnitsPerEmX in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic double getUnitsPerEmY()
throws UnsupportedFontException,
InvalidFontException,
FontLoadingException
FontUnless otherwise specified, vertical metrics returned by AFE are expressed in a metric space, and must be divided by the units per em in the Y direction to get em values.
getUnitsPerEmY in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic LineMetrics getLineMetrics() throws UnsupportedFontException, InvalidFontException, FontLoadingException
The metrics are expressed in the design space of the font, i.e. they need to be converted through the metrics matrix.
Some font formats do not support the notion of line metrics, and in those cases, this method returns null.
See also the getCoolTypeLineMetrics() method.
getLineMetrics in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic Rect getCoolTypeGlyphBBox(int glyphID) throws UnsupportedFontException, InvalidFontException, FontLoadingException
FontThe metrics are expressed in the metric space of the font.
getCoolTypeGlyphBBox in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic LineMetrics getCoolTypeLineMetrics() throws UnsupportedFontException, InvalidFontException, FontLoadingException
The metrics are expressed in the metric space of the font.
See also the getLineMetrics() method.
getCoolTypeLineMetrics in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic CoolTypeScript getCoolTypeScript() throws FontLoadingException, InvalidFontException, UnsupportedFontException
FontgetCoolTypeScript in interface FontFontLoadingExceptionInvalidFontExceptionUnsupportedFontExceptionpublic UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException, FontLoadingException
The metrics are expressed in the metric space of the font.
getCoolTypeUnderlineMetrics in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic Rect getCoolTypeIdeoEmBox() throws UnsupportedFontException, InvalidFontException, FontLoadingException
The metrics are expressed in the metric space of the font.
getCoolTypeIdeoEmBox in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic boolean hasCoolTypeProportionalRoman()
throws UnsupportedFontException,
InvalidFontException,
FontLoadingException
hasCoolTypeProportionalRoman in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic Rect getCoolTypeIcfBox() throws UnsupportedFontException, InvalidFontException, FontLoadingException
The metrics are expressed in the metric space of the font.
getCoolTypeIcfBox in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic boolean isSymbolic()
throws UnsupportedFontException,
InvalidFontException,
FontLoadingException
isSymbolic in interface FontUnsupportedFontExceptionInvalidFontExceptionFontLoadingExceptionpublic boolean canEmbedForEditting()
throws InvalidFontException,
UnsupportedFontException,
FontLoadingException
canEmbedForEditting in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic boolean canEmbedForPrintAndPreview()
throws InvalidFontException,
UnsupportedFontException,
FontLoadingException
canEmbedForPrintAndPreview in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic Subset createSubset() throws InvalidFontException, UnsupportedFontException, FontLoadingException
createSubset in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic FontData getFontData() throws InvalidFontException, UnsupportedFontException, FontLoadingException
public SWFFont4Description getSWFFont4Description() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetSWFFont4Description in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic SWFFontDescription getSWFFontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetSWFFontDescription in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic PDFFontDescription getPDFFontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetPDFFontDescription in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic XDCFontDescription getXDCFontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetXDCFontDescription in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic PostscriptFontDescription[] getPostscriptFontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetPostscriptFontDescription in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic CSS20FontDescription[] getCSS20FontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetCSS20FontDescription in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic CSS20FontDescription getPreferredCSS20FontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetPreferredCSS20FontDescription in interface FontInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic FXGFontDescription[] getFXGFontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetFXGFontDescription in interface Fontnull if there are noneInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic FXGFontDescription[] getFXGFontDescription(Platform platform) throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetFXGFontDescription in interface Fontplatform - the platform to get descriptions fornull if there are noneInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic FXGFontDescription[] getFXGFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetFXGFontDescription in interface Fontplatform - the platform to get descriptions forlocale - the locale to get descriptions fornull if there are noneInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic PlatformFontDescription[] getPlatformFontDescription() throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetPlatformFontDescription in interface Fontnull if there are noneInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic PlatformFontDescription[] getPlatformFontDescription(Platform platform) throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetPlatformFontDescription in interface Fontplatform - the platform to get descriptions fornull if there are noneInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic PlatformFontDescription[] getPlatformFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException, FontLoadingException
FontgetPlatformFontDescription in interface Fontplatform - the platform to get descriptions forlocale - the locale to get descriptions fornull if there are noneInvalidFontExceptionUnsupportedFontExceptionFontLoadingExceptionpublic CacheSupportInfo getCacheSupportInfo() throws InvalidFontException, UnsupportedFontException, FontLoadingException
public abstract String getCanonicalPath()
public abstract long getLength()
public abstract long getLastModified()
public boolean wasEmbedded()
Copyright © 2010 - 2020 Adobe. All Rights Reserved