LibGfx+LibWeb: Rename Gfx::WOFF2::Font to Gfx::WOFF2::Typeface

It's a leftover from VectorFont -> Typeface renaming
This commit is contained in:
Aliaksandr Kalenik
2024-07-12 16:52:04 +03:00
committed by Andreas Kling
parent 1d2e559e13
commit c09b5b8df0
7 changed files with 18 additions and 18 deletions

View File

@@ -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");