| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef OTS_H_ | 5 #ifndef OTS_H_ |
| 6 #define OTS_H_ | 6 #define OTS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <cstdarg> | 9 #include <cstdarg> |
| 10 #include <cstddef> | 10 #include <cstddef> |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 template<typename T> T Round2(T value) { | 176 template<typename T> T Round2(T value) { |
| 177 if (value == std::numeric_limits<T>::max()) { | 177 if (value == std::numeric_limits<T>::max()) { |
| 178 return value; | 178 return value; |
| 179 } | 179 } |
| 180 return (value + 1) & ~1; | 180 return (value + 1) & ~1; |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool IsValidVersionTag(uint32_t tag); | 183 bool IsValidVersionTag(uint32_t tag); |
| 184 | 184 |
| 185 #define FOR_EACH_TABLE_TYPE \ | 185 #define FOR_EACH_TABLE_TYPE \ |
| 186 F(cbdt, CBDT) \ |
| 187 F(cblc, CBLC) \ |
| 186 F(cff, CFF) \ | 188 F(cff, CFF) \ |
| 187 F(cmap, CMAP) \ | 189 F(cmap, CMAP) \ |
| 188 F(cvt, CVT) \ | 190 F(cvt, CVT) \ |
| 189 F(fpgm, FPGM) \ | 191 F(fpgm, FPGM) \ |
| 190 F(gasp, GASP) \ | 192 F(gasp, GASP) \ |
| 191 F(gdef, GDEF) \ | 193 F(gdef, GDEF) \ |
| 192 F(glyf, GLYF) \ | 194 F(glyf, GLYF) \ |
| 193 F(gpos, GPOS) \ | 195 F(gpos, GPOS) \ |
| 194 F(gsub, GSUB) \ | 196 F(gsub, GSUB) \ |
| 195 F(hdmx, HDMX) \ | 197 F(hdmx, HDMX) \ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 bool ots_##name##_should_serialise(OpenTypeFile *f); \ | 239 bool ots_##name##_should_serialise(OpenTypeFile *f); \ |
| 238 bool ots_##name##_serialise(OTSStream *s, OpenTypeFile *f); \ | 240 bool ots_##name##_serialise(OTSStream *s, OpenTypeFile *f); \ |
| 239 void ots_##name##_free(OpenTypeFile *f); | 241 void ots_##name##_free(OpenTypeFile *f); |
| 240 // TODO(yusukes): change these function names to follow Chromium coding rule. | 242 // TODO(yusukes): change these function names to follow Chromium coding rule. |
| 241 FOR_EACH_TABLE_TYPE | 243 FOR_EACH_TABLE_TYPE |
| 242 #undef F | 244 #undef F |
| 243 | 245 |
| 244 } // namespace ots | 246 } // namespace ots |
| 245 | 247 |
| 246 #endif // OTS_H_ | 248 #endif // OTS_H_ |
| OLD | NEW |