3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/Font.h"
7#include "mc/deps/core/file/PathBuffer.h"
12namespace Core {
class Path; }
13namespace mce {
class Color; }
16namespace mce {
struct Image; }
23 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mAsciiFontName;
24 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mUnicodeFontName;
25 ::ll::TypedStorage<4, 1024, float[256]> mCharWidths;
26 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::mce::Image>> mBitmapFontImage;
27 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, float>> mUnicodeWidths;
28 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, float>> mUnicodeOffsets;
29 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, float>> mUnicodePageGlyphWidths;
30 ::ll::TypedStorage<8, 64, ::std::unordered_set<int>> mSheetScannedForWidthsAndOffsets;
35 BitmapFont& operator=(BitmapFont
const&);
41 virtual ~BitmapFont() ;
43 virtual float _getCharWidth(
int uniChar,
bool forceUnicode) ;
45 virtual bool supportsChar(
int const& character) ;
47 virtual float getWrapHeight() const ;
49 virtual
float getScaleFactor(
int c) const ;
51 virtual
float getScaleFactor() const ;
53 virtual
bool isScreenPixelAligned() const ;
55 virtual
bool materialCanBeOverridden() const ;
57 virtual
void uploadTextureToGPU() ;
59 virtual
void _scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode) ;
61 virtual
bool _supportsShadowInSingleDraw() ;
63 virtual ::ResourceLocation _getFontSheetLocation(
int sheet,
bool forceUnicode) const ;
65 virtual ::mce::MaterialPtr const& getMaterial(
int sheet,
bool isOddGuiScale) const ;
67 virtual
void loadFontData(
bool uploadTextureImmediately) ;
69 virtual
float buildChar(
72 ::mce::Color const& color,
79 virtual ::Core::PathBuffer<::std::
string>
80 getUnicodeFontNameWithPage(::Core::Path const& fontName, uchar const page) const;
82 virtual
void switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName) ;
84 virtual ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
85 getFontSources() const ;
91 MCAPI BitmapFont(::BitmapFont const& rhs);
94 ::Core::Path const& asciiName,
95 ::Core::Path const& unicodeName,
96 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
97 bool uploadOnConstruction
100 MCAPI
void _loadAsciiFontInformation(::Core::Path const& fontName,
bool uploadTextureImmediately);
106 MCAPI
void* $ctor(::BitmapFont const& rhs);
109 ::Core::Path const& asciiName,
110 ::Core::Path const& unicodeName,
111 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
112 bool uploadOnConstruction
125 MCAPI
float $_getCharWidth(
int uniChar,
bool forceUnicode);
127 MCAPI
bool $supportsChar(
int const& character);
129 MCAPI
float $getWrapHeight() const;
131 MCAPI
float $getScaleFactor(
int c) const;
133 MCAPI
float $getScaleFactor() const;
135 MCFOLD
bool $isScreenPixelAligned() const;
137 MCFOLD
bool $materialCanBeOverridden() const;
139 MCAPI
void $uploadTextureToGPU();
141 MCAPI
void $_scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode);
143 MCFOLD
bool $_supportsShadowInSingleDraw();
145 MCAPI ::ResourceLocation $_getFontSheetLocation(
int sheet,
bool forceUnicode) const;
147 MCAPI ::mce::MaterialPtr const& $getMaterial(
int sheet,
bool isOddGuiScale) const;
149 MCAPI
void $loadFontData(
bool uploadTextureImmediately);
151 MCAPI
float $buildChar(
154 ::mce::Color const& color,
161 MCAPI ::Core::PathBuffer<::std::
string>
162 $getUnicodeFontNameWithPage(::Core::Path const& fontName, uchar const page) const;
164 MCAPI
void $switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName);
166 MCAPI ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
167 $getFontSources() const;
Definition BitmapFont.h:5
static MCAPI void ** $vftable()
Definition ResourceLocation.h:15
Definition MaterialPtr.h:15
Definition TextureGroup.h:7