Skip to content

text: only a font's Unicode cmaps (ü drew as ¸ in Menlo on iOS/tvOS) - #187

Open
proggeramlug wants to merge 1 commit into
mainfrom
fix/font-unicode-cmap
Open

proggeramlug wants to merge 1 commit into
mainfrom
fix/font-unicode-cmap

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

fontdue merges every cmap subtable of a font, later ones overwriting earlier ones. Menlo (/System/Library/Fonts/CoreUI/Menlo.ttc, the iOS/tvOS monospace) has a Unicode table followed by a legacy Mac Roman one, so U+00FC "ü" took Mac Roman byte 0xFC (the cedilla "¸") and "ä" took 0xE4 ("‰"). In the Chesslings app German buttons read "Zur¸ck" and "Men¸".

load_font now hands fontdue a copy whose cmap header lists only the Unicode encoding records (platform 0, or 3 with encoding 0/1/10). Fonts that have no Unicode map, or only Unicode maps, are passed through unchanged (no copy).

Test: cmap_tests::mac_roman_cmap_does_not_override_unicode (uses macOS's Menlo, same cmap layout as the iOS one; skipped where the file is missing).

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1b53ba4-2fdf-4af1-be6f-18103186db34
Commits

Reviewing files that changed from the base of the PR and between bcae9c2 and 022aea0.

Files selected for processing: 1

  • native/shared/src/text_renderer.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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