[PATCH v2] dwrite: Prefer Windows platform names regardless of record order.

Nikolay Sivov nsivov at codeweavers.com
Fri Sep 13 00:30:35 CDT 2019


On 9/11/19 5:58 PM, Akihiro Sagawa wrote:

> In v2, fix time out issue (loop variable name was incorrect).
>
> Otherwise localized family name of IPA font isn't available in DirectWrite.
> While Wine enumerates localized name in GDI.
>
> N.B. IPA font family (e.g. IPA Mincho) is a bit tricky. It has Japanese
> (Kanji) name for Japanese Windows, though it has English (ASCII) name for
> Japanese Macintosh. And due to record order, Wine's DirectWrite chooses
> Macintosh one.
>
> Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
> ---
>   dlls/dwrite/opentype.c | 52 ++++++++++++++++++--------------------------------
>   1 file changed, 19 insertions(+), 33 deletions(-)
>
Hi, Akihiro.

Thanks for the patch. Could you provide a link for font package you're 
testing with? I'd like to try it myself, if it's freely available.

Regarding patch itself, it should be possible to keep existing loop 
instead of running it 3 times in worst case - if you want to prefer Win 
entries, you could return when you get one, but keep running otherwise, 
keeping record id's for mac and Unicode records. Completing the loop 
would mean there is no Win entry, and then you can pick mac or Unicode one.

P.S. unrelated to this patch, names reading should also be changed to 
use "safer" table_read* helpers. I'll put that on my list.




More information about the wine-devel mailing list