[Pkg-fonts-devel] Bug#524310: fontforge: Seems to be caused by X misreporting screen size
Package: fontforge
Version: 0.0.20080429-1
Followup-For: Bug #524310
The fontforge bug was actually a manifestation of an xserver bug
(reported as #528221) - since WidthMMOfScreen was returning 1, fontforge
was rendering everything at 1600 pixels per millimeter. A workaround patch
against fontforge 20090408 (that may also work on the version in Lenny) is
enclosed, though fixing X to report reasonable screen sizes is probably
better.
*** fontforge-20090408/gdraw/gxdraw.c
--- fontforge-20090408-DEEKOO/gdraw/gxdraw.c
***************
*** 4767,4774 ****
gdisp->screen = DefaultScreen(display);
gdisp->root = RootWindow(display,gdisp->screen);
gdisp->virtualRoot = BadAlloc;
gdisp->res = (25.4*WidthOfScreen(DefaultScreenOfDisplay(display)))/
! WidthMMOfScreen(DefaultScreenOfDisplay(display));
gdisp->scale_screen_by = 1;
gdisp->mykey_keysym = XK_F12;
gdisp->mykey_mask = 0;
--- 4772,4784 ----
gdisp->screen = DefaultScreen(display);
gdisp->root = RootWindow(display,gdisp->screen);
gdisp->virtualRoot = BadAlloc;
+ int dispmm = WidthMMOfScreen(DefaultScreenOfDisplay(display));
+ if (dispmm<10) {
+ /* Sanity check */
+ dispmm = ((WidthOfScreen(DefaultScreenOfDisplay(display))/100.0)*25.4);
+ }
gdisp->res = (25.4*WidthOfScreen(DefaultScreenOfDisplay(display)))/
! dispmm;
gdisp->scale_screen_by = 1;
gdisp->mykey_keysym = XK_F12;
gdisp->mykey_mask = 0;
------- end patch -----
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages fontforge depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libfreetype6 2.3.7-2+lenny1 FreeType 2 font engine, shared lib
ii libgif4 4.1.6-6 library for GIF images (library)
ii libice6 2:1.0.4-1 X11 Inter-Client Exchange library
ii libjpeg62 6b-14 The Independent JPEG Group's JPEG
ii libpng12-0 1.2.27-2+lenny2 PNG library - runtime
ii libsm6 2:1.0.3-2 X11 Session Management library
ii libspiro0 20071029-2 a library for curve design
ii libtiff4 3.8.2-11 Tag Image File Format (TIFF) libra
ii libuninameslist0 0.0.20060907-2 a library of Unicode annotation da
ii libx11-6 2:1.1.5-2 X11 client-side library
ii libxml2 2.6.32.dfsg-5 GNOME XML library
ii python2.5 2.5.2-15 An interactive high-level object-o
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
fontforge recommends no packages.
Versions of packages fontforge suggests:
pn autotrace <none> (no description available)
ii fontforge-doc 0.0.20080429-1 Documentation for FontForge
pn potrace <none> (no description available)
-- no debconf information
Reply to: