@@ -2198,29 +2198,27 @@ def draw_text_woven(chunks):
21982198 for c in chunk :
21992199 ccode = ord (c )
22002200 gind = font .get_char_index (ccode )
2201- if gind is not None :
2202- if mode == 2 and chunk_type == 2 :
2203- glyph_name = font .get_glyph_name (gind )
2204- self .file .output (Op .gsave )
2205- self .file .output (0.001 * fontsize , 0 ,
2206- 0 , 0.001 * fontsize ,
2207- newx , 0 , Op .concat_matrix )
2208- name = self .file ._get_xobject_symbol_name (
2209- font .fname , glyph_name )
2210- self .file .output (Name (name ), Op .use_xobject )
2211- self .file .output (Op .grestore )
2212-
2213- # Move the pointer based on the character width
2214- # and kerning
2215- glyph = font .load_char (ccode ,
2216- flags = LOAD_NO_HINTING )
2217- if lastgind is not None :
2218- kern = font .get_kerning (
2219- lastgind , gind , KERNING_UNFITTED )
2220- else :
2221- kern = 0
2222- lastgind = gind
2223- newx += kern / 64.0 + glyph .linearHoriAdvance / 65536.0
2201+ if mode == 2 and chunk_type == 2 :
2202+ glyph_name = font .get_glyph_name (gind )
2203+ self .file .output (Op .gsave )
2204+ self .file .output (0.001 * fontsize , 0 ,
2205+ 0 , 0.001 * fontsize ,
2206+ newx , 0 , Op .concat_matrix )
2207+ name = self .file ._get_xobject_symbol_name (
2208+ font .fname , glyph_name )
2209+ self .file .output (Name (name ), Op .use_xobject )
2210+ self .file .output (Op .grestore )
2211+
2212+ # Move the pointer based on the character width
2213+ # and kerning
2214+ glyph = font .load_char (ccode , flags = LOAD_NO_HINTING )
2215+ if lastgind is not None :
2216+ kern = font .get_kerning (
2217+ lastgind , gind , KERNING_UNFITTED )
2218+ else :
2219+ kern = 0
2220+ lastgind = gind
2221+ newx += kern / 64 + glyph .linearHoriAdvance / 65536
22242222
22252223 if mode == 1 :
22262224 self .file .output (Op .end_text )
0 commit comments