@@ -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
0 commit comments