mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
8a07131229
We actually include what we use where we use it. This change aims to improve the speed of incremental builds.
28 lines
602 B
C++
28 lines
602 B
C++
/*
|
|
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibCore/Resource.h>
|
|
#include <LibGfx/Forward.h>
|
|
|
|
namespace Gfx {
|
|
|
|
class FontData {
|
|
public:
|
|
static NonnullOwnPtr<FontData> create_from_byte_buffer(ByteBuffer&&);
|
|
static NonnullOwnPtr<FontData> create_from_resource(Core::Resource const&);
|
|
|
|
ReadonlyBytes bytes() const;
|
|
|
|
private:
|
|
FontData(ByteBuffer&& byte_buffer);
|
|
FontData(NonnullRefPtr<Core::Resource> resource);
|
|
|
|
Variant<ByteBuffer, NonnullRefPtr<Core::Resource>> m_data;
|
|
};
|
|
|
|
}
|