Dekel Tsur <[EMAIL PROTECTED]> writes:
| On Tue, Jul 04, 2000 at 09:40:21PM +0200, Lars Gullik Bjønnes wrote:
| > | To use it, select "iso10646-1" as screen font encoding.
| > | (note that the text is still stored as 8-bit. At the rendering stage it is
| > | transformed to 16-bit according to the current language)
| >
| > So we need unicode postscriptfonts to use this?
|
| Any unicode font (bitmap, type1, TTF).
| In the screenshot, I've used monotype arial TTF font.
|
| > We really should switch to use ucs4 internally.
|
| Or ucs2, where the choice is done at compile time.
I'd rather not have the choice, this will be a bit easier to maintain
then.
| This will double (quad) the memory usage, but I don't think that it is much
| of a problem.
Of course for large documents this will have some impact.
| (Another (probably not so good) option is to use utf8 internally.)
no, that is not a good option.
| How exactly this should be done? I'm thinking of the following:
| In encoding.h (or elsewhere):
| typedef short int Uchar;
| typedef std::vector<Uchar> Ustring;
This is not enough, we also need to create char_traits<Uchar>
(also that is bad... be want to use the basic_string to make strings,
not std::vector)
wstring is supposed to be ucs4, at least in gcc libstdc++
so we should use that.
so I'd prefere
typedef std::vector<wchar_t> Text;
and then in paragraph
Text text;
| and in LyXParagraph class we use:
| Ustring text;
|
| Finally, the painter text drawing method should be
| text(int x, int y, Ustring::iterator begin, Ustring::iterator end,
| LyXFont const & f);
ok.
| > On what basis does it discover the correct encoding? In language is
| > default and I enter '?' what encoding will it use then?
|
| Again with the "default" language ?
| I've already said that the "default" language should be deleted.
I am still a bit ambivalent concerning this, but I suppose you are
right.
Lgb