LeviLamina
Loading...
Searching...
No Matches
FontAlias Class Reference
Inheritance diagram for FontAlias:

Classes

struct  ReferenceData

Public Types

using CurrentLineCallback = ::std::function<bool(::std::string_view const&, ::std::string&, float, uint&)> const
using StringCacheStoredKey = ::std::tuple<::std::string, ::mce::Color, float, float, bool, bool>
using StringCacheLookupKey = ::std::tuple<::std::string_view, ::mce::Color, float, float, bool, bool>
using StringCache

Public Member Functions

virtual float _getCharWidth (int uniChar, bool forceUnicode)
virtual bool supportsChar (int const &character)
virtual float getWrapHeight () const
virtual float getScaleFactor () const
virtual float getScaleFactor (int uniChar) const
virtual bool isScreenPixelAligned () const
virtual bool materialCanBeOverridden () const
virtual void setTextConstantsInScreenContext (::ScreenContext &screenContext, int glyphSheet, float guiScale, ::mce::Color const &textColor, bool hasShadow) const
virtual void uploadTextureToGPU ()
virtual::ResourceLocation _getFontSheetLocation (int sheet, bool forceUnicode) const
virtual::mce::MaterialPtr const & getMaterial (int sheet, bool isOddGuiScale) const
virtual::mce::Font::Type getType (int glyphSheet) const
virtual ::std::optional<::mce::Font::RenderingParameterstryGetRenderingParameters (::ScreenContext const &screenContext, int glyphSheet, float guiScale, ::mce::Color const &textColor, bool hasShadow, uint textureWidth, uint textureHeight) const
virtual void loadFontData (bool uploadTextureImmediately)
virtual bool _supportsShadowInSingleDraw ()
virtual void onLanguageChanged (::std::string_view languageCode)
virtual void _scanUnicodeCharacterSize (int character, int sheet, bool forceUnicode)
virtual float buildChar (::std::vector<::Font::GlyphQuad > &quads, int i, ::mce::Color const &color, bool italic, float x, float y, bool unicode)
virtual::std::string _remapString (::std::string_view str) const
virtual void switchFontsource (::Core::Path const &asciiName, ::Core::Path const &unicodeName)
virtual ::std::pair<::Core::PathBuffer<::std::string > const &, ::Core::PathBuffer<::std::string > const & > getFontSources () const
MCAPI FontAlias (::std::shared_ptr<::mce::TextureGroup > textureGroup, ::std::vector<::FontAlias::ReferenceData > &&fontReferences, float scaleFactor)
MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const > getFontReferenceForSheet (int const &sheet) const
MCAPI ::Bedrock::NotNullNonOwnerPtr<::FontHandle const > getFontReferenceForUnicode (int const &character) const
MCAPI void * $ctor (::std::shared_ptr<::mce::TextureGroup > textureGroup, ::std::vector<::FontAlias::ReferenceData > &&fontReferences, float scaleFactor)
MCAPI float $_getCharWidth (int uniChar, bool forceUnicode)
MCAPI bool $supportsChar (int const &character)
MCAPI float $getWrapHeight () const
MCAPI float $getScaleFactor () const
MCAPI float $getScaleFactor (int uniChar) const
MCAPI bool $isScreenPixelAligned () const
MCAPI bool $materialCanBeOverridden () const
MCAPI void $setTextConstantsInScreenContext (::ScreenContext &screenContext, int glyphSheet, float guiScale, ::mce::Color const &textColor, bool hasShadow) const
MCFOLD void $uploadTextureToGPU ()
MCAPI::ResourceLocation $_getFontSheetLocation (int sheet, bool forceUnicode) const
MCAPI::mce::MaterialPtr const & $getMaterial (int sheet, bool isOddGuiScale) const
MCAPI::mce::Font::Type $getType (int glyphSheet) const
MCAPI ::std::optional<::mce::Font::RenderingParameters$tryGetRenderingParameters (::ScreenContext const &screenContext, int glyphSheet, float guiScale, ::mce::Color const &textColor, bool hasShadow, uint textureWidth, uint textureHeight) const
MCFOLD void $loadFontData (bool uploadTextureImmediately)
MCAPI bool $_supportsShadowInSingleDraw ()
MCAPI void $onLanguageChanged (::std::string_view languageCode)
MCAPI void $_scanUnicodeCharacterSize (int character, int sheet, bool forceUnicode)
MCAPI float $buildChar (::std::vector<::Font::GlyphQuad > &quads, int i, ::mce::Color const &color, bool italic, float x, float y, bool unicode)
MCAPI::std::string $_remapString (::std::string_view str) const
MCAPI void $switchFontsource (::Core::Path const &asciiName, ::Core::Path const &unicodeName)
MCAPI ::std::pair<::Core::PathBuffer<::std::string > const &, ::Core::PathBuffer<::std::string > const & > $getFontSources () const
virtual void fetchPage (int page)
virtual void drawCached (::ScreenContext &screenContext, ::std::string_view str, float x, float y, ::mce::Color const &color, bool ignoreColorFormatting, bool darken, bool drawColorSymbol, ::mce::MaterialPtr const *optionalMat, int caretPosition, bool shadow, float linePadding, ::mce::Color const &resetColorOverride, ::mce::Color const &shaderDarkColor, float outlineWidth, float yCaretOffset, ::std::variant< ::std::monostate, ::UIActorOffscreenCaptureDescription, ::UIThumbnailMeshOffscreenCaptureDescription, ::UIMeshOffscreenCaptureDescription, ::UIStructureVolumeOffscreenCaptureDescription > const &offscreenCaptureDescription, bool autoGenNormalsAndTangents)
virtual int getLineLength (::std::string_view str, float fontSize, bool showColorSymbol)
virtual::Vec2 getTranslationFactor () const
virtual void onAppSuspended ()
virtual void onDeviceLost ()
virtual void reloadFontTextures (::Bedrock::NonOwnerPointer<::ResourceLoadManager > const &resourceLoadManager, bool blockingLoad)
virtual bool isReloadingTextures ()
virtual void unloadTextures ()
virtual int _getReplacementCharacter ()
MCAPI bool _chopString (::std::string &currentLine, ::std::string &activeFormatting, float &totalHeight, uint &remainingLineCount, float maxWidth, bool showColorSymbol, bool centered, float fontSize, ::std::function< bool(::std::string_view const &, ::std::string &, float, uint &)> currentLineCallback)
MCAPI void _drawTextSegment (::ScreenContext &screenContext, ::std::string_view str, float startX, float startY, ::mce::Color const &color, bool centered, bool shadow, bool showColorSymbol, ::mce::MaterialPtr *optionalMat)
MCAPI int _drawWordWrap (::ScreenContext &screenContext, ::std::string_view str, float x, float y, float w, ::mce::Color const &color, uint maxLine, float fontSize, bool shadow, bool centered, bool showColorSymbol, ::mce::MaterialPtr *optionalMat)
MCAPI int _getStringChopAmount (::std::string_view currentLine, bool showColorSymbol, float maxWidth)
MCAPI ::std::shared_ptr<::Font::TextObject_makeTextObject (::Tessellator &tessellator, ::std::string_view str, ::mce::Color const &ccolor, bool showColorSymbol, bool ignoreColorFormatting, int caretPosition, bool shadow, float linePadding, bool isOddGuiScale, ::mce::Color const &resetColorOverride, bool uiMaterial, float outlineWidth, float yCaretOffset, bool autoGenNormalsAndTangents)
MCAPI int _processHeightWrap (::std::string_view str, float startX, float startY, float maxWidth, uint maxLine, bool showColorSymbol, bool centered, float fontSize, ::std::function< bool(::std::string_view const &, ::std::string &, float, uint &)> currentLineCallback)
MCAPI void calculateTextWidths (::std::string_view text, ::std::vector< int > &widths)
MCAPI void drawShadow (::ScreenContext &screenContext, ::std::string_view str, float x, float y, ::mce::Color const &color, bool showColorSymbol, ::mce::MaterialPtr *optionalMat, float linePadding)
MCAPI void drawTransformed (::ScreenContext &screenContext, ::std::string_view str, float x, float y, ::mce::Color const &color, float angle, float s, bool centered, float maxWidth, bool shadow)
MCAPI ::std::unordered_set<::ResourceLocation > const & getGlyphLocations () const
MCAPI ::std::vector<::ResourceLocationgetReloadFontTextures () const
MCAPI bool hasFormattingCodes (::std::string_view str) const
MCAPI void resetFontData (bool uploadTextureImmediately)
MCAPI bool supportsString (::std::string_view str)
MCAPI void tickObfuscatedTextIndex (float deltaTime, float obfuscateSwitchTime)
MCAPI void * $ctor (::std::shared_ptr<::mce::TextureGroup > textureGroup)
MCAPI void $dtor ()
MCFOLD void $fetchPage (int page)
MCAPI void $drawCached (::ScreenContext &screenContext, ::std::string_view str, float x, float y, ::mce::Color const &color, bool ignoreColorFormatting, bool darken, bool drawColorSymbol, ::mce::MaterialPtr const *optionalMat, int caretPosition, bool shadow, float linePadding, ::mce::Color const &resetColorOverride, ::mce::Color const &shaderDarkColor, float outlineWidth, float yCaretOffset, ::std::variant< ::std::monostate, ::UIActorOffscreenCaptureDescription, ::UIThumbnailMeshOffscreenCaptureDescription, ::UIMeshOffscreenCaptureDescription, ::UIStructureVolumeOffscreenCaptureDescription > const &offscreenCaptureDescription, bool autoGenNormalsAndTangents)
MCAPI int $getLineLength (::std::string_view str, float fontSize, bool showColorSymbol)
MCFOLD::Vec2 $getTranslationFactor () const
MCFOLD void $onAppSuspended ()
MCFOLD void $onDeviceLost ()
MCAPI void $reloadFontTextures (::Bedrock::NonOwnerPointer<::ResourceLoadManager > const &resourceLoadManager, bool blockingLoad)
MCAPI bool $isReloadingTextures ()
MCFOLD void $unloadTextures ()
MCAPI int $_getReplacementCharacter ()

