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

Update comments in ImFontAtlas::GetGlyphRangesJapanese #6066

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Update comments in ImFontAtlas::GetGlyphRangesJapanese #6066

merged 1 commit into from
Jan 9, 2023

Conversation

vaiorabbit
Copy link
Contributor

Hello! I would like to update comments in ImFontAtlas::GetGlyphRangesJapanese, which I wrote in 2020.

What this PR do

  • Updates comments in ImFontAtlas::GetGlyphRangesJapanese to remove old information source and replace it to new ones.
  • Only comments are modified by this PR, so there's no need to check the behavior of GetGlyphRangesJapanese.

Details

I noticed the character database and its API ( mojikiban.ipa.go.jp/mji/ ) I used for updating ImFontAtlas::GetGlyphRangesJapanese in 2020 are no longer available. So I decided to

  • prepare a source of kanji character data for myself by processing other resources
  • fix the updater script which can regenerate GetGlyphRangesJapanese with the new data source

so that we don't have to depend on the unavailable database.

And now it's done. My repository https://github.com/vaiorabbit/everyday_use_kanji contains lists of Joyo ("for regular use") characters and Jinmeiyo ("for personal name") characters made from new sources:

To prepare these lists I used resources provided by the Agency for Cultural Affairs and the Ministry of Justice of Japan, which are available under CC-BY 4.0. For more details, please see everyday_use_kanji/LICENSE.

After that I regenerated the actual code of ImFontAtlas::GetGlyphRangesJapanese. We can say the changes made in this PR have resulted from copying and pasting this code.

Please note that there's no difference made in the offset table (static const short accumulative_offsets_from_0x4E00) even if we run the updater script, because there's also no difference between characters we can get from new source I prepared and old ones from unavailable old database. As a result, the changes in this PR occurred only on the comments section.

@ocornut ocornut merged commit a218d3a into ocornut:master Jan 9, 2023
@ocornut
Copy link
Owner

ocornut commented Jan 9, 2023

Merged ! Thank you very much for the careful details and references.

vanitas55 added a commit to vanitas55/imgui that referenced this pull request Jan 16, 2023
kjblanchard pushed a commit to kjblanchard/imgui that referenced this pull request May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants