Hello fellas! I'm trying to figure out how long a std::string is going to be in pixels with a specific font beforehand. Currently i have this:
int kerning = 0;
std::string s;
for(int i = 0; i < s.length();i++){
if(i > 0){
kerning+= Fonthere->GetKerning(sf::Uint32(s.at(i)), sf::Uint32(s.at(i-1)), TextHere.GetCharacterSize());
}
}
But kerning is still just 0. Am i doing the types around string and sf::Uint32 wrong?
edit; Code-example extremly shortened. s is initialized and has a long value. fonthere and texthere is used to draw stuff and works properly. etc.