Skip to content

Conversation

@pmenzel
Copy link
Collaborator

@pmenzel Paul Menzel (pmenzel) commented Oct 13, 2026 •

Update with sudo bee update freetype-2.15.0-0.

AI disclaimer: Drafted and assisted by claude-opus-5.5 (Claude Code) and reviewed by Paul Menzel (@pmenzel).

Same SONAME (libfreetype.so.6) and the same NEEDED set as 2.10.4, so it is a drop-in replacement.

The release tarball does not ship the fonts FreeType’s own test suite needs, so this adds scripts/smoke-tests/freetype-smoke-test, which checks an installed package against the previous version, or with --prefix an image directory or unpacked package.

Smoke test summary

Run with --prefix on the released freetype-2.15.0-0.x86_64.bee.tar.bz2, whose BUILD is this branch’s freetype.be0: PASS (0 failed, 0 warned).

  • Library: SONAME libfreetype.so.6, no RPATH/RUNPATH, NEEDED libbz2.so.1.0, libpng16.so.16, libz.so.1, libharfbuzz.so.0, libbrotlidec.so.0.6.0 – configure drops these silently when it does not find them.
  • Configuration from mee_patch: FT_CONFIG_OPTION_SUBPIXEL_RENDERING set, FT_Library_SetLcdFilter returns 0, all 18 modules present including gxvalid and otvalid.
  • Build against it: a test program compiles through freetype2.pc, and library and headers both report 2.15.0.
  • Fonts: one TrueType, CFF and Type 1 font each from /usr/share/fonts (chosen by fontconfig’s format, not by file name extension, and never from $HOME) renders to an LCD bitmap, the TrueType one also through the gzip and bzip2 streams; fc-scan parses it.
  • Negative check: a stock 2.15.0 build without mee_patch fails with 4 failures (SUBPIXEL_RENDERING, gxvalid, otvalid, LCD filter).

Rendering compared with a reference

Every font is also rendered – a fixed text in 10 to 48 px, grayscale and LCD with light hinting, and monochrome – and compared with a released package or image directory (--reference) or an earlier run (--reference-images). By default, the reference is the last installed release: the installed FreeType if it is older than the tested one, and else the last release before it in the git history of freetype.be0 (2.10.4-1 for 2.15.0). With $DISPLAY set, a viewer shows them (overlay, blink, difference, stacked row by row, zoom), with the reference and why it was chosen in its status line. Differences are informational and do not fail the test.

Font vs. installed 2.10.4 vs. 2.14.3-0
FantasqueSansMono-Bold.ttf (TrueType) 18331 pixels (1.97 %) 0
Cantarell-Bold.otf (CFF) 18647 pixels (1.92 %) 0
UTBI____.pfa (Type 1) 22049 pixels (2.49 %) 0

Against 2.10.4, the CFF and Type 1 fonts are pixel-identical in grayscale, LCD differs by at most two levels along all edges, and monochrome hinting moves single pixels. The TrueType font also differs in grayscale and LCD, but beyond three levels only in diacritics (dots on i/j, umlauts, acute and grave accents, cedilla): light hinting runs TrueType fonts through the auto-hinter, which since 2.14.0 “can now better separate diacritic glyphs from base glyphs at small sizes by artificially moving diacritics up (or down) if necessary” (docs/CHANGES). That is also why 2.14.3 and 2.15.0 render identically. A 10x20.pcf.gz bitmap font passed with --font renders identically to 2.10.4.

$ scripts/smoke-tests/freetype-smoke-test
$ scripts/smoke-tests/freetype-smoke-test --prefix …/freetype-2.15.0-0
$ scripts/smoke-tests/freetype-smoke-test --prefix …/freetype-2.15.0-0 \
    --reference /src/mariux/beeroot/packages/freetype-2.14.3-0.x86_64.bee.tar.bz2

Manually tested on maleficent. Only very minor difference in umlaut dots and accents compared to version 2.10.4.

The upstream archive was downloaded from

    https://download.savannah.gnu.org/releases/freetype/freetype-2.15.0.tar.xz

Its SHA256 checksum matches the one in the release announcement:

    93cd47eb719c325107f2d3cf087d06299e944c3b48a40b55537302304dea1dd5

