|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cete.dynamicpdf.Resource com.cete.dynamicpdf.Font com.cete.dynamicpdf.text.OpenTypeFont
public class OpenTypeFont
Represents a OpenTypeFont font.
Licensing:
This class is a DynamicPDF Generator Professional Edition
feature. One of the following licenses is required for non-evaluation usage:
Constructor Summary | |
---|---|
OpenTypeFont(byte[] bytes,
LineBreaker lineBreaker)
Intializes a new instance of OpenTypeFont class. |
|
OpenTypeFont(java.lang.String filePath)
Intializes a new instance of OpenTypeFont class. |
|
OpenTypeFont(java.lang.String filePath,
LineBreaker lineBreaker)
Intializes a new instance of OpenTypeFont class. |
Method Summary | |
---|---|
void |
draw(DocumentWriter writer)
Draw the opentype font data to the DocumentWriter . |
short |
getAscender()
Gets the ascender for the font. |
short |
getDescender()
Gets the descender for the font. |
boolean |
getEmbed()
Gets a value indicating whether the font need to be embedded in to the pdf. |
FontSubsetter |
getFontSubsetter()
Returns a font subsetter for the opentype font. |
int |
getGlyphWidth(char glyph)
Returns the mwidth of the given char. |
float |
getKernValue(char left,
char right)
Returns the kern value corresponding to the given glyph combination. |
LineBreaker |
getLineBreaker()
Gets the instance of LineBreaker used for the font. |
short |
getLineGap()
Gets the line gap for the font. |
java.lang.String |
getName()
Gets the font name for the file given. |
com.cete.dynamicpdf.text.opentypefonttables.OutLineType |
getOutLineType()
Gets the OutLineType of the opentype font. |
int |
getRequiredPdfObjects()
Gets the required pdf objects. |
ResourceType |
getResourceType()
Gets the value of ResourceType . |
boolean |
getSubset()
Gets a value indicating whether the font need to subset while embedding. |
boolean |
hasKerning()
Returns whether the font has inbuilt kerning pairs. |
void |
setEmbed(boolean value)
Sets a value indicating whether the font need to be embedded in to the pdf. |
void |
setSubset(boolean value)
Sets a value indicating whether the font need to subset while embedding. |
Methods inherited from class com.cete.dynamicpdf.Resource |
---|
getUid, newUid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OpenTypeFont(java.lang.String filePath)
OpenTypeFont
class.
filePath
- Physical file path of the OpenType font file.OpenTypeFont
public OpenTypeFont(java.lang.String filePath, LineBreaker lineBreaker)
OpenTypeFont
class.
filePath
- Physical file path of the opentype / truetype font file.lineBreaker
- Line breaker to use for the opentype font.OpenTypeFont
public OpenTypeFont(byte[] bytes, LineBreaker lineBreaker)
OpenTypeFont
class.
bytes
- bytes containg the opentype / truetype font file.lineBreaker
- Line breaker to use for the opentype font.OpenTypeFont
Method Detail |
---|
public void draw(DocumentWriter writer)
DocumentWriter
.
draw
in class Resource
writer
- DocumentWriter
object used to receive the opentype font output.DocumentWriter
public int getGlyphWidth(char glyph)
getGlyphWidth
in class Font
glyph
- Glyph whose mwidth is required.
public FontSubsetter getFontSubsetter()
getFontSubsetter
in interface IFontSubsettable
FontSubsetter
object used for the font.FontSubsetter
public boolean hasKerning()
hasKerning
in class Font
public float getKernValue(char left, char right)
getKernValue
in class Font
left
- Left glyph.right
- Right glyph.
public LineBreaker getLineBreaker()
LineBreaker
used for the font.
getLineBreaker
in class Font
LineBreaker
public java.lang.String getName()
getName
in class Font
public int getRequiredPdfObjects()
getRequiredPdfObjects
in class Resource
public ResourceType getResourceType()
ResourceType
.
getResourceType
in class Font
ResourceType
.ResourceType
public short getLineGap()
getLineGap
in class Font
public short getAscender()
getAscender
in class Font
public short getDescender()
getDescender
in class Font
public boolean getEmbed()
public void setEmbed(boolean value)
value
- boolean value indicating whether the font need to be embedded in to the pdf.public boolean getSubset()
public void setSubset(boolean value)
value
- boolean value indicating whether the font need to subset while embedding.public com.cete.dynamicpdf.text.opentypefonttables.OutLineType getOutLineType()
OutLineType
of the opentype font.
OutLineType
|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |