From 967183e9e9672cb77270ae4b858f5dfcbff0950b Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Thu, 23 Jul 2020 21:57:19 +0000 Subject: fix bugs in "force fixed-pitch" option for .otf fonts and in image cache (S. Hirata). git-svn-id: svn://tug.org/texlive/trunk@55919 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfm-x/cidtype0.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'Build/source/texk/dvipdfm-x/cidtype0.c') diff --git a/Build/source/texk/dvipdfm-x/cidtype0.c b/Build/source/texk/dvipdfm-x/cidtype0.c index 14a8c39b9a5..ecd5759a5a7 100644 --- a/Build/source/texk/dvipdfm-x/cidtype0.c +++ b/Build/source/texk/dvipdfm-x/cidtype0.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2007-2019 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2007-2020 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -656,14 +656,7 @@ CIDFont_type0_dofont (CIDFont *font) cff_read_charsets(cffont); - /* - * DW, W, DW2 and W2: - * Those values are obtained from OpenType table (not TFM). - */ - if (opt_flags & CIDFONT_FORCE_FIXEDPITCH) { - pdf_add_dict(font->fontdict, - pdf_new_name("DW"), pdf_new_number(1000.0)); - } else { + { int cid_count; if (cff_dict_known(cffont->topdict, "CIDCount")) { @@ -689,7 +682,16 @@ CIDFont_type0_dofont (CIDFont *font) num_glyphs++; } } + } + /* + * DW, W, DW2 and W2: + * Those values are obtained from OpenType table (not TFM). + */ + if (opt_flags & CIDFONT_FORCE_FIXEDPITCH) { + pdf_add_dict(font->fontdict, + pdf_new_name("DW"), pdf_new_number(1000.0)); + } else { add_CIDMetrics(info.sfont, font->fontdict, CIDToGIDMap, last_cid, ((CIDFont_get_parent_id(font, 1) < 0) ? 0 : 1)); } -- cgit v1.2.3