Link underlining and descenders in PDF output

davenz
Posts: 13
Joined: Mon Mar 11, 2019 11:53 am

Link underlining and descenders in PDF output

Post by davenz » Mon Apr 19, 2021 7:10 am

Hi all,

I want to change some aspects of PDF output for better quality. I've attached a screenshot that shows the problems.
descenders.png
descenders.png (41.37 KiB) Viewed 304 times
1. The two highlighted areas show some strange underline formatting that surrounds the automatic numbering for tables and figures.


2. The default underline styling for links overwrites the glyph descenders (which looks messy and will be a problem for non-English languages.) I added this to my CSS for print output but it doesn't change the output:

Code: Select all

a {	
text-decoration-skip-ink: all;
}
(The font family is IBM Plex.)


Any clues about where to look to fix these two problems? I'm using Oxygen XML Editor 22.1.

Thanks,
Dave

julien_lacour
Posts: 182
Joined: Wed Oct 16, 2019 3:47 pm

Re: Link underlining and descenders in PDF output

Post by julien_lacour » Mon Apr 19, 2021 10:18 am

Hello Dave,

I tried to reproduce on my side using <oXygen/> XML Editor 22.1, build 2020100710 and I didn't succeed.
Here is my generated output. You will see the underlined text is ok on my side.
flowers.zip
(236.81 KiB) Downloaded 31 times
Could you indicate which template you are using for your transformation?
You could try to debug your CSS to see if somehow there is no CSS interfering with your customization or the default CSS style-sheets.

Regards,
Julien

julien_lacour
Posts: 182
Joined: Wed Oct 16, 2019 3:47 pm

Re: Link underlining and descenders in PDF output

Post by julien_lacour » Mon Apr 19, 2021 11:00 am

Hello Dave,

I forgot to ask you on which platform you are using Oxygen (Windows/Linux)?
Could you also indicate which PDF Reader you are using? (if it's not Acrobat Reader)

Regards,
Julien

davenz
Posts: 13
Joined: Mon Mar 11, 2019 11:53 am

Re: Link underlining and descenders in PDF output

Post by davenz » Thu Apr 22, 2021 11:38 pm

Hi Julien,

Thanks for your reply and example. I'm using Oxygen XML Editor on Windows 10 and the latest version of Acrobat Reader DC.

The formatting that surrounds the table and figure text in your example is indeed fine. I'll dig into my stylesheets and see what could be causing this.

For the font underlining, I see in your example that the underline also overwrites the glyph descenders—you can see here that it overwrites the descender of the parentheses, p, and g:
descenders-2.png
descenders-2.png (24.23 KiB) Viewed 256 times
Any clue how to fix this?

Thanks,
Dave

julien_lacour
Posts: 182
Joined: Wed Oct 16, 2019 3:47 pm

Re: Link underlining and descenders in PDF output

Post by julien_lacour » Mon Apr 26, 2021 2:06 pm

Hello Dave,

Unfortunately this behavior is controlled by another CSS property called 'text-decoration-skip-ink' which is currently not supported by Apache FOP processor used inside Oxygen PDF Chemistry.
By default internet browsers have this property set to auto which means that underlined content will automatically skip glyphs descenders when underlining text (see specification: https://developer.mozilla.org/en-US/doc ... n-skip-ink).

I added a new feature request for analyzing if it is possible to reproduce this behavior on PDF outputs.
I will let you know as soon as we will have an answer to this problem.

Regards,
Julien

Post Reply