mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
44 lines
816 B
C++
44 lines
816 B
C++
#pragma once
|
|
|
|
#include "FontHacks.h"
|
|
#include <stdint.h>
|
|
|
|
class PLPasStr;
|
|
struct IGpFont;
|
|
|
|
namespace PortabilityLayer
|
|
{
|
|
enum FontFamilyFlags
|
|
{
|
|
FontFamilyFlag_None = 0,
|
|
|
|
FontFamilyFlag_Bold = 1,
|
|
|
|
FontFamilyFlag_All = 1,
|
|
};
|
|
|
|
class FontFamily final
|
|
{
|
|
public:
|
|
static const unsigned int kNumVariations = FontFamilyFlag_All + 1;
|
|
|
|
void AddFont(int flags, const char *path, FontHacks fontHacks);
|
|
void SetDefaultVariation(int defaultVariation);
|
|
|
|
int GetVariationForFlags(int variation) const;
|
|
IGpFont *GetFontForVariation(int variation) const;
|
|
FontHacks GetHacksForVariation(int variation) const;
|
|
|
|
static FontFamily *Create();
|
|
void Destroy();
|
|
|
|
private:
|
|
FontHacks m_hacks[kNumVariations];
|
|
IGpFont *m_fonts[kNumVariations];
|
|
uint8_t m_defaultVariation;
|
|
|
|
FontFamily();
|
|
~FontFamily();
|
|
};
|
|
}
|