From b5e475547fbd9cc6f9f9fe883f6ccd05d277b081 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Wed, 1 May 2013 20:18:38 +0200
Subject: add basic access functions for math dimensions

---
 tests/pln-aux-3.tex | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 tests/pln-aux-3.tex

(limited to 'tests/pln-aux-3.tex')

diff --git a/tests/pln-aux-3.tex b/tests/pln-aux-3.tex
new file mode 100644
index 0000000..12a80cf
--- /dev/null
+++ b/tests/pln-aux-3.tex
@@ -0,0 +1,39 @@
+\input luaotfload.sty
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% math dimension getter
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\font\xitsmath=file:xits-math.otf
+\font\cambriamath=file:cambria.ttc(1)
+
+\font\main=file:Iwona-Regular.otf at 12pt\main
+
+\directlua{
+  local aux = luaotfload.aux
+  local test_a = function (fontname, dimension)
+    tex.sprint(
+      "(", fontname, " (", dimension, " ",
+      aux.get_math_dimension(fontname, dimension),
+      [[))\endgraf ]])
+  end
+    
+  local test_b = function (fontname, dimension)
+    aux.sprint_math_dimension(fontname, dimension)
+    tex.print[[\endgraf ]]
+  end
+
+  test_a("xitsmath",     "AxisHeight")
+  test_a("xitsmath",     "RadicalVerticalGap")
+  test_a("cambriamath",  "StackTopShiftUp")
+  test_a("cambriamath",  "FractionNumeratorGapMin")
+
+  test_b("xitsmath",     "AxisHeight")
+  test_b("xitsmath",     "RadicalVerticalGap")
+  test_b("cambriamath",  "StackTopShiftUp")
+  test_b("cambriamath",  "FractionNumeratorGapMin")
+}
+
+foo bar baz
+
+\bye
-- 
cgit v1.2.3

