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

Unified Diff: src/cmap.cc

Issue 612653002: Fix reading and writing format 13 cmap tables (Closed) Base URL: https://chromium.googlesource.com/external/ots.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmap.cc
diff --git a/src/cmap.cc b/src/cmap.cc
index 66be75de24fabe517c7060d773d4844309807e97..03ba7e1505aed38073a491affa9e4621114f202a 100644
--- a/src/cmap.cc
+++ b/src/cmap.cc
@@ -351,8 +351,8 @@ bool Parse31013(ots::OpenTypeFile *file,
if (!subtable.Skip(8)) {
return OTS_FAILURE();
}
- uint16_t language = 0;
- if (!subtable.ReadU16(&language)) {
+ uint32_t language = 0;
+ if (!subtable.ReadU32(&language)) {
return OTS_FAILURE();
}
if (language) {
@@ -982,7 +982,7 @@ bool ots_cmap_serialise(OTSStream *out, OpenTypeFile *file) {
const unsigned num_groups = groups.size();
if (!out->WriteU16(13) ||
!out->WriteU16(0) ||
- !out->WriteU32(num_groups * 12 + 14) ||
+ !out->WriteU32(num_groups * 12 + 16) ||
!out->WriteU32(0) ||
!out->WriteU32(num_groups)) {
return OTS_FAILURE();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698