1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

LibGfx/Font: Make ScaledGlyphMetrics floating point

By rounding the scaled glyph metrics, we were losing valuable precision,
especially at smaller sizes.
This commit is contained in:
Andreas Kling 2023-01-02 21:11:25 +01:00
parent 15b920c730
commit 8cea9fe56d
2 changed files with 8 additions and 10 deletions

View file

@ -24,10 +24,10 @@ struct ScaledFontMetrics {
};
struct ScaledGlyphMetrics {
int ascender;
int descender;
int advance_width;
int left_side_bearing;
float ascender;
float descender;
float advance_width;
float left_side_bearing;
};
class VectorFont : public RefCounted<VectorFont> {