Skip to content

Select correct Noto Sans CJK font variant in stargraphic writer#4

Open
johnnyshields wants to merge 1 commit intomainfrom
stargraphic-cjk-noto-fonts
Open

Select correct Noto Sans CJK font variant in stargraphic writer#4
johnnyshields wants to merge 1 commit intomainfrom
stargraphic-cjk-noto-fonts

Conversation

@johnnyshields
Copy link
Contributor

Summary

  • Map the profile's cjk_encoding to the correct Noto Sans language variant (Noto Sans JP, Noto Sans SC, Noto Sans TC, Noto Sans KR) for Pango text rasterization in the stargraphic writer.
  • Replaces the old fc-list-based singleton font detection with a locale-driven lookup, reusing the existing CJK encoding configuration.
  • Fixes Han-unified codepoints rendering with the wrong glyph variant (e.g. Japanese vs Simplified Chinese forms of the same character).

Test plan

  • Verify stargraphic output with cjk_encoding: :ja uses Noto Sans JP
  • Verify stargraphic output with cjk_encoding: :zh uses Noto Sans SC
  • Verify stargraphic output with cjk_encoding: 'zh-TW' uses Noto Sans TC
  • Verify stargraphic output with cjk_encoding: :ko uses Noto Sans KR
  • Verify fallback to Noto Sans when no CJK encoding is set

🤖 Generated with Claude Code

Use the profile's cjk_encoding to select the language-appropriate
Noto Sans variant (JP, SC, TC, KR) for Pango text rasterization.
This ensures correct glyph rendering for Han-unified codepoints
where the same Unicode character has different visual forms per locale.

Replaces the old fc-list-based font detection singleton with a
locale-driven lookup from the existing CJK encoding configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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