Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line spacing issue in Tiro Kannada #17

Closed
Etewilak opened this issue Jun 2, 2022 · 7 comments
Closed

Line spacing issue in Tiro Kannada #17

Etewilak opened this issue Jun 2, 2022 · 7 comments

Comments

@Etewilak
Copy link

Etewilak commented Jun 2, 2022

When the sequence U+0CA1 U+0CCD U+0CA1 is entered, the last character does not appear completely:
image

@Etewilak
Copy link
Author

Etewilak commented Jun 2, 2022

A similar issue also occurs in Tiro Telugu.

@tiroj
Copy link
Contributor

tiroj commented Jun 3, 2022

It looks like LibreOffice Writer is clipping at the OS/2 sTypoDescender metric (-245), and ignoring the OS/2 usWinDescent value (-694), which explicitly sets the non-clipping zone for descending glyphs and stacks. A similar thing happens in MS Word if linespacing is defined as a multiple of the font metrics (e.g. 1) rather than in some other way such as explicit leading.

One way around this is to change the sTypoAscender and sTypoDescender to equal the same heights as the usWinAscent and usWinDescent, and set the sTypoLineGap to zero. But I don’t like doing that because a) the different sets of metrics are different for a reason, b) software should stop getting it wrong, and c) the usWin metrics need to be adjustable in future if taller or deeper glyphs are added to a font, while the linespacing metrics should remain unchanged to avoid document reflow.

@tiroj
Copy link
Contributor

tiroj commented Sep 10, 2022

Further to this: have confirmed that in at least some of the Tiro Indic fonts the OS/2 sTypo metrics and usWin metrics do not sum to the same height, so I can’t fix this by matching the former to the latter without breaking document layout.

The other font side option would be to extend the sTypoAscender and sTypoDescender to sum to their current height plus the sTypoLineGap, and set the latter to zero.

Would still dearly love to see this fixed on the app side though!

@tiroj
Copy link
Contributor

tiroj commented Sep 10, 2022

Hmm. I don’t see a way to change the font metrics without causing document reflow at least somewhere in the web of dependencies across text layout environments.

So no change for v1.60 I think.

@vv-monsalve
Copy link
Contributor

vv-monsalve commented Sep 11, 2022

@tiroj The latest VM tests I've done on all platforms led me to conclude that Word and Libre Office on Windows are indeed using typoMetrics instead of Win metrics.

@Etewilak In which version of Libre Office Writer is this happening? I can't replicate it in LibreOffice 7.4.0 (Windows 10), nor with LibreOffice 7.2.1.2 om MacOS Big Sur (11.6.5)

Tests done with TiroKannada-Regular.ttf v1.48.

  • Default "Simple" in Line spacing options in the Paragraph formatting

Windows
Screen Shot 2022-09-11 at 14 46 06
Mac
Screen Shot 2022-09-11 at 15 22 53

  • Clipping only happens when the option is turned to "Fixed" option, which seems to override the clipiong options.

Starting from 12/12 solid line spacing which of course is not ideal
Screen Shot 2022-09-11 at 14 47 05

But continues to happen at 12/21 which is also not ideal.

Screen Shot 2022-09-11 at 16 36 16

@tiroj
Copy link
Contributor

tiroj commented Sep 12, 2022

Thanks for looking into this, Viviana. After reviewing the options, I’ve decided not to change the current metrics settings in the fonts, but will probably add something about vertical metrics to the documentation on which I’ve been working this summer, so that if someone wants to fork the fonts and apply different metrics they have an idea what the issues and options are.

@tiroj tiroj closed this as completed Sep 12, 2022
@vv-monsalve
Copy link
Contributor

vv-monsalve commented Sep 12, 2022

but will probably add something about vertical metrics to the documentation on which I’ve been working this summer, so that if someone wants to fork the fonts and apply different metrics they have an idea what the issues and options are.

Looking forward to seeing it. I've performed some VM tests to check current GF specifications and been documenting them in this doc in case some of the findings could be of any help. Also, I have many open questions about behaviors I still haven't figured out and will need further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants