mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-26 10:27:21 +01:00
* another fix for mantis 13171, font.gettextwidth default value
git-svn-id: trunk@14976 -
This commit is contained in:
parent
df17bb95e8
commit
502ac4c8a5
@ -65,6 +65,9 @@ begin
|
|||||||
if inheritsFrom (TFPCustomDrawFont) then
|
if inheritsFrom (TFPCustomDrawFont) then
|
||||||
result := TFPCustomDrawFont(self).DoGetTextWidth (text)
|
result := TFPCustomDrawFont(self).DoGetTextWidth (text)
|
||||||
else
|
else
|
||||||
result := FCanvas.GetTextWidth (text);
|
if assigned(FCanvas) then
|
||||||
|
result := FCanvas.GetTextWidth (text)
|
||||||
|
else
|
||||||
|
result :=16; // *some* default better than none.
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user