mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
LibGfx/Font: Make Glyph metrics floating point
This commit is contained in:
parent
8cea9fe56d
commit
09a125bcab
1 changed files with 8 additions and 8 deletions
|
@ -55,7 +55,7 @@ private:
|
||||||
|
|
||||||
class Glyph {
|
class Glyph {
|
||||||
public:
|
public:
|
||||||
Glyph(GlyphBitmap const& glyph_bitmap, int left_bearing, int advance, int ascent)
|
Glyph(GlyphBitmap const& glyph_bitmap, float left_bearing, float advance, float ascent)
|
||||||
: m_glyph_bitmap(glyph_bitmap)
|
: m_glyph_bitmap(glyph_bitmap)
|
||||||
, m_left_bearing(left_bearing)
|
, m_left_bearing(left_bearing)
|
||||||
, m_advance(advance)
|
, m_advance(advance)
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Glyph(RefPtr<Bitmap> bitmap, int left_bearing, int advance, int ascent)
|
Glyph(RefPtr<Bitmap> bitmap, float left_bearing, float advance, float ascent)
|
||||||
: m_bitmap(bitmap)
|
: m_bitmap(bitmap)
|
||||||
, m_left_bearing(left_bearing)
|
, m_left_bearing(left_bearing)
|
||||||
, m_advance(advance)
|
, m_advance(advance)
|
||||||
|
@ -74,16 +74,16 @@ public:
|
||||||
bool is_glyph_bitmap() const { return !m_bitmap; }
|
bool is_glyph_bitmap() const { return !m_bitmap; }
|
||||||
GlyphBitmap glyph_bitmap() const { return m_glyph_bitmap; }
|
GlyphBitmap glyph_bitmap() const { return m_glyph_bitmap; }
|
||||||
RefPtr<Bitmap> bitmap() const { return m_bitmap; }
|
RefPtr<Bitmap> bitmap() const { return m_bitmap; }
|
||||||
int left_bearing() const { return m_left_bearing; }
|
float left_bearing() const { return m_left_bearing; }
|
||||||
int advance() const { return m_advance; }
|
float advance() const { return m_advance; }
|
||||||
int ascent() const { return m_ascent; }
|
float ascent() const { return m_ascent; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GlyphBitmap m_glyph_bitmap;
|
GlyphBitmap m_glyph_bitmap;
|
||||||
RefPtr<Bitmap> m_bitmap;
|
RefPtr<Bitmap> m_bitmap;
|
||||||
int m_left_bearing;
|
float m_left_bearing;
|
||||||
int m_advance;
|
float m_advance;
|
||||||
int m_ascent;
|
float m_ascent;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FontPixelMetrics {
|
struct FontPixelMetrics {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue