Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winbuild: Enable FT_CONFIG_OPTION_USE_HARFBUZZ #4915

Merged
merged 1 commit into from
Sep 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,15 @@ def cmd_msbuild(
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>": "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>", # noqa: E501
# freetype doesn't specify SDK version, MSBuild may guess incorrectly
'<PropertyGroup Label="Globals">': '<PropertyGroup Label="Globals">\n <WindowsTargetPlatformVersion>$(WindowsSDKVersion)</WindowsTargetPlatformVersion>', # noqa: E501
}
},
r"builds\windows\vc2010\freetype.user.props": {
"<UserDefines></UserDefines>": "<UserDefines>FT_CONFIG_OPTION_USE_HARFBUZZ</UserDefines>", # noqa: E501
"<UserIncludeDirectories></UserIncludeDirectories>": r"<UserIncludeDirectories>{dir_harfbuzz}\src</UserIncludeDirectories>", # noqa: E501
},
r"src/autofit/afshaper.c": {
# link against harfbuzz.lib once it becomes available
"#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ": '#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ\n#pragma comment(lib, "harfbuzz.lib")', # noqa: E501
},
},
"build": [
cmd_rmdir("objs"),
Expand Down Expand Up @@ -488,7 +496,7 @@ def build_pillow():
elif arg == "--no-imagequant":
disabled += ["libimagequant"]
elif arg == "--no-raqm":
disabled += ["harfbuzz", "fribidi", "libraqm"]
disabled += ["fribidi", "libraqm"]
elif arg.startswith("--depends="):
depends_dir = arg[10:]
elif arg.startswith("--python="):
Expand Down Expand Up @@ -562,6 +570,9 @@ def build_pillow():
"header": sum([header, msvs["header"], ["@echo on"]], []),
}

for k, v in deps.items():
prefs[f"dir_{k}"] = os.path.join(sources_dir, v["dir"])

print()

write_script(".gitignore", ["*"])
Expand Down