MacOS System Fonts

Forum rules
A place to discuss and plan OpenSource xTalk (not exclusively LCC based) and Community Builds of LCC
Ask NOT what xTalk can do for you... get involved you DO have something to contribute, no matter your skillset!

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: MacOS System Fonts

Re: MacOS System Fonts

by OpenXTalkPaul » Tue Oct 10, 2023 3:48 pm

tperry2x wrote: Tue Oct 10, 2023 1:05 pm
OpenXTalkPaul wrote: Tue Oct 10, 2023 11:53 am
case "Linux"
return "Helvetica"

-- Other distros (Arch Linux, Debian, Fedora etc.) varies, can be DejaVu Sans, Noto Sans, Liberation Sans etc.
I don't know when Helvetica was ever a choice on Linux.
That is a commercial font is it not?

Surely it could use
if $desktop_session contains "ubuntu" then...

Then use the right corresponding font for specific distros?
Yes it is, I thought that was an odd choice for FOSS (OSes).
The IDE came with a few fonts, Source Code Pro / Font Awesome.
We could include a base set of liberal licensed fonts and have font consistency across all platforms, at least in the IDE, just a thought. Or maybe make that loadable sets maybe part of an IDE theming library.

Re: MacOS System Fonts

by OpenXTalkPaul » Tue Oct 10, 2023 3:45 pm

richmond62 wrote: Tue Oct 10, 2023 12:25 pm Aha, you have found the deprecated racist word in the woodpile.

Well done.

So 'hard-coded' is only as 'hard' as far as that file goes.
Correct, the only things that are REALLY hardcoded, as in needing to recompile engine, are engine / language level and system level stuff. Most everything to do with the IDE are stacks/scripts (some call out externally, like SB to the Android SDK for example).

Re: MacOS System Fonts

by tperry2x » Tue Oct 10, 2023 1:05 pm

OpenXTalkPaul wrote: Tue Oct 10, 2023 11:53 am
case "Linux"
return "Helvetica"

-- Other distros (Arch Linux, Debian, Fedora etc.) varies, can be DejaVu Sans, Noto Sans, Liberation Sans etc.
I don't know when Helvetica was ever a choice on Linux.
That is a commercial font is it not?

Surely it could use
if $desktop_session contains "ubuntu" then...

Then use the right corresponding font for specific distros?

Re: MacOS System Fonts

by richmond62 » Tue Oct 10, 2023 12:25 pm

Aha, you have found the deprecated racist word in the woodpile.

Well done.

So 'hard-coded' is only as 'hard' as far as that file goes.

Re: MacOS System Fonts

by OpenXTalkPaul » Tue Oct 10, 2023 11:53 am

revcommonlibrary.livecodescript contains this section (modified with notes in OXT DPE IDE):

Code: Select all

function revFontGetSystemFont
   switch _revFontGetPlatform()
      case "Windows"
         if word 1 of the systemVersion is "NT" and word 2 of the systemVersion >= 5 and "Segoe UI" is among the lines of the fontNames then
            return "Segoe UI"
         else if word 1 of the systemVersion is "NT" and word 2 of the systemVersion >= 5 and "Tahoma" is among the lines of the fontNames then
            return "Tahoma"
         else
            return "MS Sans Serif"
         end if
         break

      case "MacOS X"
         return "Lucida Grande"
         break

      case "Linux"
         return "Helvetica"
         break

      case "iphone"
         return "San Francisco"
         break

      case "android"
         return "Roboto"
         break

   end switch
   -- Default sans-serif font in MacOS
   -- MacOS (El Capitan and newer) San Francisco
   -- MacOS (Yosemite) Helvetica Neue
   -- MacOS (older versions) Lucida Grande
   -- Please note that — although for interface San Francisco is the default
   -- sans-serif font — for web -apple-system will need to be used, as the
   -- sans-serif fallback will display Helvetica instead of San Francisco.
   --(this is one of the quirks I mentioned earlier)

   -- Default sans-serif font in Windows
   -- The difference between Microsoft Sans Serif and MS Sans Serif is that MS Sans Serif was a
   -- bitmap/raster font available in 8, 10, 12, 14, 18, and 24 sizes and Microsoft Sans Serif is a TrueType scalable font.

   -- MS Sans Serif was based on Helvetica and in all versions up to Windows 3.1 it was called Helv.
   --Windows (Vista and newer, including Windows 10) Segoe UI
   -- Windows (XP) Tahoma
   -- Windows (2000) Microsoft Sans Serif
   -- Windows (95, NT, Millennium) MS Sans Serif
   -- Windows (older versions including Windows 3) Helv
   -- Default sans-serif font in Linux: Many Linux users re-configure defaults to other fonts like Inter UI or others.
   -- So it’s almost impossible to accurately mention defaults, except for the Ubuntu distro
   --  which has its own font as default.
   -- Red Hat also has commissioned its own fonts Red Hat Display and Red Hat Text.

   -- Ubuntu - Ubuntu
   -- Red Hat = Red Hat
   -- Other distros (Arch Linux, Debian, Fedora etc.) varies, can be DejaVu Sans, Noto Sans, Liberation Sans etc.

   -- iOS (9 and newer)and iPadOS San Francisco
   -- iOS (8 and older) Helvetica/Helvetica Neue

   -- watchOS = San Francisco Compact
   -- Android (4.0+) Roboto
   -- Android (older versions) Droid Sans
