freetype2/include/freetype/internal/services/svgldict.h

73 lines
1.8 KiB
C
Raw Normal View History

/****************************************************************************
*
* svgldict.h
*
* The FreeType glyph dictionary services (specification).
*
2022-01-11 10:54:10 +01:00
* Copyright (C) 2003-2022 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 SVGLDICT_H_
#define SVGLDICT_H_
#include <freetype/internal/ftserv.h>
FT_BEGIN_HEADER
/*
* A service used to retrieve glyph names, as well as to find the index of
* a given glyph name in a font.
*
*/
#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict"
typedef FT_Error
(*FT_GlyphDict_GetNameFunc)( FT_Face face,
FT_UInt glyph_index,
FT_Pointer buffer,
FT_UInt buffer_max );
typedef FT_UInt
(*FT_GlyphDict_NameIndexFunc)( FT_Face face,
const FT_String* glyph_name );
FT_DEFINE_SERVICE( GlyphDict )
{
FT_GlyphDict_GetNameFunc get_name;
FT_GlyphDict_NameIndexFunc name_index; /* optional */
};
2012-02-06 22:42:11 +01:00
#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \
get_name_, \
2017-09-30 16:16:03 +02:00
name_index_ ) \
2012-02-06 22:42:11 +01:00
static const FT_Service_GlyphDictRec class_ = \
Position Independent Code (PIC) support in sfnt driver. * include/freetype/internal/services/svbdf.h add macros to init instances of FT_Service_BDFRec. * include/freetype/internal/services/svgldict.h add macros to init instances of FT_Service_GlyphDictRec. * include/freetype/internal/services/svpostnm.h add macros to init instances of FT_Service_PsFontNameRec. * include/freetype/internal/services/svsfnt.h add macros to init instances of FT_Service_SFNT_TableRec. * include/freetype/internal/services/svttcmap.h add macros to init instances of FT_Service_TTCMapsRec. * include/freetype/internal/sfnt.h add macros to init instances of SFNT_Interface. * src/sfnt/sfdriver.h declare sfnt_module_class using macros from ftmodapi.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/sfnt/sfdriver.c when FT_CONFIG_OPTION_PIC is defined the following structs: sfnt_service_sfnt_table, sfnt_service_glyph_dict, sfnt_service_ps_name tt_service_get_cmap_info, sfnt_service_bdf, sfnt_interface, sfnt_module_class, and sfnt_services array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from sfntpic.h in order to access them from the pic_container. * src/sfnt/ttcmap.h add macros to init instances of TT_CMap_ClassRec. * src/sfnt/ttcmap.c when FT_CONFIG_OPTION_PIC is defined the following structs: tt_cmap0_class_rec, tt_cmap2_class_rec, tt_cmap4_class_rec tt_cmap6_class_rec, tt_cmap8_class_rec, tt_cmap10_class_rec, tt_cmap12_class_rec, tt_cmap14_class_rec and tt_cmap_classes array will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from sfntpic.h in order to access them from the pic_container. The content of tt_cmap_classes is now described in the new file 'ttcmapc.h'. New Files: * src/sfnt/sfntpic.h declare struct to hold PIC globals for sfnt driver and macros to access them. * src/sfnt/sfntpic.c implement functions to allocate, destroy and initialize PIC globals for sfnt driver. * src/sfnt/ttcmapc.h describing the content of tt_cmap_classes allocated in ttcmap.c * src/sfnt/sfnt.c add new file to build: sfntpic.c. * src/sfnt/jamfile add new files to FT2_MULTI build: sfntpic.c.
2009-04-05 17:08:32 +02:00
{ \
get_name_, name_index_ \
};
/* */
FT_END_HEADER
#endif /* SVGLDICT_H_ */
/* END */