Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
FontAlias.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
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"
11
12// auto generated forward declare list
13// clang-format off
15class ScreenContext;
16namespace Core { class Path; }
17namespace mce { class Color; }
18namespace mce { class MaterialPtr; }
19namespace mce::Font { struct RenderingParameters; }
20// clang-format on
21
22class FontAlias : public ::Font {
23public:
24 // FontAlias inner types declare
25 // clang-format off
26 struct ReferenceData;
27 // clang-format on
28
29 // FontAlias inner types define
30 struct ReferenceData {
31 public:
32 // member variables
33 // NOLINTBEGIN
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;
38 // NOLINTEND
39 };
40
41public:
42 // member variables
43 // NOLINTBEGIN
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;
51 // NOLINTEND
52
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual ~FontAlias() /*override*/ = default;
57
58 virtual float _getCharWidth(int uniChar, bool forceUnicode) /*override*/;
59
60 virtual bool supportsChar(int const& character) /*override*/;
61
62 virtual float getWrapHeight() const /*override*/;
63
64 virtual float getScaleFactor() const /*override*/;
65
66 virtual float getScaleFactor(int uniChar) const /*override*/;
67
68 virtual bool isScreenPixelAligned() const /*override*/;
69
70 virtual bool materialCanBeOverridden() const /*override*/;
71
72 virtual void setTextConstantsInScreenContext(
73 ::ScreenContext& screenContext,
74 int glyphSheet,
75 float guiScale,
76 ::mce::Color const& textColor,
77 bool hasShadow
78 ) const /*override*/;
79
80 virtual void uploadTextureToGPU() /*override*/;
81
82 virtual ::ResourceLocation _getFontSheetLocation(int sheet, bool forceUnicode) const /*override*/;
83
84 virtual ::mce::MaterialPtr const& getMaterial(int sheet, bool isOddGuiScale) const /*override*/;
85
86 virtual ::mce::Font::Type getType(int glyphSheet) const /*override*/;
87
88 virtual ::std::optional<::mce::Font::RenderingParameters> tryGetRenderingParameters(
89 ::ScreenContext const& screenContext,
90 int glyphSheet,
91 float guiScale,
92 ::mce::Color const& textColor,
93 bool hasShadow,
94 uint textureWidth,
95 uint textureHeight,
96 bool isUnicode
97 ) const /*override*/;
98
99 virtual void loadFontData(bool uploadTextureImmediately) /*override*/;
100
101 virtual bool _supportsShadowInSingleDraw() /*override*/;
102
103 virtual void onLanguageChanged(::std::string_view languageCode) /*override*/;
104
105 virtual void _scanUnicodeCharacterSize(int character, int sheet, bool forceUnicode) /*override*/;
106
107 virtual float buildChar(
108 ::std::vector<::Font::GlyphQuad>& quads,
109 int i,
110 ::mce::Color const& color,
111 bool italic,
112 float x,
113 float y,
114 bool unicode
115 ) /*override*/;
116
117 virtual ::std::string _remapString(::std::string_view str) const /*override*/;
118
119 virtual void switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName) /*override*/;
120
121 virtual ::std::pair<::Core::PathBuffer<::std::string> const&, ::Core::PathBuffer<::std::string> const&>
122 getFontSources() const /*override*/;
123 // NOLINTEND
124
125public:
126 // member functions
127 // NOLINTBEGIN
128 MCNAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForSheet(int const& sheet) const;
129
130 MCNAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const> getFontReferenceForUnicode(int const& character) const;
131 // NOLINTEND
132
133public:
134 // virtual function thunks
135 // NOLINTBEGIN
136 MCNAPI float $_getCharWidth(int uniChar, bool forceUnicode);
137
138 MCNAPI bool $supportsChar(int const& character);
139
140 MCNAPI float $getWrapHeight() const;
141
142 MCNAPI float $getScaleFactor() const;
143
144 MCNAPI float $getScaleFactor(int uniChar) const;
145
146 MCNAPI bool $isScreenPixelAligned() const;
147
148 MCNAPI bool $materialCanBeOverridden() const;
149
151 ::ScreenContext& screenContext,
152 int glyphSheet,
153 float guiScale,
154 ::mce::Color const& textColor,
155 bool hasShadow
156 ) const;
157
158 MCNAPI void $uploadTextureToGPU();
159
160 MCNAPI ::ResourceLocation $_getFontSheetLocation(int sheet, bool forceUnicode) const;
161
162 MCNAPI ::mce::MaterialPtr const& $getMaterial(int sheet, bool isOddGuiScale) const;
163
164 MCNAPI ::mce::Font::Type $getType(int glyphSheet) const;
165
166 MCNAPI ::std::optional<::mce::Font::RenderingParameters> $tryGetRenderingParameters(
167 ::ScreenContext const& screenContext,
168 int glyphSheet,
169 float guiScale,
170 ::mce::Color const& textColor,
171 bool hasShadow,
172 uint textureWidth,
173 uint textureHeight,
174 bool isUnicode
175 ) const;
176
177 MCNAPI void $loadFontData(bool uploadTextureImmediately);
178
180
181 MCNAPI void $onLanguageChanged(::std::string_view languageCode);
182
183 MCNAPI void $_scanUnicodeCharacterSize(int character, int sheet, bool forceUnicode);
184
185 MCNAPI float $buildChar(
186 ::std::vector<::Font::GlyphQuad>& quads,
187 int i,
188 ::mce::Color const& color,
189 bool italic,
190 float x,
191 float y,
192 bool unicode
193 );
194
195 MCNAPI ::std::string $_remapString(::std::string_view str) const;
196
197 MCNAPI void $switchFontsource(::Core::Path const& asciiName, ::Core::Path const& unicodeName);
198
199 MCNAPI ::std::pair<::Core::PathBuffer<::std::string> const&, ::Core::PathBuffer<::std::string> const&>
201 // NOLINTEND
202};
Definition Path.h:10
Definition FontAlias.h:5
MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const > getFontReferenceForSheet(int const &sheet) 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 float $_getCharWidth(int uniChar, bool forceUnicode)
MCAPI void $switchFontsource(::Core::Path const &asciiName, ::Core::Path const &unicodeName)
MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const > getFontReferenceForUnicode(int const &character) const
MCAPI::std::string $_remapString(::std::string_view str) const
MCAPI void $_scanUnicodeCharacterSize(int character, int sheet, bool forceUnicode)
MCAPI::mce::MaterialPtr const & $getMaterial(int sheet, bool isOddGuiScale) const
MCAPI float $getWrapHeight() const
MCAPI void $loadFontData(bool uploadTextureImmediately)
MCAPI ::std::optional<::mce::Font::RenderingParameters > $tryGetRenderingParameters(::ScreenContext const &screenContext, int glyphSheet, float guiScale, ::mce::Color const &textColor, bool hasShadow, uint textureWidth, uint textureHeight, bool isUnicode) const
MCAPI ::std::pair<::Core::PathBuffer<::std::string > const &, ::Core::PathBuffer<::std::string > const & > $getFontSources() const
MCAPI void $onLanguageChanged(::std::string_view languageCode)
MCAPI::ResourceLocation $_getFontSheetLocation(int sheet, bool forceUnicode) const
MCAPI bool $supportsChar(int const &character)
MCAPI float $getScaleFactor() const
MCAPI void $setTextConstantsInScreenContext(::ScreenContext &screenContext, int glyphSheet, float guiScale, ::mce::Color const &textColor, bool hasShadow) const
MCAPI bool $materialCanBeOverridden() const
MCAPI::mce::Font::Type $getType(int glyphSheet) const
MCAPI bool $isScreenPixelAligned() const
MCAPI bool $_supportsShadowInSingleDraw()
Definition FontHandle.h:5
Definition Font.h:5
Definition Path.h:16
Definition ResourceLocation.h:15
Definition ScreenContext.h:5
Definition Color.h:13
Definition MaterialPtr.h:14
STL namespace.
Definition FontAlias.h:13
Definition Font.h:15
Definition RenderingParameters.h:7