| View previous topic :: View next topic |
| Author |
Message |
Hieroglyphics I post too much
Reputation: 0
Joined: 06 Dec 2007 Posts: 2007 Location: Your bedroom
|
Posted: Sun Oct 12, 2008 3:46 pm Post subject: How to automatically install a font from an app? |
|
|
Ok here is my trainer:
Notice I don't use an everyday font, so since it is a dll. I am going to make an exe to load it anyways. Is there any way to make the app automatically install the font if I include it in the .rar? _________________
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Sun Oct 12, 2008 3:49 pm Post subject: |
|
|
| should load it if it's in the same directory. I think. |
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sun Oct 12, 2008 4:49 pm Post subject: |
|
|
| AddFontResource/AddFontResourceEx |
|
| Back to top |
|
 |
Hieroglyphics I post too much
Reputation: 0
Joined: 06 Dec 2007 Posts: 2007 Location: Your bedroom
|
Posted: Sun Oct 12, 2008 6:48 pm Post subject: |
|
|
SO:
| Code: | | int AddFontResourceEx(fontname,FR_PRIVATE,0); |
or
| Code: | | int AddFontResource(fontname); |
like that? do I have to ad the extension also? _________________
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sun Oct 12, 2008 8:00 pm Post subject: |
|
|
| Add it to your resources so you can dynamically load it. |
|
| Back to top |
|
 |
Hieroglyphics I post too much
Reputation: 0
Joined: 06 Dec 2007 Posts: 2007 Location: Your bedroom
|
Posted: Sun Oct 12, 2008 11:17 pm Post subject: |
|
|
So like #include <fontname.ttf>
?
then like
int AddFontResource(fontname.ttf); _________________
|
|
| Back to top |
|
 |
Wintermoot Expert Cheater
Reputation: 0
Joined: 08 Nov 2007 Posts: 198
|
Posted: Mon Oct 13, 2008 1:35 am Post subject: |
|
|
| He said resources. Not includes. |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Mon Oct 13, 2008 8:38 am Post subject: |
|
|
| Hieroglyphics wrote: | So like #include <fontname.ttf>
?
then like
int AddFontResource(fontname.ttf); |
omfg... /facepalm
Go Learn C++ please. _________________
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Mon Oct 13, 2008 9:27 am Post subject: |
|
|
What he means by resources is that you add the font file as a resource, meaning in a .rc file for example (the .rc will compile into a .res).
Then you can use resourcefunctions (LoadResource etc) to load it into memory and then write it to a file. Google something like 'extract resources from exe' and you'll find examples.
This way the font file is bundled in the exe and you don't have to add it as a seperate file to your rar archive.
Tombana |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Mon Oct 13, 2008 10:03 am Post subject: |
|
|
Does anyone find it ironic that the man who runs "hLibrary, All you need to know about programming and hacking" and claims to have a trainer can't even write a C++ statement.
Anyways, you could always *dynamically* find the font folder in system and move the .tff or w/e to it. _________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Mon Oct 13, 2008 10:33 am Post subject: |
|
|
I know how to make resources for vb not vc.
But in vb u open resource edit and add it then u use the loadresource functions to load and edit the resources. |
|
| Back to top |
|
 |
Fuzz Grandmaster Cheater
Reputation: 0
Joined: 12 Nov 2006 Posts: 531
|
Posted: Mon Oct 13, 2008 10:57 am Post subject: |
|
|
| Hieroglyphics wrote: | So like #include <fontname.ttf>
?
then like
int AddFontResource(fontname.ttf); |
Oh my god, are you fucking serious? _________________
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Mon Oct 13, 2008 10:59 am Post subject: |
|
|
| Fuzz wrote: | | Hieroglyphics wrote: | So like #include <fontname.ttf>
?
then like
int AddFontResource(fontname.ttf); |
Oh my god, are you fucking serious? |
I think so...
I have no idea how to do this but i read some msdn and this is what I can think of:
Since I suck at C++ Ill do it in delphi
AddFontResource(GetCurrentDir + '\fontname.ttf');
try something like this. put your font tff file in the same folder as your exe and name it fontname.tff. |
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Mon Oct 13, 2008 11:28 am Post subject: |
|
|
| dnsi0 wrote: | | Fuzz wrote: | | Hieroglyphics wrote: | So like #include <fontname.ttf>
?
then like
int AddFontResource(fontname.ttf); |
Oh my god, are you fucking serious? |
I think so...
I have no idea how to do this but i read some msdn and this is what I can think of:
Since I suck at C++ Ill do it in delphi
AddFontResource(GetCurrentDir + '\fontname.ttf');
try something like this. put your font tff file in the same folder as your exe and name it fontname.tff. |
Then in C++...
| Code: | char FontPath [MAX_PATH];
GetCurrentDirectory (MAX_PATH,FontPath);
sprintf (FontPath,"%s%s",FontPath,"\\fontname.ttf");
AddFontResource (FontPath); |
_________________
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
|
| Back to top |
|
 |
|