Static Public Member Functions

static MCAPI void ** $vftable ()
static MCAPI bool containsWideChar (::std::string_view str)
static MCAPI ::Core::PathBuffer<::std::string > const & NOT_FOUND_PAGE ()
static MCAPI int const & UNICODE_REPLACEMENT_CHARACTER_CODE ()

Public Attributes

::ll::TypedStorage< 8, 24, ::std::vector<::FontAlias::ReferenceData > > mFontReferences
::ll::TypedStorage< 8, 32, ::std::string > mCurrentLanguageCode
::ll::TypedStorage< 1, 1, bool > mAllReferencesMaterialsCanBeOverridden
::ll::TypedStorage< 1, 1, bool > mAllReferencesScreenPixelAligned
::ll::TypedStorage< 1, 1, bool > mAllReferencesSupportShadowInSingleDraw
::ll::TypedStorage< 4, 4, float > mMaxWrapHeight
::ll::TypedStorage< 4, 4, float > mMaxScalar
::ll::TypedStorage< 4, 512, ::mce::Color[32]> mColors
::ll::TypedStorage< 4, 4, float > mScalarOverride
::ll::TypedStorage< 8, 24, ::std::vector<::std::tuple< int, int, float > > > mScaleOverrideCharacter
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::mce::TextureGroup > > mTextureGroup
::ll::TypedStorage< 8, 16, ::std::map< ::std::tuple<::std::string, ::mce::Color, float, float, bool, bool >, ::std::vector<::std::shared_ptr<::Font::TextObject > >, ::std::less< void > > > mStringCache
::ll::TypedStorage< 4, 4, int > mObfuscatedIndex
::ll::TypedStorage< 4, 4, float > mObfuscatedTextTime
::ll::TypedStorage< 4, 8, ::Vec2mCaretRenderPosition
::ll::TypedStorage< 4, 8, ::Vec2mCaretRenderSize
::ll::TypedStorage< 1, 1, bool > mAlwaysUnicode
::ll::TypedStorage< 1, 1, bool > mAutoResetFormat
::ll::TypedStorage< 1, 1, bool > mUseCache
::ll::TypedStorage< 4, 16, ::mce::ColormCurrentColor
::ll::TypedStorage< 4, 4, int > mFontTexture
::ll::TypedStorage< 4, 16, ::mce::ColormCaretColor
::ll::TypedStorage< 1, 1, bool > mItalic
::ll::TypedStorage< 1, 1, bool > mBold
::ll::TypedStorage< 1, 1, bool > mStrikethrough
::ll::TypedStorage< 1, 1, bool > mUnderlined
::ll::TypedStorage< 1, 1, bool > mObfuscated
::ll::TypedStorage< 8, 16, ::mce::MaterialPtrmFontMat

