[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-poppler
Subject:    Re: [poppler] [PATCH] Fix Splash back-end FT_Load_Glyph flags
From:       Benoit Jacob <jacob.benoit.1 () gmail ! com>
Date:       2009-10-03 1:24:43
Message-ID: d9f848520910021824j5f9fd0b4y954b22bbc8846f88 () mail ! gmail ! com
[Download RAW message or body]

2009/10/2 Albert Astals Cid <aacid@kde.org>:
> A Dimecres, 30 de setembre de 2009, Benoit Jacob va escriure:
>> Hi,
>>
>> Here on Opensuse 11.2 / KDE 4.3.1, Okular gave me very poor rendering
>> of PDF files. Example:
>> http://imagebin.ca/view/Z7jDxF.html
>>
>> The attached patch fixes it so it now looks like this:
>> http://imagebin.ca/view/a_rIPp.html
>>
>> For comparison, here's how it looks in Evince.
>> http://imagebin.ca/view/hoRjU3.html
>>
>> As you can see, my fix makes Okular render this document exactly like
>> Evince does.
>
> Actually it does not, see the attached images, but i agree they look much
> closer now ;-)

erm OK, actually my testing was unprofessional in that in the 2 apps,
I only used _approximately_ the same zoom level and viewpoint. So
there was no chance at all that the two would be identical
pixel-for-pixel :)

>> FT_Int32 SplashFTFont::getFTLoadFlags() const
>> {
>>   return aa ? FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP
>>
>>             : FT_LOAD_DEFAULT;
>>
>> }
>>
>> As you can see, in the anti-aliasing case, it does the exact same
>> thing as the Cairo back-end.
>>
>> I preserved the existing logic for the non-anti-aliasing case, as I
>> don't have an opinion on these matters. The logic of using
>> FT_LOAD_DEFAULT in that case is what was previously being done in the
>> Splash back-end and I just kept it without asking questions.
>
> Interesting findings, have you tried that with the autohinter enabled?

Yes, as that is the default on openSUSE. However, since you asked, I
wanted to check that. Here is my my method so you can check that it is
good:
I edit the file /etc/fonts/suse-hinting.conf, and I change this line,

       <match target="font">
               <edit name="autohint">
                       <bool>true</bool>
               </edit>
       </match>

to change the value to "false" or "true", and then I run as root:

 $ fc-cache

Assuming that my method is correct, here are my findings:

 * without any patch, the rendering is BAD regardless of the autohint setting

 * with my patch (setting FT_LOAD_NO_HINTING), the rendering is GOOD,
regardless of the autohint setting

 * with my patch as in 2nd e-mail (setting FT_LOAD_NO_AUTOHINT), the
rendering is BAD, regardless of the autohint setting

Benoit
_______________________________________________
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic