# [XeTeX] Proposed change in color handling

Jonathan Kew jonathan_kew at sil.org
Wed Jan 4 09:00:11 CET 2006

On 4 Jan 2006, at 2:34 am, Will Robertson wrote:

> On 03/01/2006, at 23:50 , Stephen Moye wrote:
>
>> On Monday, January 02, 2006, at 08:34AM, Jonathan Kew
>> <jonathan_kew at sil.org> wrote:
>>
>>> The change I am considering is to make the font colors override
>>> colors set via \special, so that if a font has a color attribute, it
>>> will *always* use that color. Where no font color is given (the
>>> usual
>>> case), the text will follow the \special color values.
>>>
>>> It seems to me that this is a more natural and intuitive model for
>>> the interaction between these two color-setting mechanisms, and it
>>> removes the need for a \special operation that resets the default
>>> color state.
>
> I agree here; I assume some of this thinking was prompted by the
> previous thread on the color package blowing away fontspec's
> default roman font colour within floats. But the implications are
> more wide-reaching than this specific case, obviously.
>
> And font-specific colour is better than using specials so it indeed
> should take priority, as seen by the problems faced (at least in
> LaTeX) with, e.g., coloured footnotes spanning pages in pdfTeX.

Ah, that's not something I've run into personally, though I can
imagine it being a problem.

Another issue is with bidirectional text, where the specials can end
up in unexpected places after the reversal of text runs by the TeX--
XeT routines, so that the colour changes don't happen where the user
intended. Coloured fonts avoid this problem, as the colour stays
firmly attached to the glyphs.

JK