Otok public index

apotocki/freetype

FreeType, the font rasterizer.

Library
freetype
Newest
2.13.3 (r1, linux)
Targets
linux, windows
License
FTL OR GPL-2.0-or-later
Homepage
https://freetype.org
Keywords
font, truetype, rasterizer

Use it

In otok.toml:

[deps.freetype]
recipe = "apotocki/freetype"
version = "~> 2.13.3"

Versions

VersionTargetChannelPublishedStatus
2.13.3 (r1, linux) linux stable 2026-11-07
2.13.3 (r1, windows) windows stable 2026-11-07

2.13.3 (r1, linux)

Platforms

linux

Toolchains

Recipe files

build.lua 617 bytes · raw
-- FreeType's CMake project without its optional dependencies. What it installs: libfreetype.a, or libfreetype.so with
-- its links (libfreetyped in debug); the headers in include/freetype2/.
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 lib = otok.glob(slice.linkage == "static" and "lib/libfreetype*.a" or "lib/libfreetype*.so", p)[1]
    return { libraries = { freetype = lib }, headers = p .. "/include/freetype2" }
end
patches/0001-t42-activate-created-size.patch 539 bytes · raw
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 1052 bytes · raw
# The otok recipe of FreeType (https://github.com/apotocki/otok): libfreetype for Linux, from the release tag,
# 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 = ["linux"]
build-on = ["linux/gcc", "linux/clang"]

[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }

[[product]]
name = "FreeType"
libraries = ["freetype"]