mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibGfx: Join SkiaFont.cpp into Font
No need to keep this function in a separate file.
This commit is contained in:
parent
8e2d1559ec
commit
455700d379
Notes:
github-actions[bot]
2025-04-21 07:52:36 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 455700d379
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4409
3 changed files with 8 additions and 24 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue