OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* svttglyf.h */ | 3 /* svttglyf.h */ |
4 /* */ | 4 /* */ |
5 /* The FreeType TrueType glyph service. */ | 5 /* The FreeType TrueType glyph service. */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2007 by David Turner. */ | 7 /* Copyright 2007, 2009, 2012 by David Turner. */ |
8 /* */ | 8 /* */ |
9 /* This file is part of the FreeType project, and may only be used, */ | 9 /* This file is part of the FreeType project, and may only be used, */ |
10 /* modified, and distributed under the terms of the FreeType project */ | 10 /* modified, and distributed under the terms of the FreeType project */ |
11 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 11 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
12 /* this file you indicate that you have read the license and */ | 12 /* this file you indicate that you have read the license and */ |
13 /* understand and accept it fully. */ | 13 /* understand and accept it fully. */ |
14 /* */ | 14 /* */ |
15 /***************************************************************************/ | 15 /***************************************************************************/ |
16 | 16 |
17 #ifndef __SVTTGLYF_H__ | 17 #ifndef __SVTTGLYF_H__ |
18 #define __SVTTGLYF_H__ | 18 #define __SVTTGLYF_H__ |
19 | 19 |
20 #include FT_INTERNAL_SERVICE_H | 20 #include FT_INTERNAL_SERVICE_H |
21 #include FT_TRUETYPE_TABLES_H | 21 #include FT_TRUETYPE_TABLES_H |
22 | 22 |
23 | 23 |
24 FT_BEGIN_HEADER | 24 FT_BEGIN_HEADER |
25 | 25 |
26 | 26 |
27 #define FT_SERVICE_ID_TT_GLYF "tt-glyf" | 27 #define FT_SERVICE_ID_TT_GLYF "tt-glyf" |
28 | 28 |
29 | 29 |
30 typedef FT_ULong | 30 typedef FT_ULong |
31 (*TT_Glyf_GetLocationFunc)( FT_Face face, | 31 (*TT_Glyf_GetLocationFunc)( FT_Face face, |
32 FT_UInt gindex, | 32 FT_UInt gindex, |
33 FT_ULong *psize ); | 33 FT_ULong *psize ); |
34 | 34 |
35 FT_DEFINE_SERVICE( TTGlyf ) | 35 FT_DEFINE_SERVICE( TTGlyf ) |
36 { | 36 { |
37 TT_Glyf_GetLocationFunc get_location; | 37 TT_Glyf_GetLocationFunc get_location; |
38 }; | 38 }; |
39 | 39 |
| 40 |
40 #ifndef FT_CONFIG_OPTION_PIC | 41 #ifndef FT_CONFIG_OPTION_PIC |
41 | 42 |
42 #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ | 43 #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ |
43 static const FT_Service_TTGlyfRec class_ = \ | 44 static const FT_Service_TTGlyfRec class_ = \ |
44 { \ | 45 { \ |
45 get_location_ \ | 46 get_location_ \ |
46 }; | 47 }; |
47 | 48 |
48 #else /* FT_CONFIG_OPTION_PIC */ | 49 #else /* FT_CONFIG_OPTION_PIC */ |
49 | 50 |
50 #define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ | 51 #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ |
51 void \ | 52 void \ |
52 FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ | 53 FT_Init_Class_ ## class_( FT_Service_TTGlyfRec* clazz ) \ |
53 { \ | 54 { \ |
54 clazz->get_location = get_location_; \ | 55 clazz->get_location = get_location_; \ |
55 } | 56 } |
56 | 57 |
57 #endif /* FT_CONFIG_OPTION_PIC */ | 58 #endif /* FT_CONFIG_OPTION_PIC */ |
58 | 59 |
59 /* */ | 60 /* */ |
60 | 61 |
61 | 62 |
62 FT_END_HEADER | 63 FT_END_HEADER |
63 | 64 |
64 #endif /* __SVTTGLYF_H__ */ | 65 #endif /* __SVTTGLYF_H__ */ |
65 | 66 |
66 | 67 |
67 /* END */ | 68 /* END */ |
OLD | NEW |