Better CSS in OT test
Brought to you by:
psb1558
The OpenType test should preferably use the high-level CSS properties where available. It still doesn’t work anywhere, though.
@font-feature-values Junicode {
@styleset {
nordic: 1;
insular: 2;
romanhigh: 4;
romanlow: 5;
enlarged: 6;
deleted: 7;
alt-yogh: 8;
retired: 9;
mufi-hook: 14;
e-caudata: 15;
old-style-punct: 18;
latin2gothic: 19;
gothic2latin: 20;
}
}
.insular { -moz-font-feature-settings: "ss02=1";
-webkit-font-feature-settings: "ss02=1";
font-feature-settings: "ss02=1";
font-variant-alternates: styleset(insular);
}
.enlarged { -moz-font-feature-settings: "ss06=1";
-webkit-font-feature-settings: "ss06=1";
font-feature-settings: "ss06=1";
font-variant-alternates: styleset(enlarged);
}
.romanhigh { -moz-font-feature-settings: "ss04=1";
-webkit-font-feature-settings: "ss04=1";
font-feature-settings: "ss04=1";
font-variant-alternates: styleset(romanhigh);
}
.romanlow { -moz-font-feature-settings: "ss05=1";
-webkit-font-feature-settings: "ss05=1";
font-feature-settings: "ss05=1";
font-variant-alternates: styleset(romanlow);
}
.smallcap { -moz-font-feature-settings: "smcp=1";
-webkit-font-feature-settings: "smcp=1";
font-feature-settings: "smcp=1";
//font-variant: small-caps;
font-variant-caps: small-caps;
}
.disclig { -moz-font-feature-settings: "dlig=1";
-webkit-font-feature-settings: "dlig=1";
font-feature-settings: "dlig=1";
font-variant-ligatures: discretionary-ligatures;
}
.histlig { -moz-font-feature-settings: "hlig=1";
-webkit-font-feature-settings: "hlig=1";
font-feature-settings: "hlig=1";
font-variant-ligatures: historical-ligatures;
}
.underdot { -moz-font-feature-settings: "ss07=1";
-webkit-font-feature-settings: "ss07=1";
font-feature-settings: "ss07=1";
font-variant-alternates: styleset(deleted);
}
.oldnum { -moz-font-feature-settings: "onum=1";
-webkit-font-feature-settings: "onum=1";
font-feature-settings: "onum=1";
font-variant-numeric: oldstyle-nums;
}
.mirrored { -moz-font-feature-settings: "rtlm=1";
-webkit-font-feature-settings: "rtlm=1";
font-feature-settings: "rtlm=1";
/* that’s one OT feature that is not directly accessible through CSS Fonts 3 */
}
.historic { -moz-font-feature-settings: "hist=1";
-webkit-font-feature-settings: "hist=1";
font-feature-settings: "hist=1";
font-variant-alternates: historical-forms;
}
.rtl {direction: rtl; unicode-bidi:bidi-override; }
This test used to work. I've found several bugs in Junicode's OT, which I hope will fix the problem. Will test before next release.
The test page ist still using only
font-feature-settings(also prefixed with-webkit-and-moz-) instead of the appropriate high-level properties which are now (finally) supported by Safari.