@@ -160,11 +160,13 @@ function update_glyph_id_std_14(cosdoc, cosfont,
160
160
glyph_name_to_cid, cid_to_glyph_name)
161
161
basefont = cosDocGetObject (cosdoc, cosfont, cn " BaseFont" )
162
162
basefont === CosNull && return false
163
- String (basefont) in ADOBE_STD_14 || return false
163
+ basefont_with_subset = CDTextString (basefont)
164
+ basefont_str = String (rsplit (basefont_with_subset, ' +' ;limit= 2 )[end ])
165
+ basefont_str in ADOBE_STD_14 || return false
164
166
gn2cid, cid2gn =
165
- basefont === cn " Symbol" ?
167
+ basefont_str == " Symbol" ?
166
168
(GlyphName_to_SYMEncoding, SYMEncoding_to_GlyphName) :
167
- basefont === cn " ZapfDingbats" ?
169
+ basefont_str == " ZapfDingbats" ?
168
170
(GlyphName_to_ZAPEncoding, ZAPEncoding_to_GlyphName) :
169
171
(GlyphName_to_STDEncoding, STDEncoding_to_GlyphName)
170
172
merge! (glyph_name_to_cid, gn2cid)
@@ -179,10 +181,7 @@ function get_glyph_id_mapping(cosdoc::CosDoc, cosfont::IDD{CosDict})
179
181
subtype = cosDocGetObject (cosdoc, cosfont, cn " Subtype" )
180
182
subtype === cn " Type0" && return glyph_name_to_cid, cid_to_glyph_name
181
183
182
- update_glyph_id_std_14 (cosdoc, cosfont,
183
- glyph_name_to_cid,
184
- cid_to_glyph_name) &&
185
- return glyph_name_to_cid, cid_to_glyph_name
184
+ update_glyph_id_std_14 (cosdoc, cosfont, glyph_name_to_cid, cid_to_glyph_name)
186
185
187
186
encoding = cosDocGetObject (cosdoc, cosfont, cn " Encoding" )
188
187
encoding === CosNull && return glyph_name_to_cid, cid_to_glyph_name
0 commit comments