freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] GSoC-2020-anuj 6ed3c34 1/3: [base] Make necessary changes to


From: Anuj Verma
Subject: [freetype2] GSoC-2020-anuj 6ed3c34 1/3: [base] Make necessary changes to allow renderers of different formats.
Date: Sun, 16 Aug 2020 07:39:31 -0400 (EDT)

branch: GSoC-2020-anuj
commit 6ed3c34a0eb15146a81116d783645757c40f88ea
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>

    [base] Make necessary changes to allow renderers of different formats.
    
    * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the 
glyph's slot
      format is `FT_GLYPH_FORMAT_BITMAP'. The `bsdf' renderer will require 
bitmaps
      for processing.
    
    * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove 
renderer's glyph
      format check before adding and removing them. The `bsdf' renderer will 
have a
      format of `FT_GLYPH_FORMAT_BITMAP'. So, if we do not remove this check it 
will
      not get initialized and will not work.
---
 src/base/ftobjs.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 8adfdff..521c5b7 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4393,8 +4393,7 @@
       render->glyph_format = clazz->glyph_format;
 
       /* allocate raster object if needed */
-      if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
-           clazz->raster_class->raster_new                )
+      if ( clazz->raster_class->raster_new )
       {
         error = clazz->raster_class->raster_new( memory, &render->raster );
         if ( error )
@@ -4441,8 +4440,7 @@
 
 
       /* release raster object, if any */
-      if ( render->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
-           render->raster                                         )
+      if ( render->raster )
         render->clazz->raster_class->raster_done( render->raster );
 
       /* remove from list */
@@ -4537,9 +4535,6 @@
 
     switch ( slot->format )
     {
-    case FT_GLYPH_FORMAT_BITMAP:   /* already a bitmap, don't do anything */
-      break;
-
     default:
       if ( slot->internal->load_flags & FT_LOAD_COLOR )
       {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]