mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Previously if a font didn't have a space advance and it was needed to make advances for tabs, Servo would try to read the advance from the font. If the font didn't have a space glyph, Servo would panic. This fixes that issue by making the space advance part of the `FontMetrics` of a font (like Gecko) and falling back properly if that glyph doesn't exist. The rendered glyph is still the "space" glyph, but we make sure to select a font that supports that glyph explicitly. This prevents a crash, but tabs still aren't handled properly. In reality, tab stops should be calculated in layout and the size of the space character of the current font shouldn't come into play. The addition of the space advance metric will make this easier. Fixes #32970. Signed-off-by: Martin Robinson <mrobinson@igalia.com> |
||
---|---|---|
.. | ||
freetype | ||
macos | ||
windows | ||
mod.rs |