File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,6 @@ function get_encoded_string(s::CosString, fum::FontUnicodeMapping)
118
118
carr = NativeEncodingToUnicode (Vector {UInt8} (s), fum. encoding)
119
119
return String (carr)
120
120
end
121
- # {UInt8, CosObject}
122
121
123
122
function get_unicode_chars (b:: UInt8 , itv:: IntervalValue )
124
123
f = first (itv)
@@ -194,8 +193,12 @@ function get_encoded_string(s::CosString, cmap::CMap)
194
193
else
195
194
b2 = barr[i+= 1 ]
196
195
itree1 = value (collect (intersect (rm, (b1,b1)))[1 ])
197
- itv = collect (intersect (itree1, (b2,b2)))[1 ]
198
- carr = get_unicode_chars (b2, itv)
196
+ itv = collect (intersect (itree1, (b2,b2)))
197
+ if length (itv) > 0
198
+ carr = get_unicode_chars (b2, itv[1 ])
199
+ else
200
+ push! (carr, Char (0 ))
201
+ end
199
202
end
200
203
append! (retarr, carr)
201
204
end
You can’t perform that action at this time.
0 commit comments