I noticed that my package lilyglyphs (http://ctan.org/pkg/lilyglyphs) seems to 
have issues with TeX
Live 2019 that weren't there in TL2017. When compiled with lualatex any glyph 
printed directly gets
an added rectangle like shown in the attached screenshot.

This is not present when compiled with XeLaTeX. The code that prints the glyphs 
is here
(https://github.com/uliska/lilyglyphs/blob/master/core/genericAccess.inp#L45-L52)

\newcommand*{\lilyPrint}[2][]{%
        % interpret optional argument
        \interpretLilyOptions{#1}%
        % print the glyph in a raisebox
        \raisebox{\lilyEffectiveRaise ex}{%
                
{\fontspec[Scale=\lilyEffectiveScale]{emmentaler-\lilyOpticalSuffix.otf}#2}%
        }%
}

and the code used to load a glyph in lualatex is here: 
https://github.com/uliska/lilyglyphs/blob/master/core/genericAccess.inp#L117-L137

\ifluatex
\usepackage{luaotfload,luacode} 
\begin{luacode}
documentdata = documentdata or { }

local stringformat = string.format
local texsprint = tex.sprint
local slot_of_name = luaotfload.aux.slot_of_name

documentdata.fontchar = function (chr)
local chr = slot_of_name(font.current(), chr, false)
if chr and type(chr) == "number" then
texsprint
 (\the\CatcodeTableLaTeX, 
  stringformat ([[\char"%X"]], chr))
end
end
\end{luacode}

\def\lilyGetGlyph#1{\directlua{documentdata.fontchar "#1"}}
\fi

Is there any suggestion as to where these rectangles come from and what may be 
the change leading to the issue? I'm somewhat inclined to rewrite the whole 
package with the Lua knowledge I have by now (all the Lua in the package had 
been contributed by someone else then), but I don't really have the time right 
now.

Thanks
Urs

Reply via email to