[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] gsoc-anurag-2023 70e807cef 2/2: Add FT_Refresh_Glyph
From: |
Werner Lemberg |
Subject: |
[freetype2] gsoc-anurag-2023 70e807cef 2/2: Add FT_Refresh_Glyph |
Date: |
Wed, 4 Oct 2023 17:07:50 -0400 (EDT) |
branch: gsoc-anurag-2023
commit 70e807cef562ceacb17edd2f3a7767ac1cb0e01d
Author: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
Commit: Anurag Thakur <anurag105csec21@bpitindia.edu.in>
Add FT_Refresh_Glyph
---
include/freetype/freetype.h | 4 ++++
src/base/ftobjs.c | 15 ++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 44c223f3c..3d95407c9 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3248,6 +3248,10 @@ FT_BEGIN_HEADER
FT_UInt glyph_index,
FT_Int32 load_flags );
+ FT_EXPORT( FT_Error )
+ FT_Refresh_Glyph( FT_Face face,
+ FT_UInt glyph_index);
+
/**************************************************************************
*
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 7a5623d31..ed4a1a1b2 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -902,7 +902,20 @@
/* documentation is in freetype.h */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Refresh_Glyph( FT_Face face,
+ FT_UInt glyph_index)
+
+ {
+ //ft_glyphslot_free_bitmap( face->garray[glyph_index] );
+ face->garray[glyph_index]->format = FT_GLYPH_FORMAT_OUTLINE;
+ // face->garray[glyph_index]->bitmap.width = 0;
+ // face->garray[glyph_index]->bitmap.rows = 0;
+ // face->garray[glyph_index]->bitmap.pitch = 0;
+ // face->garray[glyph_index]->bitmap.pixel_mode = 0;
+
+ }
FT_EXPORT_DEF( FT_Error )
FT_Load_Glyph( FT_Face face,
FT_UInt glyph_index,
@@ -3141,7 +3154,7 @@ int conic_to2(FT_GlyphSlot* slot, FT_Vector *control,
FT_Vector *from, FT_Vector
face->garray = (FT_GlyphSlot*)malloc(
face->driver->clazz->slot_object_size * face->num_glyphs );
//error = FT_Set_Char_Size( face, 0, 160 * 64, 300, 300 );
- error = FT_Set_Pixel_Sizes( face, 0, 100);
+ error = FT_Set_Pixel_Sizes( face, 0, 50);
// int glyph_index = FT_Get_Char_Index( face, 'A' );
// error = FT_Load_Glyph( face, glyph_index,
FT_LOAD_NO_HINTING );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] gsoc-anurag-2023 70e807cef 2/2: Add FT_Refresh_Glyph,
Werner Lemberg <=