[Pkg-chromium-maint] Bug#763421: Bug#763421: fixed in chromium-browser 43.0.2357.65-1

Vincent Bernat bernat at debian.org
Thu May 21 20:22:49 UTC 2015


 ❦ 21 mai 2015 22:03 +0200, Vincent Bernat <bernat at debian.org> :

>>> Well, I have no more idea. I am using 144 DPI (set through XSETTINGS and
>>> through the X server via xrandr) and Chromium correctly handles this
>>> since this version
>>
>> Maybe there's a cutoff somewhere, I'm not sure. I've tried to force 144
>> dpi but it still doesn't look good with the default scaling (but it's
>> not as bad, and I know I like my widgets tinier than most people).
>
> There may be some restrictions on the factor you can set. For example,
> GDK had a long time limitation of only allowing integers (GDK_SCALE
> needs to be an integer as far as I know). Maybe there is still some
> restrictions. 144 is 1.5*96. You can try 192 too to see if the result is
> better.

If you wanted to dig a bit, the code is here:

 http://sources.debian.net/src/chromium-browser/43.0.2357.65-1/chrome/browser/ui/libgtk2ui/gtk2_ui.cc/#L384-L392

It seems there is almost no rounding. GetDeviceScaleFactor is then used
for web rendering too. You could try to check what you get with

#v+
#include <gtk/gtk.h>

static void
activate(GtkApplication* app, gpointer user_data)
{
    GtkSettings *gtk_settings = gtk_settings_get_default();
    gint gtk_dpi = -1;
    g_object_get(gtk_settings, "gtk-xft-dpi", &gtk_dpi, NULL);
    printf("DPI: %d\n", gtk_dpi);
}

int main(int argc, char **argv) {
    GtkApplication *app;
    int status;
    app = gtk_application_new("org.gtk.example", G_APPLICATION_FLAGS_NONE);
    g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
    status = g_application_run(G_APPLICATION(app), argc, argv);
    g_object_unref(app);

    return status;
}
#v-

Compile with gcc $(pkg-config --cflags --libs gtk+-3.0) -Wall dpi.c -o dpi

Do you get the right value?
-- 
Don't diddle code to make it faster - find a better algorithm.
            - The Elements of Programming Style (Kernighan & Plauger)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-chromium-maint/attachments/20150521/544f91b5/attachment.sig>


More information about the Pkg-chromium-maint mailing list