[XeTeX] Transparent font color with xdvipdfmx (was: PDF file info)

Mojca Miklavec mojca.miklavec.lists at gmail.com
Tue Apr 17 00:10:40 CEST 2007


On 4/15/07, baptiste Auguié wrote:
>
> Although, I'm wondering what are the differences in using this
> xdvipdfmx : for one thing the transparency in the colors is gone.
> E.g, the fontspec example,
>
> \fontsize{48}{48}
> \fontspec{Hoefler Text Black}
> {\addfontfeature{Color=FF000099}W}\kern-1ex
> {\addfontfeature{Color=0000FF99}S}\kern-0.8ex
> {\addfontfeature{Color=DDBB2299}P}\kern-0.8ex
> {\addfontfeature{Color=00BB3399}R}
>
> doesn't work well (plain colors).
>
> Is that a known issue, or is it a wrong configuration of mine?

Hello,

I don't know much about LaTeX (joking, but not far from truth: "I
never noticed that LaTeX supports color as long as I had been using
it."), but the following example works OK with ConTeXt even with
xdvipdfmx - since the first day when XeTeX for Linux was announced ;)

That means that there should be a way in XeLaTeX to do that as well
(if you figure out that you need it ;).

\setupcolors[state=start]
\definecolor[c1][a=1,r=1,t=0.5]
\definecolor[c2][a=1,b=1,t=0.5]
\definecolor[c3][a=1,r=0.9,g=0.8,b=0.15,t=0.5]
\definecolor[c4][a=1,g=0.8,b=0.2,t=0.5]

\starttext
\color[c1]{W}\kern-1ex
\color[c2]{S}\kern-0.8ex
\color[c3]{P}\kern-0.8ex
\color[c4]{R}
\stoptext

You can also try it on http://live.contextgarden.net/

The only difference is that you tried to handle color with "raw XeTeX"
(well, there is a high-level user interface above it), where color is
a property of a specific font, while the example in ConTeXt uses
"general color handling mechanism", to color anything between the
braces (independent of font), and apparently that works OK. In LaTeX
it should work in a very similar way.

Mojca


More information about the XeTeX mailing list