generated from emilk/eframe_template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CJK font #71
Merged
Merged
Add CJK font #71
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What's the licensing on the font? |
SIL Open Font License. It means if the font is embedded into an application like this or embedded in a document or artwork then it can be distributed without attribution or the license, but if the font file itself is distributed then the license has to be distributed with it. |
melody-rs
approved these changes
Dec 2, 2023
5 tasks
melody-rs
pushed a commit
to melody-rs/Luminol
that referenced
this pull request
Dec 3, 2023
* feat: add Source Han Sans (for displaying CJK characters) * perf: compress fonts to reduce binary size
melody-rs
added a commit
that referenced
this pull request
Dec 3, 2023
* chore: use universal set of lints across crates * chore: 🚨 auto-fix most warnings * chore: disable panic and unwrap lints for now * chore: 🚨 fix wasily fixable warnings * refactor(image cache): ♻️ add basic egui texture loader * fix(image cache): 🐛 handle image load errors semi-gracefully * fix(image cache): 🐛 clear up the difference between uris and paths * refactor(image cache): ♻️ drop the use of multiple bind groups for one monolithic bind group * refactor(graphics): ♻️ remove pervasive passing of push constant support * fix(tilemap): 🐛 fix various shader and bind group issues * refactor(tilemap): ♻️ don't pass viewports around constantly * fix(tilemap): 🐛 fix the collision shader crashing * refactor: ♻️ remove all uses of retainedimage * fix(image cache): 🐛 fix loading errors & textures not being srgb * fix(image cache): 🐛 fix srgb weirdness * fix(image cache): 🐛 properly unload textures * refactor(image cache): 🔥 remove TextureLoader and add BytesLoader instead * refactor: ♻️ Rename atlas cache to atlas loader * fix: 🚨 fix compile error on wasm * Add CJK font (#71) * feat: add Source Han Sans (for displaying CJK characters) * perf: compress fonts to reduce binary size * rustfmt * fix(tilemap): 🐛 fix collision shader on native I don't know how I missed this, but the collision shader still expected there to be a bind group when we weren't passing one! --------- Co-authored-by: 刘皓 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds Source Han Sans Regular as a fallback font for egui so that Chinese, Japanese and Korean text can be rendered. egui's default font is still used for text that it supports.
The font file is the regular font from "Static Language Specific OTCs" (SourceHanSansOTC.zip) in version 2.004R, which despite its name is one file that contains all languages but only the regular font weight.
Testing
The KNight-Blade example game for RPG Maker XP has a lot of Japanese text in the scripts and event names. It should display now instead of showing as placeholder box characters.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
cargo build --release
trunk build --release