1Fonts and GM Tests 2================== 3 4Overview 5-------- 6 7Each test in the gm directory draws a reference image. Their primary purpose is 8to detect when images change unexpectedly, indicating that a rendering bug has 9been introduced. 10 11The gm tests have a secondary purpose: they detect when rendering is different 12across platforms and configurations. 13 14GM font selection 15----------------- 16 17Each gm specifies the typeface to use when drawing text. For now, to set the 18portable typeface on the paint, call: 19 20~~~~ 21sk_tool_utils::set_portable_typeface(SkPaint* , const char* name = nullptr, 22SkFontStyle style = SkFontStyle()); 23~~~~ 24 25To create a portable typeface, use: 26 27~~~~ 28SkTypeface* typeface = sk_tool_utils::create_portable_typeface(const char* name, 29SkFontStyle style); 30~~~~ 31 32Eventually, both `set_portable_typeface()` and `create_portable_typeface()` will be 33removed. Instead, a test-wide `SkFontMgr` will be selected to choose portable 34fonts or resource fonts. 35