/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/text/ |
H A D | typeface_test.cpp | 54 ASSERT_TRUE(typeface == nullptr); 81 ASSERT_TRUE(typeface != nullptr); 94 ASSERT_TRUE(typeface != nullptr); 107 ASSERT_TRUE(typeface != nullptr); 121 ASSERT_TRUE(typeface != nullptr); 134 ASSERT_TRUE(typeface != nullptr); 147 ASSERT_TRUE(typeface != nullptr); 160 ASSERT_TRUE(typeface != nullptr); 174 ASSERT_TRUE(typeface != nullptr); 190 ASSERT_TRUE(typeface != nullptr); [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/skia_adapter/ |
H A D | skia_typeface_test.cpp | 158 ASSERT_TRUE(typeface != nullptr); 215 ASSERT_TRUE(typeface != nullptr); 230 ASSERT_NE(typeface, nullptr); 275 ASSERT_TRUE(typeface != nullptr); 276 ASSERT_TRUE(!typeface->GetItalic()); 312 ASSERT_TRUE(typeface != nullptr); 327 ASSERT_TRUE(typeface != nullptr); 340 ASSERT_TRUE(typeface != nullptr); 374 ASSERT_NE(typeface, nullptr); 424 ASSERT_NE(typeface, nullptr); [all …]
|
H A D | skia_font_test.cpp | 50 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); variable 51 skiaFont = std::make_shared<SkiaFont>(typeface, 1, 1, 1); 63 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); variable 64 auto skiaFont = std::make_shared<SkiaFont>(typeface, 1, 1, 1); 77 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); variable 78 auto skiaFont = std::make_shared<SkiaFont>(typeface, 1, 1, 1); 91 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); variable 92 auto skiaFont = std::make_shared<SkiaFont>(typeface, 1, 1, 1); 105 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); variable 119 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); variable [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/src/ |
H A D | drawing_typeface.cpp | 81 if (typeface == nullptr) { in RegisterAndConvertTypeface() 87 !Typeface::GetTypefaceRegisterCallBack()(typeface)) { in RegisterAndConvertTypeface() 92 TypefaceMgr::GetInstance().Insert(drawingTypeface, typeface); in RegisterAndConvertTypeface() 98 std::shared_ptr<Typeface> typeface = g_LoadZhCnTypeface(); in OH_Drawing_TypefaceCreateDefault() local 99 if (typeface == nullptr) { in OH_Drawing_TypefaceCreateDefault() 104 TypefaceMgr::GetInstance().Insert(drawingTypeface, typeface); in OH_Drawing_TypefaceCreateDefault() 115 if (typeface == nullptr) { in OH_Drawing_TypefaceCreateFromFile() 156 if (typeface == nullptr || currentTypeface->GetUniqueID() == typeface->GetUniqueID()) { in OH_Drawing_TypefaceCreateFromCurrent() 159 return RegisterAndConvertTypeface(typeface); in OH_Drawing_TypefaceCreateFromCurrent() 170 if (typeface == nullptr) { in OH_Drawing_TypefaceCreateFromStream() [all …]
|
H A D | drawing_font_mgr.cpp | 168 Typeface* typeface = fontMgr->MatchFamilyStyle( in OH_Drawing_FontMgrMatchFamilyStyle() local 170 if (typeface == nullptr) { in OH_Drawing_FontMgrMatchFamilyStyle() 173 std::shared_ptr<Typeface> sharedTypeface(typeface); in OH_Drawing_FontMgrMatchFamilyStyle() 187 Typeface* typeface = fontMgr->MatchFamilyStyleCharacter(familyName, in OH_Drawing_FontMgrMatchFamilyStyleCharacter() local 190 if (typeface == nullptr) { in OH_Drawing_FontMgrMatchFamilyStyleCharacter() 193 std::shared_ptr<Typeface> sharedTypeface(typeface); in OH_Drawing_FontMgrMatchFamilyStyleCharacter() 209 std::shared_ptr<Typeface> typeface(drawingTypeface); in OH_Drawing_FontStyleSetCreateTypeface() local 210 TypefaceMgr::GetInstance().Insert(drawingTypeface, typeface); in OH_Drawing_FontStyleSetCreateTypeface() 277 std::shared_ptr<Typeface> typeface(drawingTypeface); in OH_Drawing_FontStyleSetMatchStyle() local 278 TypefaceMgr::GetInstance().Insert(drawingTypeface, typeface); in OH_Drawing_FontStyleSetMatchStyle()
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ndk/cpp/interface/ |
H A D | typeface_test.cpp | 50 OH_Drawing_Typeface* typeface; in OnTestPerformance() local 55 OH_Drawing_TypefaceDestroy(typeface); in OnTestPerformance() 58 OH_Drawing_FontSetTypeface(font, typeface); in OnTestPerformance() 68 OH_Drawing_TypefaceDestroy(typeface); in OnTestPerformance() 80 OH_Drawing_Typeface* typeface; in OnTestPerformance() local 84 OH_Drawing_TypefaceDestroy(typeface); in OnTestPerformance() 92 OH_Drawing_TypefaceDestroy(typeface); in OnTestPerformance() 95 OH_Drawing_TypefaceDestroy(typeface); in OnTestPerformance() 107 OH_Drawing_Typeface* typeface; in OnTestPerformance() local 111 OH_Drawing_TypefaceDestroy(typeface); in OnTestPerformance() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/ndk/ |
H A D | drawing_typeface_test.cpp | 51 ASSERT_TRUE(typeface == nullptr); 68 ASSERT_TRUE(typeface == nullptr); 79 ASSERT_TRUE(typeface != nullptr); 81 ASSERT_TRUE(typeface != nullptr); 150 OH_Drawing_Typeface *typeface = variable 152 ASSERT_TRUE(typeface == nullptr); 154 ASSERT_TRUE(typeface == nullptr); 156 ASSERT_TRUE(typeface != nullptr); 186 ASSERT_TRUE(typeface == nullptr); 188 ASSERT_TRUE(typeface == nullptr); [all …]
|
H A D | drawing_font_mgr_test.cpp | 110 EXPECT_NE(typeface, nullptr); 111 OH_Drawing_TypefaceDestroy(typeface); 176 EXPECT_TRUE(typeface == nullptr); 208 EXPECT_NE(typeface, nullptr); 209 typeface = OH_Drawing_FontStyleSetCreateTypeface(nullptr, 0); 210 EXPECT_TRUE(typeface == nullptr); 212 OH_Drawing_TypefaceDestroy(typeface); 248 EXPECT_NE(typeface, nullptr); 250 typeface = OH_Drawing_FontStyleSetMatchStyle(nullptr, normalStyle); 251 EXPECT_TRUE(typeface == nullptr); [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_engine/unittest/rosen_text/adapter/skia_txt/ |
H A D | font_collection_test.cpp | 38 auto typeface = fontCollection->LoadFont("familyname", data, 0); variable 39 EXPECT_EQ(typeface == nullptr, true); 40 typeface = fontCollection->LoadThemeFont("familynametest", data, 0); 41 EXPECT_EQ(typeface == nullptr, true); 54 auto typeface = OHOS::Rosen::Drawing::Typeface::MakeDefault(); variable 55 …wing::Typeface::RegisterCallBackFunc([](std::shared_ptr<OHOS::Rosen::Drawing::Typeface> typeface) { in __anone0d62bb60102() argument 58 EXPECT_EQ(fontCollection->RegisterTypeface(typeface), false); 59 …wing::Typeface::RegisterCallBackFunc([](std::shared_ptr<OHOS::Rosen::Drawing::Typeface> typeface) { in __anone0d62bb60202() argument 60 return typeface != nullptr; in __anone0d62bb60202() 63 EXPECT_EQ(fontCollection->RegisterTypeface(typeface), true); [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/adapter/skia_txt/ |
H A D | font_collection.cpp | 60 for (const auto& [id, typeface] : typefaces_) { in ~FontCollection() 61 Drawing::Typeface::GetTypefaceUnRegisterCallBack()(typeface); in ~FontCollection() 81 bool FontCollection::RegisterTypeface(std::shared_ptr<Drawing::Typeface> typeface) in RegisterTypeface() argument 83 if (!typeface || !Drawing::Typeface::GetTypefaceRegisterCallBack()) { in RegisterTypeface() 88 if (typefaces_.find(typeface->GetUniqueID()) != typefaces_.end()) { in RegisterTypeface() 91 if (!Drawing::Typeface::GetTypefaceRegisterCallBack()(typeface)) { in RegisterTypeface() 95 typefaces_.emplace(typeface->GetUniqueID(), typeface); in RegisterTypeface() 103 if (!RegisterTypeface(typeface)) { in LoadFont() 108 return typeface; in LoadFont() 139 if (!RegisterTypeface(typeface)) { in LoadThemeFont() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/draw/typeface_fuzzer/ |
H A D | typeface_fuzzer.cpp | 41 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); in TypefaceFuzzTest001() local 42 typeface->GetFamilyName(); in TypefaceFuzzTest001() 43 typeface->GetFontStyle(); in TypefaceFuzzTest001() 45 typeface->GetTableSize(tag); in TypefaceFuzzTest001() 49 typeface->GetTableData(tag2, offset, length, nullptr); in TypefaceFuzzTest001() 50 typeface->GetItalic(); in TypefaceFuzzTest001() 51 typeface->GetUniqueID(); in TypefaceFuzzTest001() 52 typeface->GetUnitsPerEm(); in TypefaceFuzzTest001() 53 typeface->IsCustomTypeface(); in TypefaceFuzzTest001() 54 typeface->IsThemeTypeface(); in TypefaceFuzzTest001() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/render/ |
H A D | rs_typeface_cache.cpp | 102 std::shared_ptr<Drawing::Typeface> typeface) in CacheDrawingTypeface() argument 104 if (!(typeface && uniqueId > 0)) { in CacheDrawingTypeface() 113 uint32_t hash_value = typeface->GetHash(); in CacheDrawingTypeface() 115 std::shared_ptr<Drawing::Data> data = typeface->Serialize(); in CacheDrawingTypeface() 137 typefaceHashMap_[hash_value] = std::make_tuple(typeface, 1); in CacheDrawingTypeface() 180 auto [typeface, ref] = typefaceHashMap[hash_value]; in RemoveHashMap() 215 return typeface; in GetDrawingTypefaceCache() 311 if (auto data = typeface->Serialize()) { in ReplaySerialize() 350 std::shared_ptr<Drawing::Typeface> typeface; in ReplayDeserialize() local 352 if (typeface) { in ReplayDeserialize() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/render/ |
H A D | rs_typeface_cache_test.cpp | 48 EXPECT_NE(typeface, nullptr); 49 uint32_t size = typeface->GetSize(); 51 uint32_t hash = typeface->GetHash(); 70 RSTypefaceCache::Instance().CacheDrawingTypeface(uniqueId1, typeface); 83 RSTypefaceCache::Instance().CacheDrawingTypeface(uniqueId2, typeface); 144 auto typeface = Drawing::Typeface::MakeDefault(); variable 147 RSTypefaceCache::Instance().CacheDrawingTypeface(uniqueIdF, typeface); 148 RSTypefaceCache::Instance().CacheDrawingTypeface(uniqueIdS, typeface); 212 auto typeface = Drawing::Typeface::MakeDefault(); variable 215 RSTypefaceCache::Instance().CacheDrawingTypeface(uniqueIdF, typeface); [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/skia_txt/txt/ |
H A D | typeface_font_asset_provider.cpp | 53 void TypefaceFontAssetProvider::RegisterTypeface(sk_sp<SkTypeface> typeface) in RegisterTypeface() argument 55 if (typeface == nullptr) { in RegisterTypeface() 60 typeface->getFamilyName(&name); in RegisterTypeface() 63 RegisterTypeface(std::move(typeface), std::move(familyName)); in RegisterTypeface() 66 void TypefaceFontAssetProvider::RegisterTypeface(sk_sp<SkTypeface> typeface, std::string familyName… in RegisterTypeface() argument 76 if (typeface != nullptr) { in RegisterTypeface() 82 iter->second->registerTypeface(std::move(typeface)); in RegisterTypeface() 99 void TypefaceFontStyleSet::registerTypeface(sk_sp<SkTypeface> typeface) in registerTypeface() argument 101 if (typeface != nullptr) { in registerTypeface() 102 typefaces_.emplace_back(std::move(typeface)); in registerTypeface()
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/texgine/src/ |
H A D | font_parser.cpp | 177 auto size = typeface->GetTableSize(tag); in ParseCmapTable() 208 auto size = typeface->GetTableSize(tag); in ParseNameTable() 244 auto size = typeface->GetTableSize(tag); in ParsePostTable() 300 if (typeface == nullptr) { in SetFontDescriptor() 304 auto fontStyle = typeface->GetFontStyle(); in SetFontDescriptor() 405 std::shared_ptr<Drawing::Typeface> typeface = nullptr; in ParserFontDescriptorsFromPath() local 407 typefaces.push_back(typeface); in ParserFontDescriptorsFromPath() 454 if (typeface == nullptr) { in ParseFontDescriptor() 457 if (typeface == nullptr) { in ParseFontDescriptor() 468 auto fontStyle = typeface->GetFontStyle(); in ParseFontDescriptor() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/ |
H A D | skia_font_mgr.cpp | 118 auto typeface = SkTypeface::MakeFromStream(std::move(stream)); in LoadDynamicFont() local 120 dynamicFontMgr->font_provider().RegisterTypeface(typeface); in LoadDynamicFont() 122 dynamicFontMgr->font_provider().RegisterTypeface(typeface, familyName); in LoadDynamicFont() 124 if (!typeface) { in LoadDynamicFont() 127 typeface->setIsCustomTypeface(true); in LoadDynamicFont() 134 if (typeface == nullptr) { in LoadThemeFont() 142 SkiaTypeface *skiaTypeFace = typeface->GetImpl<SkiaTypeface>(); in LoadThemeFont() 162 auto typeface = SkTypeface::MakeFromStream(std::move(stream)); in LoadThemeFont() local 163 if (!typeface) { in LoadThemeFont() 167 typeface->setIsCustomTypeface(true); in LoadThemeFont() [all …]
|
H A D | skia_font.cpp | 30 SkiaFont::SkiaFont(std::shared_ptr<Typeface> typeface, scalar size, scalar scaleX, scalar skewX) no… in SkiaFont() argument 32 if (!typeface) { in SkiaFont() 37 auto skiaTypeface = typeface->GetImpl<SkiaTypeface>(); in SkiaFont() 43 typeface_ = typeface; in SkiaFont() 89 void SkiaFont::SetTypeface(std::shared_ptr<Typeface> typeface) in SetTypeface() argument 91 if (!typeface) { in SetTypeface() 95 auto skiaTypeface = typeface->GetImpl<SkiaTypeface>(); in SetTypeface() 100 typeface_ = typeface; in SetTypeface()
|
H A D | skia_typeface.cpp | 261 sk_sp<SkData> SkiaTypeface::SerializeTypeface(SkTypeface* typeface, void* ctx) in SerializeTypeface() argument 263 if (!typeface) { in SerializeTypeface() 268 if (textblobCtx != nullptr && typeface->isCustomTypeface()) { in SerializeTypeface() 269 sk_sp<SkTypeface> typefacePtr = sk_ref_sp(typeface); in SerializeTypeface() 274 return typeface->serialize(); in SerializeTypeface() 289 auto& typeface = textblobCtx->GetTypeface(); in DeserializeTypeface() local 290 if (typeface == nullptr) { in DeserializeTypeface() 294 auto skiaTypeface = typeface->GetImpl<SkiaTypeface>(); in DeserializeTypeface()
|
/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/font_napi/ |
H A D | js_typeface.cpp | 92 napi_value JsTypeface::CreateJsTypeface(napi_env env, const std::shared_ptr<Typeface> typeface) in CreateJsTypeface() argument 98 auto jsTypeface = new JsTypeface(typeface); in CreateJsTypeface() 122 std::shared_ptr<Typeface> typeface = Typeface::MakeFromFile(ZH_CN_TTF); in LoadZhCnTypeface() local 123 if (typeface == nullptr) { in LoadZhCnTypeface() 124 typeface = Typeface::MakeDefault(); in LoadZhCnTypeface() 126 return typeface; in LoadZhCnTypeface() 165 auto typeface = new JsTypeface(rawTypeface); in MakeFromFile() local 171 delete typeface; in MakeFromFile() 180 delete typeface; in MakeFromFile() 184 napi_status status = napi_wrap(env, jsObj, typeface, JsTypeface::Destructor, nullptr, nullptr); in MakeFromFile() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/drawing_utils/ |
H A D | drawing_canvas_utils.h | 43 auto typeface = OHOS::Rosen::Drawing::Typeface::MakeFromFile(ZH_CN_TTF); in g_LoadZhCnTypeface() local 44 if (typeface == nullptr) { in g_LoadZhCnTypeface() 45 typeface = OHOS::Rosen::Drawing::Typeface::MakeDefault(); in g_LoadZhCnTypeface() 47 return typeface; in g_LoadZhCnTypeface()
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/texgine/texgine_drawing/src/ |
H A D | texgine_font_style_set.cpp | 55 RSTypeface* typeface = set_->CreateTypeface(index); in CreateTypeface() local 56 return std::make_shared<TexgineTypeface>(typeface); in CreateTypeface() 65 RSTypeface* typeface = set_->MatchStyle(style); in MatchStyle() local 66 return std::make_shared<TexgineTypeface>(typeface); in MatchStyle()
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/transaction/ |
H A D | rs_interfaces.cpp | 245 bool RSInterfaces::RegisterTypeface(std::shared_ptr<Drawing::Typeface>& typeface) in RegisterTypeface() argument 258 bool result = renderServiceClient_->RegisterTypeface(typeface); in RegisterTypeface() 261 typeface->GetUniqueID()); in RegisterTypeface() 263 RSTypefaceCache::Instance().CacheDrawingTypeface(globalUniqueId, typeface); in RegisterTypeface() 265 if (typeface != nullptr) { in RegisterTypeface() 267 typeface->GetFamilyName().c_str(), typeface->GetUniqueID()); in RegisterTypeface() 274 typeface->GetUniqueID()); in RegisterTypeface() 276 RSTypefaceCache::Instance().CacheDrawingTypeface(globalUniqueId, typeface); in RegisterTypeface() 280 bool RSInterfaces::UnRegisterTypeface(std::shared_ptr<Drawing::Typeface>& typeface) in UnRegisterTypeface() argument 283 bool result = renderServiceClient_->UnRegisterTypeface(typeface); in UnRegisterTypeface() [all …]
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/ndk/ndktypeface_fuzzer/ |
H A D | ndktypeface_fuzzer.cpp | 54 OH_Drawing_Typeface* typeface = OH_Drawing_TypefaceCreateDefault(); in NativeDrawingTypefaceTest001() local 79 OH_Drawing_TypefaceDestroy(typeface); in NativeDrawingTypefaceTest001() 102 OH_Drawing_Typeface* typeface = OH_Drawing_TypefaceCreateFromStream(memoryStream, streamIndex); in NativeDrawingTypefaceTest002() local 108 OH_Drawing_TypefaceDestroy(typeface); in NativeDrawingTypefaceTest002()
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/text/ |
H A D | text_blob.h | 89 explicit Context(std::shared_ptr<Typeface> typeface, bool isCustomTypeface) noexcept in Context() argument 90 : typeface_(typeface), isCustomTypeface_(isCustomTypeface) {} in Context() 97 void SetTypeface(std::shared_ptr<Typeface> typeface) in SetTypeface() argument 99 typeface_ = typeface; in SetTypeface()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/font/ |
H A D | rosen_font_collection.cpp | 97 sk_sp<SkTypeface> typeface = SkTypeface::MakeFromStream(std::move(font_stream)); in LoadFontFromList() local 100 font_provider.RegisterTypeface(typeface); in LoadFontFromList() 102 font_provider.RegisterTypeface(typeface, familyName); in LoadFontFromList() 140 sk_sp<SkTypeface> typeface = SkTypeface::MakeFromStream(std::move(font_stream)); in LoadThemeFont() local 143 font_provider.RegisterTypeface(typeface); in LoadThemeFont() 145 font_provider.RegisterTypeface(typeface, familyName); in LoadThemeFont()
|