* another fix for mantis 13171, font.gettextwidth default value

git-svn-id: trunk@14976 -
This commit is contained in:
marco 2010-03-05 21:03:49 +00:00
parent df17bb95e8
commit 502ac4c8a5

View File

@ -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;