@antadesign/anta
    Preparing search index...

    Interface BoxFontUnreviewed

    The box's resolved text style, shaped to configure a canvas 2D context.

    Assign shorthand to ctx.font first: Chromium and Firefox reset fontStretch, fontVariantCaps, fontKerning and textRendering when font is assigned, so setting those before it loses them.

    interface BoxFont {
        shorthand: string;
        family: string;
        size: number;
        weight: number;
        style: string;
        stretch: string;
        lineHeight: number | null;
        letterSpacing: string;
        wordSpacing: string;
        color: string;
        featureSettings: string;
        variationSettings: string;
        kerning: string;
        variantCaps: string;
        textRendering: string;
        direction: string;
    }
    Index
    shorthand: string

    CSS font shorthand, assembled here because every engine returns an empty string for the computed shorthand. stretch and variantCaps are left out of it deliberately: a percentage font-stretch makes every engine reject the whole string and fall back to 10px sans-serif. Apply those through ctx.fontStretch / ctx.fontVariantCaps after setting ctx.font.

    family: string

    Resolved family list, quoted as the engine reports it.

    size: number

    Font size in CSS pixels.

    weight: number

    Numeric weight, 1-1000.

    style: string

    normal, italic, or an oblique <angle>.

    stretch: string

    Computed font-stretch, a percentage such as 88%. Canvas: ctx.fontStretch.

    lineHeight: number | null

    Line height in CSS pixels, or null when it computes to normal. Canvas ignores line height in ctx.font; this is for laying text out yourself.

    letterSpacing: string

    A length, never normal - normal is reported as 0px, which is what ctx.letterSpacing accepts.

    wordSpacing: string

    Same normalization as letterSpacing. Canvas: ctx.wordSpacing.

    color: string

    Resolved text color. Canvas: ctx.fillStyle.

    featureSettings: string

    Canvas 2D consumes neither of these. They are here for text you measure or draw some other way.

    variationSettings: string
    kerning: string

    Canvas: ctx.fontKerning.

    variantCaps: string

    Canvas: ctx.fontVariantCaps.

    textRendering: string

    Canvas: ctx.textRendering, which WebKit does not implement.

    direction: string

    Canvas: ctx.direction.