-
Notifications
You must be signed in to change notification settings - Fork 5
Support for open type features #3
Comments
The Some of the features such as caps, numeric glyphs, and superscript/subscript would be relatively straightforward to make utilities for: .normal-caps {
font-variant-caps: normal;
}
.small-caps {
font-variant-caps: small-caps;
}
.all-small-caps {
font-variant-caps: all-small-caps;
}
.petite-caps {
font-variant-caps: petite-caps;
}
.unicase {
font-variant-caps: unicase;
}
.titling-caps {
font-variant-caps: titling-caps;
}
.normal-nums {
font-variant-numeric: normal;
}
.ordinal-nums {
font-variant-numeric: ordinal;
}
.slashed-zeros {
font-variant-numeric: slashed-zero;
}
.lining-nums {
font-variant-numeric: lining-nums;
}
.oldstyle-nums {
font-variant-numeric: oldstyle-nums;
}
.proportional-nums {
font-variant-numeric: proportional-nums;
}
.tabular-nums {
font-variant-numeric: tabular-nums;
}
.diagonal-fractions {
font-variant-numeric: diagonal-fractions;
}
.stacked-fractions {
font-variant-numeric: stacked-fractions;
}
.not-sub, .not-super {
font-variant-position: normal;
}
.sub {
font-variant-position: sub;
}
.super {
font-variant-position: super;
} While others such as ligatures and alternate glyphs might be a bit trickier, because they can (and probably often do) take multiple keywords and/or functions. For instance, ligature utilities could be: .normal-ligatures {
font-variant-ligatures: normal;
}
.no-ligatures {
font-variant-ligatures: none;
}
.common-ligatures {
font-variant-ligatures: common-ligatures;
}
.no-common-ligatures {
font-variant-ligatures: no-common-ligatures;
}
.discretionary-ligatures {
font-variant-ligatures: discretionary-ligatures;
}
.no-discretionary-ligatures {
font-variant-ligatures: no-discretionary-ligatures;
}
.historical-ligatures {
font-variant-ligatures: historical-ligatures;
}
.no-historical-ligatures {
font-variant-ligatures: no-historical-ligatures;
}
.contextual-ligatures {
font-variant-ligatures: contextual;
}
.no-contextual-ligatures {
font-variant-ligatures: no-contextual;
} ...but then you wouldn't be able to do like Thoughts? |
@martinfjant I'm planning on adding support for caps, numeric, and ligatures as above. Do you have any feedback on the class names? As for the other features, |
I think the names you've chosen sounds pretty good :). As for ligatures, you would hardly ever have a reason to use the more than one of the classes anyway, so, I don't think they would pose an issue. |
Thank you @martinfjant, I just released |
+1 |
@felipepodesta Which OpenType feature(s) are you missing? Any suggestions on how to implement them (class names)? |
Heads up: the classes for caps, nums, and ligatures will change in v3.0 of the plugin, because I'm adding them to the
I just published the |
Lots of fonts today support open type features, where one can toggle different font features. Adobe has a very good page explaining the features:
https://helpx.adobe.com/fonts/using/open-type-syntax.html
Ligatures seem to have nice predetermined abbreviations that could be used as classnames.
The text was updated successfully, but these errors were encountered: