[xorg-devel][patch] libXft subpixel hinting no image swap (with attachments)

Mario Vergara zephyrus_w at yahoo.com
Tue May 17 16:22:09 PDT 2011


Now with the attachments. Sorry!

Regarding the tests made on the submitted patch, I tried 2 configurations 
successfully:
1. antialias=true,rgba=none  => FT_Render_Mode=FT_RENDER_MODE_NORMAL 
(XftSwapImage() is executed)
2. antialias=true,rgba=rgb    => FT_Render_Mode=FT_RENDER_MODE_LCD 
(XftSwapImage() is bypassed)

If needed, I would be glad to perform further tests on the X server-client 
configuration mentioned below.




________________________________
From: Mario Vergara 
To: xorg-devel at lists.x.org
Sent: Wed, May 18, 2011 12:47:48 AM
Subject: [xorg-devel][patch] libXft subpixel hinting no image swap


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 if 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/4d9ffb20/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xft_2.2.0-subpixel-hinting-no-image-swap.patch
Type: application/octet-stream
Size: 5236 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110517/4d9ffb20/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rxvt-unicode_with_image_swap_patch.png
Type: application/octet-stream
Size: 96711 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110517/4d9ffb20/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rxvt-unicode_no_patch.png
Type: application/octet-stream
Size: 85721 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110517/4d9ffb20/attachment-0005.obj>


More information about the xorg-devel mailing list