Skip to content

compat.freetype: the rest of upstream's base extensions and ftbzip2 - #589

Merged
Sunrisepeak merged 1 commit into
mainfrom
compat-freetype-base-extensions
Oct 27, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
compat-freetype-base-extensions

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

compat.freetype built only part of upstream's base extensions (modules.cfg BASE_EXTENSIONS, CMakeLists.txt BASE_SRCS). The public declarations of ftstroke.h, ftgasp.h, t1tables.h (FT_Get_PS_Font_Info …), ftbdf.h, ftcid.h, ftpfr.h, ftwinfnt.h, FT_Get_FSType_Flags, FT_Face_CheckTrueTypePatents, the validation entry points and FT_Stream_OpenBzip2 therefore linked to nothing. Every distribution builds them. A consumer only notices when it calls one, as cairo did with ftsynth.c (#311).

The gap showed up while wrapping the whole FreeType API as C++ modules (mcpplibs.mwrap.freetype, mcpplibs/freetype-m). The stroker is part of that API.

  • pkgs/c/compat.freetype.lua adds src/base/{ftbdf,ftcid,ftfstype,ftgasp,ftgxval,ftotval,ftpatent,ftpfr,ftstroke,fttype1,ftwinfnt}.c and src/bzip2/ftbzip2.c. The list now matches upstream's BASE_SRCS (2.13.3 and 2.15.0 both have these files). The configuration is unchanged: without the gxvalid/otvalid modules and libbz2, the validation and bzip2 entry points return FT_Err_Unimplemented_Feature, as in upstream's default build.
  • tests/examples/freetype calls each newly built translation unit once: it strokes a path and makes each face-level query with a null face.

Local: bash tests/run_members.sh freetype passes (gcc 16.1.0, Linux).

…gasp, fttype1, ftbdf, ftcid, ftpfr, ftwinfnt, ftfstype, ftpatent, ftgxval, ftotval) and ftbzip2
@Sunrisepeak
Sunrisepeak merged commit 0469654 into main Oct 27, 2026
21 checks passed
@Sunrisepeak
Sunrisepeak deleted the compat-freetype-base-extensions branch October 27, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant