Skip to content

Commit 0bd7736

Browse files
committed
Updated code to comply with changes to Image32 library
1 parent e69a5ed commit 0bd7736

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

source/SvgPreview.pas

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
5-
* Version : 1.1 *
6-
* Date : 21 January 2022 *
5+
* Version : 1.2 *
6+
* Date : 9 August 2025 *
77
* Website : http://www.angusj.com *
8-
* Copyright : Angus Johnson 2022 *
8+
* Copyright : Angus Johnson 2022-25 *
99
* *
1010
* Purpose : IPreviewHandler and IThumbnailProvider for SVG image files *
1111
* *
@@ -18,7 +18,7 @@ interface
1818

1919
uses
2020
Windows, Messages, ActiveX, Classes, ComObj, ComServ, ShlObj, Registry,
21-
PropSys, Types, SysUtils, Math, Img32, Img32.SVG.Reader, Img32.Text;
21+
PropSys, Types, SysUtils, Math, Img32, Img32.SVG.Reader;
2222

2323
{$WARN SYMBOL_PLATFORM OFF}
2424

@@ -80,6 +80,8 @@ TSvgShellExt = class(TComObject,
8080

8181
implementation
8282

83+
uses Img32.Fmt.PNG, Img32.Fmt.JPG, Img32.Text;
84+
8385
//------------------------------------------------------------------------------
8486
// Miscellaneous functions
8587
//------------------------------------------------------------------------------
@@ -374,10 +376,12 @@ function TSvgShellExt.IInitializeWithStream_Init(const pstream: IStream;
374376

375377
procedure LoadFonts;
376378
begin
377-
FontManager.Load('Segoe UI');
378-
FontManager.Load('Segoe UI Black');
379-
FontManager.Load('Times New Roman');
380-
FontManager.Load('Segoe UI Symbol');
379+
FontManager.LoadFontReaderFamily('Segoe UI');
380+
// FontManager.Load('Segoe UI Black');
381+
FontManager.LoadFontReader('Segoe UI Symbol');
382+
FontManager.LoadFontReader('Segoe UI Emoji');
383+
FontManager.LoadFontReaderFamily('Times New Roman');
384+
// FontManager.Load('Times New Roman Bold');
381385
end;
382386
//------------------------------------------------------------------------------
383387

0 commit comments

Comments
 (0)