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

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

Issue 23033022: pdfviewer: when q start, and an operator is called, it should not be able to see operands before q.… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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/SkPdfGraphicsState.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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPdfFont_DEFINED 8 #ifndef SkPdfFont_DEFINED
9 #define SkPdfFont_DEFINED 9 #define SkPdfFont_DEFINED
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 for (int i = 0; i < textIn.len; i++) { 204 for (int i = 0; i < textIn.len; i++) {
205 textOut->text[i] = fToUnicode->fCMapEncoding[textIn.text[i]]; 205 textOut->text[i] = fToUnicode->fCMapEncoding[textIn.text[i]];
206 } 206 }
207 } else { 207 } else {
208 textOut->text = textIn.text; 208 textOut->text = textIn.text;
209 textOut->len = textIn.len; 209 textOut->len = textIn.len;
210 } 210 }
211 }; 211 };
212 212
213 inline unsigned int ToUnicode(unsigned int ch) const { 213 inline unsigned int ToUnicode(unsigned int ch) const {
214 if (fToUnicode) { 214 if (fToUnicode && fToUnicode->fCMapEncoding) {
215 return fToUnicode->fCMapEncoding[ch]; 215 return fToUnicode->fCMapEncoding[ch];
216 } else { 216 } else {
217 return ch; 217 return ch;
218 } 218 }
219 }; 219 };
220 220
221 static SkPdfFont* fontFromPdfDictionary(SkPdfNativeDoc* doc, SkPdfFontDictio nary* dict); 221 static SkPdfFont* fontFromPdfDictionary(SkPdfNativeDoc* doc, SkPdfFontDictio nary* dict);
222 static SkPdfFont* Default() {return fontFromName(NULL, NULL, "TimesNewRoman" );} 222 static SkPdfFont* Default() {return fontFromName(NULL, NULL, "TimesNewRoman" );}
223 223
224 static SkPdfType0Font* fontFromType0FontDictionary(SkPdfNativeDoc* doc, SkPd fType0FontDictionary* dict); 224 static SkPdfType0Font* fontFromType0FontDictionary(SkPdfNativeDoc* doc, SkPd fType0FontDictionary* dict);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 SkDoubleToScalar(0.0)); 441 SkDoubleToScalar(0.0));
442 return fChars[ch - fFirstChar].fWidth; 442 return fChars[ch - fFirstChar].fWidth;
443 } 443 }
444 444
445 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) { 445 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) {
446 446
447 } 447 }
448 }; 448 };
449 449
450 #endif // SkPdfFont_DEFINED 450 #endif // SkPdfFont_DEFINED
OLDNEW
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfGraphicsState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698