Package net.minecraft.client.gui.font
Class FontManager
java.lang.Object
net.minecraft.client.gui.font.FontManager
- All Implemented Interfaces:
AutoCloseable
,PreparableReloadListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record
(package private) static final record
(package private) static final record
(package private) static final record
(package private) static final record
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FileToIdConverter
private static final String
private final Map
<ResourceLocation, FontSet> private static final com.google.gson.Gson
private FontSet
(package private) static final org.slf4j.Logger
static final ResourceLocation
private final FontSet
private final List
<GlyphProvider> private final TextureManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(FontManager.Preparation pPreperation, ProfilerFiller pProfiler) void
close()
private static GlyphProvider.Conditional
private void
finalizeProviderLoading
(List<GlyphProvider.Conditional> pProviders, GlyphProvider.Conditional pFallbackProvider) private static Set
<FontOption> getFontOptions
(Options pOptions) private FontSet
getFontSetCached
(ResourceLocation p_326503_) private FontSet
getFontSetRaw
(ResourceLocation pFontSet) private static List
<com.mojang.datafixers.util.Pair<FontManager.BuilderId, GlyphProviderDefinition.Conditional>> loadResourceStack
(List<Resource> pResources, ResourceLocation pFontId) private CompletableFuture
<FontManager.Preparation> prepare
(ResourceManager pResourceManager, Executor pExecutor) reload
(PreparableReloadListener.PreparationBarrier pPreparationBarrier, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) private Map
<ResourceLocation, List<GlyphProvider.Conditional>> resolveProviders
(List<FontManager.UnresolvedBuilderBundle> pUnresolvedBuilderBundles) private CompletableFuture
<Optional<GlyphProvider>> safeLoad
(FontManager.BuilderId pBuilderId, GlyphProviderDefinition.Loader pLoader, ResourceManager pResourceManager, Executor pExecutor) void
updateOptions
(Options pOptions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
FONTS_PATH
- See Also:
-
MISSING_FONT
-
FONT_DEFINITIONS
-
GSON
private static final com.google.gson.Gson GSON -
missingFontSet
-
providersToClose
-
fontSets
-
textureManager
-
lastFontSetCache
-
-
Constructor Details
-
FontManager
-
-
Method Details
-
createFallbackProvider
-
reload
public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier pPreparationBarrier, ResourceManager pResourceManager, ProfilerFiller pPreparationsProfiler, ProfilerFiller pReloadProfiler, Executor pBackgroundExecutor, Executor pGameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
prepare
private CompletableFuture<FontManager.Preparation> prepare(ResourceManager pResourceManager, Executor pExecutor) -
safeLoad
private CompletableFuture<Optional<GlyphProvider>> safeLoad(FontManager.BuilderId pBuilderId, GlyphProviderDefinition.Loader pLoader, ResourceManager pResourceManager, Executor pExecutor) -
resolveProviders
private Map<ResourceLocation,List<GlyphProvider.Conditional>> resolveProviders(List<FontManager.UnresolvedBuilderBundle> pUnresolvedBuilderBundles) -
finalizeProviderLoading
private void finalizeProviderLoading(List<GlyphProvider.Conditional> pProviders, GlyphProvider.Conditional pFallbackProvider) -
getFontOptions
-
apply
-
updateOptions
-
loadResourceStack
private static List<com.mojang.datafixers.util.Pair<FontManager.BuilderId,GlyphProviderDefinition.Conditional>> loadResourceStack(List<Resource> pResources, ResourceLocation pFontId) -
createFont
-
createFontFilterFishy
-
getFontSetRaw
-
getFontSetCached
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-