Proper support for sub-pixel rendering (Cleartype)

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

Post Reply
Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Sat Oct 06, 2018 9:16 pm

When will Editor learn to fully support sub-pixel font anti-aliasing (Cleartype) even when transparencies are present on a page? Currently Editor is not capable of sub-pixel anti-aliasing even when said transparencies are situated completely out of the way (like upper left corner).

Here is a comparison of Cleartype implementations by various PDF Viewers at 100% and 125% zoom settings. The font is a Type 1 font in front of a background image. All but XChange are capable of using sub-pixel rendering in this document.

XChange:
XChange_100.png
XChange_125.png
Acrobat:
Acrobat_100.png
Acrobat_125.png
Foxit:
Foxit_100.png
Foxit_125.png
Nitro:
Nitro_100.png
Nitro_125.png

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 14332
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Tracker Supp-Stefan » Mon Oct 08, 2018 4:17 pm

Hello Timur,

Thanks for the samples.
Today is a statutory holiday in Canada where our lead devs are, but I have passed this and the other text rendering topic to them to review - and we will post further information in both topics as soon as it is available.

Regards,
Stefan

Ivan - Tracker Software
Site Admin
Posts: 3637
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Ivan - Tracker Software » Mon Oct 08, 2018 6:17 pm

PDF files would be much appreciated. We do not do ClearType rendering on some circumstances, and Acrobat does not use ClearType always.
Probably we have to refine conditions when to use and when do not use ClearType.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Mon Oct 08, 2018 7:47 pm

According to a discussion from last year this is due to some kind of transparencies being present anywhere on the page (not necessarily anywhere close to the affected text). Once such a transparency is present Editor seems to switch off Cleartype. I own one PDF file were in double page view one page/side may be rendered using Cleartype while the other page/side is not.

Here are two example PDF files, first one with Cleartype working up to 250% at 96 dpi. I assume that Cleartype is deliberately turned off at larger magnifications?
T_CT.pdf
(117.29 KiB) Downloaded 61 times
And here another one with presumably the very same content except for some "empty" Xform sub-folders. The offensive one seems to be object number 104, changing its blend mode from "Multiply" to "Normal" seem to fix the issue (only after Save and restart).
T_no_CT_03.pdf
(120.49 KiB) Downloaded 56 times

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Mon Oct 08, 2018 10:23 pm

When you write that Acrobat does "not use Cleartype always" I assume you mean that it uses its own type of sub-pixel rendering?! Because my example screenshot clearly show that Acrobat does use sub-pixel rendering for the font, just more subtle (less intensive red/blue). Or do you mean that Acrobat also turns off Cleartype in some circumstances?

Interestingly Acrobat switches to grayscale anti-aliasing at even smaller zoom levels / font sizes than Editor, 195% at 96 DPI for that big "T" in my example file. So the size vs. Cleartype thing obviously is a deliberate switch in both Editor and Acrobat. For smaller fonts I still miss Cleartype in Editor when the other three programs do support it under the very same circumstances.

Ivan - Tracker Software
Site Admin
Posts: 3637
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Ivan - Tracker Software » Tue Oct 09, 2018 8:11 pm

When you write that Acrobat does "not use Cleartype always" I assume you mean that it uses its own type of sub-pixel rendering?! Because my example screenshot clearly show that Acrobat does use sub-pixel rendering for the font, just more subtle (less intensive red/blue). Or do you mean that Acrobat also turns off Cleartype in some circumstances?
I meant that Acrobat turns off ClearType under some circumstances. For example, you can set Multiply blend mode for a text, and Acrobat will not use Cleartype for that text.

In the Editor, we have different rendering methods for contents that have transparency and for contents that do not use transparencies. And not in all of these methods we do support Cleartype. We will have to refine our rendering a bit to support Cleartype in more wider circumstances.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Tue Oct 09, 2018 9:09 pm

I see. I tried to set Multiply blend mode for the "T" text and indeed this turns off Cleartype rendering in Acrobat.

That being said, most of the problematic PDF files I use Editor for are rendered using Cleartype in Acrobat and the other PDF viewers. So if Editor learns to render Cleartype when a "Multiply" XForm is present on the page then it should work properly.

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Fri Oct 12, 2018 11:08 am

What is the consensus on this? Most of the documents I regularly use contain these "Multiply" layers that Editor cannot deal with but other viewers can.

Ivan - Tracker Software
Site Admin
Posts: 3637
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Ivan - Tracker Software » Mon Oct 15, 2018 6:34 pm

We will try to modify rendering in the Editor to turn off ClearType only when it is necessary.
It will not be included in 327.1, but most likely in 328.0 later this year.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Tue Oct 16, 2018 1:46 pm

Good news, thank you!

User avatar
TrackerSupp-Daniel
Site Admin
Posts: 4432
Joined: Wed Jan 03, 2018 6:52 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by TrackerSupp-Daniel » Tue Oct 16, 2018 10:44 pm

:)
Daniel McIntyre
Support Technician
Tracker Software Products (Canada) LTD

Support: <Support@tracker-software.com>
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Tue Sep 03, 2019 2:55 pm

I am still getting a mixture of grayscale and Cleartype anti-aliasing for text, one page using the former and another page using the latter. Adobe Reader renders all pages using Cleartype, including the ones where XChange drops back to grayscales.

Ivan - Tracker Software
Site Admin
Posts: 3637
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Ivan - Tracker Software » Tue Sep 03, 2019 3:33 pm

Can you please send us a sample document with such issue?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Tue Sep 03, 2019 5:43 pm

I provided sample documents earlier in this thread:

viewtopic.php?f=62&t=31569&p=135725#p128103

Adobe Reader switched the "T_no_CT" example from Cleartype to grayscale AA at exactly 179% when 96 dpi is used. XChange Editor keeps using grayscale all the way down to the smallest zoom levels.

Ivan - Tracker Software
Site Admin
Posts: 3637
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Ivan - Tracker Software » Tue Sep 03, 2019 5:45 pm

I provided sample documents earlier in this thread:
sorry, I missed it
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

Timur Born
User
Posts: 732
Joined: Tue Jun 26, 2012 1:50 pm

Re: Proper support for sub-pixel rendering (Cleartype)

Post by Timur Born » Sat Feb 06, 2021 1:26 am

Still the same result in Editor v9 trying the T_no_CT example.

Post Reply