OLD | NEW |
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 Loading... |
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 |
OLD | NEW |