vrshoot
diff libs/ft2static/freetype/internal/services/svgldict.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/ft2static/freetype/internal/services/svgldict.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,82 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* svgldict.h */ 1.7 +/* */ 1.8 +/* The FreeType glyph dictionary services (specification). */ 1.9 +/* */ 1.10 +/* Copyright 2003 by */ 1.11 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.12 +/* */ 1.13 +/* This file is part of the FreeType project, and may only be used, */ 1.14 +/* modified, and distributed under the terms of the FreeType project */ 1.15 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.16 +/* this file you indicate that you have read the license and */ 1.17 +/* understand and accept it fully. */ 1.18 +/* */ 1.19 +/***************************************************************************/ 1.20 + 1.21 + 1.22 +#ifndef __SVGLDICT_H__ 1.23 +#define __SVGLDICT_H__ 1.24 + 1.25 +#include FT_INTERNAL_SERVICE_H 1.26 + 1.27 + 1.28 +FT_BEGIN_HEADER 1.29 + 1.30 + 1.31 + /* 1.32 + * A service used to retrieve glyph names, as well as to find the 1.33 + * index of a given glyph name in a font. 1.34 + * 1.35 + */ 1.36 + 1.37 +#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict" 1.38 + 1.39 + 1.40 + typedef FT_Error 1.41 + (*FT_GlyphDict_GetNameFunc)( FT_Face face, 1.42 + FT_UInt glyph_index, 1.43 + FT_Pointer buffer, 1.44 + FT_UInt buffer_max ); 1.45 + 1.46 + typedef FT_UInt 1.47 + (*FT_GlyphDict_NameIndexFunc)( FT_Face face, 1.48 + FT_String* glyph_name ); 1.49 + 1.50 + 1.51 + FT_DEFINE_SERVICE( GlyphDict ) 1.52 + { 1.53 + FT_GlyphDict_GetNameFunc get_name; 1.54 + FT_GlyphDict_NameIndexFunc name_index; /* optional */ 1.55 + }; 1.56 + 1.57 +#ifndef FT_CONFIG_OPTION_PIC 1.58 + 1.59 +#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 1.60 + static const FT_Service_GlyphDictRec class_ = \ 1.61 + { \ 1.62 + get_name_, name_index_ \ 1.63 + }; 1.64 + 1.65 +#else /* FT_CONFIG_OPTION_PIC */ 1.66 + 1.67 +#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ 1.68 + void \ 1.69 + FT_Init_Class_##class_( FT_Library library, \ 1.70 + FT_Service_GlyphDictRec* clazz) \ 1.71 + { \ 1.72 + FT_UNUSED(library); \ 1.73 + clazz->get_name = get_name_; \ 1.74 + clazz->name_index = name_index_; \ 1.75 + } 1.76 + 1.77 +#endif /* FT_CONFIG_OPTION_PIC */ 1.78 + 1.79 + /* */ 1.80 + 1.81 + 1.82 +FT_END_HEADER 1.83 + 1.84 + 1.85 +#endif /* __SVGLDICT_H__ */