Monospaced and right justified numbers?

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
AlphaCentauriBear
Engineer
Engineer
Posts: 55
Joined: 14 Jan 2024 01:32

Monospaced and right justified numbers?

Post by AlphaCentauriBear »

Any chance anyone would have at making numbers in tables monospaced and right justified?
Game keeps updating them in real time and they keep jumping left and right which is extremely ugly. Not even mentioning they are not right aligned in tables which make visual comparison a pain.

Thank you.
skc
Traffic Manager
Traffic Manager
Posts: 177
Joined: 17 Sep 2022 02:02

Re: Monospaced and right justified numbers?

Post by skc »

Which tables are you referring to?
AlphaCentauriBear
Engineer
Engineer
Posts: 55
Joined: 14 Jan 2024 01:32

Re: Monospaced and right justified numbers?

Post by AlphaCentauriBear »

All and any tables where it makes sense with numeric values arranged top down.

These are two, for example:
- company budget
- list of vehicles with their current and last year incomes
tables.png
(1.37 MiB) Not downloaded yet
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Re: Monospaced and right justified numbers?

Post by peter1138 »

This is determined by the font you are using—some have variable width digits, some have fixed width digits. (And some have both as a variant, but we don't support that.)

The new OpenTTD Sans font matches the style of the original sprite font, but other typefaces exist.
He's like, some kind of OpenTTD developer.
AlphaCentauriBear
Engineer
Engineer
Posts: 55
Joined: 14 Jan 2024 01:32

Re: Monospaced and right justified numbers?

Post by AlphaCentauriBear »

Never mind then. I think it would be too much work just for cosmetic change. The game is playable without it.
User avatar
odisseus
Director
Director
Posts: 568
Joined: 01 Nov 2017 21:19

Re: Monospaced and right justified numbers?

Post by odisseus »

peter1138 wrote: 18 Jan 2024 11:22 The new OpenTTD Sans font
This is a good opportunity to make the digits fixed-width. I don't see any reason to keep variable width digits in the small and medium fonts.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Monospaced and right justified numbers?

Post by Eddi »

variable sized digits may provide better reading flow in general text.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Monospaced and right justified numbers?

Post by Zephyris »

I've updated OpenTTD Sans to have tabular numerals - it'll be in 14.0.
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Monospaced and right justified numbers?

Post by Auge »

Hello
Zephyris wrote: 14 Feb 2024 00:41 I've updated OpenTTD Sans to have tabular numerals - it'll be in 14.0.
That's really great. Thank you. 👍🎉

Tschö, Auge
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Quinch and 19 guests