File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -488,23 +488,27 @@ def _place_text(
488488 y_blit_target = 0 # draw the clipped bitmap at y=0
489489
490490 print (
491- 'Warning: Glyph exceeds Ascent/Descent properties: "{}"' .format (
491+ 'Warning: Glyph clipped, exceeds Ascent property: "{}"' .format (
492+ char
493+ )
494+ )
495+
496+ if (y_blit_target + my_glyph .height ) > bitmap .height :
497+ print (
498+ 'Warning: Glyph clipped, exceeds descent property: "{}"' .format (
492499 char
493500 )
494501 )
495502
496503 self ._blit (
497504 bitmap ,
498505 xposition + my_glyph .dx ,
499- y_clip
500- + yposition
501- - my_glyph .height
502- - my_glyph .dy , ##### ******
506+ y_blit_target ,
503507 my_glyph .bitmap ,
504508 x_1 = glyph_offset_x ,
505509 y_1 = y_clip ,
506510 x_2 = glyph_offset_x + my_glyph .width ,
507- y_2 = 0 + my_glyph .height ,
511+ y_2 = my_glyph .height ,
508512 skip_index = skip_index , # do not copy over any 0 background pixels
509513 )
510514
You can’t perform that action at this time.
0 commit comments