and the signature `freetype-2.15.0.tar.xz.sig` is a good one from
Werner Lemberg (key E30674707856409FF1948010BE6C3AAC63AD8E3F).

From the announcement:

> CHANGES BETWEEN 2.14.3 and 2.15.0 (2026-Oct-12)
>
>   I. IMPORTANT CHANGES
>
>   - Support for the ISO Open Font  Format, Edition 5 (released in July
>     2026) has been contributed by  Behdad Esfahbod, […]
>
>     . The  new  'VARC' table  allows  a  file  size reduction  of  CJK
>       Variation fonts by up to 90%.
>
>     . OpenType fonts with  more than 65536 glyphs can  now be handled.
>       […]
>
>     . The new 'GLYF' table also supports outlines with mixed cubic and
>       conic segments.
>
>   - The anti-aliased rasterizer now uses dynamic heap memory for large
>     glyphs,  which  significantly improves  its performance  at  sizes
>     above 40 ppem.
>
>   - The  TrueType   version  40  interpreter  got   several  ClearType
>     rendering  improvements. […]
>
>   II. IMPORTANT BUG FIXES
>
>   - Continued efforts to scrutinize FreeType with AI tools resulted in
>     more bugs  being fixed, some with  potential security implications
>     (e.g., CVE-2026-95512).

