DynamicPDF by ceTe Software

com.cete.dynamicpdf.text
Class WebOpenFont

java.lang.Object
  extended by com.cete.dynamicpdf.Resource
      extended by com.cete.dynamicpdf.Font
          extended by com.cete.dynamicpdf.text.WebOpenFont
All Implemented Interfaces:
IFontSubsettable

public class WebOpenFont
extends Font
implements IFontSubsettable

Represents an web open font.
View Example


Constructor Summary
WebOpenFont(byte[] bytes)
          Initializes a new instance of WebOpenFont class.
WebOpenFont(java.lang.String filePath)
          Initializes a new instance of WebOpenFont 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 web open 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.
 short ZInternal_getBoundingBoxBottom()
           
 short ZInternal_getBoundingBoxTop()
           
 short ZInternal_getStrikeOutPosition()
           
 short ZInternal_getStrikeOutSize()
           
 short ZInternal_getUnderlinePosition()
           
 short ZInternal_getUnderlineThickness()
           
 
Methods inherited from class com.cete.dynamicpdf.Font
getAscender, getBaseLine, getCeTeBullets, getCourier, getCourierBold, getCourierBoldOblique, getCourierOblique, getDefaultLeading, getDescender, getEncoder, getFormFontName, getHanyangSystemsGothicMedium, getHanyangSystemsShinMyeongJoMedium, getHeiseiKakuGothicW5, getHeiseiMinchoW3, getHelvetica, getHelveticaBold, getHelveticaBoldOblique, getHelveticaOblique, getLineGap, getMonotypeHeiMedium, getMonotypeSungLight, getSinoTypeSongLight, getSymbol, getTextLines, getTextLines, getTextWidth, getTextWidth, getTimesBold, getTimesBoldItalic, getTimesItalic, getTimesRoman, getZapfDingbats
 
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

WebOpenFont

public WebOpenFont(java.lang.String filePath)
Initializes a new instance of WebOpenFont class.

Parameters:
filePath - Physical file path of the web open font file.

WebOpenFont

public WebOpenFont(byte[] bytes)
Initializes a new instance of WebOpenFont class.

Parameters:
bytes - Bytes containing the web open font data.
Method Detail

draw

public void draw(DocumentWriter writer)
Draw the opentype font data to the DocumentWriter.

Specified by:
draw in class Resource
Parameters:
writer - DocumentWriter object used to receive the web open font output.
See Also:
DocumentWriter

getFontSubsetter

public FontSubsetter getFontSubsetter()
Returns a font subsetter for the opentype font.

Specified by:
getFontSubsetter in interface IFontSubsettable
Returns:
FontSubsetter object used for the font.
See Also:
FontSubsetter

getGlyphWidth

public int getGlyphWidth(char glyph)
Returns the mwidth of the given char.

Specified by:
getGlyphWidth in class Font
Parameters:
glyph - Glyph whose mwidth is required.
Returns:
mwdith of the given glyph.

getKernValue

public float getKernValue(char left,
                          char right)
Returns the kern value corresponding to the given glyph combination.

Overrides:
getKernValue in class Font
Parameters:
left - Left glyph.
right - Right glyph.
Returns:
Kern value corresponds to the combination given.

hasKerning

public boolean hasKerning()
Returns whether the font has inbuilt kerning pairs.

Overrides:
hasKerning in class Font
Returns:
true, if the font has inbuilt kerning pair.

getAscender

public short getAscender()
Gets the ascender for the font.

Specified by:
getAscender in class Font
Returns:
ascender for the font.

getDescender

public short getDescender()
Gets the descender for the font.

Specified by:
getDescender in class Font
Returns:
descender for the font.

getEmbed

public boolean getEmbed()
Gets a value indicating whether the font need to be embedded in to the pdf.

Returns:
indicating whether the font need to be embedded in to the pdf.

setEmbed

public void setEmbed(boolean value)
Sets a value indicating whether the font need to be embedded in to the pdf.

Parameters:
value - indicating whether the font need to be embedded in to the pdf.

getLineBreaker

public LineBreaker getLineBreaker()
Gets the instance of LineBreaker used for the font.

Specified by:
getLineBreaker in class Font
Returns:
instance of LineBreaker used for the font.

getLineGap

public short getLineGap()
Gets the line gap for the font.

Overrides:
getLineGap in class Font
Returns:
line gap for the font.

getName

public java.lang.String getName()
Gets the font name for the file given.

Specified by:
getName in class Font
Returns:
font name for the file given.

getOutLineType

public com.cete.dynamicpdf.text.opentypefonttables.OutLineType getOutLineType()
Gets the OutLineType of the web open font.

Returns:
OutLineType of the web open font.

getRequiredPdfObjects

public int getRequiredPdfObjects()
Gets the required pdf objects.

Overrides:
getRequiredPdfObjects in class Resource
Returns:
required pdf objects.

getResourceType

public ResourceType getResourceType()
Gets the value of ResourceType.

Overrides:
getResourceType in class Font
Returns:
value of ResourceType.
See Also:
ResourceType

getSubset

public boolean getSubset()
Gets a value indicating whether the font need to subset while embedding.

Returns:
value indicating whether the font need to subset while embedding.

setSubset

public void setSubset(boolean value)
Sets a value indicating whether the font need to subset while embedding.

Parameters:
value - indicating whether the font need to subset while embedding.

ZInternal_getBoundingBoxTop

public short ZInternal_getBoundingBoxTop()

ZInternal_getBoundingBoxBottom

public short ZInternal_getBoundingBoxBottom()

ZInternal_getStrikeOutSize

public short ZInternal_getStrikeOutSize()

ZInternal_getStrikeOutPosition

public short ZInternal_getStrikeOutPosition()

ZInternal_getUnderlinePosition

public short ZInternal_getUnderlinePosition()

ZInternal_getUnderlineThickness

public short ZInternal_getUnderlineThickness()

DynamicPDF by ceTe Software

API Reference for DynamicPDF v11.02 for Java generated on Sep 02, 2021
© Copyright 2021, ceTe Software