gtk fonts: try any combination within font face, if slanted font was not found

git-svn-id: trunk@10397 -
This commit is contained in:
jesus 2007-01-08 20:04:01 +00:00
parent b040d25c86
commit 5047d80931

View File

@ -1659,13 +1659,15 @@ begin
WeightList.CommaText := 'normal,medium,regular,light,*';
if WeightName<>'*' then
WeightList.Insert(0, WeightName);
try
if LoadFontEx then
exit;
// not found yet, before doing a generic fall over
// try to do a more specific guess.
if CalcPixelSize then begin
if CalcPixelSize then
repeat
// try one pixel smaller
{$IFDEF VerboseFonts}
@ -1683,7 +1685,17 @@ begin
if LoadFontEx then
exit;
end;
// not found yet
// if font was slanted try with any within font face.
if Slant<>'*' then begin
Slant := '*';
continue;
end;
break;
until false;
finally
WeightList.Free;
end;