Skip to content

Commit

Permalink
Fixed the error message when the wrong bitmap font size is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Alvarez authored and oomek committed Aug 23, 2020
1 parent c0421f0 commit d0390db
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/SFML/Graphics/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,17 +777,22 @@ bool Font::setCurrentSize(unsigned int characterSize) const
err() << "Failed to set bitmap font size to " << characterSize << std::endl;
err() << "Available sizes are: ";
for (int i = 0; i < face->num_fixed_sizes; ++i)
err() << face->available_sizes[i].height << " ";
{
const unsigned int size = (face->available_sizes[i].y_ppem + 32) >> 6;
err() << size << " ";
}
err() << std::endl;
}
else
{
err() << "Failed to set font size to " << characterSize << std::endl;
}
}

return result == FT_Err_Ok;
}
else
{
return true;
}

return true;
}


Expand Down

0 comments on commit d0390db

Please sign in to comment.