end revFontGetSystemFont

Re: MacOS System Fonts

by richmond62 » Tue Oct 10, 2023 11:23 am

The IDE fonts are "hardcoded" in the IDE scripts
Anything that is 'hardcoded' may be circumvented by judicious code in a component that loads later than the hard-coding.

AND, surely anything hard-coded in the IDE can be mucked around with?

Re: MacOS System Fonts

by OpenXTalkPaul » Tue Oct 10, 2023 11:05 am

Richmond I removed that font, only because it is Apple owned font and I don't want us to step on any copyrights.

Personally I prefer Charcoal for BBQ over gas.
Apple have done something so they cannot be removed
In recent versions most of the OS is now being treated s if it were ROM, as more and more macOS has become like iOS and everything gets sandboxed for your protection (and for the protection of App Store revenue).
What is a thought is to have a thing in the revPreferenceGUI stack to set a font as an OXT global font [that is the word, 'global', I should have used instead of 'system wide'].
The IDE fonts are "hardcoded" in the IDE scripts, and selected based on 'the platform', with incorrect/stale choices. The chosen for macOS for example is still using Lucida Grande which hasn't been the macOS system font in many years now (its San Francisco since 10.13 or 10.14). I would like to make these user settable, in revPrefs or possibly in that theming library I keep imagining.

Re: MacOS System Fonts

by richmond62 » Mon Oct 09, 2023 7:09 am

I tend to agree with you.

My main Macintosh machine is chock full of fonts that Apple bunged there, I don't want, and Apple have done something so they cannot be removed . . . a few more would just make things even worse.

What is a thought is to have a thing in the revPreferenceGUI stack to set a font as an OXT global font [that is the word, 'global', I should have used instead of 'system wide'].

Re: MacOS System Fonts

by tperry2x » Sun Oct 08, 2023 10:45 pm

Yes, I do get what you mean. Sorry to bang on about this, but I just think it's a bit of a bad approach.

I mean, as much as we all have our own preferred fonts / colour scheme / desktop picture what-have-you, I find it particularly obnoxious when a program dumps unmentioned stuff all over your computer - worse, stuff that you didn't give it specific permission to install.

I don't want OpenXTalk to fall into the category of a PUP (Potentially Unwanted Program).
Usually very annoying to go through the install logs and remove all the bloat that other programs might put in.
Installing extras like fonts without asking may go against the grain with many who notice. Yes, Adobe do this but it always felt like an assumption on their part. I know Arial isn't arial across all platforms

(Mac and Windows have different kerning and vertical spacing).

I think it would be far better, if the stack / application you build absolutely has to have a custom font, make sure it's free and the license allows you to distribute a copy (normally along with the original read-me file somewhere).
Activate that font in script for use, and load only when the program / stack is running.

Re: MacOS System Fonts

by richmond62 » Sun Oct 08, 2023 1:50 pm

a personal preference
I was NOT pushing CharcoalCY as the universal panacea, just bunging it here in case anyone wanted it.

Ubuntu Bold is very similar (and probably not as tied up in legal knots as CharcoalCY).

Re: MacOS System Fonts

by tperry2x » Sun Oct 08, 2023 1:42 pm

But not everyone likes charcoal. It might leave a bad taste in their mouth... sorry, bad joke.
But you get what I mean.
Personally, I like coolvetica, but that's a personal preference that I won't inflict on anyone.

Re: MacOS System Fonts

by richmond62 » Sun Oct 08, 2023 5:58 am

