ref: 33ac83e37637f9980d674f60a2621f3ff2e2de64
parent: a44e20879cefea41663bb36ff4af908cc4146fb8
author: Werner Lemberg <[email protected]>
date: Thu Jun 14 17:00:23 EDT 2018
Add glyph index and glyph load flags to glyph slot. * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused `reserved' field to `glyph_index'. * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add `load_flags' field. * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2018-06-14 Werner Lemberg <[email protected]>
+ Add glyph index and glyph load flags to glyph slot.
+
+ * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
+ `reserved' field to `glyph_index'.
+
+ * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
+ `load_flags' field.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
+
+2018-06-14 Werner Lemberg <[email protected]>
+
[sfnt] Move `CPAL' stuff into separate files.
* src/sfnt/sfdriver.c: Include `ttcpal.h'.
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1781,6 +1781,10 @@
* listed through a direct, single-linked list
* using its `next' field.
*
+ * glyph_index ::
+ * The glyph index passed as an argument to @FT_Load_Glyph while
+ * initializeing the glyph slot (since FreeType version 2.10).
+ *
* generic ::
* A typeless pointer unused by the FreeType
* library or any of its drivers. It can be
@@ -1975,7 +1979,7 @@
FT_Library library;
FT_Face face;
FT_GlyphSlot next;
- FT_UInt reserved; /* retained for binary compatibility */
+ FT_UInt glyph_index; /* new in 2.10; was reserved previously */
FT_Generic generic;
FT_Glyph_Metrics metrics;
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -434,6 +434,10 @@
*
* color_layers ::
* Data from (SFNT) COLR/CPAL tables.
+ *
+ * load_flags ::
+ * The load flags passed as an argument to @FT_Load_Glyph while
+ * initializing the glyph slot.
*/
#define FT_GLYPH_OWN_BITMAP 0x1U
@@ -448,6 +452,8 @@
void* glyph_hints;
FT_Colr_Internal color_layers;
+
+ FT_Int32 load_flags;
} FT_GlyphSlot_InternalRec;
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -999,6 +999,9 @@
}
}
+ slot->glyph_index = glyph_index;
+ slot->internal->load_flags = load_flags;
+
/* do we need to render the image or preset the bitmap now? */
if ( !error &&
( load_flags & FT_LOAD_NO_SCALE ) == 0 &&