Can InstallShield for VFP distribnute fonts?

--
.~. Might, Courage, Vision. Sincerity. http://www.linux-sxs.org
/ v \
/( _ )\ (Ubuntu) Linux 2.6.14.3
^ ^ 21:39:01 up 3 days 1:33 load average: 1.61 1.57 1.63

RE: Installshield and fonts by MichelRoy

MichelRoy
Tue Nov 29 17:27:02 CST 2005

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

PROCEDURE InstallFONT
LOCAL ARRAY laFonts(1)
LOCAL lnNum AS Integer, lcPath AS String
lcPath = FULLPATH("")
IF AFONT(laFonts, "Consolas") = 0
LOCAL loShell AS Shell.Application, loMyFonts AS Object, loWindowsFont
AS Object
TRY
loShell = CREATEOBJECT("Shell.Application")
loMyFonts = loShell.NameSpace(ADDBS(FULLPATH(""))+"TTF") && font
folder under app.
loWindowsFont =
loShell.NameSpace(ADDBS(GETENV("SystemRoot"))+"Fonts") && windows font folder
FOR EACH oItem IN loMyFonts.Items
loWindowsFont.CopyHere(oItem) && copy font to windows font folder
NEXT
CATCH
FINALLY
loMyFonts = .Null.
loWindowsFont = .NULL.
loShell = .NULL.
ENDTRY
ENDIF
SET DEFAULT TO "&lcPath."
ENDPROC

"Man-wai Chang" wrote:

>
> Can InstallShield for VFP distribnute fonts?
>
> --
> .~. Might, Courage, Vision. Sincerity. http://www.linux-sxs.org
> / v \
> /( _ )\ (Ubuntu) Linux 2.6.14.3
> ^ ^ 21:39:01 up 3 days 1:33 load average: 1.61 1.57 1.63
>

Re: Installshield and fonts by Man-wai

Man-wai
Wed Nov 30 07:39:03 CST 2005

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

Re: Installshield and fonts by MichelRoy

MichelRoy
Wed Nov 30 08:35:04 CST 2005

it works for admin and power users, limited accounts cannot install, but that
is the same with installshield.

"Man-wai Chang" wrote:

> 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
>

Re: Installshield and fonts by Leonid

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



Re: Installshield and fonts by Man-wai

Man-wai
Thu Dec 01 07:45:58 CST 2005


Thank you.

--
.~. Might, Courage, Vision. Sincerity. http://www.linux-sxs.org
/ v \
/( _ )\ (Ubuntu) Linux 2.6.14.3
^ ^ 21:45:01 up 5 days 1:39 load average: 1.10 0.52 0.54