Is there a way to set capital spacing (cpsp
) for an element without affecting other OpenType features applied to it?
Using font-feature-settings
is not an option: e.g. font-feature-settings: 'cpsp'
turns on capital spacing, but also resets all other OpenType features if they were in effect.
Some CSS properties allow for setting an OpenType tag without affecting others; e.g. font-variant-numeric
for onum
, lnum
etc, or font-variant-caps
for smpc
and c2sc
. But I don’t see a dedicated property for cpsp
tag.
I think there currently isn't any CSS mechanism for this. I'm not sure why: it seems like it wouldn't have been hard to include a font-variant property for this. Maybe it was assumed that 'cpsp' is rarely used so not a priority.
Perhaps you can open an issue in the csswg-drafts repo on GitHub suggesting this addition.