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

Side by Side Diff: third_party/woff2/src/font.h

Issue 2736873002: Update woff2 to cbea7b9 (Closed)
Patch Set: Created 3 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 // Copyright 2013 Google Inc. All Rights Reserved. 1 // Copyright 2013 Google Inc. All Rights Reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 }; 54 };
55 std::map<uint32_t, Table> tables; 55 std::map<uint32_t, Table> tables;
56 std::vector<uint32_t> OutputOrderedTags() const; 56 std::vector<uint32_t> OutputOrderedTags() const;
57 57
58 Table* FindTable(uint32_t tag); 58 Table* FindTable(uint32_t tag);
59 const Table* FindTable(uint32_t tag) const; 59 const Table* FindTable(uint32_t tag) const;
60 }; 60 };
61 61
62 // Accomodates both singular (OTF, TTF) and collection (TTC) fonts 62 // Accomodates both singular (OTF, TTF) and collection (TTC) fonts
63 struct FontCollection { 63 struct FontCollection {
64 uint32_t flavor;
64 uint32_t header_version; 65 uint32_t header_version;
65 // (offset, first use of table*) pairs 66 // (offset, first use of table*) pairs
66 std::map<uint32_t, Font::Table*> tables; 67 std::map<uint32_t, Font::Table*> tables;
67 std::vector<Font> fonts; 68 std::vector<Font> fonts;
68 }; 69 };
69 70
70 // Parses the font from the given data. Returns false on parsing failure or 71 // Parses the font from the given data. Returns false on parsing failure or
71 // buffer overflow. The font is valid only so long the input data pointer is 72 // buffer overflow. The font is valid only so long the input data pointer is
72 // valid. Does NOT support collections. 73 // valid. Does NOT support collections.
73 bool ReadFont(const uint8_t* data, size_t len, Font* font); 74 bool ReadFont(const uint8_t* data, size_t len, Font* font);
(...skipping 29 matching lines...) Expand all
103 // with the given index. Returns false if the glyph is not found. 104 // with the given index. Returns false if the glyph is not found.
104 bool GetGlyphData(const Font& font, int glyph_index, 105 bool GetGlyphData(const Font& font, int glyph_index,
105 const uint8_t** glyph_data, size_t* glyph_size); 106 const uint8_t** glyph_data, size_t* glyph_size);
106 107
107 // Removes the digital signature (DSIG) table 108 // Removes the digital signature (DSIG) table
108 bool RemoveDigitalSignature(Font* font); 109 bool RemoveDigitalSignature(Font* font);
109 110
110 } // namespace woff2 111 } // namespace woff2
111 112
112 #endif // WOFF2_FONT_H_ 113 #endif // WOFF2_FONT_H_
OLDNEW
« no previous file with comments | « third_party/woff2/src/convert_woff2ttf_fuzzer_new_entry.cc ('k') | third_party/woff2/src/font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698