Skip to content
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 Noto font so that RV can render Mandarin characters #518

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chxmberland
Copy link
Contributor

@chxmberland chxmberland commented Jul 18, 2024

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 a ttf file. This is how RV consumes fonts.

If possible, provide screenshots.

Before:

Snipaste_2024-07-11_11-20-11

After:

image

#ifndef __NOTO_H__
#define __NOTO_H__

extern const unsigned char notoFont[];
Copy link
Contributor

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 ?

//
//******************************************************************************

#ifndef __NOTO_H__
Copy link
Contributor

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)

Copy link
Contributor

@geffrak geffrak left a 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

@kohyuk91
Copy link

This may be a non related question,
but does this solve the 'only english' supported annotation text tool issue?

@chxmberland chxmberland force-pushed the fix/use-mandarin-compatible-font_SG-35809 branch from 3e8e566 to 03b4e41 Compare July 19, 2024 13:20
@chxmberland
Copy link
Contributor Author

This may be a non related question, but does this solve the 'only english' supported annotation text tool issue?

It doesn't look like it. The annotation tool does not yet detect non-English keyboard options.

@kohyuk91
Copy link

This may be a non related question, but does this solve the 'only english' supported annotation text tool issue?

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.

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.

4 participants