But it's worth seeing your function as well
Here it is:
http://www.theo.ch/lazarus/fontfinder.pasI once wrote this for my own purpose (finding fonts from HTML-style lists).
Change it to suit you needs.
You will see, if it makes a difference to Screen.Fonts on your system (GTK2).
Try with this code:
procedure TForm1.Button1Click(Sender:TObject);
var ff:TFontFinder;
begin
Memo1.Lines.Assign(Screen.Fonts);
fontfinder.EnumFonts(Memo2.Lines);
ff:=TFontFinder.Create;
Edit1.Text:=ff.FindAFontFromDelimitedString('Dummy, Arial, Helvetica, sans-serif');
ff.free;
end;
You see, that you can pass comma delimited lists of fonts (like HTML, CSS).
You will get the first that is found directly or by substring or via replacement list.
Probably not perfect but does the job for me.
You might want to get the fonts list only once in the intialization section, because it takes some time.