Get windows version to compile (fonts dont work)
This commit is contained in:
parent
40c64eab62
commit
60d6ac4494
2 changed files with 26 additions and 3 deletions
16
conanfile.py
16
conanfile.py
|
|
@ -33,6 +33,22 @@ class CompressorRecipe(ConanFile):
|
|||
"use_system_libwebp": False, # There's a problem compiling libwebp with emscripten in conan
|
||||
"use_conan_libwebp": False
|
||||
})
|
||||
elif self.settings.os == "Windows":
|
||||
self.requires("skia/143.20251028.0", options = {
|
||||
"use_system_expat": False,
|
||||
"use_freetype": False,
|
||||
"use_system_harfbuzz": True,
|
||||
"use_conan_harfbuzz": True,
|
||||
"use_system_icu": True,
|
||||
"use_conan_icu": True,
|
||||
"use_system_libjpeg_turbo": False,
|
||||
"use_system_libpng": False,
|
||||
"use_system_libwebp": False,
|
||||
"use_system_zlib": False,
|
||||
"enable_svg": True,
|
||||
"enable_skottie": False,
|
||||
"enable_bentleyottmann": True # for some reason, setting this to False results in an error when creating the project
|
||||
})
|
||||
else:
|
||||
self.requires("skia/143.20251028.0", options = {
|
||||
"use_system_expat": False,
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
#include "FontData.hpp"
|
||||
#include <include/ports/SkFontMgr_directory.h>
|
||||
#include <include/ports/SkFontMgr_empty.h>
|
||||
#include <include/core/SkFontMetrics.h>
|
||||
#include <include/core/SkTextBlob.h>
|
||||
#include <iostream>
|
||||
|
||||
#ifndef __EMSCRIPTEN__
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <include/ports/SkFontMgr_directory.h>
|
||||
#elif _WIN32
|
||||
#else
|
||||
#include <include/ports/SkFontMgr_fontconfig.h>
|
||||
#include <include/ports/SkFontScanner_FreeType.h>
|
||||
#include <include/ports/SkFontMgr_directory.h>
|
||||
#endif
|
||||
|
||||
#include <src/base/SkUTF.h>
|
||||
|
|
@ -16,11 +19,15 @@ FontData::FontData()
|
|||
{
|
||||
#ifdef __EMSCRIPTEN__
|
||||
localFontMgr = SkFontMgr_New_Custom_Empty();
|
||||
defaultFontMgr = SkFontMgr_New_Custom_Directory("data/fonts");
|
||||
#elif _WIN32
|
||||
localFontMgr = SkFontMgr_New_Custom_Empty();
|
||||
defaultFontMgr = SkFontMgr_New_Custom_Empty();
|
||||
#else
|
||||
localFontMgr = SkFontMgr_New_FontConfig(nullptr, SkFontScanner_Make_FreeType());
|
||||
defaultFontMgr = SkFontMgr_New_Custom_Directory("data/fonts");
|
||||
#endif
|
||||
|
||||
defaultFontMgr = SkFontMgr_New_Custom_Directory("data/fonts");
|
||||
|
||||
map["Roboto"] = defaultFontMgr->makeFromFile("data/fonts/Roboto-variable.ttf");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue