Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

font-tech() — font technology support query

`font-tech()` is a supports condition testing a feature implemented inside fonts rather than a font file’s container format.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

font-tech( <font-tech> )

font-tech() is a supports condition testing a feature implemented inside fonts rather than a font file’s container format.

The example obtains true for both font-tech(variations) and font-tech(color-colrv1); the variations branch genuinely applies 7px letter spacing. font-tech(cktis-unknown) returns false and cannot override it.

Grammar: font-tech( <font-tech> ).

Technology names include features-opentype, variations, color-font technologies, and palettes. A true result means the UA can use that technology, not that the selected font contains the required tables or glyphs. Use the condition for enhancements while retaining readable fallback rendering; container format is tested separately by font-format().

Examples

const probe=document.createElement('div');probe.id='tech-probe';probe.textContent='variable';document.body.append(probe);
const style=document.createElement('style');
style.textContent='@supports font-tech(variations){#tech-probe{letter-spacing:7px}}@supports font-tech(cktis-unknown){#tech-probe{letter-spacing:19px}}';
document.head.append(style);
const variations=CSS.supports('font-tech(variations)');
const colrv1=CSS.supports('font-tech(color-colrv1)');
const unknown=CSS.supports('font-tech(cktis-unknown)');
console.log('variations='+variations+'; color-colrv1='+colrv1+'; unknown='+unknown+'; applied-spacing='+getComputedStyle(probe).letterSpacing);

Result

variations=true; color-colrv1=true; unknown=false; applied-spacing=7px

`font-tech()` is a supports condition testing a feature implemented inside fonts rather than a font file’s container format.

Sources