diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/skia/windows-typeface-directwrite.patch.0 | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | external/skia/windows-typeface-directwrite.patch.0 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/external/skia/windows-typeface-directwrite.patch.0 b/external/skia/windows-typeface-directwrite.patch.0 new file mode 100644 index 000000000..56e8209ce --- /dev/null +++ b/external/skia/windows-typeface-directwrite.patch.0 @@ -0,0 +1,48 @@ +--- ./include/ports/SkTypeface_win.h ++++ ./include/ports/SkTypeface_win.h +@@ -75,5 +75,13 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontM + */ + SK_API sk_sp<SkRemotableFontMgr> SkRemotableFontMgr_New_DirectWrite(); + ++struct IDWriteFontFace; ++struct IDWriteFont; ++struct IDWriteFontFamily; ++SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily); ++ + #endif // SK_BUILD_FOR_WIN + #endif // SkTypeface_win_DEFINED +--- ./src/ports/SkFontMgr_win_dw.cpp ++++ ./src/ports/SkFontMgr_win_dw.cpp +@@ -320,6 +320,10 @@ private: + + friend class SkFontStyleSet_DirectWrite; + friend class FontFallbackRenderer; ++ friend SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily); + }; + + class SkFontStyleSet_DirectWrite : public SkFontStyleSet { +@@ -1215,6 +1219,18 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory, + defaultFamilyName, defaultFamilyNameLen); + } + ++SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily) ++{ ++ SkFontMgr_DirectWrite* mgr = dynamic_cast<SkFontMgr_DirectWrite*>(fontMgr.get()); ++ if(!mgr) ++ return nullptr; ++ sk_sp<SkTypeface> typeface = mgr->makeTypefaceFromDWriteFont(fontFace, font, fontFamily); ++ return typeface.release(); ++} ++ + #include "include/ports/SkFontMgr_indirect.h" + SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontMgr> proxy) { + sk_sp<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); |