mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 23:22:33 -04:00
Hide ui::Size implementation.
This commit is contained in:
parent
aac2d31548
commit
d15ace4676
9 changed files with 44 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue