3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/Font.h"
7#include "mc/client/gui/FontHandle.h"
8#include "mc/deps/core/file/PathBuffer.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/minecraft_renderer/renderer/Type.h"
16namespace Core {
class Path; }
17namespace mce {
class Color; }
35 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
36 ::ll::TypedStorage<8, 32, ::std::string> mLanguageCode;
37 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<int, int>>> mIncludedUnicodeRanges;
38 ::ll::TypedStorage<4, 4, float> mFontScale;
43 ReferenceData& operator=(ReferenceData
const&);
49 MCAPI ReferenceData(::FontAlias::ReferenceData
const&);
51 MCAPI ::FontAlias::ReferenceData& operator=(::FontAlias::ReferenceData&&);
53 MCAPI ~ReferenceData();
59 MCAPI
void* $ctor(::FontAlias::ReferenceData
const&);
72 ::ll::TypedStorage<8, 24, ::std::vector<::FontAlias::ReferenceData>> mFontReferences;
73 ::ll::TypedStorage<8, 32, ::std::string> mCurrentLanguageCode;
74 ::ll::TypedStorage<1, 1, bool> mAllReferencesMaterialsCanBeOverridden;
75 ::ll::TypedStorage<1, 1, bool> mAllReferencesScreenPixelAligned;
76 ::ll::TypedStorage<1, 1, bool> mAllReferencesSupportShadowInSingleDraw;
77 ::ll::TypedStorage<4, 4, float> mMaxWrapHeight;
78 ::ll::TypedStorage<4, 4, float> mMaxScalar;
88 virtual ~FontAlias() =
default;
90 virtual float _getCharWidth(
int uniChar,
bool forceUnicode) ;
92 virtual bool supportsChar(
int const& character) ;
94 virtual float getWrapHeight() const ;
96 virtual
float getScaleFactor() const ;
98 virtual
float getScaleFactor(
int uniChar) const ;
100 virtual
bool isScreenPixelAligned() const ;
102 virtual
bool materialCanBeOverridden() const ;
104 virtual
void setTextConstantsInScreenContext(
105 ::ScreenContext& screenContext,
108 ::mce::Color const& textColor,
112 virtual
void uploadTextureToGPU() ;
114 virtual ::ResourceLocation _getFontSheetLocation(
int sheet,
bool forceUnicode) const ;
116 virtual ::mce::MaterialPtr const& getMaterial(
int sheet,
bool isOddGuiScale) const ;
118 virtual ::mce::Font::Type getType(
int glyphSheet) const ;
120 virtual ::std::optional<::mce::Font::RenderingParameters> tryGetRenderingParameters(
121 ::ScreenContext const& screenContext,
124 ::mce::Color const& textColor,
130 virtual
void loadFontData(
bool uploadTextureImmediately) ;
132 virtual
bool _supportsShadowInSingleDraw() ;
134 virtual
void onLanguageChanged(::std::string_view languageCode) ;
136 virtual
void _scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode) ;
138 virtual
float buildChar(
141 ::mce::Color const& color,
148 virtual ::std::
string _remapString(::std::string_view str) const ;
150 virtual
void switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName) ;
152 virtual ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
153 getFontSources() const ;
160 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
165 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForSheet(
int const& sheet) const;
167 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForUnicode(
int const& character) const;
174 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
183 MCAPI
float $_getCharWidth(
int uniChar,
bool forceUnicode);
185 MCAPI
bool $supportsChar(
int const& character);
187 MCAPI
float $getWrapHeight() const;
189 MCAPI
float $getScaleFactor() const;
191 MCAPI
float $getScaleFactor(
int uniChar) const;
193 MCAPI
bool $isScreenPixelAligned() const;
195 MCAPI
bool $materialCanBeOverridden() const;
197 MCAPI
void $setTextConstantsInScreenContext(
198 ::ScreenContext& screenContext,
201 ::mce::Color const& textColor,
205 MCFOLD
void $uploadTextureToGPU();
207 MCAPI ::ResourceLocation $_getFontSheetLocation(
int sheet,
bool forceUnicode) const;
209 MCAPI ::mce::MaterialPtr const& $getMaterial(
int sheet,
bool isOddGuiScale) const;
211 MCAPI ::mce::Font::Type $getType(
int glyphSheet) const;
213 MCAPI ::std::optional<::mce::Font::RenderingParameters> $tryGetRenderingParameters(
214 ::ScreenContext const& screenContext,
217 ::mce::Color const& textColor,
223 MCFOLD
void $loadFontData(
bool uploadTextureImmediately);
225 MCAPI
bool $_supportsShadowInSingleDraw();
227 MCAPI
void $onLanguageChanged(::std::string_view languageCode);
229 MCAPI
void $_scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode);
231 MCAPI
float $buildChar(
234 ::mce::Color const& color,
241 MCAPI ::std::
string $_remapString(::std::string_view str) const;
243 MCAPI
void $switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName);
245 MCAPI ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
246 $getFontSources() const;
static MCAPI void ** $vftable()
Definition ResourceLocation.h:15
Definition ScreenContext.h:5
Definition MaterialPtr.h:15
Definition TextureGroup.h:7
Definition FontAlias.h:13
Definition RenderingParameters.h:7