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

support non Latin characters #36

Open
johndoe71rus opened this issue May 12, 2023 · 7 comments
Open

support non Latin characters #36

johndoe71rus opened this issue May 12, 2023 · 7 comments

Comments

@johndoe71rus
Copy link

add support non Latin characters.

Снимок экрана_2023-05-12_14-46-33

@zecruel
Copy link
Owner

zecruel commented May 12, 2023

In Config File, you can change the default interface font to one that has the character set you want.

See more at https://github.com/zecruel/CadZinho/wiki/Translations.

I take the opportunity to encourage contributions in the translation of the interface.

@johndoe71rus
Copy link
Author

droidsans used for default system font.
but not work for CadZinho. appImarge 0.3.0
Снимок экрана_2023-05-15_10-12-08

@zecruel
Copy link
Owner

zecruel commented May 15, 2023

Hi @johndoe71rus.

The DoidSans.ttf font was not loaded successfully, so the default internal font was used. This is a screenshot of the interface with that font:
image

The reasons for the font not loading could be:

  1. The path indicated in font_path variable must contain the .ttf files directly, without subfolders. In your case the path could look like: font_path = "/usr/share/fonts/TTF/DroidSans/"
  2. The font name in fonts and ui_font variables needs to be exactly the file name (in Linux it is case sensitive). Usually fonts are named in a family, where each file can have a variation in name, eg DroidSans-regular.ttf or DroidSans-bold.ttf

Font configuration is a topic that needs improvement in CadZinho. The challenge is to define a method that is portable across multiple platforms. Even on Linux, depending on the distribution, there are different paths and settings.

Warning: DroidSans font doesn't support non-latin characters (at least the one I downloaded). As an example, the font NotoSans-regular.ttf with Cyrillic support (I don't know if this is your case):
image

@johndoe71rus
Copy link
Author

johndoe71rus commented May 15, 2023

my DroidSans support Cyrillic
Снимок экрана_2023-05-15_15-47-15

but font path with subfolders.
Снимок экрана_2023-05-15_15-44-27
I wanted to focus on the names of files and folders in explorer

@zecruel
Copy link
Owner

zecruel commented May 15, 2023

Try to change fonts_path in config to /usr/share/fonts/droid/

File and folder names in explorer will likely be fixed

@johndoe71rus
Copy link
Author

specify an additional path. now it works.
Снимок экрана_2023-05-16_09-52-07

But I think you should consider including subfolders. I looked at 2 different distributions, /usr/share/fonts/ contains subfolders.

@zecruel
Copy link
Owner

zecruel commented May 16, 2023

You can reduce font size from 11 to 10, to better rendering (I need to improve this 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

No branches or pull requests

2 participants