import type { BalloonStyleConfig, ComicsConfig, Dimension, ResolvedBalloonStyleConfig, ResolvedComicsConfig, ResolvedLetteringConfig, ResolvedPanelStyleConfig, WritingMode } from '../types.js'; import type { ResolvedConfig } from '../vdt.js'; /** * The lettering face of a document language (all on Google Fonts, loaded * by family name like any other face): `Comic Neue` (Latin, Greek, * Cyrillic and most others), `Zen Antique` for Japanese (kana in Mincho, * kanji in Gothic, the antique style of manga lettering), `Noto Sans SC` * for Simplified Chinese (LXGW WenKai, the usual pick, is not on Google * Fonts in its Simplified cut), `LXGW WenKai TC` for Traditional Chinese, * `Playpen Sans Arabic` for Arabic, Persian and Urdu. */ export declare function defaultComicFont(locale: string | undefined): string; /** The face of sound effects (`sfx`) in a document language: `Bangers` * for Latin scripts, `Dela Gothic One` for Japanese, `ZCOOL KuaiLe` for * Simplified Chinese, the lettering face for Traditional Chinese, `Lalezar` * for Arabic. */ export declare function defaultComicSfxFont(locale: string | undefined): string; /** * The words each comics setting that takes one of a few chooses from * (#590): a value written otherwise is read as the setting's default (the * base style's value, for a panel or balloon style) and reported by * `collectConfigWarnings` (`unknownConfigValue`, with the closest word). */ export declare const COMIC_CHOICES: { readonly readingDirection: readonly ["auto", "ltr", "rtl"]; readonly artDirection: readonly ["ltr", "rtl"]; readonly borderStyle: readonly ["solid", "none", "rough"]; readonly fit: readonly ["cover", "contain"]; readonly writingMode: readonly ["auto", "horizontal", "vertical"]; readonly textTransform: readonly ["none", "uppercase"]; readonly dropFinalStop: readonly ["auto", "true", "false"]; readonly joinSameSpeaker: readonly ["butt", "connector", "none"]; readonly shape: readonly ["oval", "rounded", "rectangle", "cloud", "burst", "wavy", "electric", "none"]; readonly tail: readonly ["curved", "wedge", "bubbles", "zigzag", "none"]; readonly target: readonly ["mouth", "head"]; readonly position: readonly ["auto", "top-start", "top-end", "bottom-start", "bottom-end", "top", "bottom"]; readonly align: readonly ["center", "start"]; }; /** Whether `value` is one of the words of `choices`; `dropFinalStop` * takes `'auto'` or a boolean (its `'true'` and `'false'` are the * booleans, never strings). */ export declare function isComicChoice(choices: readonly string[], value: unknown): boolean; /** The panel style every panel starts from: a 1 pt black border, a white * ground, the picture cropped to fill the cell. */ export declare const DEFAULT_PANEL_STYLE: ResolvedPanelStyleConfig; /** Room between tiers and between panels side by side: in manga as in * Western comics the gap between tiers is about twice the gap inside a * tier. */ export declare const DEFAULT_COMIC_GUTTER: { horizontal: Dimension; vertical: Dimension; }; /** The lettering, less its face (see {@link defaultComicFont}). */ export declare const DEFAULT_LETTERING_STATIC: Omit; /** The built-in balloon styles, by kind (sound effects take their face from * the document language at resolution, and their bold from that face: * bold unless it is a one-cut default face, `Bangers` and the like). */ export declare const DEFAULT_BALLOON_STYLES: readonly BalloonStyleConfig[]; /** The ids of the built-in balloon styles. */ export declare const DEFAULT_BALLOON_STYLE_IDS: readonly string[]; /** Resolve `PostextConfig.comics` against the document language (the * default faces follow it). */ export declare function resolveComicsConfig(partial: ComicsConfig | undefined, locale?: string): ResolvedComicsConfig; /** What the reading direction of a document's comics depends on besides * the `comics` section: the document language (`locale`), its resolved * base direction and its writing mode. */ export interface ComicDirectionContext { locale?: string; direction?: 'ltr' | 'rtl'; writingMode?: WritingMode; } /** The direction a document's comics read in (`comics.readingDirection` * resolved; a page's own `direction` attribute still wins over it, see * `comicPageDirection`). `'ltr'` or `'rtl'` as written; `'auto'` (or * unset) is `'rtl'` when the document runs right to left (an Arabic * edition), is set vertically (`layout.writingMode: 'vertical-rl'`), or * is in a language whose readers read comics right to left * ({@link comicsLocaleDirection}: Japanese, Traditional Chinese), so a * localized edition of a Western comic reads in its language's * direction; otherwise it is the direction the art was drawn for * (`comics.artDirection`: a manga stays right to left in English, a * Western comic left to right in Simplified Chinese or Korean). With * `page.binding: 'auto'`, a document with a `comics` section reading * right to left is bound on the right. */ export declare function comicReadingDirection(comics: Pick | undefined, doc: ComicDirectionContext): 'ltr' | 'rtl'; /** The comics settings of a resolved config: `resolved.comics`, else the * defaults of the document language (a document with a `:::page` and no * `comics` section). */ export declare function resolvedComics(resolved: ResolvedConfig): ResolvedComicsConfig; /** The panel style a page or panel names: the named style, else the * default one. */ export declare function pickPanelStyle(comics: ResolvedComicsConfig, id: string | undefined): ResolvedPanelStyleConfig; /** The balloon style a script line names, or undefined. */ export declare function pickBalloonStyle(comics: ResolvedComicsConfig, id: string | undefined): ResolvedBalloonStyleConfig | undefined; /** Drop every field equal to its default: what persisting the config * needs. `locale` decides the default faces. Returns undefined when * nothing is left. */ export declare function stripComicsDefaults(config: ComicsConfig | undefined, locale?: string): ComicsConfig | undefined; //# sourceMappingURL=comics.d.ts.map