bitburner-official / bitburner-src

Bitburner source code.
Other
838 stars 273 forks source link

UI: Disable font ligatures by default #1729

Closed catloversg closed 1 month ago

catloversg commented 1 month ago

Using font ligatures may confuse the player:

This PR disables font ligatures by default. If the player wants to use that "feature", they can enable it in the Options page.

Example code:

/** @param {NS} ns */
export async function main(ns) {
  ns.tprint("|>");
  ns.tprint("|||||-");
}

Before: before

After: after

d0sboots commented 1 month ago

I am really torn on this one. I did a deep dive on why this was even happening in the first place, so I now know it's due to a "feature" in the new font that we're using that is designed for coding, but can cause problems elsewhere in exactly this way. Given that we already have an option for enabling/disabling ligatures for coding, is there any purpose to leaving them on in the rest of the game? I.e. is there even a reason to add a new option for them?

catloversg commented 1 month ago

In this PR's draft, I only set the necessary CSS to disable the font ligatures without the new setting. Before submitting that, I wondered if the player would want to use ligatures in the main UI (for whatever reasons), so I decided to add a setting for that. Personally, I don't think it's necessary at all. It's kind of "if you don't like this change, you can disable/enable it". It seems that you also think that the new setting is unnecessary, so I'll remove it.