
27-03-2023, 11:15
|
 |
Registered User
|
|
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
|
|
FMXInno - Custom Fonts
Quote:
Originally Posted by audiofeel
Here, a little higher, a user under the nickname Behnam2018 posted a screenshot with the installer. An experienced eye will notice that the fonts that should be displayed are not displayed there. Most likely, Behnam2018 is installed "Windows7". On it, with the "temporary" installation of fonts, small problems sometimes arise. As a temporary solution, I propose this.
Code:
function InitializeSetup(): Boolean;
var
ResultCode: Integer;
begin
if not FontExists('My Font') then
begin
ExtractTemporaryFile('MyFont.ttf');
ExtractTemporaryFile('FontReg.exe');
Exec(ExpandConstant('{tmp}\FontReg.exe'), '/copy', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;
Result:= True;
end;
https://code.kliu.org/misc/fontreg/
|
could you test this?
Code:
function InitializeSetup(): Boolean;
begin
{ Font }
ExtractTemporaryFile('{#MyFont1}');
ExtractTemporaryFile('{#MyFont2}');
InstallFMXFont(ExpandConstant('{tmp}\{#MyFont1}'));
InstallFMXFont(ExpandConstant('{tmp}\{#MyFont2}'));
{ Font }
FMXInnoInit;
Result := True;
end;
procedure DeinitializeSetup();
begin
{ Font }
DeleteFMXFont(ExpandConstant('{tmp}\{#MyFont1}'));
DeleteFMXFont(ExpandConstant('{tmp}\{#MyFont2}'));
{ Font }
FMXInnoShutDown;
end;
procedure FMXDesigning;
begin
{ FMX Blank Form }
FMXForm.FCreateBlankForm(WizardForm.Handle, ALCrimson, '');
FMXForm.SetCursor(ExtractAndLoad('Dark2.ani'));
// Font
InvalidateFMXFont;
....
end;
Last edited by BLACKFIRE69; 31-03-2023 at 09:52.
|