Imported fonts over different platforms

Home Forums General Using Ctrlr Imported fonts over different platforms

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #51280
    dasfaker
    Keymaster
      • Topics: 80
      • Replies: 793
      • Total: 873
      • ★★★

      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?

      #51303
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        That 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.

        #51333
        dasfaker
        Keymaster
          • Topics: 80
          • Replies: 793
          • Total: 873
          • ★★★

          Thanks 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.
          #58680
          dasfaker
          Keymaster
            • Topics: 80
            • Replies: 793
            • Total: 873
            • ★★★

            Hi Atom.

            Did you found something?

            #68719
            dasfaker
            Keymaster
              • Topics: 80
              • Replies: 793
              • Total: 873
              • ★★★

              After 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?

              #68720
              goodweather
              Participant
                • Topics: 45
                • Replies: 550
                • Total: 595
                • ★★★

                In 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.

                #68723
                dasfaker
                Keymaster
                  • Topics: 80
                  • Replies: 793
                  • Total: 873
                  • ★★★

                  You 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.

                  #69068
                  goodweather
                  Participant
                    • Topics: 45
                    • Replies: 550
                    • Total: 595
                    • ★★★

                    After 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…

                    #69069
                    dasfaker
                    Keymaster
                      • Topics: 80
                      • Replies: 793
                      • Total: 873
                      • ★★★

                      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.

                      This is a good question, but haven’t found anything related.

                      #69070
                      goodweather
                      Participant
                        • Topics: 45
                        • Replies: 550
                        • Total: 595
                        • ★★★

                        OR 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 🙂 )

                        #69076
                        proton
                        Participant
                          • Topics: 19
                          • Replies: 94
                          • Total: 113
                          • ★★

                          Hi,
                          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!

                          #69077
                          goodweather
                          Participant
                            • Topics: 45
                            • Replies: 550
                            • Total: 595
                            • ★★★

                            Google is our friend 🙂
                            The following code package.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).

                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                          There is currently 0 users and 91 guests online
                          No users are currently active
                          Forum Statistics
                          Threads: 2,495, Posts: 17,374, Members: 77,605
                          Most users ever online was 12 on January 22, 2019 3:47 pm
                          Ctrlr