mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibGfx: Join ScaledFont into Font
Since ScaledFont is the only class inherited from Font we could simply merge them.
This commit is contained in:
parent
16e883a9a3
commit
8e2d1559ec
Notes:
github-actions[bot]
2025-04-21 07:52:41 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 8e2d1559ec
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4409
18 changed files with 166 additions and 234 deletions
|
@ -7,8 +7,8 @@
|
|||
#include <AK/Format.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibCore/Resource.h>
|
||||
#include <LibGfx/Font/Font.h>
|
||||
#include <LibGfx/Font/PathFontProvider.h>
|
||||
#include <LibGfx/Font/ScaledFont.h>
|
||||
#include <LibGfx/Font/WOFF/Loader.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
@ -60,7 +60,7 @@ RefPtr<Gfx::Font> PathFontProvider::get_font(FlyString const& family, float poin
|
|||
return nullptr;
|
||||
for (auto const& typeface : it->value) {
|
||||
if (typeface->weight() == weight && typeface->width() == width && typeface->slope() == slope)
|
||||
return typeface->scaled_font(point_size);
|
||||
return typeface->font(point_size);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue