Re: How to get started



Jan <jandersen striva com> writes:

> Owen Taylor wrote:
> > Jan <jandersen striva com> writes:
> >
> [...]
> >>My project is as follows: I am studying Chinese and I want to make a
> >>simple tool that I can use for making linguistic notes - something like
> >>a 'dictionary', more or less. It would allow me to enter Chinese
> >>phrases, their pronunciation in eg. pinyin and/or bopomofo and comments
> >>in English or any language I might choose at the time (perhaps even a
> >>mix?), and it should have search facilities - especially a radical index.
> >>
> [...]
> > There is really not much about the tool you describe that is
> > "international". Basically, with GTK+ 2 and Unicode, text is just
> > text.
> Logically, that is true, of course - however, in practise it isn't
> quite, firstly because there isn't any font that covers the entire
> range of Unicode

Pango will merge multiple fonts transparently to the programer.

> as far as I know, and secondly because I want to be
> able to display Chinese characters in at least simplified as well as
> full form

With a label you can use markup like:

 Traditional: <span lang="zh_TW">foo</span>
 Complex: <span lang="zh_CN">foo</span>

Of course, in many cases where there are variants, they aren't
unified in Unicode, so this isn't necessary, but it may help
to keep the fonts consistent.

> plus I want to add a facility to enter 'variant forms'
> (like eg. seal characters).

That sounds like a PNG import facility :-) ... well, if not, you'd
just have the user install use a seal character font, and specify
that the same way you'd specify, say "Courier.
 
> > The only real question is that of input method. System integration
> > of mixed input methods is not very good on Linux currently.
> > But for the type of text you describe above, it doesn't actually
> > sound like you need a mixed input method; a Chinese input method
> > like xcin should good enough.
> > But in any case, that's more of a user configuration issue than
> > a programmer issue.
> >
> Is this really just a matter of standard GTK+ coding? I want to avoid
> producing something that can't later be used to enter, say, Arabic or
> whatever, just because I made a bad design decision in the
> beginning. I don't object to using xcin, but I want to be able to use
> any other input method at a later state without reprogramming - all
> things like fonts, input methods, lannguage etc should be fully
> configurable, which I think should be simple enough to do.

While GTK+ doesn't allow easily switching between Chinese and
Arabic (say) input, you'll be best set for the future if you
just assume that it will work, rather than hacking up your
own custom solution.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]