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

Side by Side Diff: third_party/ots/include/opentype-sanitiser.h

Issue 966703002: Updating OTS with new fixes for Color table from github (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing file permissions 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
« no previous file with comments | « third_party/ots/README.chromium ('k') | third_party/ots/src/cmap.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 #ifndef OPENTYPE_SANITISER_H_ 5 #ifndef OPENTYPE_SANITISER_H_
6 #define OPENTYPE_SANITISER_H_ 6 #define OPENTYPE_SANITISER_H_
7 7
8 #if defined(_WIN32) 8 #if defined(_WIN32)
9 #include <stdlib.h> 9 #include <stdlib.h>
10 typedef signed char int8_t; 10 typedef signed char int8_t;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 public: 196 public:
197 OTSContext() {} 197 OTSContext() {}
198 virtual ~OTSContext() {} 198 virtual ~OTSContext() {}
199 199
200 // Process a given OpenType file and write out a sanitised version 200 // Process a given OpenType file and write out a sanitised version
201 // output: a pointer to an object implementing the OTSStream interface. Th e 201 // output: a pointer to an object implementing the OTSStream interface. Th e
202 // sanitisied output will be written to this. In the even of a failure, 202 // sanitisied output will be written to this. In the even of a failure,
203 // partial output may have been written. 203 // partial output may have been written.
204 // input: the OpenType file 204 // input: the OpenType file
205 // length: the size, in bytes, of |input| 205 // length: the size, in bytes, of |input|
206 // context: optional context that holds various OTS settings like user cal lbacks
207 bool Process(OTSStream *output, const uint8_t *input, size_t length); 206 bool Process(OTSStream *output, const uint8_t *input, size_t length);
208 207
209 // This function will be called when OTS is reporting an error. 208 // This function will be called when OTS is reporting an error.
210 // level: the severity of the generated message: 209 // level: the severity of the generated message:
211 // 0: error messages in case OTS fails to sanitize the font. 210 // 0: error messages in case OTS fails to sanitize the font.
212 // 1: warning messages about issue OTS fixed in the sanitized font. 211 // 1: warning messages about issue OTS fixed in the sanitized font.
213 virtual void Message(int level, const char *format, ...) MSGFUNC_FMT_ATTR {} 212 virtual void Message(int level, const char *format, ...) MSGFUNC_FMT_ATTR {}
214 213
215 // This function will be called when OTS needs to decide what to do for a 214 // This function will be called when OTS needs to decide what to do for a
216 // font table. 215 // font table.
217 // tag: table tag as an integer in big-endian byte order, independent of 216 // tag: table tag as an integer in big-endian byte order, independent of
218 // platform endianness 217 // platform endianness
219 virtual TableAction GetTableAction(uint32_t tag) { return ots::TABLE_ACTION_ DEFAULT; } 218 virtual TableAction GetTableAction(uint32_t tag) { return ots::TABLE_ACTION_ DEFAULT; }
220 }; 219 };
221 220
222 // For backward compatibility - remove once Chrome switches over to the new API. 221 // For backward compatibility - remove once Chrome switches over to the new API.
223 bool Process(OTSStream *output, const uint8_t *input, size_t length); 222 bool Process(OTSStream *output, const uint8_t *input, size_t length);
224 223
225 // For backward compatibility - remove once https://codereview.chromium.org/7742 53008/
226 // is submitted.
227 void EnableWOFF2();
228
229 } // namespace ots 224 } // namespace ots
230 225
231 #endif // OPENTYPE_SANITISER_H_ 226 #endif // OPENTYPE_SANITISER_H_
OLDNEW
« no previous file with comments | « third_party/ots/README.chromium ('k') | third_party/ots/src/cmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698