On 24 Jun 2010, at 18:23, Manolo Gouy wrote: > In my hands, this small test program displays all scripts well > under Mac OS X, but does not display the Hiragana part under X11+Xft, > though cyrillic and greek output correctly.
OK - you haven't set any font, so you'll just be getting the system default at that point. And (you are in France I think?) that'll likely be some LGC compatible font (Latin Greek Cyrillic) in all probability - whereas what you need is a font that also provides CJK glyphs (Chinese Japanese Korean) if you want to display Hiragana. Now... Working with OSX, you get a bit spoiled: the Apple font system (and also the one used in WinVista and Win7, and I think also PanGo though I am not sure about that) detects when the current font does not have glyphs for the characters you display, and uses a fallback font-substitution scheme to fill in the gaps. By default, XFT does not do this, so you see the gaps. Options... Well, there are a few so-called Pan-Unicode fonts out there - fonts that at least attempt to contain the basic glyphs for LGC, CJK, Hebrew, Arabic and some Indic langauges, but these tend to be Really Big and/or poor quality (to save space the font designers leave out a lot of the kerning and hinting information...) What I do is load several fonts - once for LGC text, one for CJK, one for Arabic and so on, then explicitly set the font I want before rendering the string. This works, but handling mixed text is a nightmare. What I ought to do is use XFT's ability to build a "pseudo-font" that is an amalgam of several real fonts in union, and set that as my main font, and then let XFT find a suitable glyph for each character... XFT knows which glyphs each font contains, and it is fairly easy to pass it a block of text and a font, and it will tell you whether all the glyphs are available, or how many (and which ones) are not and so on, so it is possible to build a mechanism to do what the Apple font system does, using XFT. But (other than *maybe* PanGo?) I do not know of one... We could perhaps build our own - I actaully started to write something like that, but life intervened, and it does not currently work (and until my house is finished, there is no time to work on it.) Indeed, we should probably add that ability to fltk's XFT handling - and I think Timothy Lee even posted some patches to that effect that we have not yet merged. So, anyway - your program works on OSX because the Apple font system is hiding the complexity of selecting a suitable font. It fails on X11 +XFT because they don't believe in hiding that complexity... It's more an issue of system philosophy than an outright fltk bug! _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev