Page 1 of 1

Search for a character in all fonts

Posted: Fri Sep 28, 2012 3:20 pm
by joehorn
I need to know which of my fonts contain a particular character. There seems to be no simple way to do that. "Search for a character in all fonts" would be a VERY useful feature in MainType! And easy to implement too, I'd think.

Example:
Input: "Prescription Take" (or Unicode 211E)
Output: list of all my fonts which contain that character.

Thanks in advance!

-Joe-

Re: Search for a character in all fonts

Posted: Fri Sep 28, 2012 5:43 pm
by Bhikkhu Pesala
There is a way to quickly tell if a font has the required symbol — paste some text using the Prescription Take symbol ℞℞℞ in the preview text field.

Edit: Unfortunately, that doesn't seem to work for all character sets.

In the screen shot below, I have typed the Pāli word "Satipaṭṭhāna" and can see which fonts are missing the ṭ dot below.

Image

Re: Search for a character in all fonts

Posted: Mon Oct 01, 2012 10:47 am
by León Fridsma
joehorn wrote:I need to know which of my fonts contain a particular character. There seems to be no simple way to do that. "Search for a character in all fonts" would be a VERY useful feature in MainType! And easy to implement too, I'd think.
Unfortunately this is not easy to implement. MainType currently only stores the number of characters found in a font, not which characters. If a search like this would have to be performed it would have to physically go through each font which would make it very very slow. The solution that Bhikkhu Pesala provided is currently the only way to go.

León

Re: Search for a character in all fonts

Posted: Mon Oct 01, 2012 11:15 am
by Bhikkhu Pesala
León Fridsma wrote:The solution that Bhikkhu Pesala provided is currently the only way to go.
Any reason why it doesn't work with Letterlike Symbols? Prescription Take (Px) is in that character set.

Re: Search for a character in all fonts

Posted: Mon Oct 01, 2012 12:06 pm
by Erwin Denissen
It works just fine on my PC running Windows 7.
PrescriptionTake.png
PrescriptionTake.png (164.74 KiB) Viewed 2963 times

Re: Search for a character in all fonts

Posted: Mon Oct 01, 2012 12:25 pm
by Bhikkhu Pesala
That's good. :) If it only affects Windows XP I guess its not a big issue. I am sure that my own fonts all contain that symbol, but they're showing up as just rectangles. I tried various character sets, all of which showed up in the Samples Pane, but most didn't work in the Preview Text field.
Preview Text.png
Preview Text.png (19.56 KiB) Viewed 2962 times

Re: Search for a character in all fonts

Posted: Mon Oct 01, 2012 1:10 pm
by Erwin Denissen
As long as the text is not "red" it does indicate the characters are available. We are aware Windows XP has certain limits related to drawing Unicode text, but we decided to move forward, as users of more recent versions of Windows do actually benefit the new Windows APIs.