diff options
author | Norbert Preining <norbert@preining.info> | 2023-04-17 03:03:48 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-04-17 03:03:48 +0000 |
commit | 88aa9bb9a3222cf13820ae3b6f64ce48dcd003ea (patch) | |
tree | 9495d0cd2219bb309106f5330e0aeba36a675319 /support/lyluatex/lyluatex.lua | |
parent | 421b47819f21160c3662c40f7da028f15b726577 (diff) |
CTAN sync 202304170303
Diffstat (limited to 'support/lyluatex/lyluatex.lua')
-rw-r--r-- | support/lyluatex/lyluatex.lua | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/support/lyluatex/lyluatex.lua b/support/lyluatex/lyluatex.lua index c67613b3b5..0b8e74b2a7 100644 --- a/support/lyluatex/lyluatex.lua +++ b/support/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 |