summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/font_patch.tex24
-rw-r--r--tests/opbd.fea83
-rw-r--r--tests/opbd.tex2
-rw-r--r--tests/tkrn.fea14
4 files changed, 41 insertions, 82 deletions
diff --git a/tests/font_patch.tex b/tests/font_patch.tex
new file mode 100644
index 0000000..e096551
--- /dev/null
+++ b/tests/font_patch.tex
@@ -0,0 +1,24 @@
+\input{luaotfload.sty}
+\directlua {
+ local function patch(fontdata)
+ local mc = fontdata.MathConstants
+ local em = fontdata.units
+ local sz = fontdata.size
+ if fontdata.psname == "CambriaMath" and mc then
+ mc.DisplayOperatorMinHeight = 2800 / em * sz
+ end
+ end
+ luatexbase.add_to_callback("luaotfload.patch_font", patch, "cambria.domh")
+}
+
+\font\4={name:Cambria Math:mode=base;script=math} at 10pt
+\font\5={name:Cambria Math:mode=base;script=math;ssty=1} at 7pt
+\font\6={name:Cambria Math:mode=node;script=math;ssty=2} at 5pt
+\textfont4=\4 \scriptfont4=\5 \scriptscriptfont4=\6
+
+$$
+\Umathchar"1"4`∫
+\Umathchar"1"4`∑
+$$
+\bye
+
diff --git a/tests/opbd.fea b/tests/opbd.fea
index affc3c5..54f687a 100644
--- a/tests/opbd.fea
+++ b/tests/opbd.fea
@@ -1,5 +1,15 @@
+languagesystem DFLT dlft;
+languagesystem grek dflt;
+languagesystem latn dflt;
+languagesystem latn AZE;
+languagesystem latn CRT;
+languagesystem latn MOL;
+languagesystem latn NLD;
+languagesystem latn PLK;
+languagesystem latn ROM;
+languagesystem latn TRK;
-lookup RightBounds {
+feature rtbd {
lookupflag 0;
pos \exclam <100 0 0 0>;
pos \percent <100 0 0 0>;
@@ -98,9 +108,9 @@ lookup RightBounds {
pos \L_uni0303 <50 0 0 0>;
pos \T_uni0303 <50 0 0 0>;
pos \T_uni0308 <50 0 0 0>;
-} RightBounds;
+} rtbd;
-lookup LeftBounds {
+feature lfbd {
lookupflag 0;
pos \percent <-100 0 -100 0>;
pos \ampersand <-50 0 -50 0>;
@@ -174,71 +184,4 @@ lookup LeftBounds {
pos \J_uni030C.cap <-50 0 -50 0>;
pos \T_uni0303 <-50 0 -50 0>;
pos \T_uni0308 <-50 0 -50 0>;
-} LeftBounds;
-
-feature rtbd {
-
- script DFLT;
- language dflt ;
- lookup RightBounds;
-
- script grek;
- language dflt ;
- lookup RightBounds;
-
- script latn;
- language dflt ;
- lookup RightBounds;
- language AZE exclude_dflt;
- lookup RightBounds;
- language CRT exclude_dflt;
- lookup RightBounds;
- language MOL exclude_dflt;
- lookup RightBounds;
- language NLD exclude_dflt;
- lookup RightBounds;
- language PLK exclude_dflt;
- lookup RightBounds;
- language ROM exclude_dflt;
- lookup RightBounds;
- language TRK exclude_dflt;
- lookup RightBounds;
-
- script thai;
- language dflt ;
- lookup RightBounds;
-} rtbd;
-
-feature lfbd {
-
- script DFLT;
- language dflt ;
- lookup LeftBounds;
-
- script grek;
- language dflt ;
- lookup LeftBounds;
-
- script latn;
- language dflt ;
- lookup LeftBounds;
- language AZE exclude_dflt;
- lookup LeftBounds;
- language CRT exclude_dflt;
- lookup LeftBounds;
- language MOL exclude_dflt;
- lookup LeftBounds;
- language NLD exclude_dflt;
- lookup LeftBounds;
- language PLK exclude_dflt;
- lookup LeftBounds;
- language ROM exclude_dflt;
- lookup LeftBounds;
- language TRK exclude_dflt;
- lookup LeftBounds;
-
- script thai;
- language dflt ;
- lookup LeftBounds;
} lfbd;
-
diff --git a/tests/opbd.tex b/tests/opbd.tex
index 4c45781..50c4dfd 100644
--- a/tests/opbd.tex
+++ b/tests/opbd.tex
@@ -2,7 +2,7 @@
\pdfprotrudechars2 \pdfadjustspacing2
-\font\testa=file:texgyrepagella-regular:script=latn at 12pt
+\font\testa=file:texgyrepagella-regular:script=latn at 12pt
\font\testb=file:texgyrepagella-regular:mode=node;script=latn;protrusion=yes;featurefile=opbd.fea;+opbd at 12pt
\testa \input tufte \par
\testb \input tufte \par
diff --git a/tests/tkrn.fea b/tests/tkrn.fea
index 30fc11f..c83927d 100644
--- a/tests/tkrn.fea
+++ b/tests/tkrn.fea
@@ -1,16 +1,8 @@
+languagesystem DFLT dflt;
+languagesystem latn dflt;
-lookup TeXkern {
+feature tkrn {
lookupflag 0;
pos E X -125;
pos T <0 0 -166 0> E <0 -235 0 0>;
-} TeXkern;
-
-feature tkrn {
- script DFLT;
- language dflt ;
- lookup TeXkern;
- script latn;
- language dflt ;
- lookup TeXkern;
-
} tkrn;