import { ObjectBase } from "../ObjectBase"; import type { Font } from "../Font"; import { PdfFontFormat } from "../Enums"; import { FontEmbedMode } from "../Enums"; import { PdfKeyedObjectCollection } from "./PdfKeyedObjectCollection"; /** * Represents and manages a {@link Font} * used in a {@link PdfDocument}. */ export declare class FontHandler extends ObjectBase { /** * Gets the {@link Font} associated with this {@link FontHandler}. */ get font(): Font; /** * Gets or sets the format used to represent the font in a document. * If "null" (the default), {@link PdfDocument#pdfFontFormat} is used. * Note that this property does not affect the 14 standard PDF fonts, * those are always encoded as Type1. */ get pdfFontFormat(): PdfFontFormat | null; /** * Gets or sets the format used to represent the font in a document. * If "null" (the default), {@link PdfDocument#pdfFontFormat} is used. * Note that this property does not affect the 14 standard PDF fonts, * those are always encoded as Type1. */ set format(value: PdfFontFormat | null); /** * Gets or sets the font embedding mode. * By default this property is unspecified (null), and the actual embedding mode depends on * whether or not the {@link Font} is one of {@link StandardPdfFont}. * For standard fonts, {@link PdfDocument#standardFontEmbedMode} determines the embedding mode. * For all other fonts, {@link PdfDocument#fontEmbedMode} determines the embedding mode. */ get embedMode(): FontEmbedMode | null; /** * Gets or sets the font embedding mode. * By default this property is unspecified (null), and the actual embedding mode depends on * whether or not the {@link Font} is one of {@link StandardPdfFont}. * For standard fonts, {@link PdfDocument#standardFontEmbedMode} determines the embedding mode. * For all other fonts, {@link PdfDocument#fontEmbedMode} determines the embedding mode. */ set embedMode(value: FontEmbedMode | null); /** * Gets a value indicating whether the current font is actually used in the document. */ get usedInDocument(): boolean; } /** * Represents a collection of {@link FontHandler} objects. **/ export declare class FontHandlerCollection extends PdfKeyedObjectCollection { get count(): number; getAt(index: number): FontHandler; setAt(index: number, item: FontHandler): void; insert(index: number, item: FontHandler): void; contains(item: FontHandler): boolean; remove(item: FontHandler): boolean; removeAt(index: number): void; clear(): void; get(key: Font): FontHandler | undefined; containsKey(key: Font): boolean; removeByKey(key: Font): boolean; /** * Gets an existing {@link FontHandler} associated with a specified {@link Font}, * or creates a new one if such font does not exist. * * @param font - The font * @returns The existing or newly created {@link FontHandler}. */ getFontHandler(font: Font): FontHandler; }