Skip to main content
Skip table of contents

TrueTypeFont (1)

TrueTypeFont Public class

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph iTextSharp.text.pdf
  iTextSharp.text.pdf.TrueTypeFont[[TrueTypeFont]]
  iTextSharp.text.pdf.BaseFont[[BaseFont]]
  class iTextSharp.text.pdf.BaseFont abstractStyle;
  end
iTextSharp.text.pdf.BaseFont --> iTextSharp.text.pdf.TrueTypeFont

Members

Properties

Public properties
TypeNameMethods
string``[][]AllNameEntriesget
boolCffget
string``[]CodePagesSupportedget
intDirectoryOffsetget
string``[][]FamilyFontNameget
stringFileNameget
string``[][]FullFontNameget
intMaxGlyphIdget
stringPostscriptFontNameget, set
RandomAccessFileOrArrayRfget
stringSubfamilyget
Internal properties
TypeNameMethods
stringBaseFontget

Methods

Protected Static methods
ReturnsName
int``[]CompactRanges(List<int``[]> ranges)
stringGetTTCName(string name)
Internal methods
ReturnsName
voidCheckCff()
voidFillTables()
string``[][]GetAllNames()
string``[][]GetNames(int id)
intGetRawWidth(int c, string name)
boolIsWinAnsiSupported()
voidProcess(byte``[] ttfAfm, bool preload)
voidReadCMaps()
Dictionary<int, int``[]>ReadFormat0()
Dictionary<int, int``[]>ReadFormat12()
Dictionary<int, int``[]>ReadFormat4()
Dictionary<int, int``[]>ReadFormat6()
voidReadKerning()
voidWriteFont(PdfWriter writer, PdfIndirectReference piref, object``[] parms)
Protected methods
ReturnsName
PdfDictionaryGetFontBaseType(PdfIndirectReference fontDescriptor, string subsetPrefix, int firstChar, int lastChar, byte``[] shortTag)
int``[]GetRawCharBBox(int c, string name)
voidReadGlyphWidths()
stringReadStandardString(int length)
stringReadUnicodeString(int length)
Protected internal methods
ReturnsName
intGetGlyphWidth(int glyph)
byte``[]GetSubSet(HashSet2<int> glyphs, bool subsetp)
Public methods
ReturnsName
voidAddRangeUni(Dictionary<int, int``[]> longTag, bool includeMetrics, bool subsetp)
PdfDictionaryGetFontDescriptor(...)
byte``[]GetFullFont()
PdfStreamGetFullFontStream()
intGetKerning(int char1, int char2)
int``[]GetMetricsTT(int c)
boolHasKernPairs()
byte``[]ReadCffFont()
boolSetKerning(int char1, int char2, int kern)

Details

Inheritance

Nested types

Classes
  • FontHeader
  • HorizontalHeader
  • WindowsMetrics

Constructors

TrueTypeFont [1/2]

Source code

protected TrueTypeFont()
TrueTypeFont [2/2]

Source code

internal TrueTypeFont(string ttFile, string enc, bool emb, byte[] ttfAfm, bool justNames, bool forceRead)
Arguments
TypeNameDescription
stringttFile
stringenc
boolemb
byte``[]ttfAfm
booljustNames
boolforceRead

Methods

GetTTCName

Source code

protected static string GetTTCName(string name)
Arguments
TypeNameDescription
stringname
FillTables

Source code

internal void FillTables()
GetNames

Source code

internal string GetNames(int id)
Arguments
TypeNameDescription
intid
GetAllNames

Source code

internal string GetAllNames()
CheckCff

Source code

internal void CheckCff()
Process

Source code

internal void Process(byte[] ttfAfm, bool preload)
Arguments
TypeNameDescription
byte``[]ttfAfm
boolpreload
ReadStandardString

Source code

protected virtual string ReadStandardString(int length)
Arguments
TypeNameDescription
intlength
ReadUnicodeString

Source code

protected virtual string ReadUnicodeString(int length)
Arguments
TypeNameDescription
intlength
ReadGlyphWidths

Source code

