mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:29:34 +02:00
LCL, GTK2: Font with number got wrong size, issue #21775, patch from G. Zakrzewski
git-svn-id: trunk@38097 -
This commit is contained in:
parent
d4baafc62d
commit
89415fa392
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user