Google Fonts Clipping On OS X

Years ago I started this conversation on the forum about how OpenSans (among other fonts) was clipping incorrectly.

We still really would prefer to use OpenSans (and a bunch of its variants: Open Sans Light, for example) but this clipping issue really is a showstopper for us.

It’s been several years since I brought this up, and the Label control has undergone a lot of changes in the mean time. We are preparing a refresh of our UI, and again wanted to try out OpenSans. On Windows, you can see the fonts line up perfectly:

But on OS X, the leading is still messed up:

And in the code editor on OS X, they are drawn incorrectly as well:

Is there any hope of ever getting this working properly?

What happens if you just make a label in an app with Xcode and use the same font?
Because if it’s a bug in AppKit, Xojo may not be able to fix it.

Dang. Looks like XCode exhibits the exact same problem:

Is there another font that is similar (in looks) that you could use since it looks like that one is “not right” on the Mac?

I tend to use Source Sans Pro, Source Code Pro, and Source Serif Pro from Adobe. Google fonts site has 1000s of fonts.

Does using open sans work in something like TextEdit on the mac correctly ?

nm see this was asked& answered already

Looks almost good in size 36:

I cheated. Because I had problems with labels before I use a very simple canvas instead.

I wound up using the Roboto font. The baseline / leading are pretty close to that of Arial (the old font we were using) so I had to make a few small adjustments to some of my larger point size labels, but all the labels that were less than 20 pt fit reasonably well enough.

Thanks, everyone!

just a quick question?? how to use google font in xojo for desktop??
i know how to use it html for my reports but unsure how to do it on windows label and textarea and also on web edition

Go to https://fonts.google.com/about and click on API documentation which will help about using fonts for web.

For Desktop, go to the github and download the fonts. You will then be able to add them to your projects as custom fonts.

[quote=442413:@Michel Bujardet]

For Desktop, go to the github and download the fonts. You will then be able to add them to your projects as custom fonts.[/quote]

Where can i read about the custom fonts??

For Mac, search for “custom fonts” ; I posted several ways a few years ago.

For Windows, I use MBS plugins.

Windows Functionality Suite contains the functionality for installing fonts on Windows, if I remember correctly.

thanks guy, i find the posting with the sample project

Yes, indeed. I use MBS plugins today because on Mac I had to transition to 64 bits and did not feel like getting my hands dirty under the hood, and did the same under Windows.

But by all means, people who are inclined to use declares can do so.

Here is an old thread, which is still valid:
https://forum.xojo.com/5179-mac-os-custom-fonts/0

so basically using the same MBS calls for both mac and windows??

They are not identical, but close enough to use conditional compilation.

The main advantage of Christian’s plugins is that he maintains them to follow technology, so I don’t have to waste time on declares. Or worse, to get bugs because my declares are not perfect. I endured that on a project before, and that was not pretty.

Have you selected the checkbox “Uses single line mode” in the Attributes selectors pane ?

[quote=442441:@Michel Bujardet]They are not identical, but close enough to use conditional compilation.

The main advantage of Christian’s plugins is that he maintains them to follow technology, so I don’t have to waste time on declares. Or worse, to get bugs because my declares are not perfect. I endured that on a project before, and that was not pretty.[/quote]

would you mind telling me which function to use in MBS??