imacarthur wrote:
> 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..."

        Interesting coincidence -- I hadn't been following that one.

        Yeah, linux is a real PITA with fonts.. it works so well/easily
        on the other platforms.

        I wonder what tricks programs like firefox and google chrome
        are doing. Maybe fonts is why firefox takes so long to load.
        Chrome comes up pretty fast (but it's young, yet..!)

        I've found that on Fedora7, Sazanami Gothic works pretty well
        ("yum install japanese-fonts") showing antialiased fonts in FLTK.

> 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.

        If you ever find this let me know.

        I seem to recall you might have posted something font related
        a while ago that I compiled and noodled around with.. can't
        remember clearly what that was.

        Currently I am taking advantage of the fact that FLTK can
        be told to use multiple fonts (ie. comma separated font names)
        and it does seem to pick the one that works when I go back and
        forth between two OSs that each support a different font.

        I've been making the raw font names available to the user
        in a config file for the app, so that if they can't install
        that particular font, they can change the font names in the
        config file.

>> 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.
> 
> 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...

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

Reply via email to