ladybird/Libraries/LibWeb/CSS/FontLoading.h

23 lines
685 B
C
Raw Permalink Normal View History

/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/ByteBuffer.h>
#include <AK/ByteString.h>
#include <AK/Function.h>
#include <AK/Optional.h>
#include <LibCore/AnonymousBuffer.h>
#include <LibGfx/Font/Typeface.h>
namespace Web::CSS {
bool requires_off_thread_vector_font_preparation(ByteBuffer const&, Optional<ByteString> const& mime_type_essence = {});
ErrorOr<NonnullRefPtr<Gfx::Typeface const>> try_load_vector_font(ByteBuffer const&, Optional<ByteString> const& mime_type_essence = {});
void prepare_vector_font_data_off_thread(ByteBuffer, Function<void(ErrorOr<Core::AnonymousBuffer>)>&&);
}