mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-27 10:29:23 +00:00
22 lines
483 B
C++
22 lines
483 B
C++
/*
|
|
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibGfx/Font/Font.h>
|
|
#include <LibGfx/Font/FontDatabase.h>
|
|
|
|
namespace Gfx {
|
|
|
|
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;
|
|
}
|
|
|
|
}
|