NanoMichael / MicroTeX

A dynamic, cross-platform, and embeddable LaTeX rendering library
MIT License
399 stars 66 forks source link

SKIA rendering not support HDPI #158

Closed LiuPeiqiCN closed 10 months ago

LiuPeiqiCN commented 10 months ago

image

When the BUILD_SKIA option is enabled, the rendering quality degrades significantly on high-DPI displays, leading to noticeable aliasing or jagged edges in the rendered graphics.

NanoMichael commented 10 months ago

Which branch (openmath/master) do you use?

LiuPeiqiCN commented 10 months ago

master currently. I'm attempting to work with the "openmath" branch, but I'm unable to successfully compile it. Skia requires support for SkParagraph, which cannot be directly built using vcpkg. I'm still in the process of trying to compile it.

compile options:

-D GDI=ON `
-D QT=ON `
-D SKIA=ON `
`
-D BUILD_STATIC=ON `
-D BUILD_EXAMPLE_QT=ON `
-D BUILD_EXAMPLE_QTPNG=ON `
-D BUILD_EXAMPLE_WIN32=ON `
compile log ``` Build started... 1>------ Build started: Project: microtex-skia, Configuration: Debug x64 ------ 1> Creating library E:/Build/MicroTeX/build_win_x64_static/platform/skia/Debug/microtex-skia.lib and object E:/Build/MicroTeX/build_win_x64_static/platform/skia/Debug/microtex-skia.exp 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>graphic_skia.obj : error LNK2019: unresolved external symbol "public: __cdecl skia::textlayout::FontCollection::FontCollection(void)" (??0FontCollection@textlayout@skia@@QEAA@XZ) referenced in function "class sk_sp __cdecl sk_make_sp(void)" (??$sk_make_sp@VFontCollection@textlayout@skia@@$$V@@YA?AV?$sk_sp@VFontCollection@textlayout@skia@@@@XZ) 1>graphic_skia.obj : error LNK2019: unresolved external symbol "public: void __cdecl skia::textlayout::FontCollection::setDefaultFontManager(class sk_sp)" (?setDefaultFontManager@FontCollection@textlayout@skia@@QEAAXV?$sk_sp@VSkFontMgr@@@@@Z) referenced in function "class sk_sp __cdecl `anonymous namespace'::getSkFontCollection(void)" (?getSkFontCollection@?A0xa2e8ef64@@YA?AV?$sk_sp@VFontCollection@textlayout@skia@@@@XZ) 1>graphic_skia.obj : error LNK2019: unresolved external symbol "public: void __cdecl skia::textlayout::FontCollection::enableFontFallback(void)" (?enableFontFallback@FontCollection@textlayout@skia@@QEAAXXZ) referenced in function "class sk_sp __cdecl `anonymous namespace'::getSkFontCollection(void)" (?getSkFontCollection@?A0xa2e8ef64@@YA?AV?$sk_sp@VFontCollection@textlayout@skia@@@@XZ) 1>graphic_skia.obj : error LNK2019: unresolved external symbol "public: __cdecl skia::textlayout::ParagraphStyle::ParagraphStyle(void)" (??0ParagraphStyle@textlayout@skia@@QEAA@XZ) referenced in function "public: __cdecl microtex::TextLayout_skia::TextLayout_skia(class std::basic_string,class std::allocator > const &,enum microtex::FontStyle,float)" (??0TextLayout_skia@microtex@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4FontStyle@1@M@Z) 1>graphic_skia.obj : error LNK2019: unresolved external symbol "public: static class std::unique_ptr > __cdecl skia::textlayout::ParagraphBuilder::make(struct skia::textlayout::ParagraphStyle const &,class sk_sp)" (?make@ParagraphBuilder@textlayout@skia@@SA?AV?$unique_ptr@VParagraphBuilder@textlayout@skia@@U?$default_delete@VParagraphBuilder@textlayout@skia@@@std@@@std@@AEBUParagraphStyle@23@V?$sk_sp@VFontCollection@textlayout@skia@@@@@Z) referenced in function "public: __cdecl microtex::TextLayout_skia::TextLayout_skia(class std::basic_string,class std::allocator > const &,enum microtex::FontStyle,float)" (??0TextLayout_skia@microtex@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4FontStyle@1@M@Z) 1>graphic_skia.obj : error LNK2001: unresolved external symbol "private: static class std::vector > const * const skia::textlayout::TextStyle::kDefaultFontFamilies" (?kDefaultFontFamilies@TextStyle@textlayout@skia@@0PEBV?$vector@VSkString@@V?$allocator@VSkString@@@std@@@std@@EB) 1>E:\Build\MicroTeX\build_win_x64_static\Debug\microtex-skia.dll : fatal error LNK1120: 6 unresolved externals ```