protected virtual void ReadGlyphWidths()
GetGlyphWidth

Source code

protected internal virtual int GetGlyphWidth(int glyph)
Arguments
TypeNameDescription
intglyph
ReadCMaps

Source code

internal void ReadCMaps()
ReadFormat12

Source code

internal Dictionary<int, int> ReadFormat12()
ReadFormat0

Source code

internal Dictionary<int, int> ReadFormat0()
ReadFormat4

Source code

internal Dictionary<int, int> ReadFormat4()
ReadFormat6

Source code

internal Dictionary<int, int> ReadFormat6()
ReadKerning

Source code

internal void ReadKerning()
GetKerning

Source code

public override int GetKerning(int char1, int char2)
Arguments
TypeNameDescription
intchar1
intchar2
GetRawWidth

Source code

internal override int GetRawWidth(int c, string name)
Arguments
TypeNameDescription
intc
stringname
GetFontDescriptor [1/2]

Source code

public virtual PdfDictionary GetFontDescriptor(PdfIndirectReference fontStream, string subsetPrefix, PdfIndirectReference cidset)
Arguments
TypeNameDescription
PdfIndirectReferencefontStream
stringsubsetPrefix
PdfIndirectReferencecidset
GetFontBaseType

Source code

protected virtual PdfDictionary GetFontBaseType(PdfIndirectReference fontDescriptor, string subsetPrefix, int firstChar, int lastChar, byte[] shortTag)
Arguments
TypeNameDescription
PdfIndirectReferencefontDescriptor
stringsubsetPrefix
intfirstChar
intlastChar
byte``[]shortTag
GetFullFont

Source code

public virtual byte GetFullFont()
GetSubSet

Source code

protected internal virtual byte GetSubSet(HashSet2<int> glyphs, bool subsetp)
Arguments
TypeNameDescription
HashSet2<int>glyphs
boolsubsetp
CompactRanges

Source code

protected static int CompactRanges(List<int[]> ranges)
Arguments
TypeNameDescription
List<int``[]>ranges
AddRangeUni

Source code

public virtual void AddRangeUni(Dictionary<int, int[]> longTag, bool includeMetrics, bool subsetp)
Arguments
TypeNameDescription
Dictionary<int, int``[]>longTag
boolincludeMetrics
boolsubsetp
WriteFont

Source code

internal override void WriteFont(PdfWriter writer, PdfIndirectReference piref, object[] parms)
Arguments
TypeNameDescription
PdfWriterwriter
PdfIndirectReferencepiref
object``[]parms
ReadCffFont

Source code

public virtual byte ReadCffFont()
GetFullFontStream

Source code

public override PdfStream GetFullFontStream()
GetFontDescriptor [2/2]

Source code

public override float GetFontDescriptor(int key, float fontSize)
Arguments
TypeNameDescription
intkey
floatfontSize
GetMetricsTT

Source code

public virtual int GetMetricsTT(int c)
Arguments
TypeNameDescription
intc
HasKernPairs

Source code

public override bool HasKernPairs()
SetKerning

Source code

public override bool SetKerning(int char1, int char2, int kern)
Arguments
TypeNameDescription
intchar1
intchar2
intkern
GetRawCharBBox

Source code

protected override int GetRawCharBBox(int c, string name)
Arguments
TypeNameDescription
intc
stringname
IsWinAnsiSupported

Source code

internal bool IsWinAnsiSupported()

Properties

Rf
public virtual RandomAccessFileOrArray Rf { get; }
FileName
public virtual string FileName { get; }
Cff
public virtual bool Cff { get; }
DirectoryOffset
public virtual int DirectoryOffset { get; }
BaseFont
internal string BaseFont { get; }
PostscriptFontName
public override string PostscriptFontName { get; set; }
CodePagesSupported
public override string CodePagesSupported { get; }
FullFontName
public override string FullFontName { get; }
Subfamily
public override string Subfamily { get; }
AllNameEntries
public override string AllNameEntries { get; }
FamilyFontName
public override string FamilyFontName { get; }
MaxGlyphId
public int MaxGlyphId { get; }

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.