LibGfx: Join SkiaFont.cpp into Font

No need to keep this function in a separate file.
This commit is contained in:
Aliaksandr Kalenik 2025-04-20 01:18:46 +02:00 committed by Andreas Kling
parent 8e2d1559ec
commit 455700d379
Notes: github-actions[bot] 2025-04-21 07:52:36 +00:00
3 changed files with 8 additions and 24 deletions

View file

@ -129,4 +129,12 @@ hb_font_t* Font::harfbuzz_font() const
return m_harfbuzz_font;
}
SkFont Font::skia_font(float scale) const
{
auto const& sk_typeface = as<TypefaceSkia>(*m_typeface).sk_typeface();
auto sk_font = SkFont { sk_ref_sp(sk_typeface), pixel_size() * scale };
sk_font.setSubpixel(true);
return sk_font;
}
}