-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support for custom glyph ranges #74
Labels
enhancement
New feature or request
Comments
Oh, so the C++ API is one-dimensional. It will be unsafe anyway, so I'll assume the users know the contract. I can add the API if it's one dimensional. Thanks for telling me that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Per request I'm opening a new issue on this.
Font loading procedures take ranges of glyphs to load. The problem is that the API does not provide a way to instantiate them, so only default options (
getGlyphRangesFor*()
) are available. This is not sufficient, as this does not include all glyphs one might want to display.@ice1000 In the comment you said, that
I am new to Dear ImGui, so I have no experience with its API, but glyph ranges does not seem to be used in many places. In c++ the procedures take a flat zero-terminated array of integers.
I am not the right person to decide, how you should shape your API, but I do not think that passing two-dimensional array is a way — arrays in Java have dynamic length, so using them does not add any safety in this case. You could still pass an array with incorrect size.
If you want types to be safe, I think a class representing a range would be better. However, more general solution would be to just provide a way to instantiate an array of integers compatible with the c++ code, so it can be passed to it directly. I suspect that it would be simpler to implement and could be used also in other places if needed.
I do not know how Java calls c++ code, but it is supported, so I suspect that passing values to it is not so hard that it is a real problem.
The text was updated successfully, but these errors were encountered: