Table of Contents

Class ItalicPostProcessor

Namespace
KernSmith.Rasterizer
Assembly
KernSmith.dll

Simulates italic by applying a horizontal shear transform at the pixel level. Works as a fallback for rasterizers that don't support outline-level italic transforms.

public sealed class ItalicPostProcessor : IGlyphPostProcessor
Inheritance
ItalicPostProcessor
Implements
Inherited Members

Constructors

ItalicPostProcessor(float)

Creates an italic shear effect.

public ItalicPostProcessor(float shearFactor = 0.2126)

Parameters

shearFactor float

Horizontal shear amount. Default is 0.2126f (tan 12 degrees, matching FreeType).

Properties

ShearFactor

Horizontal shear amount (tangent of the italic angle). Default is tan(12 degrees).

public float ShearFactor { get; }

Property Value

float

Methods

Process(RasterizedGlyph)

Takes a rendered glyph and returns a new one with the effect applied.

public RasterizedGlyph Process(RasterizedGlyph glyph)

Parameters

glyph RasterizedGlyph

The glyph to modify.

Returns

RasterizedGlyph