Member Typedef Documentation

◆ StringCache

using Font::StringCache
inherited
Initial value:
::std::map<
::std::tuple<::std::string, ::mce::Color, float, float, bool, bool>,
::std::vector<::std::shared_ptr<::Font::TextObject>>,
::std::less<void>>

Member Function Documentation

◆ _getCharWidth()

virtual float FontAlias::_getCharWidth ( int uniChar,
bool forceUnicode )
virtual

Implements Font.

◆ supportsChar()

virtual bool FontAlias::supportsChar ( int const & character)
virtual

Implements Font.

◆ getWrapHeight()

virtual float FontAlias::getWrapHeight ( ) const
virtual

Implements Font.

◆ getScaleFactor() [1/2]

virtual float FontAlias::getScaleFactor ( ) const
virtual

Implements Font.

◆ getScaleFactor() [2/2]

virtual float FontAlias::getScaleFactor ( int uniChar) const
virtual

Reimplemented from Font.

◆ isScreenPixelAligned()

virtual bool FontAlias::isScreenPixelAligned ( ) const
virtual

Implements Font.

◆ materialCanBeOverridden()

virtual bool FontAlias::materialCanBeOverridden ( ) const
virtual

Implements Font.

◆ setTextConstantsInScreenContext()

virtual void FontAlias::setTextConstantsInScreenContext ( ::ScreenContext & screenContext,
int glyphSheet,
float guiScale,
::mce::Color const & textColor,
bool hasShadow ) const
virtual

