mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-23 09:22:30 +00:00
this commit also introduces GlobalFontConfig class that is now responsible for fontconfig initialization. it seems sane, even thought FcInit's docs state that if the default configuration has already been loaded, this routine does nothing.
28 lines
476 B
C++
28 lines
476 B
C++
/*
|
|
* Copyright (c) 2025, blukai <init1@protonmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <fontconfig/fontconfig.h>
|
|
|
|
namespace Gfx {
|
|
|
|
class GlobalFontConfig {
|
|
public:
|
|
static GlobalFontConfig& the();
|
|
FcConfig* get();
|
|
|
|
private:
|
|
GlobalFontConfig();
|
|
~GlobalFontConfig();
|
|
|
|
GlobalFontConfig(GlobalFontConfig const&) = delete;
|
|
GlobalFontConfig& operator=(GlobalFontConfig const&) = delete;
|
|
|
|
FcConfig* m_config;
|
|
};
|
|
|
|
}
|