1. Would Ubuntu allow that?
Open Sausages.
2. Would users object to having more fonts installed (in what is an already crowded font menu)
As they are simply users, rather than paying customers . . . cough, cough, cough.
3. Why would we force a set of fonts on a user, different to what they are used to in the rest of their system?
So that we could ensure that ALL text boxes inwith the IDE were not chopping off text.

Re: MacOS System Fonts

by tperry2x » Sat Oct 07, 2023 8:28 pm

richmond62 wrote: Sat Oct 07, 2023 7:06 pm Pinch 10 representative fonts from Ubuntu.
Hmmm...
1. Would Ubuntu allow that?
2. Would users object to having more fonts installed (in what is an already crowded font menu)
3. Why would we force a set of fonts on a user, different to what they are used to in the rest of their system?
4. What would be the benefit of doing so if all the above points were not issues?

Re: MacOS System Fonts

by richmond62 » Sat Oct 07, 2023 7:06 pm

(legal issues, everywhere!)
Pinch 10 representative fonts from Ubuntu. 8-)

Re: MacOS System Fonts

by tperry2x » Sat Oct 07, 2023 6:38 pm

Well, precisely...
so that's why customising fonts won't work.... until OXT can embed them (legal issues, everywhere!) Yawn

Re: MacOS System Fonts

by richmond62 » Sat Oct 07, 2023 6:27 pm

But in both cases, you'd have the fact that what you are seeing and developing for won't be what an end-user sees.
I worked that out 21 years ago when designing an automated system for teachers (surely not? Primary schools again?) to run up their own programs with ZILCH knowledge of computers . . .

. . . and having experienced some grotty problems subsequently in the early throes of my Devawriter Pro . . .

. . . NEVER to use real buttons ever again on anything that's going in a standalone to be deployed on other people's machines.

I set up a button, exactly as I want it to be and IMPORT a snapshot of the thing, and then use the image as a faux button.

Devawriter Pro checks for the presence of my bespoke whacked-out Indic font, and will not run if that is not installed by the end-user.

You can also fool around with graphic objects:
-
Screen Shot 2023-10-07 at 21.32.39.png
Screen Shot 2023-10-07 at 21.32.39.png (54.95 KiB) Viewed 2858 times
-
Obviously the chance of something coming out looking on that on someone else's machine is minimal: so:

Code: Select all

import snapshot from grc "Oval"
and 'tis all 'fixed in stone'.

Re: MacOS System Fonts

by tperry2x » Sat Oct 07, 2023 5:21 pm

richmond62 wrote: Sat Oct 07, 2023 5:16 pm What I meant was to set a font to be the 'system font' throughout the OXT IDE, and NOT the host operating system.
Edit: I misread this too. If trying to set the 'system font' through the IDE
Probably not as Windows would block this under UAC, with Linux you'd probably have to use something like xdotool to accomplish it on all systems, and on mac.... forget about it.

But, if you want the IDE to ignore the system font, and choose one you pick, then you'd have to set a global property somewhere - however the engine identifies 'the system font'.

But in both cases, you'd have the fact that what you are seeing and developing for won't be what an end-user sees.

Re: MacOS System Fonts

by richmond62 » Sat Oct 07, 2023 5:16 pm

I don't believe it's appropriate for an app to alter the user's system settings.
Sorry, I phrased things badly:
So, would it be possible, in the Preferences stack, to set an OXT 'system wide' font?
What I meant was to set a font to be the 'system font' throughout the OXT IDE, and NOT the host operating system.

Re: MacOS System Fonts

by tperry2x » Sat Oct 07, 2023 3:28 pm

richmond62 wrote: Sat Oct 07, 2023 1:34 pm All those dialogue fields and so on in the IDE then need to made generously 'too large' in case someone has set their system font to Ubuntu Bold 18
Surprisingly, they already seem to automatically scale quite well when increasing the system font size:
scaled.png
scaled.png (796.14 KiB) Viewed 2897 times
Or at least better than I thought they would.

Re: MacOS System Fonts

by FourthWorld » Sat Oct 07, 2023 3:22 pm

richmond62 wrote: Sat Oct 07, 2023 8:13 am So, would it be possible, in the Preferences stack, to set an OXT 'system wide' font?
I don't believe it's appropriate for an app to alter the user's system settings. OSes that allow changing the system font already provide a UI for that.

More thoughts on what "consistency" means in multi-platform apps, from myself and Tog:
http://lists.runrev.com/pipermail/use-l ... 71254.html

Top