apotocki/freetype 2.13.3 (r1, windows)
- Library
- freetype
- Variant
- windows, target windows
- Channel
- stable
- Published
- 2026-11-07
- Recipe source
- https://github.com/otok-dev/recipes.git
32756a87cf5bd189ca4c9825159bf0713ea8cf5einrecipes/freetype/2.13/windows/ - Recipe SHA-256
53a456d2e514a76d56d49af98dca5192d9b2b0e3b51a31c29f1cf7a44c6c4421
Recipe files changed
Inputs
| source.commit | 42608f77f20749dd6ddc9e0536788eaad70ea4b5 |
|---|---|
| source.git | https://gitlab.freedesktop.org/freetype/freetype.git |
| source.tag | VER-2-13-3 |
Platforms
windows
Toolchains
cmake { default-recipe = "apotocki/cmake", version = ">= 3.20" }ninja { default-recipe = "apotocki/ninja", version = ">= 1.10" }
Recipe files
build.lua
-- FreeType's CMake project without its optional dependencies. What it installs: freetype.lib, or freetype.lib with
-- freetype.dll, freetyped in debug; the headers in
-- include/freetype2/.
-- freetype2.pc names the library -lfreetype, also freetyped of a debug build: the file's name, so that
-- pkg-config's consumers (meson) link it
local function fix_pkg_config(p, lib)
local pc = p .. "/lib/pkgconfig/freetype2.pc"
local name = lib:match("([^/]+)%.lib$")
if not otok.exists(pc) then return end
local text, n = otok.read(pc):gsub("%-lfreetype%f[%s]", "-l" .. name)
assert(n > 0, "freetype2.pc no longer links -lfreetype")
otok.write(pc, text)
end
function build(slice, options, deps)
otok.cmake{ defines = { FT_DISABLE_ZLIB = true, FT_DISABLE_BZIP2 = true, FT_DISABLE_PNG = true, FT_DISABLE_HARFBUZZ = true,
FT_DISABLE_BROTLI = true } }
local p = slice.prefix
local dll = otok.glob("bin/freetype*.dll", p)[1]
if dll then
local link = otok.glob("lib/freetype*.lib", p)[1]
fix_pkg_config(p, link)
return { libraries = { freetype = { link = link, runtime = dll } }, headers = p .. "/include/freetype2" }
end
local lib = otok.glob("lib/freetype*.lib", p)[1]
fix_pkg_config(p, lib)
return { libraries = { freetype = lib }, headers = p .. "/include/freetype2" }
end
patches/0001-t42-activate-created-size.patch
The Type 42 driver activates the size it created only when FT_New_Size created it: on an error ttsize is
uninitialized, and FT_Activate_Size got it anyway.
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 7010ba8..406586e 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -510,9 +510,10 @@
error = FT_New_Size( t42face->ttf_face, &ttsize );
if ( !error )
+ {
t42size->ttsize = ttsize;
-
- FT_Activate_Size( ttsize );
+ FT_Activate_Size( ttsize );
+ }
return error;
}
recipe.toml
# The otok recipe of FreeType (https://github.com/apotocki/otok): freetype for Windows, from the release tag, with
# MSVC or with clang-cl across from Linux, without its optional dependencies (zlib of its own, no bzip2, libpng,
# HarfBuzz or Brotli); static or dynamic.
[recipe]
api = 1
library = "freetype"
name = "freetype"
version = "2.13.3"
revision = 1
license = "FTL OR GPL-2.0-or-later"
license-files = ["LICENSE.TXT", "docs/FTL.TXT", "docs/GPLv2.TXT"]
homepage = "https://freetype.org"
description = "FreeType, the font rasterizer."
keywords = ["font", "truetype", "rasterizer"]
linkage = ["static", "dynamic"]
[source]
git = "https://gitlab.freedesktop.org/freetype/freetype.git"
commit = "42608f77f20749dd6ddc9e0536788eaad70ea4b5"
tag = "VER-2-13-3"
patches = ["patches/0001-t42-activate-created-size.patch"]
[platforms]
supported = ["windows"]
build-on = ["windows/msvc", "linux/clang-cl"]
[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
[[product]]
name = "FreeType"
libraries = ["freetype"]