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; }
34 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
35 ::ll::TypedStorage<8, 32, ::std::string> mLanguageCode;
36 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<int, int>>> mIncludedUnicodeRanges;
37 ::ll::TypedStorage<4, 4, float> mFontScale;
44 ::ll::TypedStorage<8, 24, ::std::vector<::FontAlias::ReferenceData>> mFontReferences;
45 ::ll::TypedStorage<8, 32, ::std::string> mCurrentLanguageCode;
46 ::ll::TypedStorage<1, 1, bool> mAllReferencesMaterialsCanBeOverridden;
47 ::ll::TypedStorage<1, 1, bool> mAllReferencesScreenPixelAligned;
48 ::ll::TypedStorage<1, 1, bool> mAllReferencesSupportShadowInSingleDraw;
49 ::ll::TypedStorage<4, 4, float> mMaxWrapHeight;
50 ::ll::TypedStorage<4, 4, float> mMaxScalar;
56 virtual ~FontAlias() =
default;
58 virtual float _getCharWidth(
int uniChar,
bool forceUnicode) ;
60 virtual bool supportsChar(
int const& character) ;
62 virtual float getWrapHeight() const ;
64 virtual
float getScaleFactor() const ;
66 virtual
float getScaleFactor(
int uniChar) const ;
68 virtual
bool isScreenPixelAligned() const ;
70 virtual
bool materialCanBeOverridden() const ;
72 virtual
void setTextConstantsInScreenContext(
73 ::ScreenContext& screenContext,
76 ::mce::Color const& textColor,
80 virtual
void uploadTextureToGPU() ;
82 virtual ::ResourceLocation _getFontSheetLocation(
int sheet,
bool forceUnicode) const ;
84 virtual ::mce::MaterialPtr const& getMaterial(
int sheet,
bool isOddGuiScale) const ;
86 virtual ::mce::Font::Type getType(
int glyphSheet) const ;
88 virtual ::std::optional<::mce::Font::RenderingParameters> tryGetRenderingParameters(
89 ::ScreenContext const& screenContext,
92 ::mce::Color const& textColor,
98 virtual
void loadFontData(
bool uploadTextureImmediately) ;
100 virtual
bool _supportsShadowInSingleDraw() ;
102 virtual
void onLanguageChanged(::std::string_view languageCode) ;
104 virtual
void _scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode) ;
106 virtual
float buildChar(
109 ::mce::Color const& color,
116 virtual ::std::
string _remapString(::std::string_view str) const ;
118 virtual
void switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName) ;
120 virtual ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
121 getFontSources() const ;
127 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForSheet(
int const& sheet) const;
129 MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForUnicode(
int const& character) const;
135 MCAPI
float $_getCharWidth(
int uniChar,
bool forceUnicode);
137 MCAPI
bool $supportsChar(
int const& character);
139 MCAPI
float $getWrapHeight() const;
141 MCAPI
float $getScaleFactor() const;
143 MCAPI
float $getScaleFactor(
int uniChar) const;
145 MCAPI
bool $isScreenPixelAligned() const;
147 MCAPI
bool $materialCanBeOverridden() const;
149 MCAPI
void $setTextConstantsInScreenContext(
150 ::ScreenContext& screenContext,
153 ::mce::Color const& textColor,
157 MCFOLD
void $uploadTextureToGPU();
159 MCAPI ::ResourceLocation $_getFontSheetLocation(
int sheet,
bool forceUnicode) const;
161 MCAPI ::mce::MaterialPtr const& $getMaterial(
int sheet,
bool isOddGuiScale) const;
163 MCAPI ::mce::Font::Type $getType(
int glyphSheet) const;
165 MCAPI ::std::optional<::mce::Font::RenderingParameters> $tryGetRenderingParameters(
166 ::ScreenContext const& screenContext,
169 ::mce::Color const& textColor,
175 MCFOLD
void $loadFontData(
bool uploadTextureImmediately);
177 MCAPI
bool $_supportsShadowInSingleDraw();
179 MCAPI
void $onLanguageChanged(::std::string_view languageCode);
181 MCAPI
void $_scanUnicodeCharacterSize(
int character,
int sheet,
bool forceUnicode);
183 MCAPI
float $buildChar(
186 ::mce::Color const& color,
193 MCAPI ::std::
string $_remapString(::std::string_view str) const;
195 MCAPI
void $switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName);
197 MCAPI ::std::pair<::Core::PathBuffer<::std::
string> const&, ::Core::PathBuffer<::std::
string> const&>
198 $getFontSources() const;
Definition ResourceLocation.h:15
Definition ScreenContext.h:5
Definition MaterialPtr.h:14
Definition FontAlias.h:13
Definition RenderingParameters.h:7