From c81bffaf9ac987ee48fe06700bf218391a045780 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 25 Apr 2013 11:48:43 +0200 Subject: add test for non-standard fonts --- tests/weirdfonts.tex | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/weirdfonts.tex (limited to 'tests') diff --git a/tests/weirdfonts.tex b/tests/weirdfonts.tex new file mode 100644 index 0000000..9cbf8ac --- /dev/null +++ b/tests/weirdfonts.tex @@ -0,0 +1,15 @@ +%% non-standard fonts deserve an extra test file +\documentclass{scrartcl} +\usepackage{fontspec} +%% ···································································· +%% libertine monospace +%% ------------------- +%% real-world example from: http://tex.stackexchange.com/q/110566 +%% causing database lookups to fail; addressed in luaotfload since +%% https://github.com/phi-gamma/luaotfload/commit/4d0d2c19ab36d4918a72041a087fbcb451ac8c52 +\setmonofont{Linux Libertine Mono O} +%% ···································································· + +\begin{document} + foo {\ttfamily bar} baz +\end{document} -- cgit v1.2.3 From 9fceb52298c05c31666521b4226362322b18c178 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 27 Apr 2013 18:26:21 +0200 Subject: update fontconfig test --- tests/fontconfig_conf_reading.tex | 8 ++++--- tests/fonts.conf.test | 44 ++++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 22 deletions(-) (limited to 'tests') diff --git a/tests/fontconfig_conf_reading.tex b/tests/fontconfig_conf_reading.tex index dbbbc3c..66ab377 100644 --- a/tests/fontconfig_conf_reading.tex +++ b/tests/fontconfig_conf_reading.tex @@ -1,6 +1,8 @@ \directlua{ -require("lualibs") -require("otfl-font-nms.lua") -texio.write_nl(table.serialize(fonts.names.read_fonts_conf("fonts.conf.test", {}))) + config = { lualibs = { load_extended = false } } + require"lualibs" + require"luaotfload-database" + local results = fonts.names.read_fonts_conf{"fonts.conf.test"} + inspect(results) } \bye diff --git a/tests/fonts.conf.test b/tests/fonts.conf.test index 0e5b961..3c3e132 100644 --- a/tests/fonts.conf.test +++ b/tests/fonts.conf.test @@ -1,19 +1,25 @@ - - - - - - -test 1 ok -test 2 oktest 3 ok -test 4 oktest 5 ok - -/etc/fonts/conf.d -/etc/fonts/fonts.conf -/etc/fonts/conf.d/69-unifont.conf + + + + + + + + + + + fontconfig/fonts.conf + test 1 ok + test 2 oktest 3 ok + test 4 oktest 5 ok + + /etc/fonts/conf.d + /etc/fonts/fonts.conf + /etc/fonts/conf.d/69-unifont.conf + -- cgit v1.2.3 From 2a4159410151fa9c99adaf56071a370bcb261ac1 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 28 Apr 2013 16:03:16 +0200 Subject: add test for ttc subfont loading --- tests/pln-subfont-1.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/pln-subfont-1.tex (limited to 'tests') diff --git a/tests/pln-subfont-1.tex b/tests/pln-subfont-1.tex new file mode 100644 index 0000000..4877682 --- /dev/null +++ b/tests/pln-subfont-1.tex @@ -0,0 +1,12 @@ +\ifdefined\directlua\input luaotfload.sty\fi + +\directlua{ + inspect(fontloader.info"cambria.ttc") +} + +\font\subfontone="file:cambria.ttc(0)" at 42pt +\font\subfonttwo="file:cambria.ttc(1)" at 42pt + +\subfontone foo bar baz \endgraf +\subfonttwo foo bar baz \endgraf +\bye -- cgit v1.2.3 From 2adc02056a47717a8f9fee7a48e62ab5cf50c9c8 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Apr 2013 12:07:37 +0200 Subject: add test file for tfm --- tests/pln-tfm.tex | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/pln-tfm.tex (limited to 'tests') diff --git a/tests/pln-tfm.tex b/tests/pln-tfm.tex new file mode 100644 index 0000000..26fa738 --- /dev/null +++ b/tests/pln-tfm.tex @@ -0,0 +1,8 @@ +\ifdefined\directlua\input luaotfload.sty \fi +%% TFM’s can be loaded with a file: request ... +\font\antykwatorunska="file:rm-anttr" +%% or with an anonymous request, like in þe olde TeX: +\font\antykwatorunskabcap=ec-anttbcap +\antykwatorunska foo bar +\antykwatorunskabcap baz xyzzy +\bye -- cgit v1.2.3 From 1a76cea6357f50d7dae752765173af335ba95beb Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Apr 2013 13:57:35 +0200 Subject: add handler for XeTeX slashed notation --- tests/pln-subfont-1.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/pln-subfont-1.tex b/tests/pln-subfont-1.tex index 4877682..fb8e1e7 100644 --- a/tests/pln-subfont-1.tex +++ b/tests/pln-subfont-1.tex @@ -1,12 +1,12 @@ \ifdefined\directlua\input luaotfload.sty\fi - +%% This requires the Cambria fonts from MS. \directlua{ inspect(fontloader.info"cambria.ttc") } - +%% Here we load both subfonts in the collection +%% with the not-quite documented subfont syntax. \font\subfontone="file:cambria.ttc(0)" at 42pt \font\subfonttwo="file:cambria.ttc(1)" at 42pt - \subfontone foo bar baz \endgraf \subfonttwo foo bar baz \endgraf \bye -- cgit v1.2.3 From 19164c39c9f98d9e51a13d5d698f575879f3dfee Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Apr 2013 14:48:12 +0200 Subject: add examples for XeTeX notation and lookup caching --- tests/pln-request-4-slashed.tex | 12 ++++++++++++ tests/pln-request-5-cached.tex | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/pln-request-4-slashed.tex create mode 100644 tests/pln-request-5-cached.tex (limited to 'tests') diff --git a/tests/pln-request-4-slashed.tex b/tests/pln-request-4-slashed.tex new file mode 100644 index 0000000..5e7d99e --- /dev/null +++ b/tests/pln-request-4-slashed.tex @@ -0,0 +1,12 @@ +\ifdefined\directlua\input luaotfload.sty\fi +\font\iwona =iwona at 20pt +\font\iwonabold =iwona/b at 20pt +\font\iwonaitalic =iwona/i at 20pt +\font\iwonabolditalic =iwona/bi at 20pt + +\def\test{foo bar baz \endgraf} +{\iwona \test} +{\iwonabold \test} +{\iwonaitalic \test} +{\iwonabolditalic \test} +\bye diff --git a/tests/pln-request-5-cached.tex b/tests/pln-request-5-cached.tex new file mode 100644 index 0000000..437b20d --- /dev/null +++ b/tests/pln-request-5-cached.tex @@ -0,0 +1,17 @@ +\ifdefined\directlua + \directlua{config = config or { luaotfload = { } } + config.luaotfload.resolver = "cached" } + \input luaotfload.sty +\fi + +\font\iwona =name:iwona at 20pt +\font\iwonabold =name:iwona/b at 20pt +\font\iwonaitalic =name:iwona/i at 20pt +\font\iwonabolditalic =name:iwona/bi at 20pt + +\def\test{foo bar baz \endgraf} +{\iwona \test} +{\iwonabold \test} +{\iwonaitalic \test} +{\iwonabolditalic \test} +\bye -- cgit v1.2.3 From e79f34d859d48be485589f19fc6905afa5872a53 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 29 Apr 2013 14:52:53 +0200 Subject: only cache ``name:`` lookups --- tests/pln-request-5-cached.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/pln-request-5-cached.tex b/tests/pln-request-5-cached.tex index 437b20d..8ba4a5e 100644 --- a/tests/pln-request-5-cached.tex +++ b/tests/pln-request-5-cached.tex @@ -1,6 +1,7 @@ \ifdefined\directlua \directlua{config = config or { luaotfload = { } } - config.luaotfload.resolver = "cached" } + config.luaotfload.resolver = "cached" + config.luaotfload.loglevel = 5 } \input luaotfload.sty \fi -- cgit v1.2.3