start/stop using font file...

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Thu Jul 6 18:02:37 EDT 2017


Hi,
maybe i am missing something,

but when i unload a font in LC using

stop using font file ….

“the result” does not contain an error but the font is still listed in “the fontnames”, although it is not listed anymore in “the FontFilesInUse” does not contain any error.

And i can still able to use the font.

Here´s a sample script i am using for testing.
//
   if "DS-digital-Bold.ttf" is in files(specialfolderpath("resources"))
   then start using font file (specialfolderpath("resources") & "/ds-digital-bold.ttf")
   
   set the textfont of fld 1 to "DS-digital Bold"
   if  the result is not empty then answer the result
   answer the fontfilesinuse
   put the fontnames into tFonts
   filter tFonts with "DS*"
   answer tFonts
   
   set the textfont of fld 1 to "arial"
   
   stop using font file (specialfolderpath("resources") & "/ds-digital-bold.ttf")
   
   if the result is not empty then answer the result
   answer the fontfilesinuse
   put the fontnames into tFonts
   filter tFonts with "DS*"
   answer tFonts
   set the textfont of fld 1 to "DS-digital Bold"
//

Even after unloading the font i am still able to set the textfont of a fld to the unloaded font.

Is this the normal behaviour?

Tried with 8.1.4 and 8.1.5RC3

Regards,

Matthias 

Matthias Rebbe
+49 5741 310000
‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌




More information about the use-livecode mailing list