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 an option to allow players add full Chinese glyphs ranges. #79322

Merged
merged 6 commits into from
Jan 28, 2025

Conversation

EliadOArias
Copy link
Contributor

Summary

None

Purpose of change

Two reasons:

  • Zh_CN, zh_TW, jp all use a common glyphs ranges in the game, which mean they can't handle uncommon glyphs. And, some 'uncommon glyphs' is common in the game, like '躯' in zh_CN, which mean 'torso'. There is no reason to block players from persuing a full glyphs coverage.
  • For loading which language's glyph ranges is determined by your language, if players don't use any Chinese language, no Chinese glyphs will be load, even though the player might use a mod contains Chinese ( especially some Japanese mods ). And, this will cause some serious mistakes: calculating your glyphs' width uncorrectly.

Describe the solution

Add an option, to allow players to load full Chinese glyph ranges if they want.

Describe alternatives you've considered

  • Add options for each language.
  • Defaultly load a wide range.

Testing

Use the option and check the glyphs: all Chinese glyphs loaded.

Additional context

I don't sure if similar option could be useful for other language. but this is VERY helpful for Chinese lang to kill those not-in-range glyphs at large.

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 24, 2025
@EliadOArias EliadOArias changed the title Add an option to allow players add full Chinese g;yphs ranges. Add an option to allow players add full Chinese glyphs ranges. Jan 24, 2025
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Jan 24, 2025
EliadOArias and others added 2 commits January 25, 2025 00:06
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jan 24, 2025
Copy link
Contributor

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • Chinese glyph ranges in Imgui
  • If true, Imgui will add glyphs of full Chinese, include zh_CN, zh_TW, ja. Use this option when your need all Chinese glyphs.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

fix them, again
@ZhilkinSerg
Copy link
Contributor

Could be hidden behind language value, instead of an option.

@EliadOArias
Copy link
Contributor Author

Could be hidden behind language value,

Could you explained this more clearly? I'm sorry that I don't so understand this.

Do you mean select whether load glyphs in the language option or a similar option?

@moxian
Copy link
Contributor

moxian commented Jan 24, 2025

Describe alternatives you've considered

  • Add options for each language.
  • Defaultly load a wide range.

Can you explain in brief why these have been rejected?

My understanding (please correct me if I'm wrong) is that even with this PR the game would be broken when played in CN/TW out of the box (i.e. 躯 would not be displayed correctly), and the player would need to explicitly go and enable this option for the game to be playable.
So if everyone needs to tick the box anyway, why don't we do it for them?

Is it perhaps (also?) a translation issue? I.e would it be more appropriate to use something like 胴 instead of 躯 for the "torso"? (Sorry, I don't speak Chinese, just going off of what google translate suggests)

@EliadOArias
Copy link
Contributor Author

EliadOArias commented Jan 24, 2025

Describe alternatives you've considered

  • Add options for each language.
  • Defaultly load a wide range.

Can you explain in brief why these have been rejected?

My understanding (please correct me if I'm wrong) is that even with this PR the game would be broken when played in CN/TW out of the box (i.e. 躯 would not be displayed correctly), and the player would need to explicitly go and enable this option for the game to be playable. So if everyone needs to tick the box anyway, why don't we do it for them?

Truly correct and reasonable.

The reason I don't do this is I don't sure if loading a full range have a bad influence in those poor performance device and why former developer load only common glyphs.
Actually in my test, even load all language and all glyphs at same time is not a heavy task, and this obviously have the best effect.

It will be helpful if someone could tell me the reason why we load glyphs by language used. This seems block the use of foreign mods without i18n.

Is it perhaps (also?) a translation issue? I.e would it be more appropriate to use something like 胴 instead of 躯 for the "torso"? (Sorry, I don't speak Chinese, just going off of what google translate suggests)

Actually '躯' is most common translation for 'torso'. And this is a question wider than this character. About 2% ( or less? or more? ) characters used in game are missing in common range.

Common range only cover a small part of full Chinese range, and I guess this common mean 'common in daily conversations'. CDDA have a lot of words not so 'common'.

@Procyonae
Copy link
Contributor

Procyonae commented Jan 27, 2025

If this is being left as an option it either needs some way to handle being changed ingame or a note adding to the option's description that it won't change until restart
Having it be default might be a memory issue for android or something I'm not sure, there was some reason we don't just load all glyphs by default, I'm not sure if anyone tested it to see how consequential it is though.

This requires restart.
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jan 27, 2025
@GuardianDll GuardianDll merged commit e5624c2 into CleverRaven:master Jan 28, 2025
23 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants