Sitelet https://github.com/ocornut/imgui/pull/6066
Skip to content

Update comments in ImFontAtlas::GetGlyphRangesJapanese - #6066

Merged
ocornut merged 1 commit into
ocornut:masterfrom
vaiorabbit:feature/update_getglyphrangesjapanese_comment
Jan 9, 2023
Merged

ocornut merged 1 commit into
ocornut:masterfrom
vaiorabbit:feature/update_getglyphrangesjapanese_comment

Conversation

@vaiorabbit

Copy link
Copy Markdown
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

ocornut commented Jan 9, 2023

Copy link
Copy Markdown
Owner

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
maztheman pushed a commit to maztheman/imgui that referenced this pull request Mar 10, 2025
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.

2 participants