The SONAME stays `libfreetype.so.6` (now `libfreetype.so.6.20.7`), and
the library links against the same libraries as 2.10.4 (bzip2, libpng,
zlib, HarfBuzz, Brotli). The validators gxvalid and otvalid are built
in, and `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is defined, as before.

Built with fakeroot beesh on hotelcalifornia from a local copy of the
tarball, and again from beehive after mirroring. A test program
renders an LCD glyph with the new library, and `fc-scan` works with it.

Assisted-by: claude-opus-5.5 (Claude Code)
The sed in `mee_patch` also tries to uncomment

    #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2

with a single space, but ftoption.h never had such a line: in 2.10.4
the line is already active and has two spaces,

    #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2

and in 2.15.0, where the v38 interpreter is gone, it has no value
at all:

    #define TT_CONFIG_OPTION_SUBPIXEL_HINTING

So that alternative matches nothing; it came in with the update to 2.7
in 2016. Only keep the one for `FT_CONFIG_OPTION_SUBPIXEL_RENDERING`.

The installed ftoption.h of freetype-2.15.0-0 is byte-identical with
and without the change, and the package has the same file list; built
with fakeroot beesh on hotelcalifornia, this time from beehive.

Assisted-by: claude-opus-5.5 (Claude Code)
FreeType's test suite needs font files the release tarball does not
ship, so add a script that checks an installed freetype package, or
with `--prefix` the image directory of an uninstalled build:

- SONAME `libfreetype.so.6`, no RPATH/RUNPATH, and NEEDED entries for
  bzip2, libpng, zlib, HarfBuzz, and Brotli -- configure drops each of
  them silently, when it does not find them.
- `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` defined in ftoption.h, and
  `FT_Library_SetLcdFilter()` returning 0 at run time.
- All driver modules, including gxvalid and otvalid, which only
  `mee_patch` enables.
- A test program compiled through freetype2.pc, whose run-time library
  version has to match the headers, renders a glyph with ink for an LCD
  from a TrueType, a CFF, and a Type 1 font of the host, and from
  gzip and bzip2 copies of the TrueType font opened through FreeType's
  stream wrappers. Missing font formats are reported as WARN.
- `fc-scan` parses a font with the library.

The checks pass for freetype-2.15.0-0 (with `--prefix`) and for the
installed freetype 2.10.4. A stock 2.15.0 build without `mee_patch`
fails, as it should:

    FAIL  #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING MISSING from ftoption.h
    FAIL  module gxvalid MISSING
    FAIL  module otvalid MISSING
    FAIL  FT_Library_SetLcdFilter returns 7 -- built without SUBPIXEL_RENDERING
    FAIL  /etc/hostname: open error 2

(the last one from `--font /etc/hostname`).

Assisted-by: claude-opus-5.5 (Claude Code)
The file name extension does not tell the font format: the SyrCOM*.otf
fonts on our hosts, for instance, have TrueType outlines. The CFF check
only ran on a CFF font because the alphabetically first .otf file,
GohaTibebZemen.otf, happens to be one. Ask fontconfig for the format
instead, which is what FT_Get_Font_Format reports.

    $ smoke-tests/freetype-smoke-test --prefix .../freetype-2.15.0-0
    […]
    OK    /usr/share/fonts/Fantasque-Sans-Mono/FantasqueSansMono-Bold.ttf: TrueType Fantasque Sans Mono Bold: U+0067 as 69x33 LCD bitmap
    OK    /usr/share/fonts/X11/OTF/GohaTibebZemen.otf: CFF Goha-Tibeb Zemen Regular: U+1200 as 66x27 LCD bitmap
    OK    /usr/share/fonts/X11/Type1/UTBI____.pfa: Type 1 Utopia Bold Italic: U+0067 as 96x38 LCD bitmap
    […]
    PASS (0 failed, 0 warned), files in …/run8

Assisted-by: claude-opus-5.5 (Claude Code)
Whether glyphs come out right, only a human can tell. So the FreeType
smoke test now renders a fixed text with every font, in 10 to 48 px,
grayscale and LCD with light hinting (fontconfig's hintslight) and
monochrome, and compares it with a reference:

*   the installed FreeType by default with --prefix,
*   --reference, an image directory, / or a released .bee.tar.bz2, and
*   --reference-images, the --out directory of an earlier run.

The same test program is built against the reference, and
FREETYPE_PROPERTIES is unset for both runs. Overlay (reference red, new
cyan), difference and side-by-side images are written to --out/compare,
and with $DISPLAY set, a Tk viewer shows them with blinking and zoom
(--no-view to skip). Differences are reported as INFO and do not fail
the test, as new versions change the rendering on purpose.

Fonts covering German are preferred now, so the sample text is not all
.notdef boxes, as it was with the Ethiopic GohaTibebZemen.otf.

Compared with the installed 2.10.4, the released freetype-2.15.0-0
renders the CFF and Type 1 fonts identically in grayscale, LCD differs
by at most two levels along all edges, and monochrome hinting moves
single pixels. The TrueType font also differs in grayscale and LCD, but
beyond three levels only in diacritics: light hinting runs TrueType
fonts through the auto-hinter, which since 2.14.0 moves diacritics away
from the base glyph at small sizes:

    $ smoke-tests/freetype-smoke-test --prefix .../freetype-2.15.0-0
    […]
    OK    /usr/share/fonts/Fantasque-Sans-Mono/FantasqueSansMono-Bold.ttf: TrueType Fantasque Sans Mono Bold: U+0067 as 69x33 LCD bitmap
    OK    /usr/share/fonts/cantarell/Cantarell-Bold.otf: CFF Cantarell Bold: U+0067 as 75x37 LCD bitmap
    OK    /usr/share/fonts/X11/Type1/UTBI____.pfa: Type 1 Utopia Bold Italic: U+0067 as 96x38 LCD bitmap
    […]
    OK    freetype2.pc of the reference / reports 23.4.17
    OK    test program compiles against freetype2.pc of the reference /
    INFO  FantasqueSansMono-Bold.ttf: 18331 pixels (1.97 %) differ from 2.10.4 (/)
    INFO  Cantarell-Bold.otf: 18647 pixels (1.92 %) differ from 2.10.4 (/)
    INFO  UTBI____.pfa: 22049 pixels (2.49 %) differ from 2.10.4 (/)
    […]
    PASS (0 failed, 0 warned), files in …

With `--reference .../freetype-2.14.3-0.x86_64.bee.tar.bz2`, all three
fonts differ in 0 pixels, and a 10x20.pcf.gz bitmap font passed with
--font renders one strike per mode.

Assisted-by: claude-opus-5.5 (Claude Code)
The script passes `__doc__` as the argparse description, but the text is
a comment, so `__doc__` is None and `--help` shows none:

    $ smoke-tests/freetype-smoke-test --help
    usage: freetype-smoke-test [-h] [--prefix DIR] [--font FILE] [--out DIR]
                               [--reference DIR|PACKAGE] [--reference-images DIR]
                               [--no-view]

    options:
      -h, --help            show this help message and exit
    […]

Make the comment the module docstring, raw because of the backslash in
the last example, and keep its layout with RawDescriptionHelpFormatter.

Assisted-by: claude-opus-5.5 (Claude Code)
The script lives in scripts/smoke-tests/, but its usage examples, now
also shown by `--help`, start it from smoke-tests/:

    $ smoke-tests/freetype-smoke-test
    bash: smoke-tests/freetype-smoke-test: No such file or directory

Add the scripts/ prefix, and wrap the one example that grows to 80
characters.

Assisted-by: claude-opus-5.5 (Claude Code)
fc-list also lists the fonts in the home directory of whoever runs the
test, and as the candidates are sorted by path, /home/… wins over
/usr/…. On *maleficent* the test picked a private Microsoft Sans Serif
copy:

    OK    /home/pmenzel/.fonts/WLM-dialog: TrueType Microsoft Sans Serif Regular: U+0067 as 72x37 LCD bitmap

Only consider fonts from packages, so the result does not depend on the
user; --font still adds any other font. With a font in ~/.fonts of a
test home directory, the test now picks the packaged font again:

    $ HOME=…/fakehome scripts/smoke-tests/freetype-smoke-test
    […]
    OK    /usr/share/fonts/Fantasque-Sans-Mono/FantasqueSansMono-Bold.ttf: TrueType Fantasque Sans Mono Bold: U+0067 as 69x33 LCD bitmap

Assisted-by: claude-opus-5.5 (Claude Code)
Without --prefix, the FreeType smoke test had no reference, so on
*maleficent*, which already runs 2.15.0, every view of the viewer showed
the same image, and only the terminal said why:

    $ scripts/smoke-tests/freetype-smoke-test
    […]
    INFO  WLM-dialog: no reference, sample in /scratch/local/freetype-smoke-3rzwodhm/new/WLM-dialog.png

bee only records the installed packages, not the ones they replaced. So
when nothing is given, use the installed FreeType if it is older than
the tested one, and else the last release before the tested one in the
git history of freetype.be0, which is what got installed, unlike some
packages in /src/mariux/beeroot/packages (2.12.1 to 2.14.3 were never
in git). The test reports the reference and why it was chosen, and the
viewer shows it in the status line, as well as why there is none:

    reference (red): FreeType 2.10.1 (freetype-2.10.1-0, the last release before 2.10.4)
    new (cyan): FreeType 2.10.4 (installed), 23 pixels (0.00 %) differ, zoom 1x

    reference: none, the releases are unknown outside a bee-files checkout -- only the new rendering is shown, pass --reference DIR|PACKAGE to compare

With 2.15.0 installed and no --prefix, as on *maleficent*, the reference
is freetype-2.10.4-1 (checked by replacing header_version), and with
--prefix and the installed 2.10.4 it stays the installed one:

    $ scripts/smoke-tests/freetype-smoke-test --prefix …/freetype-2.15.0-0
    […]
    INFO  reference /: the installed one
    […]
    PASS (0 failed, 0 warned), files in …

Assisted-by: claude-opus-5.5 (Claude Code)
The `s` view of the FreeType smoke test viewer never put the renderings
side by side, as a 48 px line is already about 1700 px wide, but the
whole reference image above the whole new one. That needs scrolling
down a full image to see the second, and as the images were pasted
with their label margin into a canvas without it, the last 72 pixels of
every line were cut off.

Call it stacked, and stack row by row instead: every row of the
reference, labelled `ref`, right above the same row of the new
rendering, labelled `new`, so the pairs are on the first screen. The
key help says so:

    [o]verlay  [b]link  space: flip  [d]ifference  [s]tacked (reference above new)  [n]ew  [r]eference  +/-: zoom  left/right: font  [q]uit

The written images are named *-stacked.png now, and are as wide as the
overlay ones (1812 px for Cantarell-Bold.otf) and twice as high.

Assisted-by: claude-opus-5.5 (Claude Code)
@pmenzel Paul Menzel (pmenzel) merged commit 4ef0d86 into master Oct 14, 2026
@pmenzel Paul Menzel (pmenzel) deleted the update-freetype-from-2.10.4-to-2.15.0 branch October 14, 2026 15:44
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant