Re: Bug List
- From: Vlad Harchev <hvv hippo ru>
- To: gtk-devel-list gnome org
- Subject: Re: Bug List
- Date: Fri, 1 Dec 2000 13:21:44 +0400 (SAMT)
On 30 Nov 2000, Owen Taylor wrote:
>
> In preparation for GTK+-1.2.9, I've been tackling the GTK+ bug tracker
> over the last day or so. Attached to this is my current semi-sorted,
> semi-annotated list of bugs. It's pretty big.
>
> There are quite a few bugs here where we asked for more information
> quite a while ago and never got any. We don't have a policy now
> on when to close such bugs - my recommendation is that we should
> probably wait and close them once GTK+-2.0 has been out for a while.
>
> But there is also a fair bit of low-hanging fruit here, that people
> could probably tackle with some results. In particular, I'd like
> help with the problems in the first section, labelled "Portability
> Bugs", which are problems that show up, often from multiple reporters,
> on platforms I don't have access to.
>
> Even if these are platform bugs, not GTK+ bugs, it would be nice
> to have instructions for workarounds or even just descriptions
> of the problems in the GTK+ INSTALL file.
Here is another patch that is missing in gtk for some reason.
I've already announced it here in the very end of August.
It fixes the bug in gdk_text_with_wc when the font is not GDK_FONTSET.
Without this patch, width is measured incorrectly for chars with value >127.
> Regards,
> Owen
>
>
Best regards,
-Vlad
--- gdkfont.c-was Tue Aug 22 12:58:08 2000
+++ gdkfont.c Fri Dec 1 12:31:25 2000
@@ -388,12 +388,18 @@
xfont = (XFontStruct *) private->xfont;
if ((xfont->min_byte1 == 0) && (xfont->max_byte1 == 0))
{
- gchar *text_8bit;
- gint i;
- text_8bit = g_new (gchar, text_length);
- for (i=0; i<text_length; i++) text_8bit[i] = text[i];
- width = XTextWidth (xfont, text_8bit, text_length);
- g_free (text_8bit);
+ GdkWChar* wc_tmp;
+ gchar* mbtext;
+ gint mblen;
+
+ wc_tmp = g_new(GdkWChar,text_length+1);
+ memcpy(wc_tmp,text,sizeof(GdkWChar)*text_length);
+ wc_tmp[text_length] = (GdkWChar)0;
+ mbtext = gdk_wcstombs(wc_tmp);
+ mblen = strlen(mbtext);
+ width = XTextWidth (xfont, mbtext, mblen);
+ g_free(mbtext);
+ g_free(wc_tmp);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]