| OLD | NEW |
| 1 Fonts and GM Tests | 1 Fonts and GM Tests |
| 2 ================== | 2 ================== |
| 3 | 3 |
| 4 Overview | 4 Overview |
| 5 -------- | 5 -------- |
| 6 | 6 |
| 7 Each test in the gm directory draws a reference image. Their primary purpose is | 7 Each test in the gm directory draws a reference image. Their primary purpose is |
| 8 to detect when images change unexpectedly, indicating that a rendering bug has | 8 to detect when images change unexpectedly, indicating that a rendering bug has |
| 9 been introduced. | 9 been introduced. |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 invoked. | 63 invoked. |
| 64 | 64 |
| 65 | 65 |
| 66 GM font selection | 66 GM font selection |
| 67 ----------------- | 67 ----------------- |
| 68 | 68 |
| 69 Each gm specifies the typeface to use when drawing text. For now, to set the | 69 Each gm specifies the typeface to use when drawing text. For now, to set the |
| 70 portable typeface on the paint, call: | 70 portable typeface on the paint, call: |
| 71 | 71 |
| 72 ~~~~ | 72 ~~~~ |
| 73 sk_tool_utils::set_portable_typeface(SkPaint* , const char* name = NULL, | 73 sk_tool_utils::set_portable_typeface(SkPaint* , const char* name = nullptr, |
| 74 SkTypeface::Style style = SkTypeface::kNormal ); | 74 SkTypeface::Style style = SkTypeface::kNormal ); |
| 75 ~~~~ | 75 ~~~~ |
| 76 | 76 |
| 77 To create a portable typeface, use: | 77 To create a portable typeface, use: |
| 78 | 78 |
| 79 ~~~~ | 79 ~~~~ |
| 80 SkTypeface* typeface = sk_tool_utils::create_portable_typeface(const char* name, | 80 SkTypeface* typeface = sk_tool_utils::create_portable_typeface(const char* name, |
| 81 SkTypeface::Style style); | 81 SkTypeface::Style style); |
| 82 ~~~~ | 82 ~~~~ |
| 83 | 83 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 109 | 109 |
| 110 Adding support for selecting from multiple font managers at runtime permits | 110 Adding support for selecting from multiple font managers at runtime permits |
| 111 removing manual typeface selection in the gm tests. Today, options to dm like | 111 removing manual typeface selection in the gm tests. Today, options to dm like |
| 112 '\-\-pipe' fail with '\-\-portableFonts' because we're hard-coded to using the d
efault | 112 '\-\-pipe' fail with '\-\-portableFonts' because we're hard-coded to using the d
efault |
| 113 font manage when pictures are serialized. | 113 font manage when pictures are serialized. |
| 114 | 114 |
| 115 Some gm tests explicitly always want to use system fonts and system metrics; | 115 Some gm tests explicitly always want to use system fonts and system metrics; |
| 116 other gm tests use text only to label the drawing; yet other gm tests use text | 116 other gm tests use text only to label the drawing; yet other gm tests use text |
| 117 to generate paths for testing. Additional discrimination is needed to | 117 to generate paths for testing. Additional discrimination is needed to |
| 118 distinguish these cases. | 118 distinguish these cases. |
| OLD | NEW |