diff options
Diffstat (limited to 'docview/components/richtext/CanvasFontManager.pas')
-rw-r--r-- | docview/components/richtext/CanvasFontManager.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docview/components/richtext/CanvasFontManager.pas b/docview/components/richtext/CanvasFontManager.pas index 71e6d2fa..fe9606e6 100644 --- a/docview/components/richtext/CanvasFontManager.pas +++ b/docview/components/richtext/CanvasFontManager.pas @@ -44,6 +44,7 @@ type constructor Create(ACanvas: TfpgCanvas; AWidget: TfpgWidget); reintroduce; destructor Destroy; override; function AverageCharWidth: longint; + function CharAscender: longint; function CharDescender: longint; function CharHeight: longint; function CharWidth( const C: TfpgChar ): longint; // Retrieve the width of the given char, in the current font @@ -314,6 +315,11 @@ begin Result := FCanvas.Font.TextWidth('c'); end; +function TCanvasFontManager.CharAscender: longint; +begin + Result := FCanvas.Font.Ascent; +end; + function TCanvasFontManager.MaximumCharWidth: longint; begin Result := FCanvas.Font.TextWidth('W'); |