[webkit-dev] Re: Issues with font rendering on DirectFB build
Christian Dywan
christian at twotoasts.de
Wed Feb 13 03:07:06 PST 2008
Am Wed, 13 Feb 2008 16:06:50 +0530
schrieb "Sriram Neelakandan" <sriram.neelakandan at gmail.com>:
> Alp
>
> for some reason DPI reported by gdk_screen_get_resolution(screen);
> in webkitwebview.cpp is incorrect !!
> It returns a -1 !! so i fixed the DPI to 96 when its -1
>
> so probably we need this change !!
>
> *************** static void webkit_web_view_screen_chang
> *** 1097,1102 ****
> --- 1097,1103 ----
> #if GTK_CHECK_VERSION(2, 10, 0)
> GdkScreen* screen = gtk_widget_has_screen(GTK_WIDGET(webView)) ?
> gtk_widget_get_screen(GTK_WIDGET(webView)) : gdk_screen_get_default();
> gdouble DPI = gdk_screen_get_resolution(screen);
> + if (DPI == -1) DPI = 96;
> #else
> gdouble DPI = 96;
> g_warning("Cannot retrieve resolution, falling back to 96 DPI");
>
While that might fix the problem, hardcoding arbitrary values is not
exactly advisable.
It should be interesting to figure out what causes this function to fail
in the first place.
Regards,
Christian
More information about the webkit-dev
mailing list