Page 1 of 1

Font Detection

Posted: Tue Apr 26, 2022 7:59 am
by richmond62
My Devawriter Pro has an inbuilt font detection routine:

Code: Select all

 if "Devawriter" is among the lines of the fontNames then
      add 1 to PHONTS
   end if
   if PHONTS > 0 then
      --do nix
   else
      GO TO CARD "FONT WARNING" of stack "DWPro"
   end if
Yesterday I modified the Devawriter.ttf font and swapped it out with the earlier version on MacOS 12.4,
and it was NOT detected:
-
fontB.jpg
-
The funny thing is that the stack works perfectly well displaying text inwith its fields using
the Devawriter.ttf font, BUT standalones BREAK because of
non-detection.

Re: Font Detection

Posted: Tue Apr 26, 2022 8:21 am
by richmond62
Blast!

The font editing program had changed the INTERNAL name of the Devawriter.ttf font to Devawriter Regular.

So . . . 'Happy People' . . . 8)

What is particularly nasty about this is that there is a mismatch between the font's surface name
and its internal name, which, without opening the font up in a font-editor and poking around
might not be known.
-
SShot 2022-04-26 at 10.26.05.png
-
My sense of humour is not all that elastic-sided in the morning before my second cup of coffee.

Re: Font Detection

Posted: Tue Apr 26, 2022 11:24 am
by richmond62
What is even funnier about this is that Fontforge reports my font as Devawriter-Regular,
but LiveCode 'sees' the font as Devawriter Regular (without a hyphen).

https://fontforge.org/en-US/