I decided to try out baFontInstalled() myself after following this thread.
I can confirm Slava's bug in D8.5, Mac OS 9.1, Buddy API v1.3
I don't have Dir 8.0 installed but in Dir 7.03 everything looked OK.
Cue W98SE, D8.5, BuddyAPI v.3.5a:
testy = "Arial"
put testy
-- "Arial"
put baFontInstalled(testy, "")
-- 0 (What the #@!?)
put testy
-- "Arial"
I definitively have Arial installed.
Let's check:
put baFontList("True Type")
-- ["System", "Fixedsys", "Terminal", "MS Serif", "MS Sans Serif", "Courier",
"Symbol", "Small Fonts", "FreeHand X Symbols", "ASI_System", "ASI_Mono", "Marlett",
"Arial", "Arial CE", "Courier New", "Courier New CE", ...and so on]
Better check the baFontInstalled() syntax in Buddy's help.
"Use an empty string ("") to see if the basic font is installed."
OK, correct syntax, but it still didn't work.
put baFontInstalled("Arial", "Normal")
-- 1
Aha, this works, but cannot be used either, since the fontstyle is both font- and
language specific:
put baFontStyleList("Arial")
-- ["Normal", "Fet", "Fet Kursiv", "Kursiv"]
So the safest bet seems to be to check the FontList:
on TT_Font strFont
installed = (baFontList("TrueType").getOne(strFont)) <> 0
return installed
end
put TT_Font("Arial")
-- 1
Bertil Flink
Creative Media
[EMAIL PROTECTED]
-----------------------------------------
Pekka Buttler:
> I sure as hell do not know about that although I consider that to me a
> potentially serious problem...
>
> 1# We can rule out that the fluke would be created solely due to a message
> window bug.
>
> 2# It happens in D8.5 but not in D8, which rules out that it is purely an
> Xtra bug (cuz if it was the xtra then it would f-up in D8 i guess...)
>
> Which leaves a few questions:
> (i presuppose that the D8 test was done on the same machine as the D8.5 test
> and that the version of BuddyAPI is also the same)
>
> - can you reproduse it after a boot?
> - Test it in runtime. Does it produce the same result?
> - Can you test it on another machine? What happens?
> - can you find something equal happening with any other Xtra?
>
> This could be an Director - Xtra interfacing quirck or something purely
> director.
>
> Pekka
>
> P.S.
> D8.5 W2000
> -- Welcome to Director --
> testy = "Arial"
> put testy
> -- "Arial"
> put baFontInstalled(testy, "")
> -- 1
> put testy
> -- "Arial"
--------------------------------------
Slava Paperno:
> >
> > This is what I see under Mac OS 9.04 with D 8.5 and Buddy API 1.3b:
> >
> > --in the message window
> > Test = "Arial"
> > put Test
> > --Arial
> > put baFontInstalled(Test, "")
> > --1
> > put Test
> > --[]Arial
> >
> > Where I typed [] I actually see a rectangle that is displayed for a
> > non-defined character. It is character decimal 5:
> >
> > put CharToNum(Test.char[1])
> > --5
> >
> > Can someone confirm or disprove this for me, please? Or am I doing
> > something wrong?
> >
> > This is NOT happening with D 8.0, everything else being the same.
> >
> > Slava
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]