-
Notifications
You must be signed in to change notification settings - Fork 189
Add Noto font so that RV can render Mandarin characters #518
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
base: main
Are you sure you want to change the base?
Add Noto font so that RV can render Mandarin characters #518
Conversation
#ifndef __NOTO_H__ | ||
#define __NOTO_H__ | ||
|
||
extern const unsigned char notoFont[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a link to where this font is coming from.
Is it https://fonts.google.com/noto/specimen/Noto+Sans+SC ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chxmberland @bernie-laberge - From the header of the file, it appears the noto.cpp file is indeed "Noto Sans SC" (Simplified Chinese). It should contain regular latin, cyrilic, greek letters as well as Hangul (modern Korean) Hiragana/Katakana (Japanese, but is missing Kanji symbols).
This font file has interesting support for asian languages, but, there may be a better choice?
https://fonts.google.com/noto/specimen/Noto+Sans+Mono
The full Noto Sans Mono contains glyph support for up to 775 languages and 236 regions and I believe is a superset of Noto Sans SC. It's surely a beefer of a font file, but, if we want to add international characters, wouldn't the full font file be a better choice?
// | ||
//****************************************************************************** | ||
|
||
#ifndef __NOTO_H__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use #pragma once
instead
(When RV was created, I don't think they could use it, which is why they used this older method)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! You are so inclusive @chxmberland :D
This may be a non related question, |
Signed-off-by: Ben Chamberland <[email protected]>
Signed-off-by: Ben Chamberland <[email protected]>
3e8e566
to
03b4e41
Compare
It doesn't look like it. The annotation tool does not yet detect non-English keyboard options. |
Thank you for your reply! Really wish that could be fixed too. |
Linked issues
N/A
Summarize your change.
A new font has been added to RV's UI with the capability to render Latin and Mandarin characters.
Describe the reason for the change.
RV uses hardcoded fonts for it's the UI. The existing fonts did not have the capability to render mandarin characters, so a new font (Google Noto) needed to be added to give RV the capability of rendering mandarin glyphs.
Describe what you have tested and on which operating system.
macOS Sonoma 14.5.
Add a list of changes, and note any that might need special attention during the review.
A change that should be ignored is in
noto.cpp
, which contains a byte array of attf
file. This is how RV consumes fonts.If possible, provide screenshots.
Before:
After: