Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-ot-head-table.hh

Issue 1005693006: Roll harfbuzz-ng to 0.9.40 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 /* 38 /*
39 * head -- Font Header 39 * head -- Font Header
40 */ 40 */
41 41
42 #define HB_OT_TAG_head HB_TAG('h','e','a','d') 42 #define HB_OT_TAG_head HB_TAG('h','e','a','d')
43 43
44 struct head 44 struct head
45 { 45 {
46 static const hb_tag_t tableTag = HB_OT_TAG_head; 46 static const hb_tag_t tableTag = HB_OT_TAG_head;
47 47
48 inline unsigned int get_upem (void) const { 48 inline unsigned int get_upem (void) const
49 {
49 unsigned int upem = unitsPerEm; 50 unsigned int upem = unitsPerEm;
50 /* If no valid head table found, assume 1000, which matches typical Type1 us age. */ 51 /* If no valid head table found, assume 1000, which matches typical Type1 us age. */
51 return 16 <= upem && upem <= 16384 ? upem : 1000; 52 return 16 <= upem && upem <= 16384 ? upem : 1000;
52 } 53 }
53 54
54 inline bool sanitize (hb_sanitize_context_t *c) { 55 inline bool sanitize (hb_sanitize_context_t *c) const
56 {
55 TRACE_SANITIZE (this); 57 TRACE_SANITIZE (this);
56 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1)); 58 return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
57 } 59 }
58 60
59 protected: 61 protected:
60 FixedVersion version; /* Version of the head table--currently 62 FixedVersion version; /* Version of the head table--currently
61 * 0x00010000u for version 1.0. */ 63 * 0x00010000u for version 1.0. */
62 FixedVersion fontRevision; /* Set by font manufacturer. */ 64 FixedVersion fontRevision; /* Set by font manufacturer. */
63 ULONG checkSumAdjustment; /* To compute: set it to 0, sum the 65 ULONG checkSumAdjustment; /* To compute: set it to 0, sum the
64 * entire font as ULONG, then store 66 * entire font as ULONG, then store
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 SHORT glyphDataFormat; /* 0 for current format. */ 142 SHORT glyphDataFormat; /* 0 for current format. */
141 public: 143 public:
142 DEFINE_SIZE_STATIC (54); 144 DEFINE_SIZE_STATIC (54);
143 }; 145 };
144 146
145 147
146 } /* namespace OT */ 148 } /* namespace OT */
147 149
148 150
149 #endif /* HB_OT_HEAD_TABLE_HH */ 151 #endif /* HB_OT_HEAD_TABLE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-cmap-table.hh ('k') | third_party/harfbuzz-ng/src/hb-ot-hhea-table.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698