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

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

Issue 18042005: isolate podofo to prepare for native parser, autogenerate PDF API during build (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/SkPdfConfig.h ('k') | 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 "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
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
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
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfConfig.h ('k') | experimental/PdfViewer/SkPdfFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698