Reimplemented from Font.

◆ uploadTextureToGPU()

virtual void FontAlias::uploadTextureToGPU ( )
virtual

Implements Font.

◆ _getFontSheetLocation()

virtual::ResourceLocation FontAlias::_getFontSheetLocation ( int sheet,
bool forceUnicode ) const
virtual

Implements Font.

◆ getMaterial()

virtual::mce::MaterialPtr const & FontAlias::getMaterial ( int sheet,
bool isOddGuiScale ) const
virtual

Implements Font.

◆ loadFontData()

virtual void FontAlias::loadFontData ( bool uploadTextureImmediately)
virtual

Implements Font.

◆ _supportsShadowInSingleDraw()

virtual bool FontAlias::_supportsShadowInSingleDraw ( )
virtual

Implements Font.

◆ onLanguageChanged()

virtual void FontAlias::onLanguageChanged ( ::std::string_view languageCode)
virtual

Reimplemented from Font.

◆ _scanUnicodeCharacterSize()

virtual void FontAlias::_scanUnicodeCharacterSize ( int character,
int sheet,
bool forceUnicode )
virtual

Implements Font.

◆ buildChar()

virtual float FontAlias::buildChar ( ::std::vector<::Font::GlyphQuad > & quads,
int i,
::mce::Color const & color,
bool italic,
float x,
float y,
bool unicode )
virtual

Implements Font.

◆ switchFontsource()

virtual void FontAlias::switchFontsource ( ::Core::Path const & asciiName,
::Core::Path const & unicodeName )
virtual

Implements Font.

◆ getFontSources()

virtual ::std::pair<::Core::PathBuffer<::std::string > const &, ::Core::PathBuffer<::std::string > const & > FontAlias::getFontSources ( ) const
virtual

Implements Font.

◆ $vftable()

MCAPI void ** FontAlias::$vftable ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following files: