LCL, GTK2: Font with number got wrong size, issue #21775, patch from G. Zakrzewski

git-svn-id: trunk@38097 -
This commit is contained in:
juha 2012-07-31 19:49:16 +00:00
parent d4baafc62d
commit 89415fa392

View File

@ -534,6 +534,7 @@ var
var
c: char;
validblank: boolean;
InitPos: Integer;
function IsBlank: boolean;
begin
@ -549,11 +550,13 @@ var
Result := '';
validblank := true;
ParsePos := Length(LongFontname);
InitPos := ParsePos;
while ParsePos>0 do begin
c := longFontName[ParsePos];
if IsBlank then
if ValidBlank then begin
dec(ParsePos);
dec(InitPos);
continue
end else
break;
@ -561,8 +564,14 @@ var
if IsDigit then begin
Result := C + Result;
dec(ParsePos);
end else
end else begin
if not IsBlank then
begin
Result := '';
ParsePos := InitPos;
end;
break;
end;
end;
end;