From ea99932d684f7a7e9e320edc8b86b43f992579f1 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 26 Nov 2010 17:54:59 +0200 Subject: Test file --- tests/font_patch.tex | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/font_patch.tex (limited to 'tests') diff --git a/tests/font_patch.tex b/tests/font_patch.tex new file mode 100644 index 0000000..a8820b1 --- /dev/null +++ b/tests/font_patch.tex @@ -0,0 +1,24 @@ +\input{luaotfload.sty} +\directlua { + local function patch_font(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 + luaotfload.add_patch_callback(patch_font, "modernmath.patch_font") +} + +\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 + -- cgit v1.2.3 From 5aea89f6d96d6014e559b960096371c5b7e06968 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 26 Nov 2010 18:37:31 +0200 Subject: Remove `luaotfload.add_patch_callback()` Per Philip's suggestion, `luatexbase.add_to_callback()` is to be used directly instead. --- tests/font_patch.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/font_patch.tex b/tests/font_patch.tex index a8820b1..e096551 100644 --- a/tests/font_patch.tex +++ b/tests/font_patch.tex @@ -1,6 +1,6 @@ \input{luaotfload.sty} \directlua { - local function patch_font(fontdata) + local function patch(fontdata) local mc = fontdata.MathConstants local em = fontdata.units local sz = fontdata.size @@ -8,7 +8,7 @@ mc.DisplayOperatorMinHeight = 2800 / em * sz end end - luaotfload.add_patch_callback(patch_font, "modernmath.patch_font") + luatexbase.add_to_callback("luaotfload.patch_font", patch, "cambria.domh") } \font\4={name:Cambria Math:mode=base;script=math} at 10pt -- cgit v1.2.3 From 407e7c71360163d970ab097982959066804d8c8d Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 28 Feb 2011 01:53:50 +0200 Subject: Simplify feature file --- tests/opbd.fea | 83 +++++++++------------------------------------------------- 1 file changed, 13 insertions(+), 70 deletions(-) (limited to 'tests') 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; - -- cgit v1.2.3 From b819f1243cb0d9c8d95a7b1a66edd844ebc53964 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Mon, 28 Feb 2011 01:58:58 +0200 Subject: Minor --- tests/opbd.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') 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 -- cgit v1.2.3 From 8151f93bac4474b23b51e941ab69b9a817daf82c Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 2 Mar 2011 10:41:33 +0200 Subject: Simplify --- tests/tkrn.fea | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'tests') 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; -- cgit v1.2.3