[Dev-luatex] problem with loading Chinese Fonts.
taco at elvenkind.com
Tue Aug 14 14:51:59 CEST 2007
Sherry Zhang wrote:
> Step 2
> but then I load a Chinese font, simhei.ttf. It is also available in
> the English Edition of Windows XP.
> and now luatex reports:
> Warning: Glyph 257 is named middot which should mean it is mapped to
> Unicode U+00B7, but Glyph 194 already has that encoding.
> and then it crash:
> This went wrong:[string "luas"]:1: attempt to perform arithemetic
> on field 'width' (a nil value).
> <to be read again>
> So it fails to compile.
This was a bug in 0.10.1 that should be fixed in 0.10.2. It is not
actually related to the warning, Luatex just never outputted
glyph width information for fonts that contain vertical metrics.
> Step 3
> Then I found a smaller Chinese font named simkai.ttf, you can find it
> in the Simplified Chinese version of Windows XP. it compiles
> successfully with the Warning message but without the error message.
> it generate the pdf file, but the two chinese characters are so close
> (see the a.pdf I enclosed here) that they are almost in the same
> place. if I change
> mag = size / 2048
Here, it should use f.units_per_em instead of 2048, as not all truetype
fonts use the same value. I am not sure if that is the problem, but it
> Step 4
> I tried more Chinese ttf fonts and found that only a few can pass the
> test, and among those few, the character box width seems all wrong.
> So how can I make things right? or it is just a bug in luatex?
Probably te same bug as from Step 2, so I advise to try again with
the latest version.
More information about the dev-luatex