[XeTeX] Fwd: Re: [NTG-context] XeTeX fonts

Ross Moore ross at maths.mq.edu.au
Sat Oct 30 14:51:51 CEST 2004


Hi Jonathan, Hans, and others

On 29/10/2004, at 9:37 PM, Jonathan Kew wrote:

> On 26 Oct 2004, at 2:59 pm, Adam Lindsay wrote:
>
>> Adam Lindsay wrote:
>>
>>>> ^^@:35: Extra tokens will be flushed.
>>>> <to be read again>
>>>>                   Hoefler
>>>> l.35 defaultfont:=""Hoefler
>>>>                            Text: Ligatures=Diphthongs"";
>>
>> hm, the "'s interfere here

I've not checked, but this looks like  ConTeXt has encountered
the same problem with the \fontname primitive that we did,
but has chosen to put quotes as follows:
      "\fontname"

whereas we/you chose to preserve quotes within the name itself,
so that e.g.
    \fontname  -->  "Hoefler Text: Ligatures=Diphthongs"
or
   \fontname  -->  "Hoefler Text: Ligatures=Diphthongs" at 24pt


ConTeXt would thus produce:

    "\fontname"
      -->    ""Hoefler Text: Ligatures=Diphthongs" at 24pt"

which will be hard to parse correctly.



>>
>> [snip --atl]
>>
>> How about introducing something
>>
>> \xfn{Hoefler Text: Ligatures=Diphthongs}
>>
>> instead of " ; I can even imagine that xetex supports { } as 
>> alternative
>> for " because:
>>
>> - it's not sensitive for " being active and such
>> - it nicely moves through the tex machinery since tex knows how to 
>> deal
>> with {}'s
>>
>> on the other hand, such {} can get lost when passing arguments, so 
>> maybe
>>
>> () is a better alternative since it also fits in the ps/pdf way of
>> handling args -)
>>
>>
>>    (Hoefler Text: Ligatures=Diphthongs) at 10pt

Yes; and ConTeXt can safely put  "..."s  around this.

Though one must ask why ConTeXt is doing this.
Surely it should scan for quotes in the name, and act accordingly.


>>
>> that we then can redefine at will. This will move through most tex
>> macros without problems and adaptions.
>>
>> So, can you ask Jonathan if he is willing to accept () as an 
>> alternative
>> alongside "" ?
>>
>> Hans
>
> Font names are scanned as file names by TeX. XeTeX modifies the 
> filename-scanning rules to permit quoted file names (so names with 
> spaces can be used, for example; can be handy for Mac files, and is 
> essential for font names). Currently, it accepts either "double" or 
> 'single' quotes (the non-directional ASCII quotes, that is, not “curly 
> quotes”). There's no mechanism for escaping the quote characters 
> within the name, so a double-quoted name can't include a " character, 
> and a single-quoted one can't include a '.
>
> I'll add (....) as another "quoting" option for file and font names, 
> if that's convenient; however, remember that in principle any of these 
> characters could occur within a font/feature name, which is why I 
> provided more than one option.

Fine, but how will a user control what is returned ?
By a command-line option ?

This will complicate the coding of packages, which otherwise
might naively build routines that scan for "..." to separate the
real font name from its size/scaling information.

Hans and Jonathan need to talk about this, I think.



Cheers,

	Ross


>
> JK
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list