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

Unified Diff: third_party/ots/src/vorg.cc

Issue 1252363005: Update OTS to revision a7a3b94 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/ots/src/vmtx.cc ('k') | third_party/ots/src/woff2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ots/src/vorg.cc
diff --git a/third_party/ots/src/vorg.cc b/third_party/ots/src/vorg.cc
index 2662067559d123f4043fffd9787eef199186d5fb..358923125647ec0de9ac68e31bc36ba27e823c29 100644
--- a/third_party/ots/src/vorg.cc
+++ b/third_party/ots/src/vorg.cc
@@ -13,18 +13,18 @@
#define DROP_THIS_TABLE(...) \
do { \
- OTS_FAILURE_MSG_(file, TABLE_NAME ": " __VA_ARGS__); \
+ OTS_FAILURE_MSG_(font->file, TABLE_NAME ": " __VA_ARGS__); \
OTS_FAILURE_MSG("Table discarded"); \
- delete file->vorg; \
- file->vorg = 0; \
+ delete font->vorg; \
+ font->vorg = 0; \
} while (0)
namespace ots {
-bool ots_vorg_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
+bool ots_vorg_parse(Font *font, const uint8_t *data, size_t length) {
Buffer table(data, length);
- file->vorg = new OpenTypeVORG;
- OpenTypeVORG * const vorg = file->vorg;
+ font->vorg = new OpenTypeVORG;
+ OpenTypeVORG * const vorg = font->vorg;
uint16_t num_recs;
if (!table.ReadU16(&vorg->major_version) ||
@@ -68,13 +68,13 @@ bool ots_vorg_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
return true;
}
-bool ots_vorg_should_serialise(OpenTypeFile *file) {
- if (!file->cff) return false; // this table is not for fonts with TT glyphs.
- return file->vorg != NULL;
+bool ots_vorg_should_serialise(Font *font) {
+ if (!font->cff) return false; // this table is not for fonts with TT glyphs.
+ return font->vorg != NULL;
}
-bool ots_vorg_serialise(OTSStream *out, OpenTypeFile *file) {
- OpenTypeVORG * const vorg = file->vorg;
+bool ots_vorg_serialise(OTSStream *out, Font *font) {
+ OpenTypeVORG * const vorg = font->vorg;
const uint16_t num_metrics = static_cast<uint16_t>(vorg->metrics.size());
if (num_metrics != vorg->metrics.size() ||
@@ -96,8 +96,13 @@ bool ots_vorg_serialise(OTSStream *out, OpenTypeFile *file) {
return true;
}
-void ots_vorg_free(OpenTypeFile *file) {
- delete file->vorg;
+void ots_vorg_reuse(Font *font, Font *other) {
+ font->vorg = other->vorg;
+ font->vorg_reused = true;
+}
+
+void ots_vorg_free(Font *font) {
+ delete font->vorg;
}
} // namespace ots
« no previous file with comments | « third_party/ots/src/vmtx.cc ('k') | third_party/ots/src/woff2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698