mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 12:20:37 +01: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
|
var
|
||||||
c: char;
|
c: char;
|
||||||
validblank: boolean;
|
validblank: boolean;
|
||||||
|
InitPos: Integer;
|
||||||
|
|
||||||
function IsBlank: boolean;
|
function IsBlank: boolean;
|
||||||
begin
|
begin
|
||||||
@ -549,11 +550,13 @@ var
|
|||||||
Result := '';
|
Result := '';
|
||||||
validblank := true;
|
validblank := true;
|
||||||
ParsePos := Length(LongFontname);
|
ParsePos := Length(LongFontname);
|
||||||
|
InitPos := ParsePos;
|
||||||
while ParsePos>0 do begin
|
while ParsePos>0 do begin
|
||||||
c := longFontName[ParsePos];
|
c := longFontName[ParsePos];
|
||||||
if IsBlank then
|
if IsBlank then
|
||||||
if ValidBlank then begin
|
if ValidBlank then begin
|
||||||
dec(ParsePos);
|
dec(ParsePos);
|
||||||
|
dec(InitPos);
|
||||||
continue
|
continue
|
||||||
end else
|
end else
|
||||||
break;
|
break;
|
||||||
@ -561,8 +564,14 @@ var
|
|||||||
if IsDigit then begin
|
if IsDigit then begin
|
||||||
Result := C + Result;
|
Result := C + Result;
|
||||||
dec(ParsePos);
|
dec(ParsePos);
|
||||||
end else
|
end else begin
|
||||||
|
if not IsBlank then
|
||||||
|
begin
|
||||||
|
Result := '';
|
||||||
|
ParsePos := InitPos;
|
||||||
|
end;
|
||||||
break;
|
break;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user