File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
crates/krilla/src/object/font Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ impl CIDFont {
103
103
104
104
#[ inline]
105
105
pub ( crate ) fn set_codepoints ( & mut self , cid : Cid , text : String ) {
106
- self . cmap_entries . insert ( cid, text) ;
106
+ if !text. is_empty ( ) {
107
+ self . cmap_entries . insert ( cid, text) ;
108
+ }
107
109
}
108
110
109
111
#[ inline]
@@ -254,6 +256,7 @@ impl CIDFont {
254
256
// For the .notdef glyph, it's fine if no mapping exists, since it is included
255
257
// even if it was not referenced in the text.
256
258
for g in 1 ..self . glyph_remapper . num_gids ( ) {
259
+ println ! ( "{:?}" , self . cmap_entries. get( & g) ) ;
257
260
match self . cmap_entries . get ( & g) {
258
261
None => sc. register_validation_error ( ValidationError :: InvalidCodepointMapping (
259
262
self . font . clone ( ) ,
Original file line number Diff line number Diff line change @@ -135,7 +135,9 @@ impl Type3Font {
135
135
136
136
#[ inline]
137
137
pub ( crate ) fn set_codepoints ( & mut self , gid : Gid , text : String ) {
138
- self . cmap_entries . insert ( gid, text) ;
138
+ if !text. is_empty ( ) {
139
+ self . cmap_entries . insert ( gid, text) ;
140
+ }
139
141
}
140
142
141
143
#[ inline]
You can’t perform that action at this time.
0 commit comments