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

Side by Side Diff: experimental/PdfViewer/SkPdfFont.cpp

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/PdfViewer/SkPdfFont.h ('k') | experimental/PdfViewer/SkPdfParser.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 #include "SkPdfFont.h" 1 #include "SkPdfFont.h"
2 #include "SkPdfParser.h"
2 3
3 std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts() { 4 std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts() {
4 static std::map<std::string, SkPdfStandardFontEntry> gPdfStandardFonts; 5 static std::map<std::string, SkPdfStandardFontEntry> gPdfStandardFonts;
5 6
6 // TODO (edisonn): , vs - ? what does it mean? 7 // TODO (edisonn): , vs - ? what does it mean?
7 // TODO (edisonn): MT, PS, Oblique=italic?, ... what does it mean? 8 // TODO (edisonn): MT, PS, Oblique=italic?, ... what does it mean?
8 if (gPdfStandardFonts.empty()) { 9 if (gPdfStandardFonts.empty()) {
9 gPdfStandardFonts["Arial"] = {"Arial", false, false}; 10 gPdfStandardFonts["Arial"] = {"Arial", false, false};
10 gPdfStandardFonts["Arial,Bold"] = {"Arial", true, false}; 11 gPdfStandardFonts["Arial,Bold"] = {"Arial", true, false};
11 gPdfStandardFonts["Arial,BoldItalic"] = {"Arial", true, true}; 12 gPdfStandardFonts["Arial,BoldItalic"] = {"Arial", true, true};
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 SkPdfEncoding* SkPdfEncoding::fromName(const char* name) { 369 SkPdfEncoding* SkPdfEncoding::fromName(const char* name) {
369 SkPdfEncoding* encoding = getStandardEncodings()[name]; 370 SkPdfEncoding* encoding = getStandardEncodings()[name];
370 371
371 #ifdef PDF_TRACE 372 #ifdef PDF_TRACE
372 if (encoding == NULL) { 373 if (encoding == NULL) {
373 printf("Encoding not found: %s\n", name); 374 printf("Encoding not found: %s\n", name);
374 } 375 }
375 #endif 376 #endif
376 return encoding; 377 return encoding;
377 } 378 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfFont.h ('k') | experimental/PdfViewer/SkPdfParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698