import type { PostextConfig } from '../types.js'; import type { ContentBlock } from '../parse/index.js'; /** The text of the document (one string, or the chapters of a book): the * families a config names are not all the families a build uses — comic * pages (`:::page`) letter in faces of their own (`Comic Neue`, `Bangers`, * `Zen Antique`…) even when the config has no `comics` section. */ export type FontContentText = string | readonly string[] | undefined; /** * Every font family a configuration sets text in (the first family of a * CSS stack): body, headings, lists, callouts, tables, chips, paragraph * styles, running heads, design elements and comic lettering. */ export declare function configFontFamilies(config: PostextConfig, markdown?: FontContentText): string[]; /** The faces the glyphs of inline symbols are set in (#1058): every * `font="…"` of a `:icon[…]{glyph=… font=…}` the text writes (in a * figure's labels and its `::caption` / `::note` lines). Read with a scan, * not an expression: a long line is never read again from each opening. */ export declare function iconFontFamilies(markdown: FontContentText): string[]; /** The faces code is set in (#624): the listings' when the text holds a * fence (and the configuration reads fences) or the configuration has a * `codeStyle` section, the inline code's when it sets inline code. */ export declare function codeFontFamilies(config: PostextConfig, markdown?: FontContentText): string[]; export interface FontVariantUse { weight: number; style: 'normal' | 'italic'; } export declare const STANDARD_FONT_VARIANTS: readonly FontVariantUse[]; /** What a document's text asks of its faces beyond its configuration. */ export interface FontUsageDocument { /** Whether the text sets a letter or digit that is not Chinese in * emphasis (`*…*`): the characters that keep their italics where * emphasis is set as dots ({@link hasLatinEmphasis}). Unset when the * text is not known. */ latinEmphasis?: boolean; /** The text the configuration lays out: a code fence in it asks for the * code face (#624). */ markdown?: FontContentText; } /** Whether the text of `blocks` (headings aside, which are set in their * own face) puts a letter or digit that is not Chinese in emphasis: a * Latin word in `*…*` keeps its italics where the Chinese characters * beside it take dots (`cjk.emphasis: 'dots'`). */ export declare function hasLatinEmphasis(blocks: readonly ContentBlock[]): boolean; /** * The (weight, style) pairs the configuration asks of each family: every * config node carrying a `fontFamily` contributes its `fontWeight` (400 * when unset) and `fontStyle` (normal when unset). The body text family * also needs the four standard variants, since markdown emphasis sets bold * and italic runs in it; so does a design text with `inlineMarks`. Where * emphasis is set as dots (`cjk.emphasis`, by default in a Chinese * document), `*…*` puts dots under Chinese characters and keeps the * italics of the rest: the body family is asked for its italics only when * `doc` does not say the text holds no Latin letter or digit in emphasis. * Where `bodyText.emphasis` sets `*…*` in bold, a colour or an overline * (an Arabic document's default), the body family is asked for no italics. * The summaries of the contents (`toc.subtitle`) are asked for in the * slant they are set in, italic unless the configuration says upright. */ export declare function collectFontUsage(config: PostextConfig, doc?: FontUsageDocument): Map; //# sourceMappingURL=usage.d.ts.map