/** An estimate of the width of a string, in ems. Characters of Japanese and other full-width scripts are one em. */ export declare function textWidth(text: string, bold?: boolean): number; /** The text in capitals when it has Latin letters; any other text is left as it is. */ export declare function capitals(text: string): string; /** * A short form of a name: its initials when it has several words, else its first letters. Japanese names give their first two or three characters. * * This is a guess at a label, not a code. For a national team it is often not the code the sport uses: "Spain" gives SPA, where FIFA's * three-letter code is ESP ("Germany" gives GER, which happens to match; "Netherlands" gives NET, FIFA's is NED). Pass each team's `abbr` yourself * (the FIFA, World Rugby or ICC code your data carries); the package bundles no table of country codes. */ export declare function abbreviate(name: string): string; /** The lines a name is set in, the font size that fits them, and the width of the widest. */ export interface FittedLines { lines: string[]; size: number; width: number; height: number; } /** The line height as a multiple of the font size. */ export declare const LINE_HEIGHT = 1.1; /** * Set a name in the biggest size that fits a box, on one line or, at a space, on two. * @example * ```ts * import { fitLines } from "@johnmorrisdotca/kyogijo-stadiums"; * console.log(fitLines("GOLDEN STATE WARRIORS", 40, 12, 8).lines); * // [ 'GOLDEN STATE', 'WARRIORS' ] * ``` */ export declare function fitLines(name: string, maxWidth: number, maxHeight: number, maxSize: number): FittedLines;