[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master f9350be: [base] Complete `ft_glyphslot_clear`.
From: |
Werner Lemberg |
Subject: |
[freetype2] master f9350be: [base] Complete `ft_glyphslot_clear`. |
Date: |
Fri, 2 Apr 2021 05:10:30 -0400 (EDT) |
branch: master
commit f9350be1e45baa1c29f7551274982262f8e769ce
Author: Ben Wagner <bungeman@chromium.org>
Commit: Werner Lemberg <wl@gnu.org>
[base] Complete `ft_glyphslot_clear`.
* src/base/ftobjs.c (ft_glyphslot_clear): This function is intended
to reset all the values of a glyph slot. However, it was not
resetting the values of the advances and `glyph_index`. Reset the
advances and `glyph_index` to zero.
---
ChangeLog | 9 +++++++++
src/base/ftobjs.c | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0e599b9..6e11b2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2021-04-02 Ben Wagner <bungeman@chromium.org>
+ [base] Complete `ft_glyphslot_clear`.
+
+ * src/base/ftobjs.c (ft_glyphslot_clear): This function is intended
+ to reset all the values of a glyph slot. However, it was not
+ resetting the values of the advances and `glyph_index`. Reset the
+ advances and `glyph_index` to zero.
+
+2021-04-02 Ben Wagner <bungeman@chromium.org>
+
[truetype] Prevent glyph program state from persisting.
`FDEF` instructions are specified as allowed only in 'prep' or
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 56e1360..bee301c 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -539,6 +539,8 @@
ft_glyphslot_free_bitmap( slot );
/* clear all public fields in the glyph slot */
+ slot->glyph_index = 0;
+
FT_ZERO( &slot->metrics );
FT_ZERO( &slot->outline );
@@ -559,6 +561,8 @@
slot->linearHoriAdvance = 0;
slot->linearVertAdvance = 0;
+ slot->advance.x = 0;
+ slot->advance.y = 0;
slot->lsb_delta = 0;
slot->rsb_delta = 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master f9350be: [base] Complete `ft_glyphslot_clear`.,
Werner Lemberg <=