|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.Typeface
org.apache.fop.fonts.CustomFont
public abstract class CustomFont
Abstract base class for custom fonts loaded from files, for example.
Constructor Summary | |
---|---|
CustomFont()
|
Method Summary | |
---|---|
int |
getAscender()
Returns the ascender value of the font. |
int |
getAscender(int size)
Returns the ascent of the font described by this FontMetrics object. |
int |
getCapHeight()
Returns the capital height of the font. |
int |
getCapHeight(int size)
Returns the size of a capital letter measured from the font's baseline. |
int |
getDescender()
Returns the descender value of the font. |
int |
getDescender(int size)
Returns the descent of the font described by this FontMetrics object. |
java.lang.String |
getEmbedFileName()
Returns an URI representing an embeddable font file. |
javax.xml.transform.Source |
getEmbedFileSource()
Returns a Source representing an embeddable font file. |
java.lang.String |
getEmbedResourceName()
Returns the lookup name to an embeddable font file available as a resource. |
int |
getFirstChar()
Returns the index of the first character defined in this font. |
int |
getFlags()
Returns the flags for the font. |
int[] |
getFontBBox()
Returns the font's bounding box. |
java.lang.String |
getFontName()
Returns the font name. |
java.lang.String |
getFontSubName()
Returns font's subfamily name. |
FontType |
getFontType()
Returns the type of the font. |
int |
getItalicAngle()
Returns the italic angle for the font. |
java.util.Map |
getKerningInfo()
Returns the kerning map for the font. |
int |
getLastChar()
Returns the index of the last character defined in this font. |
int |
getMissingWidth()
Returns the width to be used when no width is available. |
int |
getStemV()
Returns the vertical stem width for the font. |
java.lang.String |
getStrippedFontName()
|
int |
getXHeight(int size)
Determines the typical font height of this FontMetrics object |
boolean |
hasKerningInfo()
Indicates if the font has kering information. |
boolean |
isKerningEnabled()
Used to determine if kerning is enabled. |
void |
putKerningEntry(java.lang.Integer key,
java.util.Map value)
Adds an entry to the kerning table. |
void |
setAscender(int ascender)
Sets the ascent value. |
void |
setCapHeight(int capHeight)
Sets the capital height value. |
void |
setDescender(int descender)
Sets the descent value. |
void |
setEmbedFileName(java.lang.String path)
Sets the path to the embeddable font file. |
void |
setEmbedResourceName(java.lang.String name)
Sets the resource name of the embeddable font file. |
void |
setFirstChar(int index)
Sets the index of the first character in the character table. |
void |
setFlags(int flags)
Sets the font's flags |
void |
setFontBBox(int[] bbox)
Sets the font's bounding box |
void |
setFontName(java.lang.String name)
Sets the font name. |
void |
setFontSubFamilyName(java.lang.String subFamilyName)
Sets the font's subfamily name. |
void |
setFontType(FontType fontType)
Sets the font type. |
void |
setItalicAngle(int italicAngle)
Sets the font's italic angle. |
void |
setKerningEnabled(boolean enabled)
Enables/disabled kerning. |
void |
setLastChar(int index)
Sets the index of the last character in the character table. |
void |
setMissingWidth(int width)
Sets the font's default width |
void |
setResolver(FontResolver resolver)
Sets the font resolver. |
void |
setStemV(int stemV)
Sets the font's StemV value. |
void |
setXHeight(int xHeight)
Returns the XHeight value of the font. |
Methods inherited from class org.apache.fop.fonts.Typeface |
---|
getEncoding, getMaxAscent, hasChar, isMultiByte, mapChar |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.fop.fonts.FontDescriptor |
---|
isEmbeddable |
Methods inherited from interface org.apache.fop.fonts.FontMetrics |
---|
getMaxAscent, getWidth, getWidths |
Constructor Detail |
---|
public CustomFont()
Method Detail |
---|
public java.lang.String getFontName()
FontMetrics
getFontName
in interface FontMetrics
FontMetrics.getFontName()
public java.lang.String getStrippedFontName()
org.apache.fop.fonts.FontMetrics#getStrippedFontName()
public java.lang.String getFontSubName()
public java.lang.String getEmbedFileName()
public javax.xml.transform.Source getEmbedFileSource() throws java.io.IOException
java.io.IOException
- if embedFileName is not null but Source is not foundpublic java.lang.String getEmbedResourceName()
public int getAscender()
FontDescriptor
getAscender
in interface FontDescriptor
FontDescriptor.getAscender()
public int getDescender()
FontDescriptor
getDescender
in interface FontDescriptor
FontDescriptor.getDescender()
public int getCapHeight()
FontDescriptor
getCapHeight
in interface FontDescriptor
FontDescriptor.getCapHeight()
public int getAscender(int size)
FontMetrics
getAscender
in interface FontMetrics
size
- font size
FontMetrics.getAscender(int)
public int getDescender(int size)
FontMetrics
getDescender
in interface FontMetrics
size
- font size
FontMetrics.getDescender(int)
public int getCapHeight(int size)
FontMetrics
getCapHeight
in interface FontMetrics
size
- font size
FontMetrics.getCapHeight(int)
public int getXHeight(int size)
FontMetrics
getXHeight
in interface FontMetrics
size
- font size
FontMetrics.getXHeight(int)
public int[] getFontBBox()
FontDescriptor
getFontBBox
in interface FontDescriptor
FontDescriptor.getFontBBox()
public int getFlags()
FontDescriptor
getFlags
in interface FontDescriptor
FontDescriptor.getFlags()
public int getStemV()
FontDescriptor
getStemV
in interface FontDescriptor
FontDescriptor.getStemV()
public int getItalicAngle()
FontDescriptor
getItalicAngle
in interface FontDescriptor
FontDescriptor.getItalicAngle()
public int getMissingWidth()
public FontType getFontType()
FontMetrics
getFontType
in interface FontMetrics
FontMetrics.getFontType()
public int getFirstChar()
public int getLastChar()
public boolean isKerningEnabled()
public final boolean hasKerningInfo()
FontMetrics
hasKerningInfo
in interface FontMetrics
FontMetrics.hasKerningInfo()
public final java.util.Map getKerningInfo()
FontMetrics
getKerningInfo
in interface FontMetrics
FontMetrics.getKerningInfo()
public void setFontName(java.lang.String name)
MutableFont
setFontName
in interface MutableFont
name
- font nameMutableFont.setFontName(String)
public void setFontSubFamilyName(java.lang.String subFamilyName)
subFamilyName
- the subfamily name of the fontpublic void setEmbedFileName(java.lang.String path)
MutableFont
setEmbedFileName
in interface MutableFont
path
- URI to the fileMutableFont.setEmbedFileName(String)
public void setEmbedResourceName(java.lang.String name)
MutableFont
setEmbedResourceName
in interface MutableFont
name
- resource nameMutableFont.setEmbedResourceName(String)
public void setCapHeight(int capHeight)
MutableFont
setCapHeight
in interface MutableFont
capHeight
- capital heightMutableFont.setCapHeight(int)
public void setXHeight(int xHeight)
xHeight
- the XHeight valuepublic void setAscender(int ascender)
MutableFont
setAscender
in interface MutableFont
ascender
- ascent heightMutableFont.setAscender(int)
public void setDescender(int descender)
MutableFont
setDescender
in interface MutableFont
descender
- descent valueMutableFont.setDescender(int)
public void setFontBBox(int[] bbox)
MutableFont
setFontBBox
in interface MutableFont
bbox
- bounding boxMutableFont.setFontBBox(int[])
public void setFlags(int flags)
MutableFont
setFlags
in interface MutableFont
flags
- flagsMutableFont.setFlags(int)
public void setStemV(int stemV)
MutableFont
setStemV
in interface MutableFont
stemV
- StemVMutableFont.setStemV(int)
public void setItalicAngle(int italicAngle)
MutableFont
setItalicAngle
in interface MutableFont
italicAngle
- italic angleMutableFont.setItalicAngle(int)
public void setMissingWidth(int width)
MutableFont
setMissingWidth
in interface MutableFont
width
- default widthMutableFont.setMissingWidth(int)
public void setFontType(FontType fontType)
MutableFont
setFontType
in interface MutableFont
fontType
- font typeMutableFont.setFontType(FontType)
public void setFirstChar(int index)
MutableFont
setFirstChar
in interface MutableFont
index
- index of first characterMutableFont.setFirstChar(int)
public void setLastChar(int index)
MutableFont
setLastChar
in interface MutableFont
index
- index of the last characterMutableFont.setLastChar(int)
public void setKerningEnabled(boolean enabled)
MutableFont
setKerningEnabled
in interface MutableFont
enabled
- True if kerning should be enabled if availableMutableFont.setKerningEnabled(boolean)
public void setResolver(FontResolver resolver)
resolver
- the font resolverpublic void putKerningEntry(java.lang.Integer key, java.util.Map value)
MutableFont
putKerningEntry
in interface MutableFont
key
- Kerning keyvalue
- Kerning valueMutableFont.putKerningEntry(Integer, Map)
|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |