[XeTeX] \font "<platform font>":color=FFFFFF produces black, not white glyphs \font "<platform font>":color=FFFFFF produces black, not white glyphs, re-visited

Ross Moore ross.moore at mq.edu.au
Tue May 26 00:58:12 CEST 2020


Hi Philip,

On 25 May 2020, at 9:00 pm, Philip Taylor <P.Taylor at Hellenic-Institute.Uk<mailto:P.Taylor at Hellenic-Institute.Uk>> wrote:

[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 ?

I’m sorry, but this just doesn’t make any sense to me — but see further below.
Surely 100% opacity means that the blend between background and foreground is 100% background, 0% foreground.
Thus your text will be invisible, whatever colour has been specified; that this is white becomes irrelevant.

The only way to get 100% white, over a coloured background, would be with 100% ink, so 0% opacity.
Any other opacity level will allow some of the background colour to be mixed in.
At least that is how I understand what colour mixing is all about.


However, there is another PDF parameter called “knockout”.
See this link for an brief description of the issue:

   https://www.enfocus.com/en/products/pitstop-pro/pdf-editing/knockout-white-text-in-a-pdf

How to achieve knockout using TeX+gs or pdfTeX or XeTeX?
I’m not at all sure. It must have a graphics state parameter.
The next image shows what I think is the relevant portion of the PDF specs.

[cid:05D57F07-A181-44B3-AE0C-C81A6DE09832 at telstra.com.au]

There’s a whole section on “Transparency Groups”, but mostly it is about how different transparent objects
must combine to produce the final colour where objects overlap.

After a cursory look, I think you need to use a Form X Object, which can be done in pdftex using the  \pdfxform  primitive,
with appropriate attributes specified.
For XeTeX you would need to be using  \special  commands.
Someone here must have some experience with this.


Philip Taylor
<Demo.pdf><Demo.tex><Lighter ground.pdf>


Hope this helps.
Stay safe.

Ross


Dr Ross Moore
Department of Mathematics and Statistics
12 Wally’s Walk, Level 7, Room 734
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955  |  F: +61 2 9850 8114
M:+61 407 288 255  |  E: ross.moore at mq.edu.au<mailto:ross.moore at mq.edu.au>
http://www.maths.mq.edu.au
[cid:image001.png at 01D030BE.D37A46F0]
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.

This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University. <http://mq.edu.au/>
<http://mq.edu.au/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20200525/b5e54b1d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-05-26 at 8.38.02 am.png
Type: image/png
Size: 384071 bytes
Desc: Screen Shot 2020-05-26 at 8.38.02 am.png
URL: <https://tug.org/pipermail/texhax/attachments/20200525/b5e54b1d/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <https://tug.org/pipermail/texhax/attachments/20200525/b5e54b1d/attachment-0003.png>


More information about the texhax mailing list.