LibTTF: Do not assert on glyphs with broken line coordinates
Until we figure out what causes this problem or we can fixup the coordinates we should simply not render this line.
This commit is contained in:
parent
9689d914b4
commit
187acd8f21
Notes:
sideshowbarker
2024-07-19 00:20:21 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/187acd8f215 Pull-request: https://github.com/SerenityOS/serenity/pull/4631 Issue: https://github.com/SerenityOS/serenity/issues/743 Reviewed-by: https://github.com/alimpfard
1 changed files with 10 additions and 0 deletions
|
@ -263,6 +263,16 @@ void Rasterizer::draw_line(Gfx::FloatPoint p0, Gfx::FloatPoint p1)
|
|||
p1.set_y(roundf(p1.y()));
|
||||
}
|
||||
|
||||
if (!(p0.x() >= 0.0 && p0.y() >= 0.0 && p0.x() <= m_size.width() && p0.y() <= m_size.height())) {
|
||||
dbgln("!P0({},{})", p0.x(), p0.y());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(p1.x() >= 0.0 && p1.y() >= 0.0 && p1.x() <= m_size.width() && p1.y() <= m_size.height())) {
|
||||
dbgln("!P1({},{})", p1.x(), p1.y());
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT(p0.x() >= 0.0 && p0.y() >= 0.0 && p0.x() <= m_size.width() && p0.y() <= m_size.height());
|
||||
ASSERT(p1.x() >= 0.0 && p1.y() >= 0.0 && p1.x() <= m_size.width() && p1.y() <= m_size.height());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue