mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGfx+LibWeb: Rename Gfx::WOFF2::Font to Gfx::WOFF2::Typeface
It's a leftover from VectorFont -> Typeface renaming
This commit is contained in:
committed by
Andreas Kling
parent
1d2e559e13
commit
c09b5b8df0
@@ -23,7 +23,7 @@
|
||||
#include <LibGfx/Font/ScaledFont.h>
|
||||
#include <LibGfx/Font/Typeface.h>
|
||||
#include <LibGfx/Font/WOFF/Typeface.h>
|
||||
#include <LibGfx/Font/WOFF2/Font.h>
|
||||
#include <LibGfx/Font/WOFF2/Typeface.h>
|
||||
#include <LibWeb/Animations/AnimationEffect.h>
|
||||
#include <LibWeb/Animations/DocumentTimeline.h>
|
||||
#include <LibWeb/CSS/AnimationEvent.h>
|
||||
@@ -177,7 +177,7 @@ ErrorOr<NonnullRefPtr<Gfx::Typeface>> FontLoader::try_load_font()
|
||||
}
|
||||
}
|
||||
if (mime_type == "font/woff2"sv || mime_type == "application/font-woff2"sv) {
|
||||
if (auto result = WOFF2::Font::try_load_from_externally_owned_memory(resource()->encoded_data()); !result.is_error()) {
|
||||
if (auto result = WOFF2::Typeface::try_load_from_externally_owned_memory(resource()->encoded_data()); !result.is_error()) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -189,7 +189,7 @@ ErrorOr<NonnullRefPtr<Gfx::Typeface>> FontLoader::try_load_font()
|
||||
auto woff = WOFF::Typeface::try_load_from_externally_owned_memory(resource()->encoded_data());
|
||||
if (!woff.is_error())
|
||||
return woff.release_value();
|
||||
auto woff2 = WOFF2::Font::try_load_from_externally_owned_memory(resource()->encoded_data());
|
||||
auto woff2 = WOFF2::Typeface::try_load_from_externally_owned_memory(resource()->encoded_data());
|
||||
if (!woff2.is_error())
|
||||
return woff2.release_value();
|
||||
return Error::from_string_literal("Automatic format detection failed");
|
||||
|
||||
Reference in New Issue
Block a user