diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2011-01-15 13:16:46 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-07-23 09:41:00 +0200 |
commit | dbd2178335b155428948362003b9d02b49fb610f (patch) | |
tree | fb49f00cf0d022e29f41a39a0d338bd08d25ec2f /docview/components/richtext | |
parent | eb30643705f18067e4e5374fa272c71a604403ab (diff) | |
download | fpGUI-dbd2178335b155428948362003b9d02b49fb610f.tar.xz |
fixes compiler errors after bring 'fonts_refactor' branch up to speed
Diffstat (limited to 'docview/components/richtext')
-rw-r--r-- | docview/components/richtext/CanvasFontManager.pas | 18 | ||||
-rw-r--r-- | docview/components/richtext/RichTextLayoutUnit.pas | 6 |
2 files changed, 14 insertions, 10 deletions
diff --git a/docview/components/richtext/CanvasFontManager.pas b/docview/components/richtext/CanvasFontManager.pas index 7024f062..98079c36 100644 --- a/docview/components/richtext/CanvasFontManager.pas +++ b/docview/components/richtext/CanvasFontManager.pas @@ -2,9 +2,9 @@ Unit CanvasFontManager; {$mode objfpc}{$H+} -Interface +interface -Uses +uses Classes ,fpg_base ,fpg_main @@ -15,13 +15,13 @@ Const // This defines the fraction of a pixel that // font character widths will be given in DefaultTopicFontName = 'Arial'; - DefaultTopicFontSize = 10; + DefaultTopicFontSize: integer = 10; DefaultTopicFixedFontName = 'Courier New'; - DefaultTopicFixedFontSize = 10; - + DefaultTopicFixedFontSize: integer = 10; - DefaultTopicFont = DefaultTopicFontName + '-' + DefaultTopicFontSize; - DefaultTopicFixedFont = DefaultTopicFixedFontName + '-' + DefaultTopicFixedFontSize; +var + DefaultTopicFont: string; + DefaultTopicFixedFont: string; type {Standard Font Attributes} @@ -320,5 +320,9 @@ begin end; +initialization + DefaultTopicFont := DefaultTopicFontName + '-' + IntToStr(DefaultTopicFontSize); + DefaultTopicFixedFont := DefaultTopicFixedFontName + '-' + IntToStr(DefaultTopicFixedFontSize); + end. diff --git a/docview/components/richtext/RichTextLayoutUnit.pas b/docview/components/richtext/RichTextLayoutUnit.pas index ccfb0ca4..7892ff20 100644 --- a/docview/components/richtext/RichTextLayoutUnit.pas +++ b/docview/components/richtext/RichTextLayoutUnit.pas @@ -131,8 +131,8 @@ end; // Create a layout of the specified rich text. constructor TRichTextLayout.Create(Text: PChar; Images: TfpgImageList; RichTextSettings: TRichTextSettings; FontManager: TCanvasFontManager; - Width: longint); -Begin + AWidth: longint); +begin ProfileEvent('DEBUG: TRichTextLayout.Create >>>>'); inherited Create; FRichTextSettings := RichTextSettings; @@ -157,7 +157,7 @@ ProfileEvent('DEBUG: TRichTextLayout.Create 2'); ProfileEvent('DEBUG: TRichTextLayout.Create 3'); Layout; ProfileEvent('DEBUG: TRichTextLayout.Create <<<<'); -End; +end; Destructor TRichTextLayout.Destroy; Begin |