Home › Forums › General › Using Ctrlr › Imported fonts over different platforms
- This topic has 11 replies, 4 voices, and was last updated 8 years ago by goodweather.
-
AuthorPosts
-
June 25, 2015 at 1:52 pm #51280
I just installed OSX Mavericks on a Virtual Machine in my Win7 system to test Ctrlr, and discovered that fonts used in my panels (all imported fonts) look very different in OSX. Some fonts became twice bigger, other just aren’t the same.
Is this a problem with the virtual machine, or related to platform change?
June 25, 2015 at 11:13 pm #51303That sounds weird and something that JUCE might be responsible for, i’ll need to check that out. Could you maybe create an empty panel with some labels and embedded fonts for me test. I’ll try to take them for a spin on my mac VMs.
June 26, 2015 at 10:40 am #51333Thanks Atom.
Here’s the panel example, and this is how it looks on my computer.
Attachments:
You must be logged in to view attached files.September 26, 2015 at 12:21 pm #58680Hi Atom.
Did you found something?
March 22, 2016 at 6:47 pm #68719After another look at this issue, it seems that on OSX, the fonts imported have to be used in bold style to be displayed correctly, while on Windows they have to be normal.
On Win: font:setSizeAndStyle(14, 0, 1, 0)
On OSX: font:setSizeAndStyle(14, 1, 1, 0)Is there a way to deal with this?
March 22, 2016 at 8:50 pm #68720In general, when using a specific font for a panel, how to secure that a user of the panel sees things in the right way with the good font? Is it needed to provide the font file and ask the user to install it on his PC?
For example for the Pro2 panel I’m busy to build, I use Neo Sans Std which is corresponding to actual font used on the physical synth.March 23, 2016 at 12:48 pm #68723You can import fonts as resources, in the same way you import images.
But it’s not that easy. I’ve found several problems related with imported fonts when viewed on OSX vs Win. Not all fonts behave the same on both platforms, you’ll need to check it.April 20, 2016 at 7:46 pm #69068After another look at this issue, it seems that on OSX, the fonts imported have to be used in bold style to be displayed correctly, while on Windows they have to be normal.
On Win: font:setSizeAndStyle(14, 0, 1, 0)
On OSX: font:setSizeAndStyle(14, 1, 1, 0)Is there a way to deal with this?
Is there a way to check that we are on Windows or on OSX? If we can test this then we can adjust the font accordingly.
Anyway thx for this topic, I have already a couple of guys who want to test my panel on OSX and myself I’m using Win…April 20, 2016 at 8:34 pm #69069Is there a way to check that we are on Windows or on OSX? If we can test this then we can adjust the font accordingly.
This is a good question, but haven’t found anything related.
April 20, 2016 at 9:17 pm #69070OR another workaround, can we test for the existence of some unique file or folder?
On Windows, we should have some “Windows” folder On a Mac you have… (I don’t know, never used a Mac – my apologizes the Mac users 🙂 )April 21, 2016 at 10:06 am #69076Hi,
that would also be of interest to me.
I had this font problems for quite some time until after many tests I decided to use only “Trebuchet MS” font since this one looks exactly the same on both platforms.
Embedding a font into a panel resources would be the easiest solution anyways!
I hope we can find a solution for that.
Have a good one!April 21, 2016 at 10:51 am #69077Google is our friend 🙂
The following codepackage.config:sub(1,1)
gives the separator in path names.
So it returns \ for Windows and / for Mac and Unix.
Another way can be to test the existance of key directories as I thought above (/Applications for MAC OS, /home (after trying MAC OS) for GNU/Linux and finally C:/Windows and C:/WINNT). -
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.