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

Side by Side Diff: gm/verttext.cpp

Issue 15064003: Fix vertical text scaling on Mac. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Work with OTF CFF fonts too. Created 7 years, 7 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 | samplecode/SampleApp.cpp » ('j') | src/ports/SkFontHost_mac.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 12 matching lines...) Expand all
23 //static const char gText[] = "﹁テスト︒﹂"; 23 //static const char gText[] = "﹁テスト︒﹂";
24 //static const char gText[] = {0xEF,0xB9,0x81, 0xE3,0x83,0x86, 0xE3,0x82,0xB9, 0 xE3,0x83,0x88, 0xEF,0xB8,0x92, 0xEF,0xB9,0x82, 0x0}; 24 //static const char gText[] = {0xEF,0xB9,0x81, 0xE3,0x83,0x86, 0xE3,0x82,0xB9, 0 xE3,0x83,0x88, 0xEF,0xB8,0x92, 0xEF,0xB9,0x82, 0x0};
25 25
26 static const size_t gLen = sizeof(gText) - 1; 26 static const size_t gLen = sizeof(gText) - 1;
27 27
28 class VertTextGM : public GM { 28 class VertTextGM : public GM {
29 public: 29 public:
30 VertTextGM() 30 VertTextGM()
31 // : fFace(SkTypeface::CreateFromName("unifont", SkTypeface::kNormal)) 31 // : fFace(SkTypeface::CreateFromName("unifont", SkTypeface::kNormal))
32 // : fFace(SkTypeface::CreateFromFile("MotoyaL04Mincho_3.ttf")) 32 // : fFace(SkTypeface::CreateFromFile("MotoyaL04Mincho_3.ttf"))
33
34 // Bitmap fonts on OS X.
35 // : fFace(SkTypeface::CreateFromName("GB18030 Bitmap", SkTypeface::kNor mal))
36 // : fFace(SkTypeface::CreateFromName("Apple Color Emoji", SkTypeface::k Normal))
37
38 // OTF CFF fonts on OS X.
39 // : fFace(SkTypeface::CreateFromName("Hiragino Mincho ProN", SkTypeface ::kNormal))
40 // : fFace(SkTypeface::CreateFromName("Hiragino Kaku Gothic Pro", SkType face::kNormal))
41 // : fFace(SkTypeface::CreateFromName("Hiragino Sans GB", SkTypeface::kN ormal))
42 // : fFace(SkTypeface::CreateFromName("STIXGeneral", SkTypeface::kNormal ))
43 // : fFace(SkTypeface::CreateFromName("Yuppy SC", SkTypeface::kNormal))
44 // : fFace(SkTypeface::CreateFromName("Yuppy TC", SkTypeface::kNormal))
45
33 { 46 {
34 } 47 }
35 48
36 //SkAutoTUnref<SkTypeface> fFace; 49 //SkAutoTUnref<SkTypeface> fFace;
37 50
38 protected: 51 protected:
39 52
40 SkString onShortName() { 53 SkString onShortName() {
41 return SkString("verttext"); 54 return SkString("verttext");
42 } 55 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 private: 111 private:
99 typedef GM INHERITED; 112 typedef GM INHERITED;
100 }; 113 };
101 114
102 /////////////////////////////////////////////////////////////////////////////// 115 ///////////////////////////////////////////////////////////////////////////////
103 116
104 static GM* MyFactory(void*) { return new VertTextGM; } 117 static GM* MyFactory(void*) { return new VertTextGM; }
105 static GMRegistry reg(MyFactory); 118 static GMRegistry reg(MyFactory);
106 119
107 } 120 }
OLDNEW
« no previous file with comments | « no previous file | samplecode/SampleApp.cpp » ('j') | src/ports/SkFontHost_mac.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698