Page 1 of 1

How to register Font Files

Posted: Mon Aug 15, 2011 11:33 am
by YogiYang
I have a software in which I bundle my own fonts that are not available otherwise in the system.

Now how can I get Enigma VB to register these fonts in the system?

Re: How to register Font Files

Posted: Mon Aug 15, 2011 1:10 pm
by Enigma
This really have no ideas... Can you send me your test files, just to reproduce the problem when font files are not working?

YogiYang, please send us NON packed files.

Re: How to register Font Files

Posted: Mon Aug 15, 2011 1:13 pm
by YogiYang
Enigma wrote:YogiYang, please send us NON packed files.
Sorry I have send a packed file long before you replied to this post. The non packed files about around 17MB in size so it would be impractical to send you all those files.

But yet if you insist I will send all the files along with the main executable.

Re: How to register Font Files

Posted: Mon Aug 15, 2011 1:34 pm
by Enigma
Just compress these files... not possible?

No problem, please send 17 MB... if only gmail won't send such email.... :?:

Re: How to register Font Files

Posted: Mon Aug 15, 2011 1:36 pm
by YogiYang
Gmail will not allow to send files greater and 10MB so I will have to upload it to some file server and send you the link.

Re: How to register Font Files

Posted: Mon Aug 15, 2011 1:42 pm
by Enigma
YogiYang wrote:Gmail will not allow to send files greater and 10MB so I will have to upload it to some file server and send you the link.
Just divide files on a two emails, no problem :)

Re: How to register Font Files

Posted: Mon May 06, 2013 3:44 pm
by judge42
Hello, do you have a solution to register font files ?
thanks

Re: How to register Font Files

Posted: Mon May 06, 2013 4:12 pm
by Enigma
I'm not sure it is possible at all. If font files are being used by another applications too, which are not packed, then EVB can't help there.

EVB does it's magic only under process of packed executable, or all other processes that it executes. It can't affect all processes or entire system.

Re: How to register Font Files

Posted: Tue May 07, 2013 5:47 am
by YogiYang
In case of fonts what you can do is remove (uninstall) old fonts and then install new fonts.

I have been doing this for quite some time now in my VB6 based software.

Here is the sample code

Code: Select all

Sub Install_TTF (FontName$, FontFileName$, WindSysDir$)
    Dim Ret%, Res&, FontPath$, FontRes$
    Const WM_FONTCHANGE = &H1D
    Const HWND_BROADCAST = &HFFFF

    FontPath$ = WindSysDir$ + "\" + FontFileName$
    FontRes$ = Left$(FontPath$, Len(FontPath$) - 3) + "FOT"

    Ret% = CreateScalableFontResource(0, FontRes$, FontFileName$, WindSysDir$)
    Ret% = AddFontResource(FontRes$)
'    Res& = SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0)
'    Ret% = WriteProfileString("fonts", FontName + " (TrueType)", FontRes$)
End Sub

' This sub will remove any True Type fonts installed
'
Sub Remove_TTF (FontName$, FontFileName$, WindSysDir$)
    
    Dim Ret%, Res&, FontPath$, FontRes$
    Const WM_FONTCHANGE = &H1D
    Const HWND_BROADCAST = &HFFFF

    FontPath$ = WindSysDir$ + "\" + FontFileName$
    FontRes$ = Left$(FontPath$, Len(FontPath$) - 3) + "FOT"

    'Ret% = CreateScalableFontResource(0, FontRes$, FontFileName$, WindSysDir$)
    Ret% = RemoveFontResource(FontRes$)
    Res& = SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0)
'    Ret% = WriteProfileString("fonts", FontName + " (TrueType)", FontRes$)

End Sub
Just my 2cents. :)

Re: How to register Font Files

Posted: Tue May 07, 2013 11:34 am
by judge42
Thanks YogiYang,
I 'll try this