mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:59:10 +02:00
* Search with Postscript font name and humanreadable font name
git-svn-id: trunk@43806 -
This commit is contained in:
parent
9bd7401ce9
commit
f01495668e
@ -126,8 +126,12 @@ begin
|
|||||||
fnt := gTTFontCache.Find(AFontName); // we are doing a PostScript Name lookup (it contains Bold, Italic info)
|
fnt := gTTFontCache.Find(AFontName); // we are doing a PostScript Name lookup (it contains Bold, Italic info)
|
||||||
if Assigned(fnt) then
|
if Assigned(fnt) then
|
||||||
Result := Document.AddFont(fnt.FileName, AFontName)
|
Result := Document.AddFont(fnt.FileName, AFontName)
|
||||||
else
|
else
|
||||||
raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
|
begin
|
||||||
|
fnt:=gTTFontCache.FindFont(AFontName);
|
||||||
|
if fnt=Nil then
|
||||||
|
raise Exception.CreateFmt('fpreport: Could not find the font <%s> in the font cache.', [AFontName]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user