iText 7 7.1.8 API
iText.Kernel.Font.PdfType3Font Class Reference

Low-level API class for Type 3 fonts. More...

Inheritance diagram for iText.Kernel.Font.PdfType3Font:
iText.Kernel.Font.PdfSimpleFont< Type3Font >

Public Member Functions

virtual void  SetFontName (String fontName)
  Sets the PostScript name of the font. More...
 
virtual void  SetFontFamily (String fontFamily)
  Sets a preferred font family name. More...
 
virtual void  SetFontWeight (int fontWeight)
  Sets font weight. More...
 
virtual void  SetItalicAngle (int italicAngle)
  Sets the PostScript italic angle. More...
 
virtual void  SetFontStretch (String fontWidth)
  Sets font width in css notation (font-stretch property) More...
 
virtual void  SetPdfFontFlags (int flags)
  Sets Font descriptor flags. More...
 
virtual Type3Glyph  GetType3Glyph (int unicode)
 
override bool  IsSubset ()
 
override bool  IsEmbedded ()
 
override double[]  GetFontMatrix ()
 
virtual void  SetFontMatrix (double[] fontMatrix)
 
virtual int  GetNumberOfGlyphs ()
  Gets count of glyphs in Type 3 font. More...
 
virtual Type3Glyph  AddGlyph (char c, int wx, int llx, int lly, int urx, int ury)
  Defines a glyph. More...
 
override Glyph  GetGlyph (int unicode)
 
override bool  ContainsGlyph (int unicode)
 
override void  Flush ()
 
- Public Member Functions inherited from iText.Kernel.Font.PdfSimpleFont< Type3Font >
override bool  IsBuiltWith (String fontProgram, String encoding)
  Checks whether the PdfFont was built with corresponding fontProgram and encoding or CMAP. Default value is false unless overridden. More...
 
override GlyphLine  CreateGlyphLine (String content)
 
override int  AppendGlyphs (String text, int from, int to, IList< Glyph > glyphs)
  Append all supported glyphs and return number of processed chars. More...
 
override int  AppendAnyGlyph (String text, int from, IList< Glyph > glyphs)
  Append any single glyph, even notdef. More...
 
virtual FontEncoding  GetFontEncoding ()
 
override byte[]  ConvertToBytes (String text)
  Converts the text into bytes to be placed in the document. More...
 
override byte[]  ConvertToBytes (GlyphLine glyphLine)
 
override byte[]  ConvertToBytes (Glyph glyph)
 
override void  WriteText (GlyphLine text, int from, int to, PdfOutputStream stream)
 
override void  WriteText (String text, PdfOutputStream stream)
 
override String  Decode (PdfString content)
 
override GlyphLine  DecodeIntoGlyphLine (PdfString content)
 
override float  GetContentWidth (PdfString content)
 
virtual bool  IsForceWidthsOutput ()
  Gets the state of the property. More...
 
virtual void  SetForceWidthsOutput (bool forceWidthsOutput)
  Set to true to force the generation of the widths array. More...
 

Detailed Description

Low-level API class for Type 3 fonts.

Low-level API class for Type 3 fonts.

In Type 3 fonts, glyphs are defined by streams of PDF graphics operators. These streams are associated with character names. A separate encoding entry maps character codes to the appropriate character names for the glyphs.



To be able to be wrapped with this iText.Kernel.Pdf.PdfObjectWrapper the iText.Kernel.Pdf.PdfObject must be indirect.

Member Function Documentation

◆ AddGlyph()

virtual Type3Glyph iText.Kernel.Font.PdfType3Font.AddGlyph ( char  c,
int  wx,
int  llx,
int  lly,
int  urx,
int  ury 
)
inlinevirtual

Defines a glyph.

Defines a glyph. If the character was already defined it will return the same content

Parameters
c the character to match this glyph.
wx the advance this character will have
llx the X lower left corner of the glyph bounding box. If the
colorize option is
true the value is ignored
"lly">
the Y lower left corner of the glyph bounding box. If the colorize option is
true the value is ignored
"urx">
the X upper right corner of the glyph bounding box. If the colorize option is
true the value is ignored
"ury">
the Y upper right corner of the glyph bounding box. If the colorize option is
true the value is ignored
a content where the glyph can be defined

◆ GetNumberOfGlyphs()

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

Gets count of glyphs in Type 3 font.

Returns
number of glyphs.

◆ SetFontFamily()

virtual void iText.Kernel.Font.PdfType3Font.SetFontFamily ( String  fontFamily )
inlinevirtual

Sets a preferred font family name.

Parameters
fontFamily a preferred font family name.

◆ SetFontName()

virtual void iText.Kernel.Font.PdfType3Font.SetFontName ( String  fontName )
inlinevirtual

Sets the PostScript name of the font.

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

◆ SetFontStretch()

virtual void iText.Kernel.Font.PdfType3Font.SetFontStretch ( String  fontWidth )
inlinevirtual

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

Parameters
fontWidth

iText.IO.Font.Constants.FontStretches

◆ SetFontWeight()

virtual void iText.Kernel.Font.PdfType3Font.SetFontWeight ( int  fontWeight )
inlinevirtual

Sets font weight.

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

◆ SetItalicAngle()

virtual void iText.Kernel.Font.PdfType3Font.SetItalicAngle ( int  italicAngle )
inlinevirtual

Sets the PostScript italic angle.

Sets the PostScript italic angle.

Italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).

Parameters
italicAngle in counter-clockwise degrees from the vertical

◆ SetPdfFontFlags()

virtual void iText.Kernel.Font.PdfType3Font.SetPdfFontFlags ( int  flags )
inlinevirtual

Sets Font descriptor flags.

Parameters
flags font descriptor flags.
See also
iText.IO.Font.Constants.FontDescriptorFlags