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<1, 1, uchar> mAsciiSheetCount;
26 ::ll::TypedStorage<1, 1, uchar> mAsciiCharacterHeight;
27 ::ll::TypedStorage<4, 4, int> mAsciiCharacterYOffset;
28 ::ll::TypedStorage<1, 1, bool> mUseExtendedAscii;
29 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::std::array<float, 256>>> mCharWidths;
30 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::std::shared_ptr<::mce::Image>>> mBitmapFontImages;
31 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, float>> mUnicodeWidths;
32 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, float>> mUnicodeOffsets;
33 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, float>> mUnicodePageGlyphWidths;
34 ::ll::TypedStorage<8, 64, ::std::unordered_set<int>> mSheetScannedForWidthsAndOffsets;
39 BitmapFont& operator=(BitmapFont
const&);
45 virtual ~BitmapFont() =
default;
47 virtual float _getCharWidth(
int uniChar,
bool forceUnicode) ;
49 virtual bool supportsChar(
int const& character) ;
51 virtual float getWrapHeight() const ;
53 virtual
float getScaleFactor(
int c) const ;
55 virtual
float getScaleFactor() const ;
57 virtual
bool isScreenPixelAligned() const ;
59 virtual
bool materialCanBeOverridden() const ;
61 virtual
void uploadTextureToGPU() ;
63 virtual
void _scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode) ;
65 virtual
bool _supportsShadowInSingleDraw() ;
67 virtual ::ResourceLocation _getFontSheetLocation(
int sheet,
bool forceUnicode) const ;
69 virtual ::mce::MaterialPtr const& getMaterial(
int sheet,
bool isOddGuiScale) const ;
71 virtual
float getGlyphHeight(
int glyphSheet,
bool isUnicode) const ;
73 virtual
void loadFontData(
bool uploadTextureImmediately) ;
75 virtual
float buildChar(
78 ::mce::Color const& color,
85 virtual ::Core::PathBuffer<::std::
string>
86 getUnicodeFontNameWithPage(::Core::Path const& fontName, uchar const page) const;
88 virtual
void switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName) ;
90 virtual ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
91 getFontSources() const ;
93 virtual uchar _getAsciiSheetCount() const ;
95 virtual
int _getAsciiGlyphsPerPage() const ;
97 virtual
bool _usesLegacyAsciiMapping() const ;
103 MCNAPI BitmapFont(::BitmapFont const& rhs);
106 ::Core::
Path const& asciiName,
107 ::Core::
Path const& unicodeName,
108 ::
std::shared_ptr<::mce::TextureGroup> textureGroup,
109 uchar asciiSheetCount,
110 bool uploadOnConstruction
119 MCNAPI
void*
$ctor(::BitmapFont const& rhs);
122 ::Core::
Path const& asciiName,
123 ::Core::
Path const& unicodeName,
124 ::
std::shared_ptr<::mce::TextureGroup> textureGroup,
125 uchar asciiSheetCount,
126 bool uploadOnConstruction
155 MCNAPI ::mce::MaterialPtr const&
$getMaterial(
int sheet,
bool isOddGuiScale) const;
164 ::mce::Color const& color,
171 MCNAPI ::Core::PathBuffer<::
std::
string>
176 MCNAPI ::
std::pair<::Core::PathBuffer<::
std::
string> const&, ::Core::PathBuffer<::
std::
string> const&>
Definition BitmapFont.h:5
MCAPI ::Core::PathBuffer<::std::string > $getUnicodeFontNameWithPage(::Core::Path const &fontName, uchar const page) const
MCAPI int $_getAsciiGlyphsPerPage() const
MCAPI void $switchFontsource(::Core::Path const &asciiName, ::Core::Path const &unicodeName)
MCAPI::mce::MaterialPtr const & $getMaterial(int sheet, bool isOddGuiScale) const
MCAPI ::Core::PathBuffer<::std::string > getAsciiFontNameWithPage(uchar const page) const
MCAPI float $_getCharWidth(int uniChar, bool forceUnicode)
MCAPI ::std::pair<::Core::PathBuffer<::std::string > const &, ::Core::PathBuffer<::std::string > const & > $getFontSources() const
MCAPI float $getScaleFactor(int c) const
MCAPI::ResourceLocation $_getFontSheetLocation(int sheet, bool forceUnicode) const
MCAPI bool $materialCanBeOverridden() const
MCAPI bool $_supportsShadowInSingleDraw()
MCAPI void $loadFontData(bool uploadTextureImmediately)
MCAPI void * $ctor(::BitmapFont const &rhs)
MCAPI float $getGlyphHeight(int glyphSheet, bool isUnicode) const
MCAPI float $buildChar(::std::vector<::Font::GlyphQuad > &quads, int i, ::mce::Color const &color, bool italic, float x, float y, bool unicode)
MCAPI void $uploadTextureToGPU()
MCAPI bool $_usesLegacyAsciiMapping() const
MCAPI void $_scanUnicodeCharacterSize(int character, int sheet, bool forceUnicode)
MCAPI bool $isScreenPixelAligned() const
MCAPI float $getWrapHeight() const
MCAPI bool $supportsChar(int const &character)
MCAPI uchar $_getAsciiSheetCount() const
Definition ResourceLocation.h:15
Definition MaterialPtr.h:14
Definition TextureGroup.h:7