[xorg-devel][patch] libXft subpixel hinting no image swap

Mario Vergara zephyrus_w at yahoo.com
Tue May 17 15:47:48 PDT 2011


Hi DevTeam,

I would like to submit the attached patch to your consideration.
It  solves a problem regarding bad rendering (e.g. 'yellow halo' font  
background) when subpixel hinting is enabled in libXft and the  application runs 
in a mixed endian X client-server configuration.
This case is quite atypical but it can be found in enterprise environments  
where servers are grouped by function, for example: login, presentation  (X 
servers), batch processing, etc.
Here are the technical details:

1. X client
----------
All X clients run in RHEL 4 x86_64 Linux machines (little endian).
Linux 2.6.9-78.0.17.ELsmp #1 SMP Thu Mar 5 04:58:34 EST 2009 x86_64 x86_64 
x86_64 GNU/Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)

2. X  server
-----------
All X servers run in Solaris machines (big endian)
SunOS 5.10 Generic_138888-06 sun4u sparc SUNW,Sun-Fire-V440
--------------------------------------------------------------
> xdpyinfo
name of display:    :13.0
version number:    11.0
vendor string:    Citrix Systems Inc
vendor release number:    59809
maximum request size:  4194300 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, MSBFirst, 32
image byte order:    MSBFirst
number of supported pixmap formats:    3
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum  207
focus:  window 0x1000003, revert to PointerRoot
number of extensions:    14
    BIG-REQUESTS
    DOUBLE-BUFFER
    Extended-Visual-Information
    GLX
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RECORD
    SECURITY
    SGI-GLX
    SHAPE
    SYNC
    TOG-CUP
    XC-MISC
    XTEST
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x800 pixels (325x203 millimeters)
  resolution:    100x100 dots per inch
  depths (1):    24
  root window id:    0x26
  depth of root window:    24  planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x22
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    32x32
  current input event mask:    0xfa2033
    KeyPressMask             KeyReleaseMask           EnterWindowMask          
    LeaveWindowMask          ButtonMotionMask         StructureNotifyMask      
    SubstructureNotifyMask    SubstructureRedirectMask FocusChangeMask          
    PropertyChangeMask       ColormapChangeMask  
  number of visuals:    1
  default visual id:  0x23
  visual:
    visual id:    0x23
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
-----------------------------------------------------------------

3. Test application
------------------
The application used to test the submitted patch was 'rxvt-unicode' linked to 
patched versions of Xft and  Freetype as follows:

* freetype_2.4.3 + infinality patches:
http://www.infinality.net/files/freetype-add-subpixel-hinting-infinality-20101114-1.patch

http://www.infinality.net/files/freetype-enable-subpixel-hinting-infinality-20100909-1.patch

http://www.infinality.net/files/freetype-entire-infinality-patchset-20101114-1.patch

http://www.infinality.net/files/freetype-filter-envvar-fix-20101117-1.patch

*  libXft_2.2.0
https://launchpad.net/ubuntu/+archive/primary/+files/xft_2.2.0.orig.tar.gz
https://launchpad.net/ubuntu/+archive/primary/+files/xft_2.2.0-2ubuntu2.diff.gz

patched with:
libXft-2.2.0/debian/patches/100-libXft-2.1.10-lcd-filter-3.patch

-> and <-
xft_2.2.0-subpixel-hinting-no-image-swap.patch (attached)


* rxvt-unicode_9.10
http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-9.10.tar.bz2
     
I wonder if you could review the patch and let me know if  it solves a general 
issue or it is only applicable to my particular case.

I have also attached a sample image of the overall result.

Thanks & BR,

/Mario. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110517/c73fec46/attachment.html>


More information about the xorg-devel mailing list