iText 8.0.5 API
iText.Kernel.Font.Type3Font Class Reference

FontProgram class for Type 3 font. More...

Inheritance diagram for iText.Kernel.Font.Type3Font:
iText.IO.Font.FontProgram

Public Member Functions

virtual Type3Glyph  GetType3Glyph (int unicode)
  Returns a glyph by unicode. More...
 
virtual Type3Glyph  GetType3GlyphByCode (int code)
  Returns a glyph by its code. More...
 
override int  GetPdfFontFlags ()
 
override bool  IsFontSpecific ()
 
virtual bool  IsColorized ()
 
override int  GetKerning (Glyph glyph1, Glyph glyph2)
  Gets the kerning between two glyphs. More...
 
virtual int  GetNumberOfGlyphs ()
  Returns number of glyphs for this font. More...
 
- Public Member Functions inherited from iText.IO.Font.FontProgram
virtual int  CountOfGlyphs ()
 
virtual FontNames  GetFontNames ()
 
virtual FontMetrics  GetFontMetrics ()
 
virtual FontIdentification  GetFontIdentification ()
 
virtual String  GetRegistry ()
 
virtual int  GetWidth (int unicode)
  Get glyph's width. More...
 
virtual int  GetAvgWidth ()
 
virtual int[]  GetCharBBox (int unicode)
  Get glyph's bbox. More...
 
virtual Glyph  GetGlyph (int unicode)
 
virtual Glyph  GetGlyphByCode (int charCode)
 
virtual bool  HasKernPairs ()
 
virtual int  GetKerning (int first, int second)
  Gets the kerning between two glyphs. More...
 
virtual bool  IsBuiltWith (String fontName)
  Checks whether the FontProgram was built with corresponding fontName. More...
 
override String  ToString ()
 

Package Functions

override void  SetFontName (String fontName)
  Sets the PostScript name of the font. More...
 
override void  SetFontFamily (String fontFamily)
  Sets a preferred font family name. More...
 
override void  SetFontWeight (int fontWeight)
  Sets font weight. More...
 
override void  SetFontStretch (String fontWidth)
  Sets font width in css notation (font-stretch property) More...
 
override void  SetCapHeight (int capHeight)
  Sets the capital letters height. More...
 
override void  SetItalicAngle (int italicAngle)
  Sets the PostScript italic angle. More...
 
override void  SetTypoAscender (int ascender)
  Sets typo ascender. More...
 
override void  SetTypoDescender (int descender)
  Sets typo descender. More...
 
- Package Functions inherited from iText.IO.Font.FontProgram
virtual void  SetRegistry (String registry)
 
virtual void  SetXHeight (int xHeight)
 
virtual void  SetStemV (int stemV)
 
virtual void  SetStemH (int stemH)
 
virtual void  SetFixedPitch (bool isFixedPitch)
 
virtual void  SetBold (bool isBold)
 
virtual void  SetBbox (int[] bbox)
 
virtual void  FixSpaceIssue ()
 

Additional Inherited Members

- Static Public Member Functions inherited from iText.IO.Font.FontProgram
static float  ConvertTextSpaceToGlyphSpace (float value)
 
static float  ConvertGlyphSpaceToTextSpace (float value)
 
static double  ConvertGlyphSpaceToTextSpace (double value)
 
static int  ConvertGlyphSpaceToTextSpace (int value)
 
- Static Public Attributes inherited from iText.IO.Font.FontProgram
const int  HORIZONTAL_SCALING_FACTOR = 100
 
const int  DEFAULT_WIDTH = 1000
 
const int  UNITS_NORMALIZATION = 1000
 
- Package Attributes inherited from iText.IO.Font.FontProgram
IDictionary< int, Glyph codeToGlyph = new DictionaryGlyph>()
 
IDictionary< int, Glyph unicodeToGlyph = new DictionaryGlyph>()
 
bool  isFontSpecific
 
FontNames  fontNames
 
FontMetrics  fontMetrics = new FontMetrics()
 
FontIdentification  fontIdentification = new FontIdentification()
 
int  avgWidth
 
String  encodingScheme = FontEncoding.FONT_SPECIFIC
  The font's encoding name. More...
 
String  registry
 

Detailed Description

FontProgram class for Type 3 font.

FontProgram class for Type 3 font. Contains map of Type3Glyph. Type3Glyphs belong to a particular pdf document. Note, an instance of Type3Font can not be reused for multiple pdf documents.

Member Function Documentation

◆ GetKerning()

override int iText.Kernel.Font.Type3Font.GetKerning ( Glyph  first,
Glyph  second 
)
inlinevirtual

Gets the kerning between two glyphs.

Parameters
first the first glyph
second the second glyph
Returns
the kerning to be applied

Implements iText.IO.Font.FontProgram.

◆ GetNumberOfGlyphs()

virtual int iText.Kernel.Font.Type3Font.GetNumberOfGlyphs ( )
inlinevirtual

Returns number of glyphs for this font.

Returns number of glyphs for this font. Its also count glyphs without unicode. See type3GlyphsWithoutUnicode.

Returns

int number off all glyphs

◆ GetType3Glyph()

virtual Type3Glyph iText.Kernel.Font.Type3Font.GetType3Glyph ( int  unicode )
inlinevirtual

Returns a glyph by unicode.

Parameters
unicode glyph unicode
Returns

Type3Glyph glyph, or null if this font does not contain glyph for the unicode

◆ GetType3GlyphByCode()

virtual Type3Glyph iText.Kernel.Font.Type3Font.GetType3GlyphByCode ( int  code )
inlinevirtual

Returns a glyph by its code.

Returns a glyph by its code. These glyphs may not have unicode.

Parameters
code glyph code
Returns

Type3Glyph glyph, or null if this font does not contain glyph for the code

◆ SetCapHeight()

override void iText.Kernel.Font.Type3Font.SetCapHeight ( int  capHeight )
inlinepackagevirtual

Sets the capital letters height.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetFontFamily()

override void iText.Kernel.Font.Type3Font.SetFontFamily ( String  fontFamily )
inlinepackagevirtual

Sets a preferred font family name.

Parameters
fontFamily a preferred font family name.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetFontName()

override void iText.Kernel.Font.Type3Font.SetFontName ( String  fontName )
inlinepackagevirtual

Sets the PostScript name of the font.

Sets the PostScript name of the font.

If full name is null, it will be set as well.

Parameters
fontName the PostScript name of the font, shall not be null or empty.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetFontStretch()

override void iText.Kernel.Font.Type3Font.SetFontStretch ( String  fontWidth )
inlinepackagevirtual

Sets font width in css notation (font-stretch property)

Parameters
fontWidth

iText.IO.Font.Constants.FontStretches.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetFontWeight()

override void iText.Kernel.Font.Type3Font.SetFontWeight ( int  fontWeight )
inlinepackagevirtual

Sets font weight.

Parameters
fontWeight integer form 100 to 900. See iText.IO.Font.Constants.FontWeights.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetItalicAngle()

override void iText.Kernel.Font.Type3Font.SetItalicAngle ( int  italicAngle )
inlinepackagevirtual

Sets the PostScript italic angle.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetTypoAscender()

override void iText.Kernel.Font.Type3Font.SetTypoAscender ( int  ascender )
inlinepackagevirtual

Sets typo ascender.

Reimplemented from iText.IO.Font.FontProgram.

◆ SetTypoDescender()

override void iText.Kernel.Font.Type3Font.SetTypoDescender ( int  descender )
inlinepackagevirtual

Sets typo descender.

Reimplemented from iText.IO.Font.FontProgram.