On Mon, Mar 13, 2000 at 06:43:22PM +0800, Dmitry Timoshkov wrote:
[snip]
> Who can add support for DBCS and Unicode fonts to x11drv or help with it?

This is something we need to sort out.  Adding Unicode support is in
principle very easy.  In X11DRV_FONT_SelectObject we just try to
create a physical font with a iso10646-1 encoding, if this fails we
should fallback onto the current scheme.  The big problem with this is
that the XServer renders all glyphs at font open time to calculate the
metrics - this can take a long time with large encodings, which would
be annoying if we're just trying to render something in iso8859-1 for
example.

So we should probably initially create a physical font with an
encoding that matches the charset of the logical font (as we do at
present) and then re-create physical fonts with a larger encoding
during the processing of ExtTextOut if we need chars that lie outside
the initial encoding.  The simplest way would be to just open the full
Unicode version of the font in this case.  X11 lets open a font by
specifying ranges of indicies which would be an improvement worth
adding later (sorry forgotten the details of this).  Of course if the
font doesn't have a Unicode encoding then we're stuck.

As for DBCS; X11DRV_ExtTextOut really doesn't know about this.  It
gets a Unicode string at that's that.  All the Windows CP stuff should
have been turned to Unicode before this.  Now of course there may be 2
byte x11-fonts that aren't Unicode that we should support - I'd be
tempted to push for these fonts to get a Unicode encoding though.

Huw.
--
   Dr. Huw D M Davies              | Clarendon Laboratory
   [EMAIL PROTECTED]      | Parks Road
   Tel: +44 1865 272390            | Oxford OX1 3PU
   Fax: +44 1865 272400            | UK

Reply via email to