CyberEngineTweaks icon indicating copy to clipboard operation
CyberEngineTweaks copied to clipboard

Default fonts for extended character sets

Open Aemony opened this issue 2 years ago • 1 comments

Microsoft defines all included font families of Windows as well as what character sets they support over on: https://docs.microsoft.com/en-us/typography/font-list/

So it is possible to add default fonts to use for the various ImGui glyph ranges instead of requiring the user to manually define them.

These are the defaults I use over on another project:

GetGlyphRangesCyrillic                - Tahoma.ttf
GetGlyphRangesJapanese                - YuGothR.ttc (Win10 only)
GetGlyphRangesChineseSimplifiedCommon - msyh.ttc
GetGlyphRangesChineseFull             - msjh.ttc
GetGlyphRangesKorean                  - malgun.ttf
GetGlyphRangesThai                    - Tahoma.ttf
GetGlyphRangesVietnamese              - Tahoma.ttf

Windows 7 does not include YuGothR.ttc as far as I know, if that's a concern. Otherwise the main thing to be aware of is that the Chinese and Japanese character sets overlap heavily, so whatever font is loaded first will be the one used for those characters.

Aemony avatar Jun 29 '22 10:06 Aemony

That does not sound all too nice tbh, best would be to find some font with all requested glyphs and package and use that for all the glyphs for consistency. Current solution is not best either, but if I would touch that part of the code, I would rather make it unified in some way.

Supporting other glyphs for other languages was never properly implemented I'd argue and it kinda shows in how lacking it is. But hardcoding bunch of different fonts and call it a day would not solve underlying issues.

WSSDude avatar Aug 01 '22 16:08 WSSDude

Well, dont honeslty have any better proposal... Did it your way, but used fonts from same family so it looks more cohesive.

Is changed by https://github.com/yamashi/CyberEngineTweaks/commit/69ae4c824621dfa251b51306d37d46e5a3a96e17

WSSDude avatar Oct 09 '22 10:10 WSSDude