File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
common/src/main/kotlin/com/lambda/graphics/renderer/gui/font Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,23 @@ import kotlin.time.Duration.Companion.days
5151 * It stores glyph information, manages texture uploads, and provides functionality to build texture buffers for fonts and emoji sets
5252 *
5353 * It caches font information and emoji data for efficient rendering and includes mechanisms for uploading and binding texture atlases
54+ *
55+ * It's also possible to upload custom atlases and bind them with no hassle
56+ * ```kt
57+ * enum class ExampleFont {
58+ * CoolFont("Cool-Font");
59+ * }
60+ *
61+ * fun loadFont(...) = BufferedImage
62+ *
63+ * ExampleFont.CoolFont.uploadAtlas(loadFont(...)) // The extension keeps a reference to the font owner
64+ *
65+ * ...
66+ *
67+ * onRender {
68+ * ExampleFont.CoolFont.bind(slot = x)
69+ * }
70+ * ```
5471 */
5572object LambdaAtlas {
5673 private val fontMap = Object2ObjectOpenHashMap <Any , Int2ObjectArrayMap <GlyphInfo >>()
You can’t perform that action at this time.
0 commit comments