Commits

Philipp Gesang committed bfbad91

add example for optical size via fontspec

Comments (0)

Files changed (3)

format/ltx-testformat.ini

 \let\dump\DUMP
 \let\DUMP\undefined
 \documentclass[a4paper,12pt]{article}
+\usepackage{luaotfload}
+\directlua{
+  local rewrite_filename = function (tfmdata, _)
+    if tfmdata and type(tfmdata) == "table" then
+      print""
+      print"==========================="
+      print("name    ", tfmdata.name)
+      print("filename", tfmdata.filename)
+      print("property", tfmdata.properties.filename)
+      print("basename", file.basename(tfmdata.filename))
+      print("fontname", tfmdata.fontname)
+      tfmdata.filename = file.basename(tfmdata.filename)
+                      or tfmdata.filename
+      tfmdata.name = tfmdata.filename
+      tfmdata.fontname = tfmdata.filename
+    end
+  end
+  luatexbase.add_to_callback("luaotfload.patch_font",
+                             rewrite_filename,
+                             "inihack.rewrite_filename")
+}
+\font\foo="file:lmroman5-regular.otf:script=latn;+tlig;"
+\foo
 \usepackage{fontspec}
+\setmainfont{Iwona}
+\setsansfont{Iwona}
 \dump

format/ltx-testformat.tex

 \begin{document}
-test
+     \fontname\font test\par
+{\foo\fontname\font test}
 \end{document}

ltx-fontspec-optical-size-1.tex

+%% http://tex.stackexchange.com/q/119883/14066
+\documentclass{memoir}
+\usepackage{fontspec}
+\setmainfont{Garamond Premier Pro}
+\begin{document}
+  {\tiny tiny}\\
+  {\normalsize normal}\\
+  {\Huge Huge}\\
+  {\HUGE HUGE}\\
+\end{document}