Skip to content

Commit f25384a

Browse files
authored
fix(freetype): 补 ftsynth.c——合成粗体/斜体 (#311)
上游把它编在 base 里,所有发行版都出;这里漏了,而这个缺口在有消费者调它之前 完全看不见——freetype 自己不调。 cairo 无条件调:cairo-ft-font.c:2443 在字体没有所要字重时调 FT_GlyphSlot_Embolden,没有任何 HAVE_ 守卫可关。所以拿这套 freetype 建 cairo 会在链接期得到两个未定义引用。加 freedesktop.cairo 时实测撞到的。 freetype 自己的测试成员照常绿。只改 pkgs/。
1 parent ad060ce commit f25384a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

pkgs/c/compat.freetype.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ package = {
5151
"*/src/base/ftbbox.c",
5252
-- Base extra (individual)
5353
"*/src/base/ftmm.c",
54+
-- Synthetic bold and oblique. Upstream builds it in `base` and
55+
-- every distribution ships it; it was missing here and the gap is
56+
-- invisible until a consumer calls it, because nothing in freetype
57+
-- itself does.
58+
--
59+
-- cairo does, unconditionally: `cairo-ft-font.c:2443` calls
60+
-- `FT_GlyphSlot_Embolden` when a font is asked for a weight it does
61+
-- not have, with no HAVE_ guard to turn off. So a cairo built
62+
-- against this freetype failed to LINK with two undefined
63+
-- references — measured while adding freedesktop.cairo.
64+
"*/src/base/ftsynth.c",
5465
-- Modules (aggregates)
5566
"*/src/autofit/autofit.c",
5667
"*/src/bdf/bdf.c",

0 commit comments

Comments
 (0)