Author Topic: Fixed width font for numbers  (Read 312 times)

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Fixed width font for numbers
« on: December 12, 2023, 01:20:01 am »
Any way to use fixed width font for numbers or somehow other way align numbers in list columns? They look skewed with proportional font.

Offline R1dO

  • Colonel
  • ****
  • Posts: 437
    • View Profile
Re: Fixed width font for numbers
« Reply #1 on: December 12, 2023, 01:42:06 am »
That is something (fixed width characters) one can already reach using mods.

It might require some maths and/or some fiddling.
See:
- https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)
For the definition of the font collection.
and:
- https://www.ufopaedia.org/index.php/Font_collection_(OpenXcom)
For the fine tuning, take special note of the `spacing` variable.

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Fixed width font for numbers
« Reply #2 on: December 12, 2023, 02:10:41 am »
I am curious how font even becomes proportional if it is claimed to be, for example, 16x16 and characters are given as images. Are they cut based on whites surrounding them or by fixed rectangle?

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Fixed width font for numbers
« Reply #3 on: December 12, 2023, 02:47:08 am »
I was right. Just making 1 wider solves this. Apparently, anyone can just edit font image to make it whatever they want.