Class FontProgram
public abstract class FontProgram
- Inheritance
-
FontProgram
- Derived
- Inherited Members
Constructors
FontProgram()
protected FontProgram()
Fields
DEFAULT_WIDTH
public const int DEFAULT_WIDTH = 1000
Field Value
HORIZONTAL_SCALING_FACTOR
public const int HORIZONTAL_SCALING_FACTOR = 100
Field Value
UNITS_NORMALIZATION
public const int UNITS_NORMALIZATION = 1000
Field Value
avgWidth
protected int avgWidth
Field Value
codeToGlyph
protected IDictionary<int, Glyph> codeToGlyph
Field Value
encodingScheme
The font's encoding name.
protected string encodingScheme
Field Value
Remarks
The font's encoding name. This encoding is 'StandardEncoding' or 'AdobeStandardEncoding' for a font that can be totally encoded according to the characters names. For all other names the font is treated as symbolic.
fontIdentification
protected FontIdentification fontIdentification
Field Value
fontMetrics
protected FontMetrics fontMetrics
Field Value
fontNames
protected FontNames fontNames
Field Value
isFontSpecific
protected bool isFontSpecific
Field Value
registry
protected string registry
Field Value
unicodeToGlyph
protected IDictionary<int, Glyph> unicodeToGlyph
Field Value
Methods
ConvertGlyphSpaceToTextSpace(double)
public static double ConvertGlyphSpaceToTextSpace(double value)
Parameters
value
double
Returns
ConvertGlyphSpaceToTextSpace(int)
public static int ConvertGlyphSpaceToTextSpace(int value)
Parameters
value
int
Returns
ConvertGlyphSpaceToTextSpace(float)
public static float ConvertGlyphSpaceToTextSpace(float value)
Parameters
value
float
Returns
ConvertTextSpaceToGlyphSpace(float)
public static float ConvertTextSpaceToGlyphSpace(float value)
Parameters
value
float
Returns
CountOfGlyphs()
public virtual int CountOfGlyphs()
Returns
FixSpaceIssue()
protected virtual void FixSpaceIssue()
GetAvgWidth()
public virtual int GetAvgWidth()
Returns
GetCharBBox(int)
Get glyph's bbox.
public virtual int[] GetCharBBox(int unicode)
Parameters
unicode
inta unicode symbol or FontSpecif code.
Returns
- int[]
Gets bbox in normalized 1000 units.
GetFontIdentification()
public virtual FontIdentification GetFontIdentification()
Returns
GetFontMetrics()
public virtual FontMetrics GetFontMetrics()
Returns
GetFontNames()
public virtual FontNames GetFontNames()
Returns
GetGlyph(int)
public virtual Glyph GetGlyph(int unicode)
Parameters
unicode
int
Returns
GetGlyphByCode(int)
public virtual Glyph GetGlyphByCode(int charCode)
Parameters
charCode
int
Returns
GetKerning(int, int)
Gets the kerning between two glyphs.
public virtual int GetKerning(int first, int second)
Parameters
Returns
- int
the kerning to be applied
GetKerning(Glyph, Glyph)
Gets the kerning between two glyphs.
public abstract int GetKerning(Glyph first, Glyph second)
Parameters
Returns
- int
the kerning to be applied
GetPdfFontFlags()
public abstract int GetPdfFontFlags()
Returns
GetRegistry()
public virtual string GetRegistry()
Returns
GetWidth(int)
Get glyph's width.
public virtual int GetWidth(int unicode)
Parameters
unicode
inta unicode symbol or FontSpecif code.
Returns
- int
Gets width in normalized 1000 units.
HasKernPairs()
public virtual bool HasKernPairs()
Returns
IsBuiltWith(string)
Checks whether the FontProgram was built with corresponding fontName.
public virtual bool IsBuiltWith(string fontName)
Parameters
fontName
stringa font name or path to a font program
Returns
- bool
true, if the FontProgram was built with the fontProgram. Otherwise false.
Remarks
Checks whether the FontProgram was built with corresponding fontName. Default value is false unless overridden.
IsFontSpecific()
public virtual bool IsFontSpecific()
Returns
SetBbox(int[])
protected virtual void SetBbox(int[] bbox)
Parameters
bbox
int[]
SetBold(bool)
protected virtual void SetBold(bool isBold)
Parameters
isBold
bool
SetCapHeight(int)
Sets the capital letters height.
protected virtual void SetCapHeight(int capHeight)
Parameters
capHeight
intcap height in 1000-units
Remarks
Sets the capital letters height. See also SetCapHeight(int).
SetFixedPitch(bool)
protected virtual void SetFixedPitch(bool isFixedPitch)
Parameters
isFixedPitch
bool
SetFontFamily(string)
Sets a preferred font family name.
protected virtual void SetFontFamily(string fontFamily)
Parameters
fontFamily
stringa preferred font family name.
SetFontName(string)
Sets the PostScript name of the font.
protected virtual void SetFontName(string fontName)
Parameters
fontName
stringthe PostScript name of the font, shall not be null or empty.
Remarks
Sets the PostScript name of the font.
If full name is null, it will be set as well.SetFontStretch(string)
Sets font width in css notation (font-stretch property)
protected virtual void SetFontStretch(string fontWidth)
Parameters
fontWidth
string
SetFontWeight(int)
Sets font weight.
protected virtual void SetFontWeight(int fontWeight)
Parameters
fontWeight
intinteger form 100 to 900. See FontWeights.
SetItalicAngle(int)
Sets the PostScript italic angle.
protected virtual void SetItalicAngle(int italicAngle)
Parameters
italicAngle
intin counter-clockwise degrees from the vertical
Remarks
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).SetRegistry(string)
protected virtual void SetRegistry(string registry)
Parameters
registry
string
SetStemH(int)
protected virtual void SetStemH(int stemH)
Parameters
stemH
int
SetStemV(int)
protected virtual void SetStemV(int stemV)
Parameters
stemV
int
SetTypoAscender(int)
Sets typo ascender.
protected virtual void SetTypoAscender(int ascender)
Parameters
ascender
inttypo ascender value in 1000-units
Remarks
Sets typo ascender. See also SetTypoAscender(int).
SetTypoDescender(int)
Sets typo descender.
protected virtual void SetTypoDescender(int descender)
Parameters
descender
inttypo descender value in 1000-units
Remarks
Sets typo descender. See also SetTypoDescender(int).
SetXHeight(int)
protected virtual void SetXHeight(int xHeight)
Parameters
xHeight
int
ToString()
public override string ToString()