forked from minhngoc25a/freetype2
[gf] Initialised gf driver files
gf driver files are initialised. Macros required for gf font files are determined in gf.h file.
This commit is contained in:
parent
dfe1bdc246
commit
43b840d6c2
0
src/gf/gf.c
Normal file
0
src/gf/gf.c
Normal file
68
src/gf/gf.h
Normal file
68
src/gf/gf.h
Normal file
@ -0,0 +1,68 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* gf.h */
|
||||
/* */
|
||||
/* FreeType font driver for TeX's GF FONT files */
|
||||
/* */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef GF_H_
|
||||
#define GF_H_
|
||||
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
#define FONT_DRIVER_GF 1
|
||||
|
||||
#define GF_PRE 247
|
||||
#define GF_ID 131
|
||||
#define GF_POST 248
|
||||
#define GF_CHAR_LOC 245
|
||||
#define GF_CHAR_LOC0 246
|
||||
#define GF_POST_POST 249
|
||||
|
||||
#define GF_PAINT_0 0
|
||||
#define GF_PAINT_1 1
|
||||
#define GF_PAINT_63 63
|
||||
#define GF_PAINT1 64
|
||||
#define GF_PAINT2 65
|
||||
#define GF_PAINT3 66
|
||||
#define GF_BOC 67
|
||||
#define GF_BOC1 68
|
||||
#define GF_EOC 69
|
||||
#define GF_SKIP0 70
|
||||
#define GF_SKIP1 71
|
||||
#define GF_SKIP2 72
|
||||
#define GF_SKIP3 73
|
||||
#define GF_NEW_ROW_0 74
|
||||
#define GF_NEW_ROW_164 238
|
||||
#define GF_XXX1 239
|
||||
#define GF_XXX2 240
|
||||
#define GF_XXX3 241
|
||||
#define GF_XXX4 242
|
||||
#define GF_YYY 243
|
||||
#define GF_NO_OP 244
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* GF_H_ */
|
||||
|
||||
|
||||
/* END */
|
141
src/gf/gfdrivr.c
Normal file
141
src/gf/gfdrivr.c
Normal file
@ -0,0 +1,141 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* gfdrivr.h */
|
||||
/* */
|
||||
/* FreeType font driver for TeX's GF FONT files */
|
||||
/* */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
#include <ft2build.h>
|
||||
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
#include FT_INTERNAL_STREAM_H
|
||||
#include FT_INTERNAL_OBJECTS_H
|
||||
#include FT_GF_H
|
||||
|
||||
|
||||
#include "gf.h"
|
||||
#include "gfdrivr.h"
|
||||
|
||||
#include "gferror.h"
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
|
||||
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
|
||||
/* messages during execution. */
|
||||
/* */
|
||||
#undef FT_COMPONENT
|
||||
#define FT_COMPONENT trace_gfdriver
|
||||
|
||||
|
||||
typedef struct GF_CMapRec_
|
||||
{
|
||||
//TO-DO
|
||||
} GF_CMapRec, *GF_CMap;
|
||||
|
||||
|
||||
FT_CALLBACK_DEF( FT_Error )
|
||||
gf_cmap_init ( FT_CMap gcmap,
|
||||
FT_Pointer init_data )
|
||||
{
|
||||
//TO-DO
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_DEF( void )
|
||||
gf_cmap_done( FT_CMap gfcmap )
|
||||
{
|
||||
//TO-DO
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_DEF( void )
|
||||
GF_Face_Done( FT_Face bdfface ) /* GF_Face */
|
||||
{
|
||||
//TO-DO
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_DEF( FT_Error )
|
||||
GF_Face_Init( FT_Stream stream,
|
||||
FT_Face bdfface, /* GF_Face */
|
||||
FT_Int face_index,
|
||||
FT_Int num_params,
|
||||
FT_Parameter* params )
|
||||
{
|
||||
//TO-DO
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_DEF( FT_Error )
|
||||
GF_Size_Request( FT_Size size,
|
||||
FT_Size_Request req )
|
||||
{
|
||||
//TO-DO
|
||||
}
|
||||
|
||||
|
||||
|
||||
FT_CALLBACK_DEF( FT_Error )
|
||||
GF_Glyph_Load( FT_GlyphSlot slot,
|
||||
FT_Size size,
|
||||
FT_UInt glyph_index,
|
||||
FT_Int32 load_flags )
|
||||
{
|
||||
//TO-DO
|
||||
}
|
||||
|
||||
|
||||
FT_CALLBACK_TABLE_DEF
|
||||
const FT_Driver_ClassRec gf_driver_class =
|
||||
{
|
||||
{
|
||||
FT_MODULE_FONT_DRIVER |
|
||||
FT_MODULE_DRIVER_NO_OUTLINES,
|
||||
sizeof ( FT_DriverRec ),
|
||||
|
||||
"gf",
|
||||
0x10000L,
|
||||
0x20000L,
|
||||
|
||||
NULL, /* module-specific interface */
|
||||
|
||||
NULL, /* FT_Module_Constructor module_init */
|
||||
NULL, /* FT_Module_Destructor module_done */
|
||||
NULL /* FT_Module_Requester get_interface */
|
||||
},
|
||||
|
||||
sizeof ( GF_FaceRec ),
|
||||
sizeof ( FT_SizeRec ),
|
||||
sizeof ( FT_GlyphSlotRec ),
|
||||
|
||||
GF_Face_Init, /* FT_Face_InitFunc init_face */
|
||||
GF_Face_Done, /* FT_Face_DoneFunc done_face */
|
||||
NULL, /* FT_Size_InitFunc init_size */
|
||||
NULL, /* FT_Size_DoneFunc done_size */
|
||||
NULL, /* FT_Slot_InitFunc init_slot */
|
||||
NULL, /* FT_Slot_DoneFunc done_slot */
|
||||
|
||||
GF_Glyph_Load, /* FT_Slot_LoadFunc load_glyph */
|
||||
|
||||
NULL, /* FT_Face_GetKerningFunc get_kerning */
|
||||
NULL, /* FT_Face_AttachFunc attach_file */
|
||||
NULL, /* FT_Face_GetAdvancesFunc get_advances */
|
||||
|
||||
GF_Size_Request, /* FT_Size_RequestFunc request_size */
|
||||
GF_Size_Select /* FT_Size_SelectFunc select_size */
|
||||
};
|
||||
|
||||
|
||||
/* END */
|
56
src/gf/gfdrivr.h
Normal file
56
src/gf/gfdrivr.h
Normal file
@ -0,0 +1,56 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* gfdrivr.h */
|
||||
/* */
|
||||
/* FreeType font driver for TeX's GF FONT files */
|
||||
/* */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifndef GFDRIVR_H_
|
||||
#define GFDRIVR_H_
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_INTERNAL_DRIVER_H
|
||||
|
||||
#include "gf.h"
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
||||
typedef struct GF_encoding_el_
|
||||
{
|
||||
FT_Long enc;
|
||||
FT_UShort glyph;
|
||||
|
||||
} GF_encoding_el;
|
||||
|
||||
|
||||
typedef struct GF_FaceRec_
|
||||
{
|
||||
FT_FaceRec root;
|
||||
//TO-DO
|
||||
} GF_FaceRec, *GF_Face;
|
||||
|
||||
|
||||
FT_EXPORT_VAR( const FT_Driver_ClassRec ) gf_driver_class;
|
||||
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
||||
#endif /* GFDRIVR_H_ */
|
||||
|
||||
|
||||
/* END */
|
40
src/gf/gferror.h
Normal file
40
src/gf/gferror.h
Normal file
@ -0,0 +1,40 @@
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* gferror.h */
|
||||
/* */
|
||||
/* FreeType font driver for TeX's GF FONT files */
|
||||
/* */
|
||||
/* Copyright 1996-2018 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
/* modified, and distributed under the terms of the FreeType project */
|
||||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
||||
/* this file you indicate that you have read the license and */
|
||||
/* understand and accept it fully. */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This file is used to define the GF error enumeration constants. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
#ifndef GFERROR_H_
|
||||
#define GFERROR_H_
|
||||
|
||||
#include FT_MODULE_ERRORS_H
|
||||
|
||||
#undef FTERRORS_H_
|
||||
|
||||
#undef FT_ERR_PREFIX
|
||||
#define FT_ERR_PREFIX GF_Err_
|
||||
#define FT_ERR_BASE FT_Mod_Err_GF
|
||||
|
||||
#include FT_ERRORS_H
|
||||
|
||||
#endif /* GFERROR_H_ */
|
||||
|
||||
|
||||
/* END */
|
Loading…
x
Reference in New Issue
Block a user