[XeTeX] \font "<platform font>":color=FFFFFF produces black, not white glyphs \font "<platform font>":color=FFFFFF produces black, not white glyphs, re-visited
Philip Taylor
P.Taylor at Hellenic-Institute.Uk
Mon May 25 13:00:42 CEST 2020
[UNIV: Plain XeTeX] —
Way back in 2015, I asked :
>/Could anyone explain why the continuum that exists from color=000000 to />/color=FEFFFF, color=FFFEFF and color=FFFFFE breaks at color=FFFFFF ? />//>/To ensure 100% consistency between the proofing version of a book (which has />/marginal notes in red to ensure that the proof-reader can unambiguously />/identify the callouts for each image) and the CRC-ready version, I prefer />/not to disable the marginal note mechanism, which /might/ lead to different />/pagination (although tests suggest, but cannot prove, that it does not) but />/instead to make the marginal notes invisible by changing their colour from />/DF0000 to FFFFFF. /To which Khaled Hosny kindly replied :
> That is a bug in xdvipdfmx; FFFFFF will be converted by XeTeX to
> FFFFFFFF when written to the XDV, but xdvipdfmx uses the 0xFFFFFFFF
> value to mean that no color have been selected so ends up ignoring the
> color here. A work around is to set the color to FFFFFF00 (or any other
> value for the alpha since xdvipdfmx does not support transparency
> currently).
and at the time, that appeared to solve my problem. However, it would appear that since then "xdvipdfmx" has been enhanced to support transparency, as a result of which Khaled's suggested FFFFFF00 no longer works (the text is invisible, see attached). Could anyone tell me how, short of using \specials, I can achieve 100% white with 100% opacity (= 0% ink) in XeTeX ?
Philip Taylor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20200525/2da602fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Demo.pdf
Type: application/pdf
Size: 452811 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20200525/2da602fb/attachment-0002.pdf>
-------------- next part --------------
\pdfpagewidth = 99 mm
\pdfpageheight = 210 mm
\hsize = \pdfpagewidth
\vsize = \pdfpageheight
\parindent = 0 pt
\newdimen \knuthoffset
\knuthoffset = 1 true in
\newdimen \margin
\margin = 1 cm
\advance \hoffset by -\knuthoffset
\advance \voffset by -\knuthoffset
\setbox 0 = \hbox {\XeTeXpdffile "Lighter ground.pdf" \relax}
\copy 0 \kern -\ht 0
\kern \margin
\def \RRGGBBTT #1#2%
{%
\def \colour {color=#2}
\global \font \default = "TeX Gyre Adventor:color=FFFFFFFE"
\global \font \thisfont = "TeX Gyre Adventor":\colour
\thisfont This should be {\default #1 white}\quad & \default [#2]\cr
}
\halign
\bgroup
& \qquad #\hfil \cr
\RRGGBBTT {true}{FFFFFF}
\RRGGBBTT {near}{FFFFFE}
\RRGGBBTT {near}{FFFEFF}
\RRGGBBTT {near}{FEFFFF}
\RRGGBBTT {transparent}{FFFFFF00}
\RRGGBBTT {translucent}{FFFFFF80}
\RRGGBBTT {almost opaque}{FFFFFFFE}
\RRGGBBTT {fully opaque}{FFFFFFFF}
\egroup
\end
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Lighter ground.pdf
Type: application/pdf
Size: 463917 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20200525/2da602fb/attachment-0003.pdf>
More information about the texhax
mailing list.