Leonid
Wed Nov 30 10:05:55 CST 2005
If you want to use uninstalled fonts without administrative rights, you may
do it the next way. Rename your font file MyFontFile.ttf to MyFontFile.tt_
add it to the project and include it into exe file. Put next code somewhere
in the begining of your programm. Then you may use this font in your
application
m.TempDir=addbs(Getenv("Temp"))
if !afont(m.arf,"MyFontName") && The name of the font (Arial)
m.FontFile=m.TempDir+"MyFontFile.ttf" && Font filename
if !file(m.FontFile)
strtofile(filetostr("MyFontFile.tt_"),m.FontFile)
endif
DECLARE Integer AddFontResource IN Win32API String cFontFile
AddFontResource(m.FontFile+chr(0))
endif
Leonid
"Man-wai Chang" <toylet.toylet@gmail.com> wrote in message
news:%23w7fpNb9FHA.3416@TK2MSFTNGP15.phx.gbl...
> Michel Roy wrote:
>> i haven't tried installshield, but fonts can be installed easily from
>> your program
>> i keep a font folder under the application and when the program starts it
>> installs the fonts if they are missing. like this
>
> I am a bit worried about security. My app may not be running as user
> administrator...
>
> --
> .~. Might, Courage, Vision. Sincerity.
http://www.linux-sxs.org
> / v \
> /( _ )\ (Ubuntu) Linux 2.6.14.3
> ^ ^ 21:38:01 up 4 days 1:32 load average: 1.23 1.58 2.03