Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 10-06-2016, 23:27
Prince4 Prince4 is offline
Registered User
 
Join Date: Mar 2015
Location: India->Delhi->Rohini
Posts: 119
Thanks: 100
Thanked 19 Times in 15 Posts
Prince4 is on a distinguished road
Post Fonts Manifest

There's something i also need to know (this is the best place to ask cause i can't find another)
How can i have custom fonts in a TLabel please i tried some methods like (AddFontResource '{tmp}\myfont.ttf') but failed.. I know there are nuemrous methods to this but i want to understand them please help me out
Reply With Quote
Sponsored Links
  #2  
Old 10-06-2016, 23:50
vint56 vint56 is offline
Registered User
 
Join Date: May 2011
Location: almaty
Posts: 52
Thanks: 118
Thanked 55 Times in 31 Posts
vint56 is on a distinguished road
Code:
#define Font "Zombie.ttf"
#define FontName "DS Zombie Cyr"

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Files]
Source: {#Font}; Flags: dontcopy

[code ]
#ifdef UNICODE
    #define A "W"
#else
    #define A "A"
#endif

const
    FR_PRIVATE = $10;

function AddFontResource(lpszFilename: String; fl, pdv: DWORD): Integer; external 'AddFontResourceEx{#A}@gdi32.dll stdcall';
function RemoveFontResource(lpFileName: String; fl, pdv: DWORD): BOOL; external 'RemoveFontResourceEx{#A}@gdi32.dll stdcall';

procedure InitializeWizard();
begin
    if not FontExists('{#FontName}') then
    begin
        ExtractTemporaryFile('{#Font}');
        AddFontResource(ExpandConstant('{tmp}\{#Font}'), FR_PRIVATE, 0);
    end;
    WizardForm.Font.Name := '{#FontName}';
end;

procedure DeinitializeSetup();
begin
    RemoveFontResource(ExpandConstant('{tmp}\{#Font}'), FR_PRIVATE, 0);
    WizardForm.Free;
end;
Reply With Quote
The Following 2 Users Say Thank You to vint56 For This Useful Post:
Nemko (11-08-2017), Prince4 (11-06-2016)
  #3  
Old 11-06-2016, 00:02
Prince4 Prince4 is offline
Registered User
 
Join Date: Mar 2015
Location: India->Delhi->Rohini
Posts: 119
Thanks: 100
Thanked 19 Times in 15 Posts
Prince4 is on a distinguished road
Thanks brother will check it at noon thanks, iguess you like helping me out..

Thanks..
Reply With Quote
  #4  
Old 11-06-2016, 00:11
Prince4 Prince4 is offline
Registered User
 
Join Date: Mar 2015
Location: India->Delhi->Rohini
Posts: 119
Thanks: 100
Thanked 19 Times in 15 Posts
Prince4 is on a distinguished road
Quote:
Originally Posted by Prince4 View Post
Thanks brother will check it at noon thanks, iguess you like helping me out..

Thanks..
And yeah can you please check out the "Colored Fonts in MsgBox" thread please
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coloured Fonts in Msg Box with Hyper Links? Prince4 Conversion Tutorials 0 05-06-2016 03:14
freelancer fonts ariedebeuker PC Games 3 10-04-2003 13:15
High Heat 2003 Problem - Small Fonts RKatcher PC Games 2 29-04-2002 07:41



All times are GMT -7. The time now is 05:57.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com