khaledhosny / luaotfload

Moved to https://github.com/latex3/luaotfload
23 stars 15 forks source link

pdfpageresoures should be set globally #56

Open wspr opened 10 years ago

wspr commented 10 years ago

Debugged by Robert on tex.sx:

The example can be further reduced (and plainified) by removing the preview package -- a simple \vbox is enough:

\input luaotfload.sty
\font\x="texgyrebonum-bold.otf:color=FF000077" at 24pt\x
AAA \newbox\y\setbox\y\vbox{AAA}\unvbox\y
\bye

The effect is that the setting of the pdfpageresources (which must contain the transparency spec) does not propagate out of the vbox. (What I do not quite understand, though, is why there is no transparency even though the transparent font is also used outside of the vbox.)

The pdfpageresoures are set in luaotfload-colors.lua, in the function color_handler, near the end of the file. Changing the line

  tex.pdfpageresources=tpr

to

  tex.set('global','pdfpageresources',tpr)

seems to resolve the issue.

khaledhosny commented 10 years ago

This repository is no longer maintained, this should be reported against https://github.com/lualatex/luaotfload/.

wspr commented 10 years ago

Oops! I just googled and chose the first link :) Thanks.