GlyphInfo .java

com.mojang.blaze3d.font.GlyphInfo (interface, 26 lines): members: getShadowOffset, getBoldOffset, getAdvance, simple. imports: EnvType.

com.mojang.blaze3d.fontinterface26 linesclient487 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Full Source

GlyphInfo.java26 lines · Minecraft 26.3 · verbatim
1
package com.mojang.blaze3d.font;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
6
@Environment(EnvType.CLIENT)
7
public interface GlyphInfo {
8
	float getAdvance();
9
10
	default float getAdvance(final boolean bold) {
11
		return this.getAdvance() + (bold ? this.getBoldOffset() : 0.0F);
12
	}
13
14
	default float getBoldOffset() {
15
		return 1.0F;
16
	}
17
18
	default float getShadowOffset() {
19
		return 1.0F;
20
	}
21
22
	static GlyphInfo simple(final float advance) {
23
		return () -> advance;
24
	}
25
}
26

Decompiled Minecraft 26.3 source of GlyphInfo (com/mojang/blaze3d/font/GlyphInfo.java) with Mojang official mappings, stored verbatim on the site.