Home
last modified time | relevance | path

Searched refs:Typeface (Results 1 – 25 of 91) sorted by relevance

1234

/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/text/
H A Dtypeface.cpp26 std::shared_ptr<Typeface> Typeface::MakeDefault() in MakeDefault()
31 std::shared_ptr<Typeface> Typeface::MakeFromFile(const char path[], int index) in MakeFromFile()
41 std::vector<std::shared_ptr<Typeface>> Typeface::GetSystemFonts() in GetSystemFonts()
51 std::shared_ptr<Typeface> Typeface::MakeFromName(const char familyName[], FontStyle fontStyle) in MakeFromName()
117 std::shared_ptr<Typeface> Typeface::MakeClone(const FontArguments& args) const in MakeClone()
149 std::shared_ptr<Typeface> Typeface::Deserialize(const void* data, size_t size) in Deserialize()
159 void Typeface::RegisterCallBackFunc(std::function<bool(std::shared_ptr<Typeface>)> func) in RegisterCallBackFunc()
164 std::function<bool(std::shared_ptr<Typeface>)>& Typeface::GetTypefaceRegisterCallBack() in GetTypefaceRegisterCallBack()
170 void Typeface::UnRegisterCallBackFunc(std::function<bool(std::shared_ptr<Typeface>)> func) in UnRegisterCallBackFunc()
175 std::function<bool(std::shared_ptr<Typeface>)>& Typeface::GetTypefaceUnRegisterCallBack() in GetTypefaceUnRegisterCallBack()
[all …]
H A Dfont.cpp28 Font::Font(std::shared_ptr<Typeface> typeface, scalar size, scalar scaleX, scalar skewX) in Font()
63 void Font::SetTypeface(std::shared_ptr<Typeface> typeface) in SetTypeface()
113 std::shared_ptr<Typeface> Font::GetTypeface() const in GetTypeface()
207 std::shared_ptr<Typeface> currentTypeface = GetTypeface(); in GetFallbackFont()
208 std::shared_ptr<Typeface> fallbackTypeface = nullptr; in GetFallbackFont()
210 fallbackTypeface = std::shared_ptr<Typeface>(fontMgr->MatchFamilyStyleCharacter(nullptr, in GetFallbackFont()
213 std::shared_ptr<Typeface> defaultTypeface = Typeface::MakeDefault(); in GetFallbackFont()
214 …fallbackTypeface = std::shared_ptr<Typeface>(fontMgr->MatchFamilyStyleCharacter(nullptr, defaultTy… in GetFallbackFont()
H A Dfont_mgr.cpp37 Typeface* FontMgr::LoadDynamicFont(const std::string& familyName, const uint8_t* data, size_t dataL… in LoadDynamicFont()
45 Typeface* FontMgr::LoadThemeFont(const std::string& familyName, const std::string& themeName, in LoadThemeFont()
54 void FontMgr::LoadThemeFont(const std::string& themeName, std::shared_ptr<Typeface> typeface) in LoadThemeFont()
63 Typeface* FontMgr::MatchFamilyStyleCharacter(const char familyName[], const FontStyle& fontStyle, in MatchFamilyStyleCharacter()
81 Typeface* FontMgr::MatchFamilyStyle(const char familyName[], const FontStyle& fontStyle) const in MatchFamilyStyle()
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/skia_adapter/
H A Dskia_font_test.cpp50 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
63 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
77 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
91 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
105 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
119 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
133 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
147 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
161 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
182 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault();
[all …]
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/text/
H A Dtypeface.h32 class DRAWING_API Typeface {
34 explicit Typeface(std::shared_ptr<TypefaceImpl> typefaceImpl) noexcept;
35 virtual ~Typeface() = default;
37 static std::shared_ptr<Typeface> MakeDefault();
38 static std::shared_ptr<Typeface> MakeFromFile(const char path[], int index = 0);
44 static std::function<bool(std::shared_ptr<Typeface>)>& GetTypefaceRegisterCallBack();
46 static std::vector<std::shared_ptr<Typeface>> GetSystemFonts();
93 std::shared_ptr<Typeface> MakeClone(const FontArguments&) const;
99 static std::shared_ptr<Typeface> Deserialize(const void* data, size_t size);
134 static std::function<bool(std::shared_ptr<Typeface>)> registerTypefaceCallBack_;
[all …]
H A Dfont_mgr.h69Typeface* LoadDynamicFont(const std::string& familyName, const uint8_t* data, size_t dataLength);
79 Typeface* LoadThemeFont(const std::string& familyName, const std::string& themeName,
87 void LoadThemeFont(const std::string& themeName, std::shared_ptr<Drawing::Typeface> typeface);
99 Typeface* MatchFamilyStyleCharacter(const char familyName[], const FontStyle& fontStyle,
125 Typeface* MatchFamilyStyle(const char familyName[], const FontStyle& fontStyle) const;
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/drawing_ndk/src/
H A Ddrawing_typeface.cpp67 static const Typeface* CastToTypeface(const OH_Drawing_Typeface* cTypeface) in CastToTypeface()
69 return reinterpret_cast<const Typeface*>(cTypeface); in CastToTypeface()
87 !Typeface::GetTypefaceRegisterCallBack()(typeface)) { in RegisterAndConvertTypeface()
98 std::shared_ptr<Typeface> typeface = g_LoadZhCnTypeface(); in OH_Drawing_TypefaceCreateDefault()
114 std::shared_ptr<Typeface> typeface = Typeface::MakeFromFile(path, index); in OH_Drawing_TypefaceCreateFromFile()
121 Drawing::Typeface::GetTypefaceRegisterCallBack() != nullptr) { in OH_Drawing_TypefaceCreateFromFile()
122 bool ret = Drawing::Typeface::GetTypefaceRegisterCallBack()(typeface); in OH_Drawing_TypefaceCreateFromFile()
148 const Typeface* currentTypeface = CastToTypeface(cCurrentTypeface); in OH_Drawing_TypefaceCreateFromCurrent()
169 std::shared_ptr<Typeface> typeface = Typeface::MakeFromStream(std::move(memoryStream), index); in OH_Drawing_TypefaceCreateFromStream()
173 if (Drawing::Typeface::GetTypefaceRegisterCallBack() != nullptr) { in OH_Drawing_TypefaceCreateFromStream()
[all …]
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/unittest/text/
H A Dtypeface_test.cpp80 auto typeface = std::make_shared<Typeface>(nullptr);
93 auto typeface = std::make_shared<Typeface>(nullptr);
106 auto typeface = std::make_shared<Typeface>(nullptr);
120 auto typeface = std::make_shared<Typeface>(nullptr);
133 auto typeface = std::make_shared<Typeface>(nullptr);
146 auto typeface = std::make_shared<Typeface>(nullptr);
159 auto typeface = Typeface::MakeDefault();
173 auto typeface = Typeface::MakeDefault();
189 auto typeface = Typeface::MakeDefault();
202 auto typeface = std::make_shared<Typeface>(nullptr);
[all …]
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text/adapter/skia_txt/
H A Dfont_collection.cpp55 if (Drawing::Typeface::GetTypefaceUnRegisterCallBack() == nullptr) { in ~FontCollection()
61 Drawing::Typeface::GetTypefaceUnRegisterCallBack()(typeface); in ~FontCollection()
81 bool FontCollection::RegisterTypeface(std::shared_ptr<Drawing::Typeface> typeface) in RegisterTypeface()
83 if (!typeface || !Drawing::Typeface::GetTypefaceRegisterCallBack()) { in RegisterTypeface()
91 if (!Drawing::Typeface::GetTypefaceRegisterCallBack()(typeface)) { in RegisterTypeface()
99 std::shared_ptr<Drawing::Typeface> FontCollection::LoadFont( in LoadFont()
102 …std::shared_ptr<Drawing::Typeface> typeface(dfmanager_->LoadDynamicFont(familyName, data, datalen)… in LoadFont()
111 static std::shared_ptr<Drawing::Typeface> CreateTypeFace(const uint8_t *data, size_t datalen) in CreateTypeFace()
115 return Drawing::Typeface::MakeFromStream(std::move(stream)); in CreateTypeFace()
120 std::shared_ptr<Drawing::Typeface> FontCollection::LoadThemeFont( in LoadThemeFont()
[all …]
H A Dfont_collection.h42 std::shared_ptr<Drawing::Typeface> LoadFont(
44 std::shared_ptr<Drawing::Typeface> LoadThemeFont(
47 bool RegisterTypeface(std::shared_ptr<Drawing::Typeface> typeface) override;
53 std::unordered_map<uint32_t, std::shared_ptr<Drawing::Typeface>> typefaces_;
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/
H A Dskia_typeface.cpp138 return std::make_shared<Typeface>(typefaceImpl); in MakeClone()
168 std::shared_ptr<Typeface> SkiaTypeface::MakeDefault() in MakeDefault()
176 return std::make_shared<Typeface>(typefaceImpl); in MakeDefault()
188 return std::make_shared<Typeface>(typefaceImpl); in MakeFromFile()
212 return std::make_shared<Typeface>(typefaceImpl); in MakeFromFile()
215 std::vector<std::shared_ptr<Typeface>> SkiaTypeface::GetSystemFonts() in GetSystemFonts()
221 std::vector<std::shared_ptr<Typeface>> typefaces; in GetSystemFonts()
245 return std::make_shared<Typeface>(typefaceImpl); in MakeFromStream()
258 return std::make_shared<Typeface>(typefaceImpl); in MakeFromName()
271 auto customTypeface = std::make_shared<Typeface>(typefaceImpl); in SerializeTypeface()
[all …]
H A Dskia_typeface.h51 std::shared_ptr<Typeface> MakeClone(const FontArguments& args) const override;
56 static std::shared_ptr<Typeface> MakeDefault();
57 static std::shared_ptr<Typeface> MakeFromFile(const char path[], int index);
58 …static std::shared_ptr<Typeface> MakeFromFile(const char path[], const FontArguments& fontArgument…
59 …static std::shared_ptr<Typeface> MakeFromStream(std::unique_ptr<MemoryStream> memoryStream, int32_…
60 static std::shared_ptr<Typeface> MakeFromName(const char familyName[], FontStyle fontStyle);
61 static std::vector<std::shared_ptr<Typeface>> GetSystemFonts();
66 static std::shared_ptr<Typeface> Deserialize(const void* data, size_t size);
H A Dskia_font_mgr.h42Typeface* LoadDynamicFont(const std::string& familyName, const uint8_t* data, size_t dataLength) o…
43 Typeface* LoadThemeFont(const std::string& familyName, const std::string& themeName,
45 void LoadThemeFont(const std::string& themeName, std::shared_ptr<Typeface> typeface) override;
47 Typeface* MatchFamilyStyleCharacter(const char familyName[], const FontStyle& fontStyle,
52 Typeface* MatchFamilyStyle(const char familyName[], const FontStyle& fontStyle) const override;
H A Dskia_static_factory.h45 static std::shared_ptr<Typeface> MakeDefault();
46 static std::shared_ptr<Typeface> MakeFromFile(const char path[], int index);
47 …static std::shared_ptr<Typeface> MakeFromFile(const char path[], const FontArguments& fontArgument…
48 …static std::shared_ptr<Typeface> MakeFromStream(std::unique_ptr<MemoryStream> memoryStream, int32_…
49 static std::shared_ptr<Typeface> MakeFromName(const char familyName[], FontStyle fontStyle);
50 static std::vector<std::shared_ptr<Typeface>> GetSystemFonts();
71 static std::shared_ptr<Typeface> DeserializeTypeface(const void* data, size_t size);
H A Dskia_font_mgr.cpp110 Typeface* SkiaFontMgr::LoadDynamicFont(const std::string& familyName, const uint8_t* data, size_t d… in LoadDynamicFont()
129 return new Typeface(typefaceImpl); in LoadDynamicFont()
132 void SkiaFontMgr::LoadThemeFont(const std::string& themeName, std::shared_ptr<Typeface> typeface) in LoadThemeFont()
149 Typeface* SkiaFontMgr::LoadThemeFont(const std::string& familyName, const std::string& themeName, in LoadThemeFont()
170 return new Typeface(typefaceImpl); in LoadThemeFont()
176 Typeface* SkiaFontMgr::MatchFamilyStyleCharacter(const char familyName[], const FontStyle& fontStyl… in MatchFamilyStyleCharacter()
192 return new Typeface(typefaceImpl); in MatchFamilyStyleCharacter()
210 Typeface* SkiaFontMgr::MatchFamilyStyle(const char familyName[], const FontStyle& fontStyle) const in MatchFamilyStyle()
224 return new Typeface(typefaceImpl); in MatchFamilyStyle()
H A Dskia_font_style_set.cpp32 Typeface* SkiaFontStyleSet::CreateTypeface(int index) in CreateTypeface()
43 return new Typeface(typefaceImpl); in CreateTypeface()
69 Typeface* SkiaFontStyleSet::MatchStyle(const FontStyle& pattern) in MatchStyle()
82 return new Typeface(typefaceImpl); in MatchStyle()
H A Dskia_static_factory.cpp51 std::shared_ptr<Typeface> SkiaStaticFactory::MakeDefault() in MakeDefault()
56 std::shared_ptr<Typeface> SkiaStaticFactory::MakeFromFile(const char path[], int index) in MakeFromFile()
61 std::shared_ptr<Typeface> SkiaStaticFactory::MakeFromFile(const char path[], const FontArguments& f… in MakeFromFile()
66 std::shared_ptr<Typeface> SkiaStaticFactory::MakeFromStream(std::unique_ptr<MemoryStream> memoryStr… in MakeFromStream()
71 std::shared_ptr<Typeface> SkiaStaticFactory::MakeFromName(const char familyName[], FontStyle fontSt… in MakeFromName()
76 std::vector<std::shared_ptr<Typeface>> SkiaStaticFactory::GetSystemFonts() in GetSystemFonts()
146 std::shared_ptr<Typeface> SkiaStaticFactory::DeserializeTypeface(const void* data, size_t size) in DeserializeTypeface()
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/fuzztest/draw/typeface_fuzzer/
H A Dtypeface_fuzzer.cpp41 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); in TypefaceFuzzTest001()
74 std::shared_ptr<Typeface> typeface = Typeface::MakeFromFile(path, length); in TypefaceFuzzTest002()
102 std::shared_ptr<Typeface> typeface = Typeface::MakeFromStream(std::move(memoryStream), index); in TypefaceFuzzTest003()
121 std::shared_ptr<Typeface> typeface = Typeface::MakeDefault(); in TypefaceFuzzTest004()
174 std::shared_ptr<Typeface> typeface = Typeface::MakeFromName(familyName, fontStyle); in TypefaceFuzzTest005()
/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/font_napi/
H A Djs_typeface.cpp92 napi_value JsTypeface::CreateJsTypeface(napi_env env, const std::shared_ptr<Typeface> typeface) in CreateJsTypeface()
120 std::shared_ptr<Typeface> JsTypeface::LoadZhCnTypeface() in LoadZhCnTypeface()
122 std::shared_ptr<Typeface> typeface = Typeface::MakeFromFile(ZH_CN_TTF); in LoadZhCnTypeface()
124 typeface = Typeface::MakeDefault(); in LoadZhCnTypeface()
129 std::shared_ptr<Typeface> JsTypeface::GetTypeface() in GetTypeface()
160 auto rawTypeface = Typeface::MakeFromFile(text.c_str()); in MakeFromFile()
168 Drawing::Typeface::GetTypefaceRegisterCallBack() != nullptr) { in MakeFromFile()
169 bool ret = Drawing::Typeface::GetTypefaceRegisterCallBack()(rawTypeface); in MakeFromFile()
H A Djs_typeface.h31 explicit JsTypeface(std::shared_ptr<Typeface> typeface) : m_typeface(typeface) {}; in JsTypeface()
37 static napi_value CreateJsTypeface(napi_env env, const std::shared_ptr<Typeface> typeface);
42 static std::shared_ptr<Typeface> LoadZhCnTypeface();
44 std::shared_ptr<Typeface> GetTypeface();
50 std::shared_ptr<Typeface> m_typeface = nullptr;
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/impl_interface/
H A Dfont_mgr_impl.h33 …virtual Typeface* LoadDynamicFont(const std::string& familyName, const uint8_t* data, size_t dataL…
34 virtual Typeface* LoadThemeFont(const std::string& familyName, const std::string& themeName,
36 … virtual void LoadThemeFont(const std::string& themeName, std::shared_ptr<Typeface> typeface) = 0;
38 virtual Typeface* MatchFamilyStyleCharacter(const char familyName[], const FontStyle& fontStyle,
43 … virtual Typeface* MatchFamilyStyle(const char familyName[], const FontStyle& fontStyle) const = 0;
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/ui/
H A Drs_root_node.cpp33 std::function<bool (std::shared_ptr<Drawing::Typeface>)> registerTypefaceFunc = in RegisterTypefaceCallback()
34 [] (std::shared_ptr<Drawing::Typeface> typeface) -> bool { in RegisterTypefaceCallback()
38 Drawing::Typeface::RegisterCallBackFunc(registerTypefaceFunc); in RegisterTypefaceCallback()
40 std::function<bool (std::shared_ptr<Drawing::Typeface>)> unregisterTypefaceFunc = in RegisterTypefaceCallback()
41 [] (std::shared_ptr<Drawing::Typeface> typeface) -> bool { in RegisterTypefaceCallback()
45 Drawing::Typeface::UnRegisterCallBackFunc(unregisterTypefaceFunc); in RegisterTypefaceCallback()
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/
H A Dstatic_factory.h45 static std::shared_ptr<Typeface> MakeDefault();
46 static std::shared_ptr<Typeface> MakeFromFile(const char path[], int index);
47 …static std::shared_ptr<Typeface> MakeFromFile(const char path[], const FontArguments& fontArgument…
48 …static std::shared_ptr<Typeface> MakeFromStream(std::unique_ptr<MemoryStream> memoryStream, int32_…
49 static std::shared_ptr<Typeface> MakeFromName(const char familyName[], FontStyle fontStyle);
50 static std::vector<std::shared_ptr<Typeface>> GetSystemFonts();
71 static std::shared_ptr<Typeface> DeserializeTypeface(const void* data, size_t size);
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_engine/unittest/rosen_text/adapter/skia_txt/
H A Dfont_collection_test.cpp54 auto typeface = OHOS::Rosen::Drawing::Typeface::MakeDefault();
55 …OHOS::Rosen::Drawing::Typeface::RegisterCallBackFunc([](std::shared_ptr<OHOS::Rosen::Drawing::Type… in __anone0d62bb60102()
59 …OHOS::Rosen::Drawing::Typeface::RegisterCallBackFunc([](std::shared_ptr<OHOS::Rosen::Drawing::Type… in __anone0d62bb60202()
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/texgine/src/
H A Dfont_parser.cpp174 int FontParser::ParseCmapTable(std::shared_ptr<Drawing::Typeface> typeface, FontParser::FontDescrip… in ParseCmapTable()
205 int FontParser::ParseNameTable(std::shared_ptr<Drawing::Typeface> typeface, FontParser::FontDescrip… in ParseNameTable()
272 int FontParser::ParseTable(std::shared_ptr<Drawing::Typeface> typeface, FontParser::FontDescriptor&… in ParseTable()
299 auto typeface = Drawing::Typeface::MakeFromFile(path); in SetFontDescriptor()
396 std::vector<std::shared_ptr<Drawing::Typeface>> typefaces = Drawing::Typeface::GetSystemFonts(); in GetSystemFonts()
403 std::vector<std::shared_ptr<Drawing::Typeface>> typefaces; in ParserFontDescriptorsFromPath()
405 std::shared_ptr<Drawing::Typeface> typeface = nullptr; in ParserFontDescriptorsFromPath()
406 while ((typeface = Drawing::Typeface::MakeFromFile(path.c_str(), index)) != nullptr) { in ParserFontDescriptorsFromPath()
414 const std::vector<std::shared_ptr<Drawing::Typeface>>& typefaces, const std::string& locale) in CreateFontDescriptors()
453 auto typeface = Drawing::Typeface::MakeFromFile(path.c_str()); in ParseFontDescriptor()
[all …]

1234