LeviLamina
Loading...
Searching...
No Matches
Font Class Referenceabstract
+ Inheritance diagram for Font:

Classes

struct  GlyphQuad
 
struct  TextObject
 

Public Types

using CurrentLineCallback = ::std::function<bool(::std::string const&, ::std::string&, float, uint&)> const
 
using StringCache
 

Public Member Functions

virtual void switchFontsource (::Core::Path const &, ::Core::Path const &)=0
 
virtual ::std::pair<::Core::PathBuffer<::std::string > const &, ::Core::PathBuffer<::std::string > const & > getFontSources () const =0
 
virtual void fetchPage (int)
 
virtual void drawCached (::ScreenContext &screenContext, ::std::string const &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 bool supportsChar (int const &)=0
 
virtual int getLineLength (::std::string const &str, float fontSize, bool showColorSymbol)
 
virtual float getWrapHeight () const =0
 
virtual float getScaleFactor () const =0
 
virtual float getScaleFactor (int) const
 
virtual::Vec2 getTranslationFactor () const
 
virtual bool isScreenPixelAligned () const =0
 
virtual bool materialCanBeOverridden () const =0
 
virtual void uploadTextureToGPU ()=0
 
virtual void setTextConstantsInScreenContext (::ScreenContext &, int, float, ::mce::Color const &, bool) 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 onAppSuspended ()
 
virtual void onDeviceLost ()
 
virtual void reloadFontTextures (::Bedrock::NonOwnerPointer<::ResourceLoadManager > const &, bool)
 
virtual bool isReloadingTextures ()
 
virtual void unloadTextures ()
 
virtual void onLanguageChanged (::std::string const &)
 
virtual float buildChar (::std::vector<::Font::GlyphQuad > &, int, ::mce::Color const &, bool, float, float, bool)=0
 
virtual::mce::MaterialPtr const & getMaterial (int, bool) const =0
 
virtual void loadFontData (bool)=0
 
virtual int _getReplacementCharacter ()
 
virtual bool _supportsShadowInSingleDraw ()=0
 
virtual float _getCharWidth (int, bool)=0
 
virtual void _scanUnicodeCharacterSize (int, int, bool)=0
 
virtual::ResourceLocation _getFontSheetLocation (int, bool) const =0
 
virtual::std::string _remapString (::std::string const &str) const
 
MCAPI Font (::std::shared_ptr<::mce::TextureGroup > textureGroup)
 
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 const &, ::std::string &, float, uint &)> currentLineCallback)
 
MCAPI void _drawTextSegment (::ScreenContext &screenContext, ::std::string const &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 const &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 const &currentLine, bool showColorSymbol, float maxWidth)
 
MCAPI ::std::shared_ptr<::Font::TextObject_makeTextObject (::Tessellator &tessellator, ::std::string const &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 const &str, float startX, float startY, float maxWidth, uint maxLine, bool showColorSymbol, bool centered, float fontSize, ::std::function< bool(::std::string const &, ::std::string &, float, uint &)> currentLineCallback)
 
MCAPI void calculateTextWidths (::std::string const &text, ::std::vector< int > &widths)
 
MCAPI void drawShadow (::ScreenContext &screenContext, ::std::string const &str, float x, float y, ::mce::Color const &color, bool showColorSymbol, ::mce::MaterialPtr *optionalMat, float linePadding)
 
MCAPI void drawTransformed (::ScreenContext &screenContext, ::std::string const &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<::ResourceLocation > getReloadFontTextures () const
 
MCAPI int getTextHeight (::std::string const &str, float fontSize)
 
MCAPI bool hasFormattingCodes (::std::string const &str) const
 
MCAPI int processLinesInBox (::std::string const &str, float maxWidth, uint maxLines, bool showColorSymbol, ::std::function< bool(::std::string const &, ::std::string &, float, uint &)> currentLineCallback)
 
MCAPI void resetFontData (bool uploadTextureImmediately)
 
MCAPI bool supportsString (::std::string const &str)
 
MCAPI void tickObfuscatedTextIndex (float deltaTime, float obfuscateSwitchTime)
 
MCAPI void * $ctor (::std::shared_ptr<::mce::TextureGroup > textureGroup)
 
MCAPI void $dtor ()
 
MCFOLD void $fetchPage (int)
 
MCAPI void $drawCached (::ScreenContext &screenContext, ::std::string const &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 const &str, float fontSize, bool showColorSymbol)
 
MCAPI float $getScaleFactor (int) const
 
MCFOLD::Vec2 $getTranslationFactor () const
 
MCFOLD void $setTextConstantsInScreenContext (::ScreenContext &, int, float, ::mce::Color const &, bool) const
 
MCFOLD::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 $onAppSuspended ()
 
MCFOLD void $onDeviceLost ()
 
MCAPI void $reloadFontTextures (::Bedrock::NonOwnerPointer<::ResourceLoadManager > const &, bool)
 
MCAPI bool $isReloadingTextures ()
 
MCFOLD void $unloadTextures ()
 
MCFOLD void $onLanguageChanged (::std::string const &)
 
MCAPI int $_getReplacementCharacter ()
 
MCFOLD::std::string $_remapString (::std::string const &str) const
 

Static Public Member Functions

static MCAPI bool containsWideChar (::std::string const &str)
 
static MCAPI int const & DEFAULT_FONT_HEIGHT ()
 
static MCAPI int const & DEFAULT_WRAP_HEIGHT ()
 
static MCAPI ::Core::PathBuffer<::std::string > const & NOT_FOUND_PAGE ()
 
static MCAPI int const & NULL_CHAR ()
 
static MCAPI float const & OBFUSCATED_TIME_SWITCH ()
 
static MCAPI int const & PRIVATE_USE_AREA_BEGIN ()
 
static MCAPI int const & PRIVATE_USE_AREA_END ()
 
static MCAPI int const & UNICODE_REPLACEMENT_CHARACTER_CODE ()
 
static MCAPI void ** $vftable ()
 

Public Attributes

::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 > > > > mStringCache
 
::ll::TypedStorage< 4, 4, int > mObfuscatedIndex
 
::ll::TypedStorage< 4, 4, float > mObfuscatedTextTime
 
::ll::TypedStorage< 4, 8, ::Vec2 > mCaretRenderPosition
 
::ll::TypedStorage< 4, 8, ::Vec2 > mCaretRenderSize
 
::ll::TypedStorage< 1, 1, bool > mAlwaysUnicode
 
::ll::TypedStorage< 1, 1, bool > mAutoResetFormat
 
::ll::TypedStorage< 1, 1, bool > mUseCache
 
::ll::TypedStorage< 4, 16, ::mce::Color > mCurrentColor
 
::ll::TypedStorage< 4, 4, int > mFontTexture
 
::ll::TypedStorage< 4, 16, ::mce::Color > mCaretColor
 
::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::MaterialPtr > mFontMat
 

Member Typedef Documentation

◆ StringCache

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

Member Function Documentation

◆ $vftable()

static MCAPI void ** Font::$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: