mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
parent
052dd903a4
commit
0eefe2d872
@ -68,10 +68,10 @@ class Genode::Vfs_font : public Text_painter::Font
|
|||||||
void with_glyph(Text_painter::Area const bb, auto const &fn) const
|
void with_glyph(Text_painter::Area const bb, auto const &fn) const
|
||||||
{
|
{
|
||||||
/* consider glyph bounds exceeding the font's bounding box */
|
/* consider glyph bounds exceeding the font's bounding box */
|
||||||
uint8_t const clipped_h = uint8_t(_width ? (bb.count() / _width) : 0u);
|
unsigned const clipped_h = _width ? unsigned(bb.count() / _width) : 0u;
|
||||||
|
|
||||||
fn(Glyph { .width = _width,
|
fn(Glyph { .width = _width,
|
||||||
.height = min(_height, clipped_h),
|
.height = min(unsigned(_height), clipped_h),
|
||||||
.vpos = _vpos,
|
.vpos = _vpos,
|
||||||
.advance = _advance(),
|
.advance = _advance(),
|
||||||
.values = _values });
|
.values = _values });
|
||||||
|
Loading…
Reference in New Issue
Block a user