mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
LibGfx: Don't crash on Typeface::get_font() with size 0
If someone wants a zero-sized font, we can just give it to them instead of making a fuss.
This commit is contained in:
parent
589a1e9325
commit
6a32634440
|
@ -61,7 +61,7 @@ void Typeface::set_vector_font(RefPtr<VectorFont> font)
|
|||
|
||||
RefPtr<Font> Typeface::get_font(float point_size, Font::AllowInexactSizeMatch allow_inexact_size_match) const
|
||||
{
|
||||
VERIFY(point_size > 0);
|
||||
VERIFY(point_size >= 0);
|
||||
|
||||
if (m_vector_font)
|
||||
return adopt_ref(*new Gfx::ScaledFont(*m_vector_font, point_size, point_size));
|
||||
|
|
Loading…
Reference in a new issue