> It is suggested that the width of each character should be adjusted > in font files (font/devutf8/NOTES). > > However, since the width of some Unicode character may differ under > different locale settings, I wonder if font files are really > sufficient for every user.
IMHO groff's font mechanism is not sophisticated enough to handle locales. Compare this to TeX. However... > The attached is a patch to compute character width on the fly. ... devutf8 and the other TTY devices are different. My main concern with `wcwidth' and its siblings is that some platforms have either broken support for it or the functions aren't available at all. Can you extend your patch so that it contains the replacement stuff from gnulib (as it is done e.g. in texinfo)? This is a bigger task I fear since you probably have to modify groff's build system. > The patch is currently useless with the trunk, but with Colin > Walters' charclass branch I confirmed that it renders Japanese man > pages with the kinsoku shori applied correctly (er, mostly, it looks > some kind of hyphenation is necessary for non-punct Japanese > characters): > > http://ueno.fedorapeople.org/groff/kinsoku.png Very nice! Where can I get Colin's branch? Werner