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

[API] ImFontGlyphRangesBuilder and fonts example #51

Merged
merged 1 commit into from
Apr 29, 2021

Conversation

abvadabra
Copy link
Contributor

@abvadabra abvadabra commented Apr 28, 2021

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.
image

…fonts configuration with ImFontGlyphRangesBuilder usage. Added font awesome integration example.
@SpaiR SpaiR changed the title ImFontGlyphRangesBuilder and example of fonts configuration with multiple languages and Font Awesome icons. [API] ImFontGlyphRangesBuilder and fonts example Apr 29, 2021
@SpaiR SpaiR merged commit 36e59c4 into SpaiR:master Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants