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

Zdenek Wagner zdenek.wagner at gmail.com
Sun Mar 1 11:50:58 CET 2020


ne 1. 3. 2020 v 2:02 odesílatel Shunsaku Hirata
<shunsaku.hirata74 at gmail.com> napsal:
>
> Dear Hironobu,
>
> ...
>
> > though this example contains addition of "embolden text" to clipping path
> > which shoule be "forgotten" according to Shunsaku.
> > (All three PDF files are attached)
>
> I mean it is not possible to add clipping path of "embolden text outline" by
> doing
>
>   7 Tr 2Tr 1 w BT ...text description goes here... ET
>
> When "emblolden text" is requested, dvipdfmx reset the TR mode to 2 by
> inserting "2 Tr" without knowing the existence of "7 Tr".
>
Sure, if you have 7 Tr 2 Tr, then 2 Tr wins. There is no way how to
query the current value of Tr.

> > SH> It's OK if the proposed patch is meant to work only for the case where
> > SH> the ocgx2 package is never used together with the fake-bold feature,
> >
> > Yes, my patch is meant as such.
>
> OK, we should warn everyone not to use fake-bold (embolden text) together
> with the ocgx2 package.
>
> > I agree that it is difficult to have those two at the same time;
> > actually I know that my proposal [xdvipdfmx-B] will break ocgx2 package
> > after any occurrence of fake-bold.  However, even with [xdvipdfmx-A],
> > ocgx2 package would need revised to add an extra Q..q to make "7 Tr"
> > work again; moreover, we would get into a mess as the package can't say
> > which version of xdvipdfmx is in use.
>
> Adding an extra "Q..q" (I assume it is not a typo) does not help. (rather it
> makes generated PDFs corrupt)
> Let me explain the original problem: My version of fake-bold patch adds a
> q-Q block around the text section BT-ET, but as this q-Q block recovers the
> graphics state saved by "q" at the execution of "Q" operator, clipping path
> added in the BT-ET section is discarded. This is why my patch broke the
> ocgx2 package.

It should work. You start by Q which pops out the state pushed by q.
You know that after your code Q will be added, hence your code must
end with q so that the added Q can pop anything. It is necessary to
pair correctly q a Q in order not to corrupt the graphic stack.
>
> ...
>
>
> Thanks,
> Shunsaku Hirata
>

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz



More information about the tex-live mailing list.