## API Report File for "@eigenpal/docx-editor-core"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

// @public
export function buildFontString(style: FontStyle): string;

// @public
export function clampFloatingWrapMargins(leftMargin: number, rightMargin: number, contentWidth: number): {
    leftMargin: number;
    rightMargin: number;
};

// @public
export function clearAllCaches(): void;

// @public
export function clearFontMetricsCache(): void;

// @public
export function clearParagraphMeasureCache(): void;

// @public
export function clearTextWidthCache(): void;

// @public
export function findCharacterAtX(x: number, charWidths: number[]): number;

// @public (undocumented)
export interface FloatingExclusionRect {
    // (undocumented)
    distBottom: number;
    // (undocumented)
    distLeft: number;
    // (undocumented)
    distRight: number;
    // (undocumented)
    distTop: number;
    // (undocumented)
    height: number;
    side: 'left' | 'right';
    // (undocumented)
    width: number;
    // (undocumented)
    wrapText?: WrapTextDirection;
    // (undocumented)
    wrapType?: string;
    x: number;
    y: number;
}

// @public (undocumented)
export interface FloatingImageZone {
    // (undocumented)
    bottomY: number;
    fullWidthBlock?: boolean;
    // (undocumented)
    leftMargin: number;
    // (undocumented)
    rightMargin: number;
    // (undocumented)
    segments?: FloatingLineSegmentZone[];
    // (undocumented)
    topY: number;
}

// @public (undocumented)
export interface FloatingLineSegmentZone {
    // (undocumented)
    availableWidth: number;
    // (undocumented)
    leftOffset: number;
}

// @public
export type FloatPageGeometry = PageGeometry;

// @public
export interface FontMetrics {
    // (undocumented)
    ascent: number;
    // (undocumented)
    descent: number;
    // (undocumented)
    fontFamily: string;
    // (undocumented)
    fontSize: number;
    // (undocumented)
    lineHeight: number;
    singleLineRatio: number;
}

// @public
export interface FontStyle {
    // (undocumented)
    bold?: boolean;
    // (undocumented)
    fontFamily?: string;
    // (undocumented)
    fontSize?: number;
    // (undocumented)
    italic?: boolean;
    // (undocumented)
    letterSpacing?: number;
}

// @public
export function getCachedFontMetrics(fontFamily: string, fontSize: number, bold?: boolean, italic?: boolean): FontMetricsEntry | undefined;

// @public
export function getCachedParagraphMeasure(block: ParagraphBlock, maxWidth: number): ParagraphMeasure | undefined;

// @public
export function getCachedTextWidth(text: string, font: string, letterSpacing?: number): number | undefined;

// @public
export function getCanvasContext(): CanvasRenderingContext2D;

// @public (undocumented)
export function getFloatingMargins(lineY: number, lineHeight: number, zones: FloatingImageZone[] | undefined, paragraphYOffset: number): FloatingLineMargins;

// @public
export function getFontCacheSize(): number;

// @public
export function getFontMetrics(style: FontStyle): FontMetrics;

// @public
export function getParagraphCacheSize(): number;

// @public
export function getRunCharWidths(run: TextRun): number[];

// @public
export function getTextCacheSize(): number;

// @public
export function getTotalCacheSize(): number;

// @public
export function getXForCharacter(offset: number, charWidths: number[]): number;

// @public
export function halfPtToPx(halfPt: number): number;

// @public
export function hashParagraphBlock(block: ParagraphBlock): string;

// @public
export type MeasureBlockFn = (block: FlowBlock, contentWidth: number, floatingZones?: FloatingImageZone[], cumulativeY?: number) => Measure;

// @public
export function measureBlocksWithFloats(blocks: FlowBlock[], contentWidth: number | number[], measureBlock: MeasureBlockFn, pageGeometry?: FloatPageGeometry): Measure[];

// @public
export function measureParagraph(block: ParagraphBlock, maxWidth: number, options?: MeasureParagraphOptions): ParagraphMeasure;

// @public
export interface MeasureParagraphOptions {
    floatingZones?: FloatingImageZone[];
    paragraphYOffset?: number;
}

// @public
export function measureParagraphs(blocks: ParagraphBlock[], maxWidth: number): ParagraphMeasure[];

// @public
export function measureRun(text: string, style: FontStyle): RunMeasurement;

// @public
export function measureText(text: string, style: FontStyle): TextMeasurement;

// @public
export function measureTextWidth(text: string, style: FontStyle): number;

// @public
export function ptToPx(pt: number): number;

// @public
export function pxToHalfPt(px: number): number;

// @public
export function pxToPt(px: number): number;

// @public
export function pxToTwips(px: number): number;

// @public (undocumented)
export function rectsToFloatingZones(rects: FloatingExclusionRect[], contentWidth: number): FloatingImageZone[];

// @public
export function resetCanvasContext(): void;

// @public
export interface RunMeasurement {
    // (undocumented)
    charWidths: number[];
    // (undocumented)
    metrics: FontMetrics;
    // (undocumented)
    width: number;
}

// @public
export function setCachedFontMetrics(fontFamily: string, fontSize: number, bold: boolean, italic: boolean, metrics: FontMetricsEntry): void;

// @public
export function setCachedParagraphMeasure(block: ParagraphBlock, maxWidth: number, measure: ParagraphMeasure): void;

// @public
export function setCachedTextWidth(text: string, font: string, letterSpacing: number, width: number): void;

// @public
export function setFontCacheSize(size: number): void;

// @public
export function setParagraphCacheSize(size: number): void;

// @public
export function setTextCacheSize(size: number): void;

// @public
export interface TextMeasurement {
    // (undocumented)
    ascent: number;
    // (undocumented)
    descent: number;
    // (undocumented)
    height: number;
    // (undocumented)
    width: number;
}

// @public
export function twipsToPx(twips: number): number;

```
