/goodnight progress bar does not match percentage

Issue #347 resolved
Haromis created an issue

As title, as issue: 5fiycKk.png

Comments (7)

  1. Riot

    It would if the display were monospace. Problem is spaces are much narrower than equals signs in that particular Minecraft font.

    A workaround could be to multiply number of spaces by some hardcoded value but that might not be the same on fonts from other skins or theme mods.

    Another workaround could be to replace spaces with a fixed width character of the same width, such as _ - but the result may be uglier

  2. 14mRh4X0r

    I think there's a file somewhere that defines the width of characters. Perhaps we could use that for width calculations.

  3. 14mRh4X0r

    Minecraft just uses the actual width of the character, with a 3-pixel width for spaces. Between chars is 1 pixel of space. For the unicode font, there's a file that defines the character widths (assets/font/glyph_sizes.bin)

  4. Log in to comment