Skip to content

Commit

Permalink
[freetype] add subpixel-rendering feature (#37443)
Browse files Browse the repository at this point in the history
  • Loading branch information
abique authored Mar 26, 2024
1 parent fe39c3c commit 0475ca4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ports/freetype/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if("subpixel-rendering" IN_LIST FEATURES)
set(SUBPIXEL_RENDERING_PATCH "subpixel-rendering.patch")
endif()

vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO freetype/freetype2
Expand All @@ -9,6 +13,7 @@ vcpkg_from_sourceforge(
brotli-static.patch
bzip2.patch
fix-exports.patch
${SUBPIXEL_RENDERING_PATCH}
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
13 changes: 13 additions & 0 deletions ports/freetype/subpixel-rendering.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 1976b33af959..b3425e55feec 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -123,7 +123,7 @@ FT_BEGIN_HEADER
* When this macro is not defined, FreeType offers alternative LCD
* rendering technology that produces excellent output.
*/
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING


/**************************************************************************
4 changes: 4 additions & 0 deletions ports/freetype/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "freetype",
"version": "2.13.2",
"port-version": 1,
"description": "A library to render fonts.",
"homepage": "https://www.freetype.org/",
"license": "FTL OR GPL-2.0-or-later",
Expand Down Expand Up @@ -42,6 +43,9 @@
"libpng"
]
},
"subpixel-rendering": {
"description": "Enables subpixel rendering."
},
"zlib": {
"description": "Use zlib instead of internal library for DEFLATE",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2834,7 +2834,7 @@
},
"freetype": {
"baseline": "2.13.2",
"port-version": 0
"port-version": 1
},
"freetype-gl": {
"baseline": "2022-01-17",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/freetype.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "60a5a2596ec865db746a7ea741458322cf0cc2bc",
"version": "2.13.2",
"port-version": 1
},
{
"git-tree": "443f320ccf3139bc1818f0cc273944a56e960d6e",
"version": "2.13.2",
Expand Down

0 comments on commit 0475ca4

Please sign in to comment.