[API] ImFontGlyphRangesBuilder and fonts example #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #45, this PR adds java reimplementation of ImFontGlyphRangesBuilder from native code. It is a helper to create glyph ranges based on text input. For example, in our project we used it to create font atlas with all characters which are used in game (not only alphabet glyphs, but also some special punctuation symbols ) and allowed our content creators to add these symbols via a separate dictionary txt file which was shared both for in game UI and editors.
I also implemented example of fonts configuration which integrates cyrllic, japanese and Font Awesome icons in imgui's font atlas. Example module now contains FontAwesomeIcons.java file which provides codepoints for all free icons from FA. It is expected that users which want to use these icons in their projects will replicate font setup code and copy this class.