OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 2010 Red Hat, Inc. | 2 * Copyright © 2010 Red Hat, Inc. |
3 * Copyright © 2012 Google, Inc. | 3 * Copyright © 2012 Google, Inc. |
4 * | 4 * |
5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
6 * | 6 * |
7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 return 16 <= upem && upem <= 16384 ? upem : 1000; | 51 return 16 <= upem && upem <= 16384 ? upem : 1000; |
52 } | 52 } |
53 | 53 |
54 inline bool sanitize (hb_sanitize_context_t *c) { | 54 inline bool sanitize (hb_sanitize_context_t *c) { |
55 TRACE_SANITIZE (this); | 55 TRACE_SANITIZE (this); |
56 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); | 56 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); |
57 } | 57 } |
58 | 58 |
59 protected: | 59 protected: |
60 FixedVersion version; /* Version of the head table--currently | 60 FixedVersion version; /* Version of the head table--currently |
61 » » » » » * 0x00010000 for version 1.0. */ | 61 » » » » » * 0x00010000u for version 1.0. */ |
62 FixedVersion fontRevision; /* Set by font manufacturer. */ | 62 FixedVersion fontRevision; /* Set by font manufacturer. */ |
63 ULONG checkSumAdjustment; /* To compute: set it to 0, sum the | 63 ULONG checkSumAdjustment; /* To compute: set it to 0, sum the |
64 * entire font as ULONG, then store | 64 * entire font as ULONG, then store |
65 » » » » » * 0xB1B0AFBA - sum. */ | 65 » » » » » * 0xB1B0AFBAu - sum. */ |
66 ULONG»» magicNumber;» » /* Set to 0x5F0F3CF5. */ | 66 ULONG»» magicNumber;» » /* Set to 0x5F0F3CF5u. */ |
67 USHORT flags; /* Bit 0: Baseline for font at y=0; | 67 USHORT flags; /* Bit 0: Baseline for font at y=0; |
68 * Bit 1: Left sidebearing point at x=0; | 68 * Bit 1: Left sidebearing point at x=0; |
69 * Bit 2: Instructions may depend on poi
nt size; | 69 * Bit 2: Instructions may depend on poi
nt size; |
70 * Bit 3: Force ppem to integer values f
or all | 70 * Bit 3: Force ppem to integer values f
or all |
71 * internal scaler math; may use fract
ional | 71 * internal scaler math; may use fract
ional |
72 * ppem sizes if this bit is clear; | 72 * ppem sizes if this bit is clear; |
73 * Bit 4: Instructions may alter advance
width | 73 * Bit 4: Instructions may alter advance
width |
74 * (the advance widths might not scale
linearly); | 74 * (the advance widths might not scale
linearly); |
75 | 75 |
76 * Bits 5-10: These should be set accord
ing to | 76 * Bits 5-10: These should be set accord
ing to |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 SHORT glyphDataFormat; /* 0 for current format. */ | 140 SHORT glyphDataFormat; /* 0 for current format. */ |
141 public: | 141 public: |
142 DEFINE_SIZE_STATIC (54); | 142 DEFINE_SIZE_STATIC (54); |
143 }; | 143 }; |
144 | 144 |
145 | 145 |
146 } /* namespace OT */ | 146 } /* namespace OT */ |
147 | 147 |
148 | 148 |
149 #endif /* HB_OT_HEAD_TABLE_HH */ | 149 #endif /* HB_OT_HEAD_TABLE_HH */ |
OLD | NEW |