Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
f9350be1
by Ben Wagner at 2021-04-02T11:09:01+02:00
2 changed files:
Changes:
1 |
+2021-04-02 Ben Wagner <bungeman@chromium.org>
|
|
2 |
+ |
|
3 |
+ [base] Complete `ft_glyphslot_clear`.
|
|
4 |
+ |
|
5 |
+ * src/base/ftobjs.c (ft_glyphslot_clear): This function is intended
|
|
6 |
+ to reset all the values of a glyph slot. However, it was not
|
|
7 |
+ resetting the values of the advances and `glyph_index`. Reset the
|
|
8 |
+ advances and `glyph_index` to zero.
|
|
9 |
+ |
|
1 | 10 |
2021-04-02 Ben Wagner <bungeman@chromium.org>
|
2 | 11 |
|
3 | 12 |
[truetype] Prevent glyph program state from persisting.
|
... | ... | @@ -539,6 +539,8 @@ |
539 | 539 |
ft_glyphslot_free_bitmap( slot );
|
540 | 540 |
|
541 | 541 |
/* clear all public fields in the glyph slot */
|
542 |
+ slot->glyph_index = 0;
|
|
543 |
+ |
|
542 | 544 |
FT_ZERO( &slot->metrics );
|
543 | 545 |
FT_ZERO( &slot->outline );
|
544 | 546 |
|
... | ... | @@ -559,6 +561,8 @@ |
559 | 561 |
|
560 | 562 |
slot->linearHoriAdvance = 0;
|
561 | 563 |
slot->linearVertAdvance = 0;
|
564 |
+ slot->advance.x = 0;
|
|
565 |
+ slot->advance.y = 0;
|
|
562 | 566 |
slot->lsb_delta = 0;
|
563 | 567 |
slot->rsb_delta = 0;
|
564 | 568 |
}
|