[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: testfiles-harf/fallback.lvt: improve robustness by blanking out fallback id (8847f61)

Jonas Witschel diabonas at archlinux.org
Thu Apr 9 16:57:13 CEST 2020


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/8847f617a7fbdb3eaaad3f1e3fe20026e164542f

>---------------------------------------------------------------

commit 8847f617a7fbdb3eaaad3f1e3fe20026e164542f
Author: Jonas Witschel <diabonas at archlinux.org>
Date:   Thu Apr 9 16:22:46 2020 +0200

    testfiles-harf/fallback.lvt: improve robustness by blanking out fallback id
    
    The font ID is variable, remove it from the missing glyph warning like
    it is already done for the glyph info.


>---------------------------------------------------------------

8847f617a7fbdb3eaaad3f1e3fe20026e164542f
 testfiles-harf/fallback.lvt | 4 ++++
 testfiles-harf/fallback.tlg | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/testfiles-harf/fallback.lvt b/testfiles-harf/fallback.lvt
index d5cf813..6e43294 100644
--- a/testfiles-harf/fallback.lvt
+++ b/testfiles-harf/fallback.lvt
@@ -10,6 +10,10 @@
   luatexbase.add_to_callback('glyph_info', function(n)
     return string.format('"\csstring\%s" \csstring\%04X \csstring\%+i:\csstring\%+i\string\t\csstring\%s', cb(n), n.char, n.xoffset, n.yoffset, font.getfont(n.font).specification.specification:gsub(";fallback=\csstring\%d+",";fallback=..."))
   end, 'Harf glyph_info callback -- testing variant')
+  luatexbase.add_to_callback('glyph_not_found', function(id, char)
+    texio.write_nl(string.format('Missing character: There is no \csstring\%s (U+\csstring\%04X) in font \csstring\%s!',
+                   utf8.char(char), char, font.getfont(id).specification.specification:gsub(";fallback=.*",";fallback=...")))
+  end, 'Harf glyph_not_found callback -- testing variant')
 }
 
 \directlua{luaotfload.add_fallback("myfallback", {
diff --git a/testfiles-harf/fallback.tlg b/testfiles-harf/fallback.tlg
index 0254ae8..a08c977 100644
--- a/testfiles-harf/fallback.tlg
+++ b/testfiles-harf/fallback.tlg
@@ -73,6 +73,6 @@ Completed box being shipped out [1]
 ...\glue 0.0 plus 1.0fil
 ...\TU/lmr/m/n/10 "1" 0031 +0:+0^^I[lmroman10-regular]:+tlig;
 ...\glue 0.0 plus 1.0fil
-Missing character: There is no ฐ (U+0E10) in font [DejaVuSans.ttf]:mode=harf;-fallback;script=thai;-multiscript;fallback=8!
-Missing character: There is no ู (U+0E39) in font [DejaVuSans.ttf]:mode=harf;-fallback;script=thai;-multiscript;fallback=8!
+Missing character: There is no ฐ (U+0E10) in font [DejaVuSans.ttf]:mode=harf;-fallback;script=thai;-multiscript;fallback=...!
+Missing character: There is no ู (U+0E39) in font [DejaVuSans.ttf]:mode=harf;-fallback;script=thai;-multiscript;fallback=...!
 2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 2 attribute, 48 glue_spec, 2 attribute_list (fallback.aux)





More information about the latex3-commits mailing list.