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 preperation, ProfilerFiller profiler) void
close()
private static GlyphProvider.Conditional
private void
finalizeProviderLoading
(List<GlyphProvider.Conditional> providers, GlyphProvider.Conditional fallbackProvider) private static Set
<FontOption> getFontOptions
(Options options) private FontSet
getFontSetCached
(ResourceLocation fontSet) private FontSet
getFontSetRaw
(ResourceLocation fontSet) private static List
<com.mojang.datafixers.util.Pair<FontManager.BuilderId, GlyphProviderDefinition.Conditional>> loadResourceStack
(List<Resource> resources, ResourceLocation fontId) private CompletableFuture
<FontManager.Preparation> prepare
(ResourceManager resourceManager, Executor executor) reload
(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) private Map
<ResourceLocation, List<GlyphProvider.Conditional>> resolveProviders
(List<FontManager.UnresolvedBuilderBundle> unresolvedBuilderBundles) private CompletableFuture
<Optional<GlyphProvider>> safeLoad
(FontManager.BuilderId builderId, GlyphProviderDefinition.Loader loader, ResourceManager resourceManager, Executor executor) void
updateOptions
(Options options) 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 preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
prepare
private CompletableFuture<FontManager.Preparation> prepare(ResourceManager resourceManager, Executor executor) -
safeLoad
private CompletableFuture<Optional<GlyphProvider>> safeLoad(FontManager.BuilderId builderId, GlyphProviderDefinition.Loader loader, ResourceManager resourceManager, Executor executor) -
resolveProviders
private Map<ResourceLocation,List<GlyphProvider.Conditional>> resolveProviders(List<FontManager.UnresolvedBuilderBundle> unresolvedBuilderBundles) -
finalizeProviderLoading
private void finalizeProviderLoading(List<GlyphProvider.Conditional> providers, GlyphProvider.Conditional fallbackProvider) -
getFontOptions
-
apply
-
updateOptions
-
loadResourceStack
private static List<com.mojang.datafixers.util.Pair<FontManager.BuilderId,GlyphProviderDefinition.Conditional>> loadResourceStack(List<Resource> resources, ResourceLocation fontId) -
createFont
-
createFontFilterFishy
-
getFontSetRaw
-
getFontSetCached
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-