Hi Yanmin,

During my debuging, HasChar always returns false for each face of SimSong. But in function SimpleWinLayout::LayoutText, mrWinFontData.HasChar(nCharCode) really returns true for the same circumstance. That is pretty confusing.

I think I know now what the problem is: the font is not set in the HDC, so the system provides the wrong CMAP data to the UpdateFromHDC()/ ReadCmapTable() methods. Please use SetFont() to set the font before you call UpdateFromHDC().

I'm now using the simplest way to implement a demo to just prove dynamic glyph fallback workable under windows system. Enumerate all the fonts that windows has, if a font contains the missing character, then it would be the glyph fallback font, certainly not the best one.


Setting and checking each font can be quite expensive, especially for the startup. And if we cache the result there is the problem to keep this cache always consistent with the system. Anyway, these problems only get in the way in a later phase of this project.

---
Herbert Duerr
du...@sun.com




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@gsl.openoffice.org
For additional commands, e-mail: dev-h...@gsl.openoffice.org

Reply via email to