Skip to content

feat(compat.harfbuzz): switch no-freetype for 14.3.0 (revision 2) - #860

Merged
Sunrisepeak merged 1 commit into
mainfrom
compat-harfbuzz-no-freetype
Nov 20, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
compat-harfbuzz-no-freetype

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

A feature, off by default (the default build is unchanged): no-freetype builds HarfBuzz without its FreeType backend.

With HAVE_FREETYPE, hb_font_create() reaches hb_ft_font_set_funcs through hb_font_set_funcs_using()'s table of backends (hb-font.cc), so every program that makes a font links all of FreeType, its core and every driver, even when it never names FreeType. A consumer whose fonts use HarfBuzz's own ot functions (the default, first in that table) can now turn the switch on and carry none of it. With the switch on, <hb-ft.h>'s functions are not defined.

The backend's HAVE_* defines move from cxxflags into a generated config.h read under HAVE_CONFIG_H (a command-line define could not be taken back); hb-config.hh still supplies every other default. Revision 2 on the three platform rows.

A feature, off by default, so the default build is the one it was. The
backend's HAVE_* defines move from cxxflags into a generated config.h, read
under HAVE_CONFIG_H (hb-config.hh still supplies every other default), and
the switch leaves them out (MCPP_FEATURE_NO_FREETYPE is defined for the
package's own units).

Why: with HAVE_FREETYPE, hb_font_create() reaches hb_ft_font_set_funcs through
hb_font_set_funcs_using()'s table of backends, so every program that makes a
font links all of FreeType (its core and every driver) whether or not it names
FreeType. A consumer whose fonts take HarfBuzz's own `ot` functions (the first
in that table, the default) turns the switch on and carries none of it; the
functions of <hb-ft.h> are then not defined.
@Sunrisepeak
Sunrisepeak merged commit f5593a3 into main Nov 20, 2026
21 checks passed
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