some bits of opentype math testing

77 views
Skip to first unread message

Ulrik Vieth

unread,
Jul 25, 2010, 2:58:02 PM7/25/10
to uni...@googlegroups.com, lua...@tug.org
Hi folks,

I've been doing a bit of OpenType math testing once again with
LuaLaTeX, XeLaTeX, and ConTeXt MkIV, all based on the final
(currently frozen) TL2010 pretest version.

Here are a my observations of rendering and font loading issues.

I expect that none of them are serious show stoppers for the
TL2010 release, but they might lead to subsequent online updates
after the TL release.

Regards, Ulrik


Rendering issues (ConTeXt):

- \hbar in math formulas (e.g. quantum mechanics) is incorrectly
mapped to U+0127 (text upright) instead of U+210F (math italic).

For Asana-Math you get a missing (disappearing) character.
For Cambria and XITS-Math you get an incorrect character shape.

It works OK if you use \hslash, or if you \let\hbar=\hslash.
(Except for Neo-Euler which doesn't have the glyph.)

- For prime (U+0232), ConTeXt does not use the font substitution
prime -> prime.ssty, so the raised prime appears too small.

This problem was recently fixed in luaotfload for LuaLaTeX
and the fix probably needs to be ported back to ConTeXt now.
(Or maybe ConTeXt needs to be updated again in TL2010.)


Rendering issues (LuaLaTeX and XeLaTeX):

- \hbar in math formulas is constructed as a macro using
an 'h' from the current math font and a bar from cmr10 (!).

It works OK if you use \hslash, or if you \let\hbar=\hslash.
(Except for Neo-Euler which doesn't have the glyph.)


Rendering issues (LuaLaTeX):

- For Asana-Math and Cambria-Math displaystyle integrals appear
too small in LuaLaTeX, whereas they are correct in ConTeXt.
For Neo-Euler and XITS-Math displaystyle integrals appear
in the same size in LuaLaTeX and ConTeXt (and also in XeLaTeX).

Does this depend on how many sizes of integrals are available
or does it depend on the OT parameter DisplayOperatorMinHeight?

Rendering issues (ConTeXt and LuaLaTeX):

- For Asana-Math a straight version of displaystyle parentheses
(as in the extensible version) is used in LuaLaTeX and ConTeXt,
whereas a round version is used in XeTeX.

Does this depend on how many sizes of integrals are available
or does it depend on the OT parameter DisplayOperatorMinHeight?


Font loading issues (ConTeXt and LuaLaTeX):

- If cambria.ttc is installed in texmf-local/fonts/opentype,
luaotfload fails to find the font "Cambria" or "Cambria Math".
If cambria.ttc is installed in texmf-local/fonts/truetype,
luaotfload correctly resolves the font name.

With ConTeXt it doesn't matter where cambria.ttc was installed.
It was correctly found it both locations.

- If euler.otf is installed in texmf-local/fonts/opentype,
Context fails to find the font, whereas luaotfload does find it.

Does this depend on specific names in the defintion of typescript
pagella-euler in type-otf.mkiv?


Font loading issues (XeLaTeX):

- For Asana-Math, you get a messed up PDF file, if the font
is loaded with \setmathfont{Asana Math}, because there are
both OTF and TTF versions of the font in the texmf tree.
If the font is loaded with \setmathfont{Asana-Math.otf}
(specific type), there are no problems.

With LuaLaTeX, using the unspecific type works fine.


Font issues:

- It would be nice if Neo-Euler would have a \hslash glpyh (U+210F).
- It would be nice if Neo-Euler would have a bold \nabla (U+1D6C1).

lualatex-asana-test.pdf
lualatex-asana-test.tex
xelatex-asana-test.pdf
xelatex-asana-test.tex

Khaled Hosny

unread,
Jul 25, 2010, 4:40:12 PM7/25/10
to uni...@googlegroups.com, lua...@tug.org
On Sun, Jul 25, 2010 at 08:58:02PM +0200, Ulrik Vieth wrote:
> Hi folks,
>
> I've been doing a bit of OpenType math testing once again with
> LuaLaTeX, XeLaTeX, and ConTeXt MkIV, all based on the final
> (currently frozen) TL2010 pretest version.
>
> Here are a my observations of rendering and font loading issues.
>
> I expect that none of them are serious show stoppers for the
> TL2010 release, but they might lead to subsequent online updates
> after the TL release.
>
> Regards, Ulrik
>
>
> Rendering issues (ConTeXt):

[...]

> - For prime (U+0232), ConTeXt does not use the font substitution
> prime -> prime.ssty, so the raised prime appears too small.
>
> This problem was recently fixed in luaotfload for LuaLaTeX
> and the fix probably needs to be ported back to ConTeXt now.
> (Or maybe ConTeXt needs to be updated again in TL2010.)

This is already fixed in ConTeXt beta, it was a different issue than in
LuaLaTeX (the ssty feature activation got accidentally disabled during
some code shuffling).

[...]

> Font loading issues (ConTeXt and LuaLaTeX):
>
> - If cambria.ttc is installed in texmf-local/fonts/opentype,
> luaotfload fails to find the font "Cambria" or "Cambria Math".
> If cambria.ttc is installed in texmf-local/fonts/truetype,
> luaotfload correctly resolves the font name.

This is a kpathsea issue (TTC and TTF fonts are looked for in $TTFONTS
not $OPENTYPEFONTS and thus the font names database generation code will
not see cambria.ttc in the first case (you can check with kpsewhich).

> With ConTeXt it doesn't matter where cambria.ttc was installed.
> It was correctly found it both locations.
>
> - If euler.otf is installed in texmf-local/fonts/opentype,
> Context fails to find the font, whereas luaotfload does find it.
>
> Does this depend on specific names in the defintion of typescript
> pagella-euler in type-otf.mkiv?

ConTeXt doesn't use kpathsea, luaotfload does. To check if ConTeXt can
find a file try `luatools --find`.

> Font loading issues (XeLaTeX):
>
> - For Asana-Math, you get a messed up PDF file, if the font
> is loaded with \setmathfont{Asana Math}, because there are
> both OTF and TTF versions of the font in the texmf tree.
> If the font is loaded with \setmathfont{Asana-Math.otf}
> (specific type), there are no problems.
>
> With LuaLaTeX, using the unspecific type works fine.

This is a known XeTeX bug (engine bug, no mutter which of te two files
fontspec will load).

> Font issues:
>
> - It would be nice if Neo-Euler would have a \hslash glpyh (U+210F).
> - It would be nice if Neo-Euler would have a bold \nabla (U+1D6C1).

I'll put them on the, unwritten, TODO list :)
(tracker issues so it does not get missed is appreciated, now and in
the future.)

Regards,
Khaled

--
Khaled Hosny
Arabic localiser and member of Arabeyes.org team
Free font developer

Reply all
Reply to author
Forward
0 new messages