Skip to content

Conversation

@SteelCrab
Copy link
Contributor

@SteelCrab SteelCrab commented Jan 11, 2026

Description

Add Korean/CJK character support with Noto Sans KR fallback font.

Fixes #7

Type of Change

  • Bug fix
  • New feature

Changes Made

  • Add NotoSansKR-Regular.ttf as fallback font for Korean characters
  • Configure fallback chains in src/fonts.rs

Checklist

  • cargo fmt - no changes
  • cargo clippy - no warnings
  • cargo build --release - success

@OlaProeis
Copy link
Owner

Thanks for this fix! The implementation looks solid.

One concern: the Noto Sans KR font adds ~15.7 MB to the binary size. Would you be open to trying a system font fallback approach first?

For example, on most systems there are already CJK fonts installed:

  • Windows: "Microsoft YaHei", "Malgun Gothic"
  • macOS: "PingFang SC", "Apple SD Gothic Neo"
  • Linux: "Noto Sans CJK" (if installed)

We could try those as fallbacks before bundling a font. If no system font is available, THEN we could consider bundling a subset or the full font.

What do you think?

@SteelCrab
Copy link
Contributor Author

@OlaProeis #8 (comment)
I agree. Using system fonts seems like a better approach. :)

@SteelCrab SteelCrab changed the title feat: add Korean/CJK character support with Noto Sans KR fallback font feat: add CJK character support with Noto Sans KR fallback font Jan 11, 2026
@SteelCrab
Copy link
Contributor Author

introduced the font-kit library to enable direct loading of local fonts installed in the OS (e.g. Apple SD Gothic Neo, Malgun Gothic) at runtime.

@SteelCrab SteelCrab changed the title feat: add CJK character support with Noto Sans KR fallback font feat: support multi-region CJK fonts (KR, SC, JP) using native system fonts Jan 11, 2026
@OlaProeis
Copy link
Owner

This is fantastic! Thank you for reworking the PR to use system fonts

The multi-region support (Korean, Chinese, Japanese) is a great bonus, and the implementation looks solid with proper fallback handling.

One small thing: there's a duplicate test_korean.md in the root directory (the one in test_md/ folder is probably the intended location). Could you remove the root-level one, or should I do it after merge?

OlaProeis added a commit that referenced this pull request Jan 11, 2026
Bug Fixes:
- CJK character rendering (#7) - system font fallback (PR #8 by @SteelCrab)
- Undo/redo behavior (#5) - scroll, focus, cursor restoration
- UTF-8 tree viewer crash - safe string slicing for multi-byte chars
- Misleading code folding UI (#12) - hide indicators by default

CLI Improvements:
- Command-line file opening (#9) - ferrite file.md
- Version/help flags (#10) - -V/--version and -h/--help
- Configurable log level (#11) - --log-level flag and config setting

UX Improvements:
- Default view mode setting (#3) - choose Raw/Rendered/Split for new tabs

Performance:
- Large file editing - deferred syntax highlighting
- Scroll performance - galley caching for instant colors

Docs:
- CLI reference (docs/cli.md)
- Technical docs for log level, default view mode, code folding UI
OlaProeis added a commit that referenced this pull request Jan 11, 2026
Bug Fixes:
- CJK character rendering (#7) - system font fallback (PR #8 by @SteelCrab)
- Undo/redo behavior (#5) - scroll, focus, cursor restoration
- UTF-8 tree viewer crash - safe string slicing for multi-byte chars
- Misleading code folding UI (#12) - hide indicators by default

CLI Improvements:
- Command-line file opening (#9) - ferrite file.md
- Version/help flags (#10) - -V/--version and -h/--help
- Configurable log level (#11) - --log-level flag and config setting

UX Improvements:
- Default view mode setting (#3) - choose Raw/Rendered/Split for new tabs

Performance:
- Large file editing - deferred syntax highlighting
- Scroll performance - galley caching for instant colors

Docs:
- CLI reference (docs/cli.md)
- Technical docs for log level, default view mode, code folding UI
@OlaProeis OlaProeis merged commit 884ce91 into OlaProeis:master Jan 11, 2026
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.

[Bug] Korean/CJK characters not displaying correctly

2 participants