<Control>.TextFont = "System" on Yosemite

I’m not really sure how this would work. The system fonts are installed system-wide. So, a permissions problem in one user would be the same in all users, right?

Well, in the 10.6 days I’d agree. Today - not so much.

A difference in OS behaviour noticeable between two virgin user accounts would usually indicate a perms issue or a profile difference. Since the System font appears correctly for the 2nd user, the first place I’d look would be permissions.

Try running repair permissions from DiskUtil for a start.

Well, repairing permissions in Disk Utility turned up noting amiss except for a few things dealing with a Canon printer driver.

As for the questions on permissions, maybe I would understand better if you called out exactly what permissions you think should be looked at. There are three Fonts folders: /Library/Fonts, /System/Library/Fonts and ~/Library/Fonts. Obviously, only ~/Library/Fonts is user-specific and the fonts in question here aren’t in that folder. The other two fonts folders are shared between all users. That’s where my confusion about your suggestion comes in.

Also, keep in mind, that as far as I can tell, only Xojo applications show this problem. All other applications don’t show the reversion to Lucida Grande. They use Helvetica Neue.

I do appreciate your help, but I need some more clarification.

It is possible to change permissions for a font file in /Library/Fonts so once could effectively prevent access to a particular font. A customer of mine requested that recently for MICR fonts used to print checks, which is sensitive enough to make sure no unauthorised party can access the font.

But I do not think that is what is going on here.

I all hypothesis, Xojo gets the name of the system font from the system itself, and it seems that process sometimes selects Helvetica New and sometimes Lucida Grande. That notion of system font size zero is a good idea for heterogenous cross-platform systems such as Windows or Linux, where the system font can be anything. But on Mac, since we know Helvetica Neue will be there always, the sensible thing to do would be simply to abandon System altogether and set Helvetica Neue as the default font for all controls.

In the improbable event a crazy user removes Helvetica Neue from his system, one could just verify when the app opens it is really there, and eventually use a replacement.

I thought the same, but the problem with that is that “Helvetica Neue” is not the actual font that Apple uses for the system font in Yosemite. They’re actually using a slightly modified version for the system font that doesn’t actually seem to appear in the font list. And, I haven’t figured out where this modified version of the font actually lives.

So, by putting “Helvetica Neue” in the font for controls, it still doesn’t work right. Plus, this doesn’t take into account those places where we have no control of the font, such as window titles. And, even in controls where I can set the font, setting a size of 12 point makes the font too small and setting a size of 13 point makes it slightly too big and it doesn’t center vertically correctly.

I suppose it could still be a permissions issue the way you describe Michel, but how does that explain why other applications seem to have no problems and it seems to be only Xojo made applications (including the IDE) that show this behavior? There is something else going on here.

@Scott Crick: I just tried your sample project on a clean Yosemite VM (10.10.2) using both an admin and non-admin account. Both instances worked fine in the debugger - displaying the System font as Helvetica Neue .

The default permissions for the contents of /Library/Fonts and /System/Library/Fonts are 0644 root:wheel. I see that both HelveticaNeue.dfont and HelveticaNeueDeskInterface.ttc are installed in /System/Library/Fonts. Check if you have both of those files with the correct permissions.

Another blue-sky thought is to select all the fonts in FontBook and run Validate Font on them. Failing that, I’d look to your installation media or procedures.

Please don’t abandon “System”. The system font is special and shouldn’t be hardcoded, as mentioned by Apple at WWDC 2014:

Applications built with releases prior to 2014r3 go down a compatibility path Apple added for third party developers. From another one of the 2014 WWDC sessions:

[quote]If we see explicit references to Lucida Grande in a UI element, we assume that you really meant Helvetica Neue, and we just do a replacement.

In addition, if we find that the text clips or wraps because it’s too wide for the area it has, we will compress it so it fits. So that, of course, ensures compatibility for existing applications.[/quote]

Applications built with 2014r3 and later do not go down this compatibility path and are assumed to be designed with the new system font metrics in mind. So, perhaps this explains what people are seeing?

My applications on Mac usually never use anything but System for controls. I did suspect Mac OS X was selecting it with precise criterion that better not be disturbed.

As the OP essentially wanted to make sure he got Helvetica Neue since he found out that sometimes Yosemite uses Lucida Grande, I suggested he unified his UI. I was not aware Apple specifically discouraged setting controls fonts, but I can understand.

This page shows how the system font is set for the whole OS :

From what it says, Lucida Grande is Mavericks, and Helvetica Neue Yosemite. All the more reasons not to change anything, since in general we never know on which system our apps will end up.

@Tanner Lee The permissions of all fonts in /System/Library/Fonts looks correct.

@Joe Ranieri I’ve been testing on 2014r2.1, but I will download the latest release and see what happens. Just don’t have the money to upgrade right now.

Again, keep in mind, this is not an issue system-wide. It is only happening with Xojo-built apps. With Xojo-built apps, “System” and “SmallSystem” is using Lucida Grande, not Helvetica Neue.

I do not think so, for me it looks correct.

OSX 10.10.2 Xojo 2014 R3.2

I could not verify what you posted. But it does not mean it cannot happen. I did not test in 2014R2.1 and as I said, I always use System anyway.

And…apparently, this was it. I just downloaded 2014r3.2 and tried my sample project with it and everything displays correctly. Thank you Joe for that bit of information. I had it so stuck in my head that I never thought to try the newer release.

sigh Now that means I have to figure out how to afford to renew before I can release. :slight_smile:

A user of my app Find Any File, built with 2014r2.1 (I need this for 10.6 compatibility) just notified me of this issue, even found this forum posting.

There was a similar issue years earlier already when only occured on Japanese systems. It, too, then used the wrong fonts. My work-around for that was to set the Font from “System” to “”, i.e. the empty string. Maybe this fix works here, too?

[quote=162795:@Axel Schneider]OSX 10.10…2 - Xojo 2014R3.2


Same here on 10.10.3 (from yesterday).
Maybe it happens on german systems only?

To be clear, I haven’t seen this problem with 2014r3.2 or 2015r1. So, at least for me, something changed between 2014r2.1 and 2014r3.2 that fixed this issue.

Uh, didn’t Joe Ranieri explain exactly that, i.e. that this issue got fixed in 2014r3?

My today’s comment was about suggesting a work-around for pre-2014r3 versions, BTW.

Thomas, please don’t get me wrong. I just wanted to make sure I was clear that I wasn’t seeing the problem anymore, just in case there was any confusion.

Well, never mind me suggesting to use an empty Font name. That doesn’t help with this issue. In my Find Any File, some controls do appear in Helvetica Neue on Yosemite, but only those where I could not use native Xojo controls but instead used Cocoa controls or even older APIs (for the popup menus, for instance). Sigh.

Looks like I’ll have to start offering two versions - one built with an older Xojo version (2013r3.3) for 10.6 systems and one with the latest Xojo version for correct fonts on 10.10.

Are there enough sales to users on older systems to make it worth it ?