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