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

Glyph layout - See Issue #442 #455

Merged
merged 16 commits into from
Nov 29, 2020
Merged

Glyph layout - See Issue #442 #455

merged 16 commits into from
Nov 29, 2020

Conversation

vk-github18
Copy link
Contributor

@vk-github18 vk-github18 commented Nov 15, 2020

Pull request for issue #442 Accented Letters composed of Unicode base letter and combining accent are rendered incorrectly.

The position of glyphs is computed with statndard Java AWT methods.
The output should be correct for all characters and sequences of DIN SPEC 91379.
Eventually other scripts are also rendered correctly especially with Java versions >= 1.9 using HarfBuzz for rendering - this is not in the scope of this change.

See the example GlyphLayoutDinSpec91379.java

@codecracker2014
Copy link
Contributor

@vk-github18 can you check this wiki and see if this can solve notofonts/noto-fonts#442

@vk-github18
Copy link
Contributor Author

@codecracker2014 FopGlyphProcessor does glyph substitution, not glyph positioning, so it can not solve notofonts/noto-fonts#442

@codecracker2014
Copy link
Contributor

@vk-github18 can you share output with FopGlyphProcessor enabled.

@vk-github18
Copy link
Contributor Author

vk-github18 commented Nov 16, 2020

@codecracker2014 The output would not change with FopGlyphProcessor enabled, because it will not be called. The LayoutProcessor always calls showText(glyphVector),

Output of Hindi example with LayoutProcessor enabled:
helloworld-hindi.pdf

@vk-github18
Copy link
Contributor Author

Output of example programs:
GlyphLayoutDocumentDinSpec91379.pdf
GlyphLayoutFormDinSpec91379.pdf

@asturio
Copy link
Member

asturio commented Nov 22, 2020

@codecracker2014 , @vk-github18
Any objections in this PR? It looks OK for me. (will merge in 3 days, if no one is against it :-) )

Copy link
Member

@asturio asturio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The results look good. Code is clean!

@vk-github18
Copy link
Contributor Author

I need to provide another correction before merging.

@sonarcloud
Copy link

sonarcloud bot commented Nov 24, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@vk-github18
Copy link
Contributor Author

Code should be ok now, the result of the examples is:

GlyphLayoutDocumentDinSpec91379.pdf
GlyphLayoutFormDinSpec91379.pdf

@asturio
Copy link
Member

asturio commented Nov 29, 2020

It's a nice improvement. I think there still some issues with "apostrophes" or "acutes" like in c', or t'. But other glyphs are looking great.

@asturio asturio merged commit 0be946d into LibrePDF:master Nov 29, 2020
@vk-github18
Copy link
Contributor Author

Thanks for merging the request.
I am not sure, which combinations you refer to. Some problems are addressed in https://github.com/googlefonts/noto-fonts/issues/1882

@vk-github18
Copy link
Contributor Author

For reference I am adding a list of the sequences with codepoint and name.
GlyphLayoutDinSpec91379Sequences.pdf

@vk-github18 vk-github18 deleted the glyph-layout branch November 29, 2020 18:00
@asturio
Copy link
Member

asturio commented Nov 30, 2020

For reference I am adding a list of the sequences with codepoint and name.
GlyphLayoutDinSpec91379Sequences.pdf

Everything fine. I assumed the display of "LATIN CAPITAL LETTER * WITH COMBINING COMMA ABOVE RIGHT" was wrong. But it is exactly as in the reference.

Thank you again for this very nice PR 👍

@vk-github18
Copy link
Contributor Author

@asturio You are right, the display of some letters with "COMBINING COMMA ABOVE RIGHT" is wrong, this is caused by a bug of the Noto Sans fonts, see https://github.com/googlefonts/noto-fonts/issues/1882

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

Successfully merging this pull request may close these issues.

Accented Letters composed of Unicode base letter and combining accent are rendered incorrectly.
3 participants