| 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 "SkPdfPodofoMapper_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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts(); | 30 std::map<std::string, SkPdfStandardFontEntry>& getStandardFonts(); |
| 31 SkTypeface* SkTypefaceFromPdfStandardFont(const char* fontName, bool bold, bool
italic); | 31 SkTypeface* SkTypefaceFromPdfStandardFont(const char* fontName, bool bold, bool
italic); |
| 32 SkPdfFont* fontFromName(SkPdfObject* obj, const char* fontName); | 32 SkPdfFont* fontFromName(SkPdfObject* obj, const char* fontName); |
| 33 | 33 |
| 34 struct SkUnencodedText { | 34 struct SkUnencodedText { |
| 35 void* text; | 35 void* text; |
| 36 int len; | 36 int len; |
| 37 | 37 |
| 38 public: | 38 public: |
| 39 SkUnencodedText(const SkPdfObject* obj) { | 39 SkUnencodedText(const SkPdfString* obj) { |
| 40 text = (void*)obj->podofo()->GetString().GetString(); | 40 text = (void*)obj->c_str(); |
| 41 len = obj->podofo()->GetString().GetLength(); | 41 len = obj->len(); |
| 42 } | 42 } |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 struct SkDecodedText { | 45 struct SkDecodedText { |
| 46 uint16_t* text; | 46 uint16_t* text; |
| 47 int len; | 47 int len; |
| 48 public: | 48 public: |
| 49 unsigned int operator[](int i) const { return text[i]; } | 49 unsigned int operator[](int i) const { return text[i]; } |
| 50 int size() const { return len; } | 50 int size() const { return len; } |
| 51 }; | 51 }; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 pdfContext->fGraphicsState.fMatrixTm.preTranslate(SkDoubleToScalar(pdfCo
ntext->fGraphicsState.fCurFontSize * fChars[ch - fFirstChar].fWidth), | 395 pdfContext->fGraphicsState.fMatrixTm.preTranslate(SkDoubleToScalar(pdfCo
ntext->fGraphicsState.fCurFontSize * fChars[ch - fFirstChar].fWidth), |
| 396 SkDoubleToScalar(0.0)); | 396 SkDoubleToScalar(0.0)); |
| 397 } | 397 } |
| 398 | 398 |
| 399 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) { | 399 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) { |
| 400 | 400 |
| 401 } | 401 } |
| 402 }; | 402 }; |
| 403 | 403 |
| 404 #endif // __DEFINED__SkPdfFont | 404 #endif // __DEFINED__SkPdfFont |
| OLD | NEW |