View Single Post
  #148  
Old 19-01-2013, 14:02
Andre Jesus's Avatar
Andre Jesus Andre Jesus is offline
Registered User
 
Join Date: Jun 2012
Location: Brazil
Posts: 70
Thanks: 11
Thanked 0 Times in 0 Posts
Andre Jesus is on a distinguished road
Quote:
Originally Posted by Razor12911 View Post
[Files]
Source: Font.ttf; DestDir: {tmp}; Flags: dontcopy;

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


const
FR_PRIVATE = $10;

function AddFontResource(lpszFilename:string;fl:dword;pdv:i nteger): Integer; external 'AddFontResourceEx{#A}@gdi32.dll stdcall';
function RemoveFontResource(lpszFilename:string;fl:dword;pd v:integer): BOOL; external 'RemoveFontResourceEx{#A}@gdi32.dll stdcall';

procedure InitializeWizard;
begin
ExtractTemporaryFile('Font.ttf');
AddFontResource(ExpandConstant('{tmp}\Font.ttf'), FR_PRIVATE, 0);
end;

procedure DeinitializeSetup;
begin
RemoveFontResource(ExpandConstant('{tmp}\Font.ttf' ), FR_PRIVATE, 0);
end;

__________________________________________________ ______________

Glad could help with font.

Work on ANSI and UNICODE

Sorry for bad english.
Thank you very much for your response friend.
I will try use this code and return the result.
Reply With Quote