Page MenuHome

UI: always use international font
AcceptedPublic

Authored by Brecht Van Lommel (brecht) on Fri, Feb 14, 7:05 PM.

Details

Summary

This means Blender can display more text correctly without having to enable
user interface translation. Previously the quality of the font was lower,
but that has been fixed now.

The font files have now been ungzipped, which results in faster file loading
as Freetype can read only the parts of the file that it needs. In the release
package it will still be compressed.

This is a more limited version of D3705, not changing anything related to
translation.

Diff Detail

Repository
rB Blender
Branch
international-fonts (branched from master)
Build Status
Buildable 6628
Build 6628: arc lint + arc unit

Event Timeline

Leroy (Leroy) added a subscriber: Leroy (Leroy).EditedSat, Feb 15, 4:07 AM

@Brecht Van Lommel (brecht) In 2.8, if Translation is enabled, IME is also enabled. IME often conflicts with shortcuts (it's easy to make shortcuts unusable), so I usually don't enable translation. Does the international font have anything to do with Translation?(2.7x called international font, and 2.8 named translation? ). although my English is not good, it effectively avoids shortcut conflicts. and can you add the option of whether to enable the system IME in the future? thanks.

@Leroy (Leroy) this patch does not affect IME, that's still only enabled when Translation is on.

While this patch seems fine BLF_get_unifont & BLF_get_unifont_mono are still using BLI_file_ungzip_to_mem which could be replaced by BLI_file_read_binary_as_mem.


With larger fonts by default and avoiding compression, wouldn't it be better to have freetype load the files directly?

Could be handled in a separate patch.

This revision is now accepted and ready to land.Sat, Feb 15, 9:56 AM

@Leroy (Leroy) this patch does not affect IME, that's still only enabled when Translation is on.

Love you so much:D

@Leroy (Leroy) - In 2.8, if Translation is enabled, IME is also enabled...so I usually don't enable translation.

Do you mind elaborating a bit more about this? It is my understanding that IME is only turned on if translation is enabled AND a language is selected that uses IME (Chinese, Japanese, Korean). Are you using one of these languages? If so, are you also saying that there are times when you would like to manually enable/disable IME?

With this patch, it just means that, by default and without turning on "Translations", all users would be able to see almost all international characters. So a user with "English" selected would always be able to see Chinese characters, for example. Ideally we would be removing the "Translation" checkbox entirely. And then IME would be turned on if Chinese, Japanese, or Korean is the selected language. I am guessing from your post that you would like an additional checkbox for "enable IME" for those languages?

@Harley Acheson (harley) Thank you very much for your detailed reply. user with "English" selected would always be able to see Chinese characters and disable IME at the same time would be very useful. At before, I needed to enable Translation for see Chinese characters, and then the IME would always be enabled, even if I disabled Translation, so I had to restart Blender.

Yes, I am from China. I often have some problems with IME, such as the input state even in 3D view. I am not sure it caused by blender or IME. Disable IME is the most direct and stable method. So usually I use the English version for disabled IME. I think additional checkbox for "enable IME" will be much more convenient, also convenient for people who used the English version but want to enter other languages.

Anyway, it already great for me. solved my problem of looking at Chinese characters.

@Brecht Van Lommel (brecht) By the way, this patch will affect performance? In 2.7x, enabled international fonts will make nodes scaling not smooth. thanks.

@Brecht Van Lommel (brecht) By the way, this patch will affect performance? In 2.7x, enabled international fonts will make nodes scaling not smooth. thanks.

I've never been able to reproduce excessive slowness for node zooming. But I suspect what makes it slower is not using a particular font, but rather that some languages have more characters. So I expect performance will be no worse or better.