From: MINAMI H. <mi...@mi...> - 2006-03-06 16:13:28
|
Sorry for late reply. I've just started to process my pile of To-Do... On Sun, 2005-12-18 at 21:40 -0500, Rich Felker wrote: > Is there any way to use a glyph substitution table from an external > file and still use the fonts through X? That is to say: does X make > the precombined glyphs available in any way at all, or are they > completely inaccessible? If there's a sane way to make them accessible > and just use a separate subst table it would work for bitmap fonts > too, which would be a big plus. If you can convert a UCS4 sequence to corresponding id and can use Xft, XftDrawGlyphs() which takes an array of glyph-id may be used to draw any glyph in a font. The conversion is not trivial, though. With old x core font, I don't think we can use glyphs outside of Unicode. Do you think we can force to use Xft? > > Alternatively, we may able to use m17n-lib > > (http://www.m17n.org/m17n-lib/) > > as a rendering engine. Though I'm not yet investigated deeply, > > implementation of mlterm side can simpler in this case. > > Yes I've been looking at m17n-lib a lot since I wrote. It seems to > have the only reasonable Tibetan input methods on *nix (altho I was > just planning on adding key bindings to screen to switch keyboard to > tibetan mode and back). I haven't looked at its rendering stuff yet. I > see that mlterm supports m16n-lib already; what does it use it for? mlterm is using m17n-lib only as one of input frameworks like XIM/iiimf/uim/scim. > > Supporting to edit Tibetan on command line / editors like vim can be > > very difficult. Because there's no standard for handling of combined > > characters on a terminal, you have to define "the right way" at first. > > ex.) > > Some of these questions belong at the terminal level, some at the pty > level, and some at the application level. > > > - When you press Delete/Backspace key in a combined character, > > Should we delete entire character or part of it? > > - When you press right/left key, should a cursor move one consonant or > > one character? > > Hard to say. Either way would be usable. This is definitely left to > the application however (or when using cooked line-based input at the > terminal, the kernel tty driver). The problem is, mlterm can't know whether an application running on it knows Tibetan or not. When both of mlterm and the application perform conversion, the result will be horrible. But some problems also occur if none of them cares about combined characters. > > - What should we do if part of combined character was overwritten? > > I don't think this is possible. The terminal control codes to move to > a position are based on character cells, not characters, right? There are no standard to handle combined characters on terminal. So an application may be implemented in either way. > On the other hand, what happens when you overwrite just half of a cjk > doublewidth character? If the application is wise enough, entire character will be erased. Otherwise, we see garbage. -- MINAMI Hirokazu <mi...@mi...> |