Hide ui::Size implementation.

This commit is contained in:
Jared Boone 2016-11-28 10:55:45 -08:00
parent aac2d31548
commit d15ace4676
9 changed files with 44 additions and 32 deletions

View file

@ -44,8 +44,10 @@ Size Font::size_of(const std::string s) const {
for(const auto c : s) {
const auto glyph_data = glyph(c);
size.w += glyph_data.w();
size.h = std::max(size.h, glyph_data.h());
size = {
size.width() + glyph_data.w(),
std::max(size.height(), glyph_data.h())
};
}
return size;