import { EventEmitter } from 'eventemitter3';
import 'reflect-metadata';
import { IFontAtlas, IFontMapping, IFontOptions, IFontService, IIconFontGlyph } from './IFontService';
export declare const DEFAULT_CHAR_SET: string[];
export declare const DEFAULT_FONT_FAMILY = "sans-serif";
export declare const DEFAULT_FONT_WEIGHT = "normal";
export declare const DEFAULT_FONT_SIZE = 24;
export declare const DEFAULT_BUFFER = 3;
export declare const DEFAULT_CUTOFF = 0.25;
export declare const DEFAULT_RADIUS = 8;
export declare const VALID_PROPS: string[];
export default class FontService extends EventEmitter implements IFontService {
    get scale(): number;
    get canvas(): HTMLCanvasElement;
    get mapping(): IFontMapping;
    getCanvasByKey(key: string): HTMLCanvasElement;
    getMappingByKey(key: string): IFontMapping;
    fontAtlas: IFontAtlas;
    iconFontMap: Map<string, string>;
    private iconFontGlyphs;
    private fontOptions;
    private key;
    private cache;
    init(): void;
    addIconGlyphs(glyphs: IIconFontGlyph[]): void;
    /**
     * 添加对 iconfont unicode 的映射
     * @param fontUnicode
     * @param name
     */
    addIconFont(name: string, fontUnicode: string): void;
    /**
     * 获取自定义 iconfont 别称对应的 unicode 编码，若是当前的 map 中没有对应的键值对，那么就返回原值
     * @param name
     * @returns
     */
    getIconFontKey(name: string): string;
    getGlyph(name: string): string;
    setFontOptions(option: Partial<IFontOptions>): void;
    /**
     * 用户自定义添加第三方字体 （用户使用 layer/point/text/iconfont 的前提需要加载第三方字体文件）
     * @param fontFamily
     * @param fontPath
     */
    addFontFace(fontFamily: string, fontPath: string): void;
    destroy(): void;
    private generateFontAtlas;
    private getKey;
    /**
     *
     * @param key
     * @param characterSet
     * @returns
     * 若是相同的 key，那么将字符存储到同同一个字符列表中
     */
    private getNewChars;
}
