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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 827733004: Change function signature of SkPDFObject::emitObject. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFontImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 SkPDFFont* SkPDFType0Font::getFontSubset(const SkPDFGlyphSet* subset) { 1092 SkPDFFont* SkPDFType0Font::getFontSubset(const SkPDFGlyphSet* subset) {
1093 if (!canSubset()) { 1093 if (!canSubset()) {
1094 return NULL; 1094 return NULL;
1095 } 1095 }
1096 SkPDFType0Font* newSubset = new SkPDFType0Font(fontInfo(), typeface()); 1096 SkPDFType0Font* newSubset = new SkPDFType0Font(fontInfo(), typeface());
1097 newSubset->populate(subset); 1097 newSubset->populate(subset);
1098 return newSubset; 1098 return newSubset;
1099 } 1099 }
1100 1100
1101 #ifdef SK_DEBUG 1101 #ifdef SK_DEBUG
1102 void SkPDFType0Font::emitObject(SkWStream* stream, SkPDFCatalog* catalog, 1102 void SkPDFType0Font::emitObject(SkWStream* stream, SkPDFCatalog* catalog) {
1103 bool indirect) {
1104 SkASSERT(fPopulated); 1103 SkASSERT(fPopulated);
1105 return INHERITED::emitObject(stream, catalog, indirect); 1104 return INHERITED::emitObject(stream, catalog);
1106 } 1105 }
1107 #endif 1106 #endif
1108 1107
1109 bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) { 1108 bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) {
1110 insertName("Subtype", "Type0"); 1109 insertName("Subtype", "Type0");
1111 insertName("BaseFont", fontInfo()->fFontName); 1110 insertName("BaseFont", fontInfo()->fFontName);
1112 insertName("Encoding", "Identity-H"); 1111 insertName("Encoding", "Identity-H");
1113 1112
1114 SkAutoTUnref<SkPDFCIDFont> newCIDFont( 1113 SkAutoTUnref<SkPDFCIDFont> newCIDFont(
1115 new SkPDFCIDFont(fontInfo(), typeface(), subset)); 1114 new SkPDFCIDFont(fontInfo(), typeface(), subset));
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1487
1489 insert("FontBBox", makeFontBBox(bbox, 1000))->unref(); 1488 insert("FontBBox", makeFontBBox(bbox, 1000))->unref();
1490 insertInt("FirstChar", 1); 1489 insertInt("FirstChar", 1);
1491 insertInt("LastChar", lastGlyphID() - firstGlyphID() + 1); 1490 insertInt("LastChar", lastGlyphID() - firstGlyphID() + 1);
1492 insert("Widths", widthArray.get()); 1491 insert("Widths", widthArray.get());
1493 insertName("CIDToGIDMap", "Identity"); 1492 insertName("CIDToGIDMap", "Identity");
1494 1493
1495 populateToUnicodeTable(NULL); 1494 populateToUnicodeTable(NULL);
1496 return true; 1495 return true;
1497 } 1496 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFontImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698