sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

Vertical placement of section head text (with borders) depends on whether it has descenders or not #402

Closed jeffheath-sil closed 3 years ago

jeffheath-sil commented 3 years ago

When I put a border around a section heading, I’m seeing that the text is placed differently within the border if it doesn’t have any descenders. For example, look at the difference in vertical position in the text of these two borders:

image

The borders are being placed consistently, but a section head text without descenders is placed much lower.

This does bad things when the section head is at the top of a page, because a section head with descenders appears fine:

image

But for a section head without descenders, XeTeX thinks it has room enough to fit the section head on one line:

image

mhosken commented 3 years ago

Fixed the top of page issue. More thought needed on the descenders problem.

mhosken commented 3 years ago

Added a legacy compatibility option to use glyphmetrics for line heights. Disable this to get what you want.

jeffheath-sil commented 3 years ago

In case anyone else is looking for it... It's on the Advanced tab, in the Compatibility box. And that seems to take care of the problem.

The pop-up for this new option says this: image

That sort of begs the question... If font metrics gives more consistent results, why would you use glyph metrics? I'm OK leaving it in (with this option), but I just thought I'd ask.

And assuming you do The Right Thing with that question, as far as I'm concerned you can close this issue.

markpenny commented 3 years ago

Here's how I understand it working...

For any new projects, it will automatically default to the better way of working (i.e. that option to "Use glyph metrics" will default to being OFF). But in order to not break everything for everyone else, existing projects will continue to use the legacy "glyph metrics" - so that box will stay checked for them. But they are free to uncheck it...

Does that make sense as to why it is ON for you? But hopefully OFF for anyone starting out fresh...