Skip to content

Commit

Permalink
Define fontname before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Nov 17, 2024
1 parent c789ac3 commit 3a2155b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/luaotfload-auxiliary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ function aux.provides_script(font_id, asked_script)
end
return false
else
local fontname = tfmdata.fontname
local features = get_features (tfmdata)
if features == false then
logreport ("log", 1, "aux", "font no %d lacks a features table", font_id)
Expand Down Expand Up @@ -556,6 +557,7 @@ function aux.provides_language(font_id, asked_script, asked_language)
asked_language = stringlower(asked_language)
local tfmdata = identifiers[font_id]
if not tfmdata then return false end
local fontname = tfmdata.fontname
local features = get_features (tfmdata)
if features == false then
logreport ("log", 1, "aux", "font no %d lacks a features table", font_id)
Expand Down Expand Up @@ -712,6 +714,7 @@ function aux.provides_feature(font_id, asked_script,
end
return false
else
local fontname = tfmdata.fontname
asked_language = stringlower(asked_language)
local features = get_features (tfmdata)
if features == false then
Expand Down

0 comments on commit 3a2155b

Please sign in to comment.