xdvipdfmx-20200116 : additional q/Q bracket around BT...ET

Ulrike Fischer news3 at nililand.de
Sat Feb 29 16:38:34 CET 2020


Am Sat, 29 Feb 2020 22:00:50 +0900 schrieb Hironobu Yamashita:

> Hi all,
> 
> ZW> \special{pdf:code SOMETHING } used to insert just SOMETHING
> ZW> while \special{pdf:put SOMETHING} used to insert q SOMETHING Q
> ZW> In the previous behaviour both possibilities were available, you just
> ZW> have to choose between pdf:code and pdf:put.
> 
> I agree with Zdenek.
> It would be useful if users can choose between pdf:code and pdf:put,

Yes, but I don't think that it would help for the fake bold issue.
You can't expect users to add such specials when using fake bold
fonts.

> SH> unfortunately, as this fake-bold feature relies on changing text rendering
> SH> mode (fill-then-stroke with adjusted stroke line-width) via "Tr" operator,
> SH> any fixes might be inherently incompatible with what Alexander wants to
> SH> do.
> SH> (The possible fix here is to forcibly add "Tr" operator whenever new text
> SH> starts or font is changed)
> 
> I tried the attached patch, and it works well at least for the MWE in
> https://tug.org/pipermail/dvipdfmx/2019-June/000014.html
> though I'm not sure whether this affects what Alexander wants to do.

If I understood the code you are basically inserting "0 Tr" when the
fake bold font ends. This should imho work for the fake bold
problem. In most cases it shouldn't harm Alexander's code. But it
could perhaps do harm if such an embolden is used at the wrong
place. I can't test with xdvipdfmx, but there is for pdflatex a
package called pdfrender which does something similar: it adds 2 Tr
and 0 Tr to embolden a font. And if I use it inside the \href the
page gets blue:

\documentclass{article}
\usepackage{l3pdf}
\usepackage{lipsum,pdfrender}
\usepackage[colorlinks=true,urlcolor=blue]{hyperref}
\usepackage[ocgcolorlinks]{ocgx2}
\ExplSyntaxOn
\pdf_uncompress:
\ExplSyntaxOff
\begin{document}
abc
\href{http://tex.stackexchange.com}{\pdfrender{TextRenderingMode=2,LineWidth=1}
aaa}
\end{document}   


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/



More information about the tex-live mailing list.