UNPKG

nehan

Version:

Html layout engine for paged-media written in Typescript

49 lines (48 loc) 1.41 kB
import { CssText, PropValue, NehanElement, NativeStyleMap, ILogicalCssEvaluator } from "./public-api"; export interface FontShorthand { "font-style"?: string; "font-variant"?: string; "font-weight"?: string; "font-stretch"?: string; "line-height"?: string; "font-size": string; "font-family": string; } declare type FontShorthandKey = keyof FontShorthand; export declare enum FontSizeKeyword { XX_SMALL = "xx-small", X_SMALL = "x-small", SMALL = "small", MEDIUM = "medium", LARGE = "large", X_LARGE = "x-large", XX_LARGE = "xx-large" } export declare enum FontSizeKeywordRelative { SMALLER = "smaller", LARGER = "larger" } export declare const FontSizeKeywords: unknown[]; export declare const FontSizeKeywordsRelative: unknown[]; export declare const FontSizeKeywordSize: { [keyword: string]: number; }; export declare const FontSizeKeywordRelativeSize: { [keyword: string]: string; }; export declare class Font { style: string; variant: string; weight: string; stretch: string; size: number; lineHeight: string; family: string; constructor(); get css(): string; get lineExtent(): number; static parseShorthand(text: CssText): PropValue<FontShorthandKey, string>[]; static load(element: NehanElement): Font; acceptCssEvaluator(visitor: ILogicalCssEvaluator): NativeStyleMap; } export {};