* \[Experimental\] Add a font feature for texture control (#2081).

- Currently only available through custom builds with `build-texture-feature = true`.
This commit is contained in:
be5invis 2023-11-10 03:27:51 -08:00
parent d91cbeca6c
commit cfb3826680
9 changed files with 179 additions and 4 deletions

View file

@ -23,8 +23,19 @@ export const VS01 = LinkedGlyphProp("VS01");
export const TieMark = LinkedGlyphProp("TieMark");
export const LeaningMark = LinkedGlyphProp("LeaningMark");
export const LeaningMarkSpacer = LinkedGlyphProp("LeaningMarkSpacer");
export const Texture = {
ExtL: LinkedGlyphProp("TextureExtL"),
ExtR: LinkedGlyphProp("TextureExtR"),
ExtLR: LinkedGlyphProp("TextureExtLR"),
ShrL: LinkedGlyphProp("TextureShrL"),
ShrR: LinkedGlyphProp("TextureShrR"),
ShrLR: LinkedGlyphProp("TextureShrLR")
};
function LinkedGlyphProp(key) {
return {
key,
get(glyph) {
if (glyph && glyph.related) return glyph.related[key];
else return null;