Font match quality score?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fontconfig will always match a font name with something, and it would in some instances be extremely helpful for the program using it to know how good or bad a match was found. In my case I ran into this when trying to reassemble complex text that had been broken down into chunk1,chunk2, chunk3, etc. with only the start position on the page, font name, and font size known. If the match was good then the rules for figuring out that the chunks "E","=mc","2" are supposed to be "E=mc2" (that is supposed to be a superscript 2) are pretty straightforward. However, when the match is bad the chunks either overlap each other too much or are too short. In brief, it is not worth the effort trying to reassemble complex text fif the font match is poor.

Consider three cases:

1.  Arial
2.  Arial Narrow
3.  Random2347937

Because (1) is such a common font pretty much every system has a good match. If there is an actual Arial Narrow then (2) will match exactly, otherwise the match
  will generally be terrible.
For (3) the match could only be good by pure chance, since fontconfig knows nothing about this
"font".

The application cannot know the preceding 3 facts, unless fontconfig somehow tells it.

Is there currently some way to get fontconfig to reveal how good a match was found? If not, could it please be enhanced to return some sort of quality score? For instance "10" for "Arial" matching "Arial", or "Arial Narrow" matching "Arial Narrow", vs. 3 for "Arial Narrow" matching some other condensed font, or 1 for "Random2347937" which Fontconfig cannot identify?

Thank you,

David Mathog
mathog@xxxxxxxxxxx
Manager, Sequence Analysis Facility, Biology Division, Caltech
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig


[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux