# [XeTeX] xunicode questions

Ross Moore ross at ics.mq.edu.au
Mon Jun 15 23:50:34 CEST 2009

Hi Alan and David,

On 16/06/2009, at 12:52 AM, Alan Munn wrote:

> At 10:05 PM -0400 6/14/09, David J. Perry wrote:
>> Hi all,
>>
>> As someone with an extensive background in Unicode but relatively
>> new to (Xe)TeX, I have been working to understand exactly what
>> xunicode does.  I cannot find any documentation except the very
>> short readme file on CTAN, and for a non-programmer the source
>> code of xunicode.sty is rough going.  (I'd be happy to help write
>> some docs once I get it figured out!)

>> characters in the Private Use Area, specifically the old style
>> numbers.

No. PUA finishes at  UxF8FF .
The entries that you are referring to are at  UxFF10 --> UxFF19
which are  "Full width digits".

I wanted to map the   \text...oldstyle  to something, and this
seemed the most suitable.

You can always
\UndeclareUTFcharacter[\UTFencname]{xFF10}{\textzerooldstyle}
...

or redefine the macros to produce something else, if you like.

>> This surprised me, since XeTeX is one of the few applications that
>> allows users to access alternate number shapes via OpenType or AAT
>> features.  Users therefore have no need to use these PUA values,
>> and using them is not a good practice. (Adobe, for instance, is
>> removing the PUA assignments from oldstyle numerals and small caps
>> as they release new versions of their fonts.)    Perhaps such PUA
>> items should be removed from future versions of xunicode.

Xunicode  is mostly about backward compatibility, providing
sensible *general* definitions for macros that have been defined
in older packages which now should *not* be used with XeTeX.
This allows LaTeX source to be reused, and does not force
people to learn new input methods, when they have already
built up experience with non-XeTeX versions of LaTeX, etc.

By incorporating the "encoding" parameter of LaTeX's NFSS,
these general definitions can co-exist with more specialised
definitions adapted to particular fonts that support more
characters and/or variants.

What is needed are specialised packages adapted to the particular
features that a given font supports.

> Not sure about these two questions. Perhaps Ross can answer them.

I've not seen any compelling reason to change Xunicode.sty ,
except perhaps to include testing of whether a glyph exists
within a font, and use alternative methods when it does not.
(But this is not an issue raised within this email.)

>
> Alan

Hope this helps,

Ross

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------