#Positioning and scaling custom UI using fonts

1 messages · Page 1 of 1 (latest)

topaz cliff
#

(ignore the skew, im know how to fix that) i made a 256x256 font and here i now need to fill the screen with this image fully.

vernal wing
#

can you show your font.json?

topaz cliff
#

"providers": [
{
"type": "bitmap",
"file": "imagemaker:font/loading_screen/tile_0_0.png",
"ascent": 20,
"height": 20,
"chars": [
"a"
]
},
{
"type": "bitmap",
"file": "imagemaker:font/loading_screen/tile_0_1.png",
"ascent": 20,
"height": 20,
"chars": [
"b"
]
},
{
"type": "bitmap",
"file": "imagemaker:font/loading_screen/tile_0_2.png",
"ascent": 20,
"height": 20,
"chars": [
"c"
]
},
{
"type": "bitmap",
"file": "imagemaker:font/loading_screen/tile_0_3.png",
"ascent": 20,
"height": 20,
"chars": [
"d"
]
},
{
"type": "bitmap",
"file": "imagemaker:font/loading_screen/tile_0_4.png",
"ascent": 20,
"height": 20,
"chars": [
"e"
]
},
{
"type": "bitmap",
"file": "imagemaker:font/loading_screen/tile_0_5.png",
"ascent": 20,
"height": 20,
"chars": [
"f"
]
},

#

and so on

#

lowest point is -60

vernal wing
#

you should just be able to increase the height

topaz cliff
#

height is now 30, i guessi increase the image untill i get to the top?

vernal wing
#

yea you can also use the ascent to move the image up/down, it can be negative but the value can't be bigger than the height.

#

There is also something called negative spaces for moving the image left and right. I think this video might help you a lot: https://www.youtube.com/watch?v=EL2X6ppZSCQ

We cover how to make custom ui bars similar to the health and hunger bar, in Minecraft.

💡 Amber's Negative Space Font (included in example pack) : https://github.com/AmberWat/NegativeSpaceFont

📦 Download (Contains Resource Pack and Datapack: https://www.dropbox.com/s/1fa3byoz6ugrwx3/cw_mana_bar.zip?dl=1

🔵 Discord Server: https://disc...

▶ Play video
#

although it's a little outdated

topaz cliff
#

yeah negative spaces are used here

#

-1 after each to keep it all stiched and a massive one (tho i miscalculated) to reset back to beggining

#

hm, but now a problem here

#

if i go higher then the image will become too big no?

topaz cliff
#

yeah I guess I'll have to rescale the image to be 3x3

#

as I have on idea on how to scale it good with the current stuff