Table of Contents

Class CurrentFontState

Namespace
UglyToad.PdfPig.Graphics
Assembly
UglyToad.PdfPig.dll

The current state of text related parameters for a content stream.

public class CurrentFontState : IDeepCloneable<CurrentFontState>
Inheritance
CurrentFontState
Implements
Inherited Members

Constructors

CurrentFontState()

public CurrentFontState()

Properties

CharacterSpacing

A value in unscaled text space units which is added to the horizontal (or vertical if in vertical writing mode) glyph displacement.

public double CharacterSpacing { get; set; }

Property Value

double

Remarks

In horizontal writing mode a positive value will expand the distance between letters/glyphs. Default value 0.

FontName

The name of the currently active font.

public NameToken FontName { get; set; }

Property Value

NameToken

FontSize

The current font size.

public double FontSize { get; set; }

Property Value

double

FromExtendedGraphicsState

Whether the font comes from the extended graphics state via the SetGraphicsStateParametersFromDictionary operator.

public bool FromExtendedGraphicsState { get; set; }

Property Value

bool

HorizontalScaling

Adjusts the width of glyphs/letters by stretching (or compressing) them horizontally. Value is a percentage of the normal width.

public double HorizontalScaling { get; set; }

Property Value

double

Knockout

Are all glyphs in a text object treated as a single elementary object for the purpose of the transparent imaging model?

public bool Knockout { get; set; }

Property Value

bool

Leading

The vertical distance in unscaled text space units between the baselines of lines of text.

public double Leading { get; set; }

Property Value

double

Rise

The distance in unscaled text space units to move the default baseline either up or down.

public double Rise { get; set; }

Property Value

double

Remarks

Always applies to the vertical coordinate irrespective or writing mode.

TextRenderingMode

The TextRenderingMode for glyph outlines.

public TextRenderingMode TextRenderingMode { get; set; }

Property Value

TextRenderingMode

Remarks

When the rendering mode requires filling the current non-stroking color in the state is used.
When the rendering mode requires stroking the current stroking color in the state is used.
The rendering mode has no impact on Type 3 fonts.

WordSpacing

As for CharacterSpacing but applies only for the space character (32).

public double WordSpacing { get; set; }

Property Value

double

Remarks

Default value 0.

Methods

DeepClone()

public CurrentFontState DeepClone()

Returns

CurrentFontState