Skip to content

Fix table column misalignment in GUI Emacs#170

Merged
dnouri merged 1 commit intomasterfrom
fix/table-font-alignment
Mar 17, 2026
Merged

Fix table column misalignment in GUI Emacs#170
dnouri merged 1 commit intomasterfrom
fix/table-font-alignment

Conversation

@dnouri
Copy link
Copy Markdown
Owner

@dnouri dnouri commented Mar 17, 2026

Inline markdown faces like md-ts-code inherit from fixed-pitch, which uses a different font than the default face in GUI Emacs. Since table padding is character-counted but rendering is pixel-based, columns drifted whenever a cell contained styled text like backtick literals.

This resolves each face in table display strings to an anonymous plist that retains only visual attributes (foreground, weight, slant) and drops font-identity ones (family, height). All table text now renders in the buffer's default font; colors survive.

Follows up on #167.

Inline markdown faces (e.g. md-ts-code) inherit from fixed-pitch,
which uses a different font than the default face.  Since padding
is character-counted but rendering is pixel-based, columns drifted
whenever a cell contained styled text like backtick literals.

Resolve each face in table display strings to an anonymous plist
that retains only visual attributes (foreground, weight, slant)
and drops font-identity ones (family, height).  All table text
now renders in the buffer's default font; colors survive.

Follows up on #167.
@dnouri dnouri merged commit 643ff93 into master Mar 17, 2026
11 checks passed
@dnouri dnouri deleted the fix/table-font-alignment branch March 17, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant