Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed Dec 19, 2016
2 parents 0dd58e7 + 631a207 commit cacf892
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/otf-writer/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ void otfcc_statFont(otfcc_Font *font, const otfcc_Options *options) {
if (cff->fontBBoxTop < font->head->yMax) cff->fontBBoxTop = font->head->yMax;
if (cff->fontBBoxLeft < font->head->xMin) cff->fontBBoxLeft = font->head->xMin;
if (cff->fontBBoxRight < font->head->xMax) cff->fontBBoxRight = font->head->xMax;
if (font->glyf && cff->isCID) { cff->cidCount = font->glyf->length; }
if (font->glyf && cff->isCID) { cff->cidCount = (uint32_t)font->glyf->length; }
if (cff->isCID) {
if (cff->fontMatrix) { FREE(cff->fontMatrix); }
for (tableid_t j = 0; j < cff->fdArrayCount; j++) {
Expand Down Expand Up @@ -626,8 +626,8 @@ void otfcc_statFont(otfcc_Font *font, const otfcc_Options *options) {

statCFFWidths(font);
}
if (font->glyf && font->maxp) { font->maxp->numGlyphs = font->glyf->length; }
if (font->glyf && font->post) { font->post->maxMemType42 = font->glyf->length; }
if (font->glyf && font->maxp) { font->maxp->numGlyphs = (uint16_t)font->glyf->length; }
if (font->glyf && font->post) { font->post->maxMemType42 = (uint32_t)font->glyf->length; }
if (font->glyf && font->maxp && font->maxp->version == 0x10000) {
statMaxp(font);
if (font->fpgm && font->fpgm->length > font->maxp->maxSizeOfInstructions) {
Expand Down
5 changes: 3 additions & 2 deletions lib/table/SVG.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ void otfcc_dumpSVG(const table_SVG *svg, json_value *root, const otfcc_Options *
json_object_push(_a, "end", json_integer_new(a->end));
if (canUsePlainFormat(a->document)) {
json_object_push(_a, "format", json_string_new("plain"));
json_object_push(_a, "document", json_string_new_length(a->document->size, (char *)a->document->data));
json_object_push(_a, "document",
json_string_new_length((uint32_t)a->document->size, (char *)a->document->data));
} else {
size_t len = 0;
uint8_t *buf = base64_encode(a->document->data, a->document->size, &len);
json_object_push(_a, "format", json_string_new("base64"));
json_object_push(_a, "document", json_string_new_length(len, (char *)buf));
json_object_push(_a, "document", json_string_new_length((uint32_t)len, (char *)buf));
free(buf);
}
json_array_push(_svg, _a);
Expand Down

0 comments on commit cacf892

Please sign in to comment.