Add structure to store preloaded lines
This commit is contained in:
parent
67c1c30645
commit
36f7c6bd34
|
@ -1041,6 +1041,13 @@ FT_BEGIN_HEADER
|
|||
*/
|
||||
typedef struct FT_Face_InternalRec_* FT_Face_Internal;
|
||||
|
||||
typedef struct FT_PreLineRec_* FT_PreLine;
|
||||
typedef struct FT_PreLineRec_
|
||||
{
|
||||
int x1, x2, y1, y2;
|
||||
FT_PreLine next;
|
||||
} FT_PreLineRec;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
|
@ -2289,6 +2296,7 @@ FT_BEGIN_HEADER
|
|||
FT_Pos rsb_delta;
|
||||
|
||||
void* other;
|
||||
FT_PreLine prelines;
|
||||
|
||||
FT_Slot_Internal internal;
|
||||
|
||||
|
|
|
@ -1169,6 +1169,7 @@
|
|||
error = FT_Render_Glyph( slot, mode );
|
||||
else
|
||||
ft_glyphslot_preset_bitmap( slot, mode, NULL );
|
||||
|
||||
}
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
|
@ -2786,7 +2787,7 @@
|
|||
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 );
|
||||
int glyph_index = FT_Get_Char_Index( face, 'A' );
|
||||
// int glyph_index = FT_Get_Char_Index( face, 'A' );
|
||||
// error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_HINTING );
|
||||
|
||||
for ( int gindex = 0; gindex < face->num_glyphs; gindex++ )
|
||||
|
@ -2797,11 +2798,15 @@
|
|||
|
||||
FT_ALLOC(face->garray[gindex], clazz->slot_object_size);
|
||||
face->garray[gindex]->face = face;
|
||||
face->garray[gindex]->glyph_index = gindex;
|
||||
ft_glyphslot_init(face->garray[gindex]);
|
||||
face->garray[gindex]->next = face->garray[gindex];
|
||||
face->glyph = face->garray[gindex];
|
||||
*face->glyph = *face->garray[gindex];
|
||||
|
||||
FT_Load_Glyph(face, gindex, FT_LOAD_NO_HINTING);
|
||||
|
||||
*face->garray[gindex]->prelines = (FT_PreLineRec){1,2,3,4, NULL}; // need to revise structs and pointers.
|
||||
|
||||
FT_Load_Glyph(face, glyph_index, FT_LOAD_NO_HINTING);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <freetype/internal/ftobjs.h>
|
||||
#include "ftdenserend.h"
|
||||
#include "ftdense.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ftdenseerrs.h"
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -90,6 +90,7 @@
|
|||
FT_Render_Mode mode,
|
||||
const FT_Vector* origin )
|
||||
{
|
||||
printf("%d %d %d %d \n", slot->prelines->x1, slot->prelines->x2, slot->prelines->y1, slot->prelines->y2);
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_Outline* outline = &slot->outline;
|
||||
FT_Bitmap* bitmap = &slot->bitmap;
|
||||
|
|
Loading…
Reference in New Issue