GNOME Bugzilla – Bug 96300
Hangul shaper needs a generic font-based render_func selection mechanism as found in Thai shaper
Last modified: 2004-12-22 21:47:04 UTC
Currently, hangul-x.c in hangul module uses charset field + encoding field of XLFD to select rendering function. My patch for hangul-xft.c (bug 95708) uses two methods to select fonts (one is font-name based and the other is whether a certain glyph is combining or not. see set_render_func() in my patch). In boht cases, this selection is done every time a cluster is rendered without any caching even though a single font is used for a run of text in many cases. Therefore, caching has to be done per font and Hangul_Font_Type has to be defined and be used by both hangul-x and hangul-xft. The implementation in Thai shaper should set a very good example for this. I suggest this bug has to be put off until bug 95708, bug 96299 and other Hangul shaper related bugs are all resolved(or at least patches for them are committed to HEAD) because this bug is a kind of code-clean-up and reorganization that doesn't affect the functionality/features although it affects the performance and code manageability.
Moving bugs to new hangul component
A new proposal (to add 'fontcap' to fontconfig 'DB') can help this bug as well in identifying Korean opentype fonts: bug 112467). See http://fontconfig.org/bugzilla/show_bug.cgi?id=111
Isn't this a WONTFIX, since we only have one Hangul shaper now, hangul-fc?
I'm not 100% sure. I have to think a bit more about it. You're right that the original intent of filing this bug was 'fulfilled', but we still need a more generic 'run-time' detection of font features that triggers an appropriate render_*(). However, I guess we have to wait until fontconfig offers the necessary infrastructure unless we want to do it ourselves.
I think the content of this bug is basically "figure out the cleanest way to handle multiple types of OpenType and non-OpenType fonts in a single shaper." As this, I don't think it really needs a separate bug report; as we add different types of fonts to hangul-fc.c presumably doing it in a clean way is an integral part of that. So, I'm going to close this NOTABUG just to keep the bug database a bit smaller and easier to understand.