/** * Synthetic Font Effects * * Provides transformations for creating synthetic bold, italic, and other effects * on glyph outlines. These are useful for fonts that don't have native bold/italic * variants. */ import type { GlyphPath } from "../render/path.ts"; /** * Apply oblique (slant/italic) transformation to a path * * @param path - The glyph path to transform * @param slant - Tangent of the slant angle (0.2 = ~12 degrees, typical italic) * @returns New path with slant applied * * Transform: x' = x + y * slant, y' = y */ export declare function obliquePath(path: GlyphPath, slant: number): GlyphPath; /** * Apply general 2D affine transformation to a path * * @param path - The glyph path to transform * @param matrix - 2D transformation matrix [a, b, c, d, e, f] * @returns New path with transformation applied * * Transform: x' = a*x + c*y + e, y' = b*x + d*y + f */ export declare function transformPath(path: GlyphPath, matrix: [number, number, number, number, number, number]): GlyphPath; /** * Apply horizontal scaling (condensing/expanding) to a path * * @param path - The glyph path to transform * @param factor - Horizontal scale factor (< 1 = narrower, > 1 = wider) * @returns New path with horizontal scaling applied * * Transform: x' = x * factor, y' = y */ export declare function condensePath(path: GlyphPath, factor: number): GlyphPath; /** * Embolden (make bolder) a path by offsetting the outline * * This implementation uses a simplified approach that offsets each contour * outward by moving points along the normal direction. For production use, * a proper stroking algorithm would be more accurate. * * @param path - The glyph path to embolden * @param strength - Offset strength in font units (positive = bolder, negative = thinner) * @returns New path with emboldening applied */ export declare function emboldenPath(path: GlyphPath, strength: number): GlyphPath;