mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue