mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
sculpt: set lower bound for font size
This commit is contained in:
parent
0a478dac7f
commit
f687d4824b
@ -1315,6 +1315,12 @@ void Sculpt::Main::_handle_gui_mode()
|
||||
|
||||
_font_size_px = (float)mode.area.h() / 60.0;
|
||||
|
||||
/*
|
||||
* Limit lower bound of font size. Otherwise, the glyph rendering
|
||||
* may suffer from division-by-zero problems.
|
||||
*/
|
||||
_font_size_px = max(_font_size_px, 2.0);
|
||||
|
||||
if (_font_size == Font_size::SMALL) _font_size_px *= 0.85;
|
||||
if (_font_size == Font_size::LARGE) _font_size_px *= 1.35;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user