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

Side by Side Diff: third_party/ots/src/post.cc

Issue 1487543005: Update OTS to revision 99a3b7f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/ots/src/ots.cc ('k') | third_party/ots/src/vhea.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "post.h" 5 #include "post.h"
6 6
7 #include "maxp.h" 7 #include "maxp.h"
8 8
9 // post - PostScript 9 // post - PostScript
10 // http://www.microsoft.com/typography/otspec/post.htm 10 // http://www.microsoft.com/typography/otspec/post.htm
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 bool ots_post_should_serialise(Font *font) { 123 bool ots_post_should_serialise(Font *font) {
124 return font->post != NULL; 124 return font->post != NULL;
125 } 125 }
126 126
127 bool ots_post_serialise(OTSStream *out, Font *font) { 127 bool ots_post_serialise(OTSStream *out, Font *font) {
128 const OpenTypePOST *post = font->post; 128 const OpenTypePOST *post = font->post;
129 129
130 // OpenType with CFF glyphs must have v3 post table. 130 // OpenType with CFF glyphs must have v3 post table.
131 if (font->post && font->cff && font->post->version != 0x00030000) { 131 if (post && font->cff && post->version != 0x00030000) {
132 return OTS_FAILURE_MSG("Bad post version %x", post->version); 132 return OTS_FAILURE_MSG("Bad post version %x", post->version);
133 } 133 }
134 134
135 if (!out->WriteU32(post->version) || 135 if (!out->WriteU32(post->version) ||
136 !out->WriteU32(post->italic_angle) || 136 !out->WriteU32(post->italic_angle) ||
137 !out->WriteS16(post->underline) || 137 !out->WriteS16(post->underline) ||
138 !out->WriteS16(post->underline_thickness) || 138 !out->WriteS16(post->underline_thickness) ||
139 !out->WriteU32(post->is_fixed_pitch) || 139 !out->WriteU32(post->is_fixed_pitch) ||
140 !out->WriteU32(0) || 140 !out->WriteU32(0) ||
141 !out->WriteU32(0) || 141 !out->WriteU32(0) ||
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 font->post_reused = true; 184 font->post_reused = true;
185 } 185 }
186 186
187 void ots_post_free(Font *font) { 187 void ots_post_free(Font *font) {
188 delete font->post; 188 delete font->post;
189 } 189 }
190 190
191 } // namespace ots 191 } // namespace ots
192 192
193 #undef TABLE_NAME 193 #undef TABLE_NAME
OLDNEW
« no previous file with comments | « third_party/ots/src/ots.cc ('k') | third_party/ots/src/vhea.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698