[dvipdfmx] bug of dvipdfm-x
݆ޒ
16144565 at qq.com
Tue Jan 25 10:39:38 CET 2022
it's not relative uppercase and lowercase.
let me explain. i'm changing some chinese font's StemV, otherwise dvipdfmx render the font too light. you can check the dvipdfmx changelog of 2008-05-17 (i'm using cellphone reply you, sorry it's not convenient to add the link directly).
but i'm using xelatex but not latex. so when i follow the way of latex to change StemV, i'm failed.
then i open dvipdfmx's log with '-vv' option, i found dvipdfma recognize the fontmap generated by xelatex is 'C:/Windows/Fonts/simhei.ttf/0/H/65536/0/0', as you said, not latex fontmap 'unihei at Unicode@'.
but when i add the xelatex fontmap in cid-x.map, the StemV still didn't change. then i found it's because of the `static const char *valid_chars` in the function `parse_ident` missing `/`, so dvipdfmx can't recognize the fontmap. when i add the '/' and build dvipdfmx by myself, the StemV change successfully by my build dvipdfmx.
so i think there must be something wrong with 'xelatex+dvipdfmx'.
if it's not a bug, how can we change the specific font's StemV in windows system path with 'xelatex+dvipdfmx'?
Thanks!
------------------ Original ------------------
From: Shunsaku Hirata <shunsaku.hirata74 at gmail.com>
Date: Tue,Jan 25,2022 4:28 AM
To: ݆ޒ <16144565 at qq.com>
Cc: dvipdfmx <dvipdfmx at tug.org>
Subject: Re: [dvipdfmx] bug of dvipdfm-x
I am not sure why you have concluded so but...
The function parse_ident is not used in parsing fontmap files (fontmap.c).
And also, font identifiers something like your example,
"C:/Windows/Fonts/simhei.ttf/0/H/65536/0/0", are XeTeX internally generated
ones and normally not expected to be used in fontmap specifications.
Probably this behavior is related to uppercase vs. lowercase?
Please try changing the drive letter 'C' to 'c' and see what happens.
Thanks,
Shunsaku Hirata
2022年1月25日(火) 2:15 ݆ޒ via dvipdfmx <dvipdfmx at tug.org>:
>
> for the pdfparse.c file in dvipdfm-x, the `static const char *valid_chars` in the function `parse_ident` missing `/`.
>
> char *
> parse_ident (const char **start, const char *end)
> {
> static const char *valid_chars =
> "!\"#$&'*+,-.0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\^_`abcdefghijklmnopqrstuvwxyz|~";
>
> return parse_gen_ident(start, end, valid_chars);
> }
>
> should change to:
>
> char *
> parse_ident (const char **start, const char *end)
> {
> static const char *valid_chars =
> "!\"#$&'*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\^_`abcdefghijklmnopqrstuvwxyz|~";
>
> return parse_gen_ident(start, end, valid_chars);
> }
>
> because when I set StemV for TureType font (such simhei.ttf), the fontmap is:
> C:/Windows/Fonts/simhei.ttf/0/H/65536/0/0
> but because valid_chars don't include `/`, so dvipdfmx can't recognize:
> C:/Windows/Fonts/simhei.ttf/0/H/65536/0/0 Identity-H simhei.ttf -v 50
> in cid-x.map to change SimHei's StemV.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/dvipdfmx/attachments/20220125/a56cc51a/attachment.html>
More information about the dvipdfmx
mailing list.