[XeTeX] Using OpenType fonts of 2048 em-width glyphs with xelatex, using fontspec

Simon Cozens simon at simon-cozens.org
Tue Nov 10 02:53:27 CET 2015


On 04/11/2015 07:30, Simon Cozens wrote:
> OK, I'm happy to have a dig into this. (because it will probably affect
> my software as well... ;-) Hugo, could you send me the font and a test file?

I started to dig into this:

* The font has 2048 upem set in the head table (as one would expect).

* The FontMatrix in the CFF table is [0.000488281 0 0 0.000488281 0 0].

* dvipdfmx writes the font in Type 0C format.

* This bug was reported six years ago, and it was found that if the font
was used with plain tex and dvipdfmx (not xdvipdfmx), the font was
written in Type 1C format and all would be well.

Here's Jonathan Kew about the bug back then:
http://www.ntg.nl/pipermail/dev-luatex/2009-March/002420.html

And here is how luatex handles the situation:
http://www.ntg.nl/maps/40/07.pdf

I'm not sure what the answer is at this point. In this specific case,
converting the font to Type 1 should do it. In the general case, luatex
seems to (a) scale the font size by 1000/upem when writing PDF Tf
instructions for PS fonts and (b) reset the FontMatrix entry back to
[0.001 * * 0.001 * *] when outputting the PDF object containing the CFF
dictionary. It seems a bit kludgy, but I would be happy to dvipdfmx do
that if that is the right thing to do. I would like some advice from
dvipdfmx-y people first, though.


More information about the XeTeX mailing list