On 29 Mar 2010, at 17:30, Greg Ercolano wrote:

> Is there a linux tool that can take utf8 text, and tell you all the  
> fonts
> on the system that can display it?

Well - this kind of relates to the thread over in fltk.dev "Support  
for non alphabetic scripts..."

I don't know of such a tool that already existed, but I did write one  
to do just that a while back - but it depends on XFT, so if you are  
wanting Xlib support, well...

Anyway, what the code did (note that I can't actually find it right  
now - I think it maybe on the box in the spare room, which is shut  
down at present...) is take a block of text in utf8, then uses XFT  
calls to poke each font in turn to see if the font can support each  
code point in the text block - the XFT lib provides functions for  
exactly that purpose.

I think I stopped when I found one that worked, but it would be  
trivial to go and poke them all...

> I'm not sure such a tool can exist, but I imagine there must be  
> some way
> a tool can load each font on the system, and confirm whether the  
> glyphs
> exist or not for that font.

Yup - as noted above, XFT can do that.
I think the Xlib font mechanism maybe can too, but I don't know  
enough about it to know.

> Firefox and Thunderbird all seem to know how to display eg.  
> japanese and
> korean fonts "automagically", but in FLTK (on linux anyway), we  
> need to
> /specify/ font names in order to display them properly.

...which is exactly the problem that the thread in fltk.dev is  
looking at...

> So it'd be great if I could copy UTF8 text from eg. firefox/mozilla,
> and paste it into a program that tells me what font names on the  
> system
> can display it.

Yup...

If I can find my code, or any bits of it, I'll send it along. Won't  
be today though, as the baby is asleep in that room now...
-- 
Ian



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to