mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 22:29:23 +02:00
* Fix from Pascal Riekenberg for bug ID #37309 (font search failure)
git-svn-id: trunk@45744 -
This commit is contained in:
parent
792eafadef
commit
1c70372cc3
@ -124,14 +124,11 @@ begin
|
||||
else
|
||||
begin
|
||||
fnt := gTTFontCache.Find(AFontName); // we are doing a PostScript Name lookup (it contains Bold, Italic info)
|
||||
if Assigned(fnt) then
|
||||
Result := Document.AddFont(fnt.FileName, AFontName)
|
||||
else
|
||||
begin
|
||||
if not Assigned(fnt) then
|
||||
fnt:=gTTFontCache.FindFont(AFontName);
|
||||
if fnt=Nil then
|
||||
raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
|
||||
end;
|
||||
if fnt=Nil then
|
||||
raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
|
||||
Result := Document.AddFont(fnt.FileName, AFontName)
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user