freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][gsoc-anurag-2023] Add structure to store preloa


From: Anurag Thakur (@AdbhutDev)
Subject: [Git][freetype/freetype][gsoc-anurag-2023] Add structure to store preloaded lines
Date: Thu, 24 Aug 2023 19:06:01 +0000

Anurag Thakur pushed to branch gsoc-anurag-2023 at FreeType / FreeType

Commits:

  • 36f7c6bd
    by Anurag Thakur at 2023-08-25T00:35:30+05:30
    Add structure to store preloaded lines
    

3 changed files:

Changes:

  • include/freetype/freetype.h
    ... ... @@ -1041,6 +1041,13 @@ FT_BEGIN_HEADER
    1041 1041
        */
    
    1042 1042
       typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
    
    1043 1043
     
    
    1044
    +  typedef struct FT_PreLineRec_* FT_PreLine;
    
    1045
    +  typedef struct FT_PreLineRec_
    
    1046
    +  {
    
    1047
    +    int x1, x2, y1, y2;
    
    1048
    +    FT_PreLine next;
    
    1049
    +  } FT_PreLineRec;
    
    1050
    +
    
    1044 1051
     
    
    1045 1052
       /**************************************************************************
    
    1046 1053
        *
    
    ... ... @@ -2289,6 +2296,7 @@ FT_BEGIN_HEADER
    2289 2296
         FT_Pos            rsb_delta;
    
    2290 2297
     
    
    2291 2298
         void*             other;
    
    2299
    +    FT_PreLine        prelines;
    
    2292 2300
     
    
    2293 2301
         FT_Slot_Internal  internal;
    
    2294 2302
     
    

  • src/base/ftobjs.c
    ... ... @@ -1169,6 +1169,7 @@
    1169 1169
             error = FT_Render_Glyph( slot, mode );
    
    1170 1170
           else
    
    1171 1171
             ft_glyphslot_preset_bitmap( slot, mode, NULL );
    
    1172
    +      
    
    1172 1173
         }
    
    1173 1174
     
    
    1174 1175
     #ifdef FT_DEBUG_LEVEL_TRACE
    
    ... ... @@ -2786,7 +2787,7 @@
    2786 2787
           face->garray = (FT_GlyphSlot*)malloc(
    
    2787 2788
               face->driver->clazz->slot_object_size * face->num_glyphs );
    
    2788 2789
           error           = FT_Set_Char_Size( face, 0, 160 * 64, 300, 300 );
    
    2789
    -      int glyph_index = FT_Get_Char_Index( face, 'A' );
    
    2790
    +      // int glyph_index = FT_Get_Char_Index( face, 'A' );
    
    2790 2791
           // error           = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_HINTING );
    
    2791 2792
     
    
    2792 2793
           for ( int gindex = 0; gindex < face->num_glyphs; gindex++ )
    
    ... ... @@ -2797,11 +2798,15 @@
    2797 2798
     
    
    2798 2799
             FT_ALLOC(face->garray[gindex], clazz->slot_object_size);
    
    2799 2800
             face->garray[gindex]->face = face;
    
    2801
    +        face->garray[gindex]->glyph_index = gindex;
    
    2800 2802
             ft_glyphslot_init(face->garray[gindex]);
    
    2801 2803
             face->garray[gindex]->next = face->garray[gindex];
    
    2802
    -        face->glyph = face->garray[gindex];
    
    2804
    +        *face->glyph = *face->garray[gindex];
    
    2805
    +
    
    2806
    +        FT_Load_Glyph(face, gindex, FT_LOAD_NO_HINTING);
    
    2807
    +
    
    2808
    +        *face->garray[gindex]->prelines = (FT_PreLineRec){1,2,3,4, NULL}; // need to revise structs and pointers.
    
    2803 2809
     
    
    2804
    -        FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_HINTING);
    
    2805 2810
           }
    
    2806 2811
     
    
    2807 2812
     
    

  • src/dense/ftdenserend.c
    ... ... @@ -5,7 +5,7 @@
    5 5
     #include <freetype/internal/ftobjs.h>
    
    6 6
     #include "ftdenserend.h"
    
    7 7
     #include "ftdense.h"
    
    8
    -
    
    8
    +#include <stdio.h>
    
    9 9
     #include "ftdenseerrs.h"
    
    10 10
     
    
    11 11
       /**************************************************************************
    
    ... ... @@ -90,6 +90,7 @@
    90 90
                        FT_Render_Mode   mode,
    
    91 91
                        const FT_Vector* origin )
    
    92 92
       {
    
    93
    +    printf("%d %d %d %d \n", slot->prelines->x1, slot->prelines->x2, slot->prelines->y1, slot->prelines->y2);
    
    93 94
         FT_Error    error   = FT_Err_Ok;
    
    94 95
         FT_Outline* outline = &slot->outline;
    
    95 96
         FT_Bitmap*  bitmap  = &slot->bitmap;
    


  • reply via email to

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