Click or drag to resize
Pdftools logo

Font Class

Inheritance Hierarchy
SystemObject
  PdfTools.Toolbox.InternalNativeBase
    PdfTools.Toolbox.InternalNativeObject
      PdfTools.Toolbox.Pdf.ContentFont

Namespace: PdfTools.Toolbox.Pdf.Content
Assembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.1.0+5820e9ca9ca173983539ffc40abc227fb62e6928
Syntax
C#
public class Font : NativeObject

The Font type exposes the following members.

Properties
 NameDescription
Public propertyAscent

The ascent of the font.

The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters.
Public propertyBaseFont

The PostScript name of the font

Public propertyCapHeight

The cap height of the font.

The vertical coordinate of the top of flat capital letters, measured from the baseline.
Public propertyDescent

The descent of the font.

The maximum depth below the baseline reached by glyphs in this font. The value is a negative number.
Public propertyItalicAngle

The italic angle of the font.

The angle is expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font. (For example, the 9-o’clock position is 90 degrees, and the 3-o’clock position is –90 degrees.) The value is negative for fonts that slope to the right, as almost all italic fonts do.
Public propertyLeading

The leading of the font.

The vertical distance between two adjacent base lines in multiline text.

This is a recomended value when generating several lines of text. If the font does not define this value, is returned.

Note that TextGenerator(Text, Font, Double, NullablePoint) uses a fixed value of 1.2 instead of this property to initialize the Leading in order to maintain backward compatibility with earlier versions.

Public propertyWeight

The visual weight of the font.

Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. If the font does not define this value, is returned.
Top
Methods
 NameDescription
Public methodStatic memberCreate

Create a new font object from font file data.

Supported formats are:
  • Type1
  • CFF
  • TrueType
  • OpenType
The returned font object is not yet used on any page, but it is associated with the given target document.
Public methodStatic memberCreateFromSystem

Create a new font object from an installed font.

The returned font object is not yet used on any page, but it is associated with the given target document.
Public methodEquals
(Inherited from NativeObject)
Public methodGetCharacterWidth

the width of a single glyph.

The width of a unicode character (in pt) relative to a font size of 1 pt.

If an error occurs (because the font or the owning document has already been closed) this method returns 0. But a return value of 0 is not generally an indication for failure.

Public methodGetHashCode
(Inherited from NativeObject)
Top
See Also