# [luatex] lilyglyphs package compatibility with TeXLive 2019

Urs Liska lists at openlilylib.org
Tue Jul 30 11:50:15 CEST 2019

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
\begin{luacode}
documentdata = documentdata or { }

local stringformat = string.format
local texsprint = tex.sprint

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lualatex-rectangles.png
Type: image/png
Size: 5231 bytes
Desc: not available
URL: <https://tug.org/pipermail/luatex/attachments/20190730/bf4523e2/attachment.png>