sp614x / optifine

1.81k stars 416 forks source link

[Bug] Negative Bitmap Font Heights not working #6446

Open nodenotjs opened 2 years ago

nodenotjs commented 2 years ago

Description of Issue

Setting the height property of a custom font does not work. Text is rendered as if the height were 0 As it should be: https://imgur.com/a/zlY4Jro) As it is: https://imgur.com/a/tSh7A1S

Steps to Reproduce

  1. Use any resourcepack who have a font that has the negative height property

OptiFine Version

1.18 H3

Installation Method

Installing with jar file

F3 Debug Screenshot

https://imgur.com/a/Gjjglkm

Prior Testing

This works normally in minecraft vanilla.

sp614x commented 2 years ago

Which resource pack is using fonts with negative height?

nodenotjs commented 2 years ago

i am using my own resourcepack. it uses an almost completely transparent 8x8 image and uses negative height to make the space negative. Download Link of my resourcepack

sp614x commented 2 years ago

How do you use it, steps to reproduce?

vladbarcelo commented 1 year ago

Which resource pack is using fonts with negative height?

@sp614x , Next to any resource pack with custom UIs uses negative font height. Take a look at the Spigot resource, section "Custom GUIs - Using The Minecraft Fontrenderer To Render Backgrounds".

The resourcepack usually relies on a custom font json: assets/minecraft/font/default.json:

{
    "providers": [
        {
            "type": "bitmap",
            "file": "some-spacer.png",
            "ascent": -32768,
            "height": -3, // <<- here
            "chars": [
                "\uE000"
            ]
        }
    ]
}

Also, bump.

nodenotjs commented 1 year ago

at the time I didn't use github much and I had to respond. sorry guys any future questions, I am willing to answer