/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net */ /** * @module plugins/font */ import type { IJodit } from "../../types/index"; import { ViewComponent } from "../../core/component/view-component"; /** * A font as the Google Fonts Developer API describes it */ export interface IGoogleFont { family: string; category: string; variants: string[]; } /** * The first family of a `font-family` value, unquoted and in lower case for * comparing */ export declare function firstFamily(fontFamily: string): string; /** * Loads fonts from Google Fonts: the whole of each font the content uses into * the editor's document, and just the letters of its name for the font list */ export declare class GoogleFonts extends ViewComponent { className(): string; /** * The library by lower-case family, empty until it arrives */ readonly fonts: Map; readonly ready: Promise; private readonly __links; private readonly __loaded; private readonly __previewed; constructor(jodit: IJodit); /** * The library's font named first in a `font-family` value */ find(fontFamily: string): IGoogleFont | undefined; /** * The `font-family` value that applies a font */ value(font: IGoogleFont): string; /** * Loads the regular, italic, bold and bold italic styles that a font has * into the editor's document */ load(font: IGoogleFont): void; /** * Loads every font of the library that the content uses */ loadUsed(): void; /** * Loads into the page just the letters of each font's name, so the font * list can show the name in its font */ preview(fonts: IGoogleFont[]): void; private __loadedInto; private __family; private __append; destruct(): void; }