Flutter Engine
The Flutter Engine
Classes | Functions
ChineseFlingSlide.cpp File Reference
#include "include/core/SkCanvas.h"
#include "include/core/SkFontMetrics.h"
#include "include/core/SkFontMgr.h"
#include "include/core/SkTextBlob.h"
#include "include/core/SkTypeface.h"
#include "src/base/SkRandom.h"
#include "tools/Resources.h"
#include "tools/ToolUtils.h"
#include "tools/fonts/FontToolUtils.h"
#include "tools/viewer/Slide.h"

Go to the source code of this file.

Classes

class  ChineseFlingSlide
 
class  ChineseZoomSlide
 

Functions

static sk_sp< SkTypefacechinese_typeface ()
 

Function Documentation

◆ chinese_typeface()

static sk_sp< SkTypeface > chinese_typeface ( )
static

Definition at line 26 of file ChineseFlingSlide.cpp.

26 {
27#ifdef SK_BUILD_FOR_ANDROID
28 return ToolUtils::CreateTypefaceFromResource("fonts/NotoSansCJK-Regular.ttc");
29#elif defined(SK_BUILD_FOR_WIN)
31#elif defined(SK_BUILD_FOR_MAC)
32 return ToolUtils::CreateTestTypeface("Hiragino Sans GB W3", SkFontStyle());
33#elif defined(SK_BUILD_FOR_IOS)
34 return ToolUtils::CreateTestTypeface("Hiragino Sans GB W3", SkFontStyle());
35#elif defined(SK_BUILD_FOR_UNIX)
36 return ToolUtils::CreateTestTypeface("Noto Sans CJK SC", SkFontStyle());
37#else
38 return nullptr;
39#endif
40}
sk_sp< SkTypeface > CreateTypefaceFromResource(const char *resource, int ttcIndex)
sk_sp< SkTypeface > CreateTestTypeface(const char *name, SkFontStyle style)