Skip to content

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 ?

Copy link
Contributor

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?

image

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

#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?

Signed-off-by: Ben Chamberland <[email protected]>
@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.

@bernie-laberge bernie-laberge changed the title Add Noto font so that RV can render Mandarin characters [DO NOT MERGE] - Add Noto font so that RV can render Mandarin characters Jun 27, 2025
@cedrik-fuoco-adsk cedrik-fuoco-adsk marked this pull request as draft June 27, 2025 16:15
@cedrik-fuoco-adsk cedrik-fuoco-adsk added the do not merge Do not merge the PR label Jun 27, 2025
@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title [DO NOT MERGE] - Add Noto font so that RV can render Mandarin characters Add Noto font so that RV can render Mandarin characters Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants