Package: xfce4-xkb-plugin
Version: 0.5.3.3-2
Severity: normal
Tags: patch

When text mode chosen instead of flag mode for indication current layout,
font size is too small, almost invisible. Plugin source reveals hardcoded
font_sizes table which intented for panel_size conversion to font size.
This table works nice for specific screen dpi, it seems. And doesn't work
for me with 96 dpi.

In patch attached i've specified font size in pixels ("px" after font size)
equals to 95% panel size (5% gives apropriate space aroung text)

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.8 (SMP w/1 CPU core)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xfce4-xkb-plugin depends on:
ii  libatk1.0-0             1.28.0-1         The ATK accessibility toolkit
ii  libc6                   2.10.2-6         Embedded GNU C Library: Shared lib
ii  libcairo2               1.8.10-3         The Cairo 2D vector graphics libra
ii  libfontconfig1          2.8.0-2          generic font configuration library
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  libglib2.0-0            2.22.4-1         The GLib library of C routines
ii  libgtk2.0-0             2.18.9-2         The GTK+ graphical user interface 
ii  libpango1.0-0           1.26.2-2         Layout and rendering of internatio
ii  librsvg2-2              2.26.0-1         SAX-based renderer library for SVG
ii  libwnck22               2.28.0-1         Window Navigator Construction Kit 
ii  libxfce4util4           4.6.1-2          Utility functions library for Xfce
ii  libxfcegui4-4           4.6.3-2          Basic GUI C functions for Xfce4
ii  libxklavier15           4.0-2            X Keyboard Extension high-level AP
ii  libxml2                 2.7.6.dfsg-2+b1  GNOME XML library
ii  xfce4-panel             4.6.3-1          The Xfce4 desktop environment pane
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

xfce4-xkb-plugin recommends no packages.

xfce4-xkb-plugin suggests no packages.

-- debconf-show failed
--- xfce4-xkb-plugin-0.5.3.3/panel-plugin/xkb-cairo.c	2009-03-06 16:16:03.000000000 +0300
+++ xfce4-xkb-plugin-0.5.3.3-mod/panel-plugin/xkb-cairo.c	2010-03-31 18:29:47.000000000 +0400
@@ -32,7 +32,7 @@
 #include "xkb-cairo.h"
 #include "xkb-util.h"
 
-#define XKB_PREFERRED_FONT "Courier New, Courier 10 Pitch, Monospace Bold %d"
+#define XKB_PREFERRED_FONT "DejaVu Sans, Courier New, Courier 10 Pitch, Monospace Bold %dpx"
 
 #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \
     xx = layoutx + width - 12 + x; \
@@ -170,7 +170,7 @@
     layout = pango_cairo_create_layout (cr);
 
     pango_layout_set_text (layout, normalized_group_name, -1);
-    g_sprintf (font_str, XKB_PREFERRED_FONT, font_sizes[panel_size - 16]);
+    g_sprintf (font_str, XKB_PREFERRED_FONT, 0.95f * panel_size);
     desc = pango_font_description_from_string (font_str);
     pango_layout_set_font_description (layout, desc);
     pango_font_description_free (desc);

Reply via email to