wide char to glyph
- From: Miroslaw Dobrzanski-Neumann <mne mosaic-ag com>
- To: GTKDEV <gtk-devel-list gnome org>
- Subject: wide char to glyph
- Date: Wed, 20 Feb 2002 11:02:43 +0100
Hi,
the arabic module in pango-0.25 mixes gunichar with glyph indices
it is harmless but not clean
static void
arabic_engine_shape ()
{
...
gunichar *wc;
...
wc = ... filled with wide char text
...
while(i < n_chars) {
...
arabic_mule_recode(&subfont, &(wc[i]), fs->subfonts);
...
set_glyph (..., wc[i], ...);
}
}
void
arabic_mule_recode(PangoXSubfont* subfont,int* glyph,PangoXSubfont* mulefonts);
transofrms wide char passed as int* in glyph with the glyph index.
The correct solution should be:
void arabic_mule_recode(PangoXSubfont* subfont, gunicode const *unichar, int* glyph, PangoXSubfont* mulefonts);
and the call
arabic_mule_recode(&subfont, &(wc[i]), &glyphs[i], fs->subfonts);
...
set_glyph (..., glyphs[i], ...);
the same applies for other *_recode functions.
it is harmless because sizeof(gunicode) == sizeof(int) on (almost) all
plattforms
My compiler will be happy if you correct this.
Regards,
--
Miroslaw Dobrzanski-Neumann
MOSAIC SOFTWARE AG
Base Development and Research
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne mosaic-ag com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]