GimpFontFactory, GimpFont: Improve font matching with old XCF files and fonts validity check
-
Don't rely on the extension in file names to determine the validity of fonts.
-
Retrieve the actual font files that pango would use for a given
pango font description
and use that to look for a matching font, this is because pango when given an unsupported font, will find the closest supported font but still report the unsupported font's name (e.g. the xcf file from #9220, reports the font to beCentury Schoolbook L
which is an unsupported Type1 font but actually it usesC059-Bold
if it's available (a TTF font). -
Also fixes #11341.
Edited by Idriss Fekir