OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2011,2012 Google, Inc. | 2 * Copyright © 2011,2012 Google, Inc. |
3 * | 3 * |
4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
5 * | 5 * |
6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
10 * all copies of this software. | 10 * all copies of this software. |
(...skipping 12 matching lines...) Expand all Loading... |
23 * | 23 * |
24 * Google Author(s): Behdad Esfahbod | 24 * Google Author(s): Behdad Esfahbod |
25 */ | 25 */ |
26 | 26 |
27 #ifndef HB_OT_HHEA_TABLE_HH | 27 #ifndef HB_OT_HHEA_TABLE_HH |
28 #define HB_OT_HHEA_TABLE_HH | 28 #define HB_OT_HHEA_TABLE_HH |
29 | 29 |
30 #include "hb-open-type-private.hh" | 30 #include "hb-open-type-private.hh" |
31 | 31 |
32 | 32 |
| 33 namespace OT { |
| 34 |
33 | 35 |
34 /* | 36 /* |
35 * hhea -- The Horizontal Header Table | 37 * hhea -- The Horizontal Header Table |
36 */ | 38 */ |
37 | 39 |
38 #define HB_OT_TAG_hhea HB_TAG('h','h','e','a') | 40 #define HB_OT_TAG_hhea HB_TAG('h','h','e','a') |
39 | 41 |
40 | 42 |
41 struct hhea | 43 struct hhea |
42 { | 44 { |
43 static const hb_tag_t Tag = HB_OT_TAG_hhea; | 45 static const hb_tag_t Tag = HB_OT_TAG_hhea; |
44 | 46 |
45 inline bool sanitize (hb_sanitize_context_t *c) { | 47 inline bool sanitize (hb_sanitize_context_t *c) { |
46 TRACE_SANITIZE (); | 48 TRACE_SANITIZE (); |
47 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); | 49 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); |
48 } | 50 } |
49 | 51 |
50 private: | 52 protected: |
51 FixedVersion version; /* 0x00010000 for version 1.0. */ | 53 FixedVersion version; /* 0x00010000 for version 1.0. */ |
52 FWORD ascender; /* Typographic ascent. <a | 54 FWORD ascender; /* Typographic ascent. <a |
53 * href="http://developer.apple.com/font
s/TTRefMan/RM06/Chap6hhea.html"> | 55 * href="http://developer.apple.com/font
s/TTRefMan/RM06/Chap6hhea.html"> |
54 * (Distance from baseline of highest | 56 * (Distance from baseline of highest |
55 * ascender)</a> */ | 57 * ascender)</a> */ |
56 FWORD descender; /* Typographic descent. <a | 58 FWORD descender; /* Typographic descent. <a |
57 * href="http://developer.apple.com/font
s/TTRefMan/RM06/Chap6hhea.html"> | 59 * href="http://developer.apple.com/font
s/TTRefMan/RM06/Chap6hhea.html"> |
58 * (Distance from baseline of lowest | 60 * (Distance from baseline of lowest |
59 * descender)</a> */ | 61 * descender)</a> */ |
60 FWORD lineGap; /* Typographic line gap. Negative | 62 FWORD lineGap; /* Typographic line gap. Negative |
(...skipping 21 matching lines...) Expand all Loading... |
82 SHORT reserved3; /* set to 0 */ | 84 SHORT reserved3; /* set to 0 */ |
83 SHORT reserved4; /* set to 0 */ | 85 SHORT reserved4; /* set to 0 */ |
84 SHORT metricDataFormat; /* 0 for current format. */ | 86 SHORT metricDataFormat; /* 0 for current format. */ |
85 USHORT numberOfHMetrics; /* Number of hMetric entries in 'hmtx' | 87 USHORT numberOfHMetrics; /* Number of hMetric entries in 'hmtx' |
86 * table */ | 88 * table */ |
87 public: | 89 public: |
88 DEFINE_SIZE_STATIC (36); | 90 DEFINE_SIZE_STATIC (36); |
89 }; | 91 }; |
90 | 92 |
91 | 93 |
| 94 } // namespace OT |
| 95 |
| 96 |
92 #endif /* HB_OT_HHEA_TABLE_HH */ | 97 #endif /* HB_OT_HHEA_TABLE_HH */ |
OLD | NEW |