Skip to content

text-freetype2: Rebuild file text after antialiasing changes (#484) - #711

Merged
zackees merged 3 commits into
masterfrom
fix/484-text-aa-file-glyphs
Oct 14, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/484-text-aa-file-glyphs

Conversation

@zackees

@zackees zackees commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Fixes #484
Refs #686

Fix by @chriscoveries (chriscoveries/obsrust-fork fix/text-freetype-aa-file-glyphs), cherry-picked with -x, authorship kept.

Toggling antialiasing on a file-backed text source cleared the glyph texture but did not mark the vertex buffer for rebuild, so unchanged file text vanished.

Test font

test/cmocka/data/text-aa.ttf (1000 bytes) keeps the test independent of installed fonts. Its outlines are rectangles written in text-aa.py (no third-party glyph data, repository licence). The generator now runs through uv (#!/usr/bin/env -S uv run --script, fonttools pinned in PEP 723 metadata) and regenerates the font byte for byte (uv run test/cmocka/data/text-aa.py then cmp: identical). It is committed rather than generated at test time because the Tier 2 images have no uv or fonttools.

RED → GREEN

  • RED (rust/tools/linux-validate/run.sh, OFF and ON): test_text_aa_file FAILED: unchanged_file_glyphs_survive_aa, unchanged_file_vertices_follow_aa.
  • GREEN: 202/202 OFF and ON, exported symbols IDENTICAL (1766). ./lint ok. Linux-only test (Fontconfig backend).

chriscoveries and others added 2 commits October 14, 2026 01:13
Pins fonttools in PEP 723 metadata; the script regenerates the committed
font byte for byte.
@zackees

zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

Duplicate of #712 (same #484 test from chriscoveries' branch). Note this branch's diff has no change to plugins/text-freetype2/text-freetype2.c, only the test and data, so it would merge a failing test. #712 carries the one-line fix (vbuf_needs_update = true on an antialiasing change) and is red→green on Tier 2. Suggest closing this one.

@zackees

zackees commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

The first CI run failed because the pushed head lacked the GREEN commit; it was picked onto the wrong local branch. 895dc4c adds it. Re-verified locally: 202/202 OFF and ON.

@zackees
zackees merged commit d7f3e94 into master Oct 14, 2026
21 checks passed
@zackees
zackees deleted the fix/484-text-aa-file-glyphs branch October 14, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: text-freetype2: toggling Antialiasing blanks characters in "Read from file" text

2 participants