From ac643913b6d9dd1ed761d10e30f8e2621e68377d Mon Sep 17 00:00:00 2001 From: Roman Kassebaum Date: Mon, 11 Jul 2016 03:17:34 +0200 Subject: [PATCH] Tried to use a dictionary instead of an array which was too small. --- PdfFonts.pas | 44 +++++++++++++++++++++++----------- hpp/Win32/Debug/PdfFonts.hpp | 38 ++++++++++++++--------------- hpp/Win32/Release/PdfFonts.hpp | 38 ++++++++++++++--------------- hpp/Win64/Debug/PdfFonts.hpp | 38 ++++++++++++++--------------- hpp/Win64/Release/PdfFonts.hpp | 38 ++++++++++++++--------------- 5 files changed, 102 insertions(+), 94 deletions(-) diff --git a/PdfFonts.pas b/PdfFonts.pas index f2db46d..d295058 100644 --- a/PdfFonts.pas +++ b/PdfFonts.pas @@ -26,7 +26,7 @@ interface uses - SysUtils, Classes, PdfDoc, PdfTypes; + SysUtils, Classes, Generics.Collections, PdfDoc, PdfTypes; const TYPE1_FONT_STR_TABLE: array[0..2] of TPDF_STR_TBL =( @@ -491,8 +491,10 @@ TPdfType1Font = class(TPdfFont) private FFirstChar: Byte; FLastChar: Byte; - FArray: array[0..255] of Word; + FArray: TDictionary; public + constructor Create(AXref: TPdfXref; AName: string); override; + destructor Destroy; override; procedure SetData(Value: TPdfDictionary); override; function GetCharWidth(AText: string; APos: integer): integer; override; end; @@ -565,35 +567,49 @@ TPdfScript = class(TPdfType1Font) implementation { TPdfType1Font } + +constructor TPdfType1Font.Create(AXref: TPdfXref; AName: string); +begin + inherited Create(AXref, AName); + FArray := TDictionary.Create; +end; + +destructor TPdfType1Font.Destroy; +begin + FArray.Free; + inherited Destroy; +end; + function TPdfType1Font.GetCharWidth(AText: string; APos: integer): integer; +var + lDefaultWidth: Word; begin - result := FArray[ord(AText[APos])]; + if not FArray.TryGetValue(APos, Result) then + begin + // initialize char widths array by default value (if missing width parameter + // is defined, use it as default value.) + if Data.PdfNumberByName('MissingWidth') <> nil then + lDefaultWidth := Data.PdfNumberByName('MissingWidth').Value + else + lDefaultWidth := 0; + Result := lDefaultWidth; + end; end; procedure TPdfType1Font.SetData(Value: TPdfDictionary); var i: integer; - DefaultWidth: Word; Widths: TPdfArray; begin inherited SetData(Value); - // initialize char widths array by default value (if missing width parameter - // is defined, use it as default value.) - if Data.PdfNumberByName('MissingWidth') <> nil then - DefaultWidth := Data.PdfNumberByName('MissingWidth').Value - else - DefaultWidth := 0; - for i := 0 to 255 do - FArray[i] := DefaultWidth; - FFirstChar := Data.PdfNumberByName('FirstChar').Value; FLastChar := Data.PdfNumberByName('LastChar').Value; // fill width array with "Widths" table values. Widths := Data.PdfArrayByName('Widths'); for i := 0 to Widths.ItemCount - 1 do - FArray[i + FFirstChar] := TPdfNumber(Widths.Items[i]).Value; + FArray.Add(i + FFirstChar, TPdfNumber(Widths.Items[i]).Value); end; { FixedWidth } diff --git a/hpp/Win32/Debug/PdfFonts.hpp b/hpp/Win32/Debug/PdfFonts.hpp index 6193774..d61ea44 100644 --- a/hpp/Win32/Debug/PdfFonts.hpp +++ b/hpp/Win32/Debug/PdfFonts.hpp @@ -16,8 +16,10 @@ #include #include #include +#include #include #include +#include //-- user supplied ----------------------------------------------------------- @@ -93,17 +95,13 @@ class PASCALIMPLEMENTATION TPdfType1Font : public Pdfdoc::TPdfFont private: System::Byte FFirstChar; System::Byte FLastChar; - System::StaticArray FArray; + System::Generics::Collections::TDictionary__2* FArray; public: + __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); + __fastcall virtual ~TPdfType1Font(void); virtual void __fastcall SetData(Pdftypes::TPdfDictionary* Value); virtual int __fastcall GetCharWidth(System::UnicodeString AText, int APos); -public: - /* TPdfFont.Create */ inline __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName) : Pdfdoc::TPdfFont(AXref, AName) { } - -public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfType1Font(void) { } - }; #pragma pack(pop) @@ -116,7 +114,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidth : public TPdfType1Font public: __fastcall virtual TPdfFixedWidth(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } }; @@ -130,7 +128,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBold : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } }; @@ -144,7 +142,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } }; @@ -158,7 +156,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } }; @@ -172,7 +170,7 @@ class PASCALIMPLEMENTATION TPdfArial : public TPdfType1Font public: __fastcall virtual TPdfArial(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } }; @@ -186,7 +184,7 @@ class PASCALIMPLEMENTATION TPdfArialBold : public TPdfType1Font public: __fastcall virtual TPdfArialBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } }; @@ -200,7 +198,7 @@ class PASCALIMPLEMENTATION TPdfArialItalic : public TPdfType1Font public: __fastcall virtual TPdfArialItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } }; @@ -214,7 +212,7 @@ class PASCALIMPLEMENTATION TPdfArialBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfArialBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } }; @@ -228,7 +226,7 @@ class PASCALIMPLEMENTATION TPdfTimesRoman : public TPdfType1Font public: __fastcall virtual TPdfTimesRoman(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } }; @@ -242,7 +240,7 @@ class PASCALIMPLEMENTATION TPdfTimesBold : public TPdfType1Font public: __fastcall virtual TPdfTimesBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } }; @@ -256,7 +254,7 @@ class PASCALIMPLEMENTATION TPdfTimesItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } }; @@ -270,7 +268,7 @@ class PASCALIMPLEMENTATION TPdfTimesBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } }; @@ -284,7 +282,7 @@ class PASCALIMPLEMENTATION TPdfScript : public TPdfType1Font public: __fastcall virtual TPdfScript(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } }; diff --git a/hpp/Win32/Release/PdfFonts.hpp b/hpp/Win32/Release/PdfFonts.hpp index 6193774..d61ea44 100644 --- a/hpp/Win32/Release/PdfFonts.hpp +++ b/hpp/Win32/Release/PdfFonts.hpp @@ -16,8 +16,10 @@ #include #include #include +#include #include #include +#include //-- user supplied ----------------------------------------------------------- @@ -93,17 +95,13 @@ class PASCALIMPLEMENTATION TPdfType1Font : public Pdfdoc::TPdfFont private: System::Byte FFirstChar; System::Byte FLastChar; - System::StaticArray FArray; + System::Generics::Collections::TDictionary__2* FArray; public: + __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); + __fastcall virtual ~TPdfType1Font(void); virtual void __fastcall SetData(Pdftypes::TPdfDictionary* Value); virtual int __fastcall GetCharWidth(System::UnicodeString AText, int APos); -public: - /* TPdfFont.Create */ inline __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName) : Pdfdoc::TPdfFont(AXref, AName) { } - -public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfType1Font(void) { } - }; #pragma pack(pop) @@ -116,7 +114,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidth : public TPdfType1Font public: __fastcall virtual TPdfFixedWidth(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } }; @@ -130,7 +128,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBold : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } }; @@ -144,7 +142,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } }; @@ -158,7 +156,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } }; @@ -172,7 +170,7 @@ class PASCALIMPLEMENTATION TPdfArial : public TPdfType1Font public: __fastcall virtual TPdfArial(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } }; @@ -186,7 +184,7 @@ class PASCALIMPLEMENTATION TPdfArialBold : public TPdfType1Font public: __fastcall virtual TPdfArialBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } }; @@ -200,7 +198,7 @@ class PASCALIMPLEMENTATION TPdfArialItalic : public TPdfType1Font public: __fastcall virtual TPdfArialItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } }; @@ -214,7 +212,7 @@ class PASCALIMPLEMENTATION TPdfArialBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfArialBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } }; @@ -228,7 +226,7 @@ class PASCALIMPLEMENTATION TPdfTimesRoman : public TPdfType1Font public: __fastcall virtual TPdfTimesRoman(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } }; @@ -242,7 +240,7 @@ class PASCALIMPLEMENTATION TPdfTimesBold : public TPdfType1Font public: __fastcall virtual TPdfTimesBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } }; @@ -256,7 +254,7 @@ class PASCALIMPLEMENTATION TPdfTimesItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } }; @@ -270,7 +268,7 @@ class PASCALIMPLEMENTATION TPdfTimesBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } }; @@ -284,7 +282,7 @@ class PASCALIMPLEMENTATION TPdfScript : public TPdfType1Font public: __fastcall virtual TPdfScript(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } }; diff --git a/hpp/Win64/Debug/PdfFonts.hpp b/hpp/Win64/Debug/PdfFonts.hpp index 952bc3d..da43c39 100644 --- a/hpp/Win64/Debug/PdfFonts.hpp +++ b/hpp/Win64/Debug/PdfFonts.hpp @@ -16,8 +16,10 @@ #include #include #include +#include #include #include +#include //-- user supplied ----------------------------------------------------------- @@ -92,17 +94,13 @@ class PASCALIMPLEMENTATION TPdfType1Font : public Pdfdoc::TPdfFont private: System::Byte FFirstChar; System::Byte FLastChar; - System::StaticArray FArray; + System::Generics::Collections::TDictionary__2* FArray; public: + __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); + __fastcall virtual ~TPdfType1Font(void); virtual void __fastcall SetData(Pdftypes::TPdfDictionary* Value); virtual int __fastcall GetCharWidth(System::UnicodeString AText, int APos); -public: - /* TPdfFont.Create */ inline __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName) : Pdfdoc::TPdfFont(AXref, AName) { } - -public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfType1Font(void) { } - }; @@ -113,7 +111,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidth : public TPdfType1Font public: __fastcall virtual TPdfFixedWidth(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } }; @@ -125,7 +123,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBold : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } }; @@ -137,7 +135,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } }; @@ -149,7 +147,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } }; @@ -161,7 +159,7 @@ class PASCALIMPLEMENTATION TPdfArial : public TPdfType1Font public: __fastcall virtual TPdfArial(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } }; @@ -173,7 +171,7 @@ class PASCALIMPLEMENTATION TPdfArialBold : public TPdfType1Font public: __fastcall virtual TPdfArialBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } }; @@ -185,7 +183,7 @@ class PASCALIMPLEMENTATION TPdfArialItalic : public TPdfType1Font public: __fastcall virtual TPdfArialItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } }; @@ -197,7 +195,7 @@ class PASCALIMPLEMENTATION TPdfArialBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfArialBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } }; @@ -209,7 +207,7 @@ class PASCALIMPLEMENTATION TPdfTimesRoman : public TPdfType1Font public: __fastcall virtual TPdfTimesRoman(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } }; @@ -221,7 +219,7 @@ class PASCALIMPLEMENTATION TPdfTimesBold : public TPdfType1Font public: __fastcall virtual TPdfTimesBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } }; @@ -233,7 +231,7 @@ class PASCALIMPLEMENTATION TPdfTimesItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } }; @@ -245,7 +243,7 @@ class PASCALIMPLEMENTATION TPdfTimesBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } }; @@ -257,7 +255,7 @@ class PASCALIMPLEMENTATION TPdfScript : public TPdfType1Font public: __fastcall virtual TPdfScript(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } }; diff --git a/hpp/Win64/Release/PdfFonts.hpp b/hpp/Win64/Release/PdfFonts.hpp index 952bc3d..da43c39 100644 --- a/hpp/Win64/Release/PdfFonts.hpp +++ b/hpp/Win64/Release/PdfFonts.hpp @@ -16,8 +16,10 @@ #include #include #include +#include #include #include +#include //-- user supplied ----------------------------------------------------------- @@ -92,17 +94,13 @@ class PASCALIMPLEMENTATION TPdfType1Font : public Pdfdoc::TPdfFont private: System::Byte FFirstChar; System::Byte FLastChar; - System::StaticArray FArray; + System::Generics::Collections::TDictionary__2* FArray; public: + __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); + __fastcall virtual ~TPdfType1Font(void); virtual void __fastcall SetData(Pdftypes::TPdfDictionary* Value); virtual int __fastcall GetCharWidth(System::UnicodeString AText, int APos); -public: - /* TPdfFont.Create */ inline __fastcall virtual TPdfType1Font(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName) : Pdfdoc::TPdfFont(AXref, AName) { } - -public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfType1Font(void) { } - }; @@ -113,7 +111,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidth : public TPdfType1Font public: __fastcall virtual TPdfFixedWidth(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidth(void) { } }; @@ -125,7 +123,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBold : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBold(void) { } }; @@ -137,7 +135,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthItalic(void) { } }; @@ -149,7 +147,7 @@ class PASCALIMPLEMENTATION TPdfFixedWidthBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfFixedWidthBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfFixedWidthBoldItalic(void) { } }; @@ -161,7 +159,7 @@ class PASCALIMPLEMENTATION TPdfArial : public TPdfType1Font public: __fastcall virtual TPdfArial(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArial(void) { } }; @@ -173,7 +171,7 @@ class PASCALIMPLEMENTATION TPdfArialBold : public TPdfType1Font public: __fastcall virtual TPdfArialBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBold(void) { } }; @@ -185,7 +183,7 @@ class PASCALIMPLEMENTATION TPdfArialItalic : public TPdfType1Font public: __fastcall virtual TPdfArialItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialItalic(void) { } }; @@ -197,7 +195,7 @@ class PASCALIMPLEMENTATION TPdfArialBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfArialBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfArialBoldItalic(void) { } }; @@ -209,7 +207,7 @@ class PASCALIMPLEMENTATION TPdfTimesRoman : public TPdfType1Font public: __fastcall virtual TPdfTimesRoman(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesRoman(void) { } }; @@ -221,7 +219,7 @@ class PASCALIMPLEMENTATION TPdfTimesBold : public TPdfType1Font public: __fastcall virtual TPdfTimesBold(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBold(void) { } }; @@ -233,7 +231,7 @@ class PASCALIMPLEMENTATION TPdfTimesItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesItalic(void) { } }; @@ -245,7 +243,7 @@ class PASCALIMPLEMENTATION TPdfTimesBoldItalic : public TPdfType1Font public: __fastcall virtual TPdfTimesBoldItalic(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfTimesBoldItalic(void) { } }; @@ -257,7 +255,7 @@ class PASCALIMPLEMENTATION TPdfScript : public TPdfType1Font public: __fastcall virtual TPdfScript(Pdfdoc::TPdfXref* AXref, System::UnicodeString AName); public: - /* TPersistent.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } + /* TPdfType1Font.Destroy */ inline __fastcall virtual ~TPdfScript(void) { } };