[XeTeX] Re: Re: Fontspec feature request?

Will Robertson will at guerilla.net.au
Tue Oct 25 09:27:26 CEST 2005


25/10/2005, 4pm - Suki Venkat, [TnQ] wrote:


> Yes in mathmode I know that these things happen:
> (1) Operator-spaces on both sides of a operator;
> (2) Fences grow to the size of it descendants;
> (3) Limit operators grow in size and \displaystyle decides if its side
> limit or under-over limit;
> (4) I know that the fraction bar, over-bars, under-bars, under-braces,
> square-root etc... are difficult to design.
>
> In the mathmode you need exact glyph dimensions to do this, as JK was
> explaining, this not provided in the font metrics, but can be  
> calculated
> using some programs, I suppose.
>

If by "some program", you mean "by hand, manually", then you're  
right. I don't know of any program besides metafont and its  
derivatives that will create math font metrics for you, although I've  
been very wrong in the past...


> Fence construction in LaTeX is unsatisfactory, as it uses horrendous
> pieces to assemble, instead of just geometrically stretching the  
> fence-
> glyph in the vertical direction.
>

As a side note, I don't agree with this. Geometric transformations on  
anything to do with fonts to accommodate sizes and shapes you don't  
have always leads to poor output, in my opinion. (Cf. real versus  
fake italics and small caps.)


> It is also about time that the math is brought in line with text,
> atleast to use some of the interesting OpenType font features and also
> to bring it to confirm with unicode mapping.
>

I think we all agree on this :)
It's just that it sounds like less work than it is.


>> Anyway, there IS a way to set \mathit in fontspec (luckily, I
>> implemented it last version). It is taken as the italic form of
>> \mathrm, which is specified with \setmathrm.
>>
>
> -it doesn't :(
>
> The \mathit works for ASCII characters but for UTF-8 (x3B1) it  
> works in
> the text-mode but not in mathmode (I cut the text in PDF and pasted it
> to check- I found that \mathit{x3B1} shows-up as TimesNewRomanPSMT and
> not TimesNewRoman-ItalicPSMT). I also checked it for OpenType font
> "Warnock Pro" - just to be sure (see PDF attached).
>

I don't really know what's going on here. As far as I can fathom it's  
nothing to do with fontspec. I wouldn't have expected
   \documentclass{article}
   \usepackage{fontspec}
   \setromanfont{Times Roman}
   \begin{document}
   roman text
   \[ α+β=γ \]
   \end{document}
to even give you sensible output in the first place. It's too low  
level TeX for me to know off the top of my head. There's a chance  
that the workings of inputenc's [math] option could be of help here,  
but not directly.

I don't have time to look into it now, but there are others on this  
list who know more than me about why maths doesn't work for unicode  
fonts.

The biggest and most overriding factor is that at the moment, XeTeX  
still uses \mathchar that it inherited from TeX to access symbols in  
a maths font. These fonts were limited to contain 256 glyphs each,  
and so \mathchar will similarly access only the first 256 glyphs in a  
font.

Bruno Voisin's has posted at some stage a hack to allow the Apple  
Symbols as a replacement for many of the maths operators and  
relations, but it uses the same trick as your code: it inserts text  
mode glyphs into the maths stream with \text{} or \mathrm{}, so  
spacing, et al. will have to be done manually in the macros by hand.

Good luck,

Will



More information about the XeTeX mailing list