proportional digits in 2018r4’s systemfont

Hello, when I compile with Xojo 2018R4 I realize a differenze to 2018R3 in System Font in a ListBox on macOS 10.14.2 on a MBP Retina.

Any help is very appreciated.

Regards Thomas

Please change the name of the thread to something meaningful – proposal: “proportional digits in 2018r4’s systemfont”, change the second image link to http://www.arvoitus.de/2018R4.jpg and file a feature request in Feedback:

Beginning with macOS 10.11, NSFont’s systemFontOfSize: method now returns a proportional version of San Francisco, and an additional method “monospacedDigitSystemFontOfSize:weight:” was added.
As Xojo 2018r4 now links against the Mojave framework whereas before it still used the 10.10 API, I suspect the reason lies in the unchanged use of the first method.

Hello Ulrich,

thanks for your answer. Unfortunately I can’t find where to change the thread name. Sry was my first post here…

Do a double-click on the title of the thread.

If you want the digits to line up, you need to select a monospaced font. 2018r4 is behaving correctly.

And sadly, there is no easy workaround as far as I can see. It is no problem to add a handful of declares to enable monospaced digits system font on Textfields or -areas and similar controls, but the listbox’ TextFont cannot be overriden that easily.

It is also easy to extend the methods to a Graphics object, but that does not change anything because DrawString uses the Graphics’ text font property, not what you might declare into it …

It’s under the secondary properties (the cog).

I frankly don’t see an issue with drawing text as the font’s designer intended.

Yes, but you’d have to override the listbox’ cells’ drawing routines. A setFont: declare into the listbox itself does not change anything.

EDIT: Agreed. But there is a monospaced variant of Apple’s system font which is currently unavailable. For showing numbers in a table, it would be good to have it. Especially because many macOS developers upgrading to 2018r4 would experience this change in their apps if they use the system font.

There used to be a rule of font design dictating that regardless of whether the overall font was fixed or proportional, the numerals were were always fixed width so that they would always line up in columns. It seems that modern font designers no longer have a clue about these practicalities.

Yep. Anybody who designs a font for reading body text, and doesn’t consider that numerals should always have a fixed width, for the reasons explained by Robert (above) should do us all a favour and have themselves booked into a “re-education” facility asap.

Also the same reasoning applies to full stops (decimal point) and the comma (among others) are the same width to ensure that tables of figures line up and therefore easily read. “Legibility” should not be underestimated.

Indeed fixed width numerals was the rule since lead typography.

Count on Apple’s minions to mess things up with their creativity.

I am not opposed to innovation. But if I understand right, my apps which as recommended use system font to display columns of digits, will look terrible under Mojave. I should have done what I regularly have to do when I want to be certain typography will be good, that is using one of my own fonts. And that is what I will do for now on.

Just be aware of <https://xojo.com/issue/54392> if you’re building your applications for Windows, too.
And regarding typography: be aware that on Windows you can now render Text with both GDI or Direct2D (as the two technologies will have some differences - each one with it’s own advantages and disadvantages). But at least we can now use what’s best from both.

And since <https://xojo.com/issue/54670> is closed…
…I still think someone who needs monospaced digit fonts should put in a feature request to be able to use that in a Xojo-supported way. Otherwise it’s not possible to build a spreadsheet-type application (or a list of numbers in a Listbox) with Xojo (that looks good with system font).

[quote=421970:@Jürg Otter]
…I still think someone who needs monospaced digit fonts should put in a feature request to be able to use that in a Xojo-supported way. Otherwise it’s not possible to build a spreadsheet-type application (or a list of numbers in a Listbox) with Xojo (that looks good with system font).[/quote]
Switch the font in the inspector to Monaco or your other favorite monospaced font.

Yep. Monaco or Consolas show Zero correct. That is, Zero has the diagonal stroke through it.

A pet hate of mine is when people give a number and say “O” when they really mean Zero. “O” is an alphabetical letter. Zero is numeric. It’s often hard to tell the difference with most fonts, but using Monaco or Consolas you can easily see the difference.

I bet you hate Jenny then :wink:

Jenny?

867-5309/Jenny
(it’s a classic old song, I hope region restrictions don’t get in the way)

That’s one option, yes. A quick and dirty one.

There are many good reasons a developer uses the “System” Font for an app’s UI.
And in case of having to display a grid of data, where some columns may contain numbers this new “default proportional System Font” is an issue. Just see the Pictures in the Forum Post - if the entire UI is using “System” (which is a good idea), then such a Listbox could/should use a “monospaced Digit System Font” - and not an entirely different Font.

Using a completely different Font (e.g. Monaco) is an option. But not always.
It’s certainly not a good UI design if Fonts get “mixed” just because we don’t have another way.
And not always a good option to entirely switch to a “non default System Font”.

When updating the SDK, Apple has provided to use the “monospaced Digit System Font”. It’s up to the developer to use that when appropriate. Unfortunately, Xojo has updated the SDK without allowing the Xojo Developers to get access to the monospacedDigitSystemFont…
… so here is the Feature request to get this ability in Xojo: <https://xojo.com/issue/54711> - macOS: Provide a way to use the monospacedDigitSystemFont