Anurag Thakur pushed to branch gsoc-anurag-2023 at FreeType / FreeType
Commits:
-
67c1c306
by Anurag Thakur at 2023-08-23T21:56:19+05:30
2 changed files:
Changes:
... | ... | @@ -1276,6 +1276,7 @@ FT_BEGIN_HEADER |
1276 | 1276 | FT_ListRec sizes_list;
|
1277 | 1277 | |
1278 | 1278 | FT_Generic autohint; /* face-specific auto-hinter data */
|
1279 | + FT_GlyphSlot* garray;
|
|
1279 | 1280 | void* extensions; /* unused */
|
1280 | 1281 | |
1281 | 1282 | FT_Face_Internal internal;
|
... | ... | @@ -914,7 +914,7 @@ |
914 | 914 | /* The validity test for `glyph_index' is performed by the */
|
915 | 915 | /* font drivers. */
|
916 | 916 | |
917 | - slot = face->glyph;
|
|
917 | + slot = face->garray[face->glyph->glyph_index];
|
|
918 | 918 | ft_glyphslot_clear( slot );
|
919 | 919 | |
920 | 920 | driver = face->driver;
|
... | ... | @@ -2782,6 +2782,29 @@ |
2782 | 2782 | // FT_Outline_Decompose here
|
2783 | 2783 | |
2784 | 2784 | }
|
2785 | + |
|
2786 | + face->garray = (FT_GlyphSlot*)malloc(
|
|
2787 | + face->driver->clazz->slot_object_size * face->num_glyphs );
|
|
2788 | + error = FT_Set_Char_Size( face, 0, 160 * 64, 300, 300 );
|
|
2789 | + int glyph_index = FT_Get_Char_Index( face, 'A' );
|
|
2790 | + // error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_HINTING );
|
|
2791 | + |
|
2792 | + for ( int gindex = 0; gindex < face->num_glyphs; gindex++ )
|
|
2793 | + {
|
|
2794 | + driver = face->driver;
|
|
2795 | + FT_Driver_Class clazz = driver->clazz;
|
|
2796 | + memory = driver->root.memory;
|
|
2797 | + |
|
2798 | + FT_ALLOC(face->garray[gindex], clazz->slot_object_size);
|
|
2799 | + face->garray[gindex]->face = face;
|
|
2800 | + ft_glyphslot_init(face->garray[gindex]);
|
|
2801 | + face->garray[gindex]->next = face->garray[gindex];
|
|
2802 | + face->glyph = face->garray[gindex];
|
|
2803 | + |
|
2804 | + FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_HINTING);
|
|
2805 | + }
|
|
2806 | + |
|
2807 | + |
|
2785 | 2808 | }
|
2786 | 2809 | |
2787 | 2810 | /* some checks */
|