import EventEmitter from 'eventemitter3';
import type { Texture } from '../../renderers/shared/texture/Texture';
import type { FontMetrics } from '../canvas/CanvasTextMetrics';
export interface CharData {
    id: number;
    xOffset: number;
    yOffset: number;
    xAdvance: number;
    kerning: Record<string, number>;
    texture?: Texture;
}
export interface RawCharData extends Omit<CharData, 'texture'> {
    page: number;
    x: number;
    y: number;
    width: number;
    height: number;
    letter: string;
}
export interface BitmapFontData {
    baseLineOffset: number;
    chars: Record<string, RawCharData>;
    pages: {
        id: number;
        file: string;
    }[];
    lineHeight: number;
    fontSize: number;
    fontFamily: string;
    distanceField?: {
        type: 'sdf' | 'msdf' | 'none';
        range: number;
    };
}
export interface BitmapFontInstallOptions {
    /**
     * Characters included in the font set. You can also use ranges.
     * For example, `[['a', 'z'], ['A', 'Z'], "!@#$%^&*()~{}[] "]`.
     * Don't forget to include spaces ' ' in your character set!
     * @default BitmapFont.ALPHANUMERIC
     */
    chars?: string | (string | string[])[];
    /**
     * Render resolution for glyphs.
     * @default 1
     */
    resolution?: number;
    /**
     * Padding between glyphs on texture atlas. Lower values could mean more visual artifacts
     * and bleeding from other glyphs, larger values increase the space required on the texture.
     * @default 4
     */
    padding?: number;
    /**
     * Skip generation of kerning information for the BitmapFont.
     * If true, this could potentially increase the performance, but may impact the rendered text appearance.
     * @default false
     */
    skipKerning?: boolean;
}
interface BitmapFontEvents<Type> {
    destroy: [Type];
}
export declare abstract class AbstractBitmapFont<FontType> extends EventEmitter<BitmapFontEvents<FontType>> implements Omit<BitmapFontData, 'chars' | 'pages' | 'fontSize'> {
    /** The map of characters by character code. */
    readonly chars: Record<string, CharData>;
    /** The line-height of the font face in pixels. */
    readonly lineHeight: BitmapFontData['lineHeight'];
    /** The name of the font face. */
    readonly fontFamily: BitmapFontData['fontFamily'];
    readonly fontMetrics: FontMetrics;
    readonly baseLineOffset: BitmapFontData['baseLineOffset'];
    /** The range and type of the distance field for this font. */
    readonly distanceField: BitmapFontData['distanceField'];
    /** The map of base page textures (i.e., sheets of glyphs). */
    readonly pages: {
        texture: Texture;
    }[];
    readonly baseMeasurementFontSize: number;
    protected baseRenderedFontSize: number;
    /**
     * @deprecated since 8.0.0
     * The name of the font face.
     */
    get font(): BitmapFontData['fontFamily'];
    /** @deprecated since 8.0.0 */
    get pageTextures(): AbstractBitmapFont<FontType>['pages'];
    /**
     * @deprecated since 8.0.0
     * The size of the font face in pixels.
     */
    get size(): BitmapFontData['fontSize'];
    /**
     * @deprecated since 8.0.0
     * The kind of distance field for this font or "none".
     */
    get distanceFieldRange(): BitmapFontData['distanceField']['range'];
    /**
     * @deprecated since 8.0.0
     * The range of the distance field in pixels.
     */
    get distanceFieldType(): BitmapFontData['distanceField']['type'];
    destroy(): void;
}
export {};
