Missing Fonts

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Missing Fonts

Post by bn » Mon Mar 11, 2024 2:11 pm

Gary,

Just a wild guess:
Did you close the Properties Inspector after installing a new font?
In my experience the Properties Inspector does not refresh the list of available fonts once open.

Kind regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Missing Fonts

Post by bn » Mon Mar 11, 2024 3:07 pm

Gary,

after installing open sans of your choice could you do the following from the message box?

Code: Select all

put the fontNames into tNames; sort tNames; filter tNames with "*open sans*"; put tNames
Put the code into the single line message box and hit return.
What shows up in the message box?

Kind regards
Bernd

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Tue Mar 12, 2024 12:15 pm

Thanks Bernd for your continued assistance. I've written a test app...
1.jpg
2.jpg
3.jpg
The code for the 'Test' button is

Code: Select all

on mouseup
   answer file "choose font"
   if it is not empty then 
      put it into tFile
      start using font file tFile
   end if
   put fontnames() into fld "fFonts"
end mouseUp
Using this, only "Open Sans" is listed, not the other weights. The message box script didn't produce any info.

This issue is happening with other typefaces too.

Thanks

Gary

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Missing Fonts

Post by bn » Tue Mar 12, 2024 12:25 pm

Gary,

I am running out of ideas and have the impression that it is Windows specific.

Maybe someone using Windows could chime in.

Kind regards
Bernd

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Tue Mar 12, 2024 3:45 pm

Thanks again Bernd for your continued interest.
As it appears that as no else has ever had this issue, then I'd be tempted to suggest it's my setup. However, I use three totally different Windows machines, and it's the same on them all.
I can't believe I'm the first to discover this anomaly. If I can't get this to work then I'll revert back to Python with a Browser front end.

Cheers

Gary

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Missing Fonts

Post by stam » Tue Mar 12, 2024 8:46 pm

Not sure it's any consolation, but like others, on MacOS this works fine.
I wondered if it may be the case that Windows version of LiveCode is a 2nd class citizen in some respects

However on testing on my work PC (Win 10 Enterprise, 21H2 - I have LiveCode 9.6.9 installed on it), I downloaded the open sans font and installed all font faces by selecting them and right-clicking -> install all.
On re-launching the IDE the font appears has switching to this works as expected.

Not sure how that helps your issue but it's not a generic Windows/LC issue it seems... or maybe its a Win 11 issue, I don't know...

Stam

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Missing Fonts

Post by stam » Wed Mar 13, 2024 1:38 am

I've also now tested on a Windows 11 system (Win 11 Home, 22H2, running LC 9.6.8 ).
As previously downloaded open sans from google, open the static fonts, selected all and right-clicked to install.
After restarting LC, Open Sans appears in Font menu (although only 3 typefaces) and selecting this very clearly changes the font.
I quite like Open Sans Condensed!

Given that I found it works on both MacOS, WIn10 and Win11, there must be an issue with your setup.
Have you tried removing the font and re-installing? What version of LC are you using?

Stam

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Wed Mar 13, 2024 6:08 pm

Thanks for your comments Stam. I am using Livecode 9.6.9 on three different Windows systems.

As you say Open Sans appears in the Font menu "although only 3 typefaces". The faces and weights I need, which do not appear, are...

1.png
1.png (12.29 KiB) Viewed 701 times

... even though they are installed ...

2.png

... and available in other applications...

3.png

Cheers

Gary
Last edited by Gary Rathbone on Wed Mar 13, 2024 9:04 pm, edited 1 time in total.

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Wed Mar 13, 2024 8:42 pm

The same issue occurs with numerous other fonts...

For example Bahnscrift...

Listed as a single option in Live Code...

41.png

Multiple styles installed...

42.png

Available in other applications...

43.png

...
Last edited by Gary Rathbone on Wed Mar 13, 2024 8:46 pm, edited 1 time in total.

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Wed Mar 13, 2024 8:46 pm

...

and another favorite of mine DinPro...


Listed as a single option in Livecode...

51.png

Three options installed...

52.png

... and available in other applications...

53.png

...

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Wed Mar 13, 2024 8:50 pm

... and a third example... Quicksand ...


Listed as a single item in Livecode...

71.png

Multiple styles installed...

72.png

Available in other applications...

73.png
...
Last edited by Gary Rathbone on Wed Mar 13, 2024 9:04 pm, edited 1 time in total.

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Wed Mar 13, 2024 9:03 pm

... The Livecode guide states...

8.png

So weights available via textstyle are limited, and don't represent the full options available.

I've written some brief code (thanks to others)...

Code: Select all

on mouseup
   answer file "Select a Font..."
   put it into tFont
   start using font file tFont
   set the textfont of fld "fFont" to tFont
end mouseup

The field "fFont" is initially set to Arial Rounded Bold

9.jpg

When I select "Quicksand-Light.ttf" the text field goes blank...

91.jpg

So, my question is still... "How can I use the fonts that are installed on my machine to develop applications in Livecode?"

Thanks for your patience.

Gary

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Missing Fonts

Post by bn » Wed Mar 13, 2024 9:30 pm

Gary,

Code: Select all

on mouseup
   answer file "Select a Font..."
   put it into tFont
   start using font file tFont
   set the textfont of fld "fFont" to tFont ## does not work ##########
end mouseup
as you can see in the properties inspector the last line of your code tries to set the font of the field to the path to the font. That is not how it works.
The font can have a name different from what it is called in the filename.

In this case the internal name as it is supposed to appear in the option menu of the properties inspector could be something like
"Quick sand lite" or "Quick Sand-lite" or whatever suits the creator of the font.

After you have run your script above (without the last line) you have to close the Properties Inspector (in case it is open) and reopen it and you should look in the Font menu for a name that sounds as it could be your just loaded font.
The installation in this way is temporary for your IDE. The next time you would have to install it again.

Kind regards
Bernd

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Missing Fonts

Post by SparkOut » Wed Mar 13, 2024 9:59 pm

There are quite a few font related issues in the buglist, some are very old.
This one is very relevant to the latest part of this thread https://quality.livecode.com/show_bug.cgi?id=21804
Ken Ray described the problem in 2019, and it remains "confirmed". A workaround was suggested by Juan in 2021, essentially installing fonts multiple times with different names.

Gary Rathbone
Posts: 39
Joined: Mon Apr 19, 2021 8:39 pm

Re: Missing Fonts

Post by Gary Rathbone » Wed Mar 13, 2024 10:16 pm

Thanks once again, Bernd, its very much appreciated.

I've changed the code and checked the name of the typeface...

Code: Select all

on mouseup
   answer file "Select a Font..."
   put it into tFont
   start using font file tFont
   set the textfont of fld "fFont" to "Quicksand Light"
end mouseup

This is step one...

Z1.png


Step two.. Even though the font states it's "Quicksand Light", it isn't...

Z2.png

.. and the typeface...

Z3.png

I'm going to park this now. I'm disappointed that Livecode can't do something as basic as display typefaces.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”