SFML community forums
Help => General => Topic started by: dk123 on August 05, 2016, 07:02:07 am
-
Hi, I'm trying to get glyph information for certain characters within a string. sf::Font::getGlyph however seems to take a codepoint int as it's argument though, which I'm finding difficulty in finding. How can find the codepoint of a given character?
It would be nice if this was a default override of sf::Font::getGlyph if not already implemented.
-
A code point is just the integer representation of a character. So you basically pass in a char, e.g. font.getGlyph(L'2', 10, false).
It would be nice if this was a default override of sf::Font::getGlyph if not already implemented.
What do you mean by "this" and what default override?
-
A code point is just the integer representation of a character. So you basically pass in a char, e.g. font.getGlyph(L'2', 10, false).
It would be nice if this was a default override of sf::Font::getGlyph if not already implemented.
What do you mean by "this" and what default override?
Thanks, that helps. I thought there might need to be some sort of conversion (indexing) between the char and the integer representation, which is why I mentioned that it might be nice to have an overloaded function for sf::Font::getGlyph that explicitly takes in a char_t or wchar_t.
Might be nice to add this to the class information to make things clearer.