2023-01-02 20:10:00 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibGfx/Font/Font.h>
|
2024-06-03 17:14:05 +02:00
|
|
|
#include <LibGfx/Font/FontDatabase.h>
|
2023-01-02 20:10:00 +01:00
|
|
|
|
|
|
|
|
namespace Gfx {
|
|
|
|
|
|
2024-06-03 17:14:05 +02:00
|
|
|
Font const& Font::bold_variant() const
|
|
|
|
|
{
|
|
|
|
|
if (m_bold_variant)
|
|
|
|
|
return *m_bold_variant;
|
|
|
|
|
m_bold_variant = Gfx::FontDatabase::the().get(family(), point_size(), 700, Gfx::FontWidth::Normal, 0);
|
|
|
|
|
if (!m_bold_variant)
|
|
|
|
|
m_bold_variant = this;
|
|
|
|
|
return *m_bold_variant;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-02 20:10:00 +01:00
|
|
|
}
|