绘制中文的ts接口ttf文件替换

Signed-off-by: zhangchao <zhangchao345@huawei.com>
This commit is contained in:
zhangchao 2024-05-06 16:02:09 +08:00
parent e62f08e63c
commit 13355fc20e
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ namespace OHOS::Rosen {
namespace Drawing {
class JsTypeface final {
public:
static constexpr char ZH_CN_TTF[] = "/system/fonts/HarmonyOS_Sans_SC_Regular.ttf";
static constexpr char ZH_CN_TTF[] = "/system/fonts/HarmonyOS_Sans_SC.ttf";
explicit JsTypeface(std::shared_ptr<Typeface> typeface) : m_typeface(typeface) {};
~JsTypeface();

View File

@ -33,7 +33,7 @@ public:
};
// Default typeface does not support chinese characters, needs to load chinese character ttf file.
static constexpr char ZH_CN_TTF[] = "/system/fonts/HarmonyOS_Sans_SC_Regular.ttf";
static constexpr char ZH_CN_TTF[] = "/system/fonts/HarmonyOS_Sans_SC.ttf";
inline std::shared_ptr<OHOS::Rosen::Drawing::Typeface> g_LoadZhCnTypeface()
{