ladybird/Libraries/LibGfx/Font/FontData.h
Pavel Shliak 8a07131229 LibGfx: Clean up #include directives
We actually include what we use where we use it.
This change aims to improve the speed of incremental builds.
2024-11-20 21:13:23 +01:00

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;
};
}