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

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

Issue 18293012: pdf viewer: fix a few warnings, and enable warning as errors (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 | « no previous file | experimental/PdfViewer/SkPdfFont.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef __DEFINED__SkPdfFont 1 #ifndef __DEFINED__SkPdfFont
2 #define __DEFINED__SkPdfFont 2 #define __DEFINED__SkPdfFont
3 3
4 #include "SkPdfHeaders_autogen.h" 4 #include "SkPdfHeaders_autogen.h"
5 #include "SkPdfMapper_autogen.h" 5 #include "SkPdfMapper_autogen.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
11 #include "SkUtils.h" 11 #include "SkUtils.h"
12 #include "SkPdfBasics.h" 12 #include "SkPdfBasics.h"
13 #include "SkPdfUtils.h" 13 #include "SkPdfUtils.h"
14 14
15 15
16 class SkPdfType0Font; 16 class SkPdfType0Font;
17 class SkPdfType1Font; 17 class SkPdfType1Font;
18 class SkPdfType3Font; 18 class SkPdfType3Font;
19 class SkPdfTrueTypeFont; 19 class SkPdfTrueTypeFont;
20 class SkPdfMultiMasterFont; 20 class SkPdfMultiMasterFont;
21 class SkPdfFont; 21 class SkPdfFont;
22 22
23
24 struct SkPdfStandardFontEntry { 23 struct SkPdfStandardFontEntry {
24 // We don't own this pointer!
25 const char* fName; 25 const char* fName;
26 bool fIsBold; 26 bool fIsBold;
27 bool fIsItalic; 27 bool fIsItalic;
28 SkPdfStandardFontEntry()
29 : fName(NULL),
30 fIsBold(false),
31 fIsItalic(false) {}
32
33 SkPdfStandardFontEntry(const char* name, bool bold, bool italic)
34 : fName(name),
35 fIsBold(bold),
36 fIsItalic(italic) {}
28 }; 37 };
29 38
30 std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts(); 39 std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts();
31 SkTypeface* SkTypefaceFromPdfStandardFont(const char* fontName, bool bold, bool italic); 40 SkTypeface* SkTypefaceFromPdfStandardFont(const char* fontName, bool bold, bool italic);
32 SkPdfFont* fontFromName(SkNativeParsedPDF* doc, SkPdfObject* obj, const char* fo ntName); 41 SkPdfFont* fontFromName(SkNativeParsedPDF* doc, SkPdfObject* obj, const char* fo ntName);
33 42
34 struct SkUnencodedText { 43 struct SkUnencodedText {
35 void* text; 44 void* text;
36 int len; 45 int len;
37 46
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 SkDoubleToScalar(0.0)); 410 SkDoubleToScalar(0.0));
402 return fChars[ch - fFirstChar].fWidth; 411 return fChars[ch - fFirstChar].fWidth;
403 } 412 }
404 413
405 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) { 414 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) {
406 415
407 } 416 }
408 }; 417 };
409 418
410 #endif // __DEFINED__SkPdfFont 419 #endif // __DEFINED__SkPdfFont
OLDNEW
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698