diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-20 00:01:18 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-20 00:01:18 +0000 |
commit | be7db03ecbeecc2d78f499a32a12449e3d5d8e36 (patch) | |
tree | 5baf8c401d58d5d2fb06e01f4f35299de6b3c645 /src | |
parent | abed0abfe372ba23d5b36ab8270587e5694fb491 (diff) | |
download | fpGUI-be7db03ecbeecc2d78f499a32a12449e3d5d8e36.tar.xz |
It seems I was wrong, the .Height property is indeed the correct value to use.
Some fonts like "Anonymous Pro" have characters like ( or ) that is larger (taller) than capital
letters. Using the .Height property make multi-line text with ( or ) symbols not touch. This issue
was noted in the TfpgTextEdit widget used in Maximus IDE.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index 046b2f74..20974dfe 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -2694,8 +2694,7 @@ end; function TfpgX11FontResource.GetHeight: integer; begin - // Do NOT use FFontData^.height as it isn't as accurate - Result := GetAscent + GetDescent; + Result := FFontData^.Height; end; function TfpgX11FontResource.GetTextWidth(const txt: string): integer; |