mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 13:09:16 +02: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
|
||||
result := TFPCustomDrawFont(self).DoGetTextWidth (text)
|
||||
else
|
||||
result := FCanvas.GetTextWidth (text);
|
||||
if assigned(FCanvas) then
|
||||
result := FCanvas.GetTextWidth (text)
|
||||
else
|
||||
result :=16; // *some* default better than none.
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user