summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/lyluatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-16 20:22:47 +0000
committerKarl Berry <karl@freefriends.org>2023-04-16 20:22:47 +0000
commit3f101a664145b610ba4f60a4f308670b4cf78279 (patch)
tree0edc2bbec4833089adecac55e97105bfde15c60a /Master/texmf-dist/scripts/lyluatex
parent7d24ab35bf8515f17ce5647b1bd9815085920aac (diff)
lyluatex (16apr23)
git-svn-id: svn://tug.org/texlive/trunk@66861 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/lyluatex')
-rwxr-xr-xMaster/texmf-dist/scripts/lyluatex/lyluatex.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/lyluatex/lyluatex.lua b/Master/texmf-dist/scripts/lyluatex/lyluatex.lua
index c67613b3b54..0b8e74b2a77 100755
--- a/Master/texmf-dist/scripts/lyluatex/lyluatex.lua
+++ b/Master/texmf-dist/scripts/lyluatex/lyluatex.lua
@@ -1,8 +1,8 @@
-- luacheck: ignore ly log self luatexbase internalversion font fonts tex token kpse status ly_opts
local err, warn, info, log = luatexbase.provides_module({
name = "lyluatex",
- version = '1.1.3', --LYLUATEX_VERSION
- date = "2023/03/01", --LYLUATEX_DATE
+ version = '1.1.4', --LYLUATEX_VERSION
+ date = "2023/04/15", --LYLUATEX_DATE
description = "Module lyluatex.",
author = "The Gregorio Project − (see Contributors.md)",
copyright = "2015-2023 - jperon and others",
@@ -1357,7 +1357,21 @@ end
function ly.get_font_family(font_id)
- return lib.fontinfo(font_id).fullname:match("[^-]*")
+ local ft = lib.fontinfo(font_id)
+ if ft.shared.rawdata then return ft.shared.rawdata.metadata.familyname
+ else
+ warn([[
+Some useful informations aren’t available:
+you probably loaded polyglossia
+before defining the main font, and we have
+to "guess" the font’s familyname.
+If the text of your scores looks weird,
+you should consider using babel instead,
+or at least loading polyglossia
+after defining the main font.
+]])
+ return ft.fullname:match("[^-]*")
+ end
end