Skip to content

Commit 85abb5d

Browse files
committed
Hack (Regular) will be deleted (issue #15)
1 parent 2afa60e commit 85abb5d

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

src/HackWindowsInstaller.iss

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,10 @@ Name: "{app}\Website"; Filename: "{#Website}";
444444
;------------------------
445445
;Remove old font names during install
446446
#define public i 0
447-
#sub Sub_RegistyDelete
447+
#sub Sub_DeleteRegistryOldFontnames
448448
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"; ValueName: "{#remove_font_names[i]} {#TrueType}"; ValueType: none; Flags: deletevalue;
449449
#endsub
450-
#for {i = 0; i < remove_font_count; i++} Sub_RegistyDelete
450+
#for {i = 0; i < remove_font_count; i++} Sub_DeleteRegistryOldFontnames
451451
#undef i
452452
;------------------------
453453

@@ -461,6 +461,22 @@ Name: "{app}\Website"; Filename: "{#Website}";
461461
#undef i
462462
;------------------------
463463

464+
;------------------------
465+
;Check if we fint a font name without "Bold" or "Italic" in it and if so, we will add (Regular) and will delete it during installation
466+
;This is necessary as Windows does not expect (Regular) to be used, but sometimes the Font applet add this text anyway
467+
#define public i 0
468+
#sub Sub_DeleteRegistryFontRegular
469+
#if pos('Bold', font_names[i]) == 0
470+
#if pos('Italic', font_names[i]) == 0
471+
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"; ValueName: "{#font_names[i]} Regular {#TrueType}"; ValueType: none; Flags: deletevalue;
472+
#endif
473+
#endif
474+
#endsub
475+
#for {i = 0; i < install_font_count; i++} Sub_DeleteRegistryFontRegular
476+
#undef i
477+
;------------------------
478+
479+
464480

465481
[INI]
466482
;Create an ini to make detection for enterprise deployment tools easy
@@ -1011,7 +1027,6 @@ begin
10111027
//Inform windows that fonts have changed (just to be sure we do this always)
10121028
//See https://msdn.microsoft.com/en-us/library/windows/desktop/dd183326%28v=vs.85%29.aspx
10131029
SendBroadcastMessage(29, 0, 0);
1014-
//HWND_BROADCAST = -1
10151030
//WM_FONTCHANGE = 0x1D = 29
10161031
}
10171032

src/zz_Preprocessor_Result.iss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,13 @@ Name: "{app}\Website"; Filename: "http://sourcefoundry.org/hack/";
308308
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes"; ValueName: "Hack Italic (TrueType)"; ValueType: none; Flags: deletevalue;
309309
;------------------------
310310

311+
;------------------------
312+
;Check if we fint a font name without "Bold" or "Italic" in it and if so, we will add (Regular) and will delete it during installation
313+
;This is necessary as Windows does not expect (Regular) to be used, but sometimes the Font applet add this text anyway
314+
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"; ValueName: "Hack Regular (TrueType)"; ValueType: none; Flags: deletevalue;
315+
;------------------------
316+
317+
311318

312319
[INI]
313320
;Create an ini to make detection for enterprise deployment tools easy

0 commit comments

Comments
 (0)