[ 
https://issues.apache.org/jira/browse/PDFBOX-5729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17794332#comment-17794332
 ] 

JAVA USER edited comment on PDFBOX-5729 at 12/7/23 7:05 PM:
------------------------------------------------------------

[~tilman] For Devanagari, the missing top horizontal bar in the third glyph of 
first word in Mangal is by design:

!Screenshot from 2023-12-07 20-46-25.png!
You can see it's also -present- absent in Lohit-Devanagari, Baloo, Biryani and 
Hind fonts.
The fact that rkrf feature isn't present in Lohit Devanagari and Mangal, led to 
the creation of createRKRF, given vatu was present. But things are opposite in 
Noto Sans Devanagari. Maybe that's why it won't work in Noto Sans Gujarati as 
well. Devanagari GsubWorker needs improvement.

 

For Gujarati, the repositionGlyphs function is running from index 3, that's why 
the beforeHalfGlyphIds isn't positioning arc vowel ({*}ि{*}) to the starting 
consonant (શ). Changing the starting index to 1 will fix that.
Also, this arc vowel ({*}ि{*}) should also be substituted with wider arc vowel 
glyph (Noto Sans Gujarati present at index 404 called ivowelsigndefaultgujr) if 
its following glyphs are half+consonant, and should happen in applyGsubFeature. 
I'll try by running repositionGlyphs before applyGsubFeature maybe it'll 
capture the substitution condition that way.

 

By FCFS, I mean in Language.java, if the first enum is DEVANAGARI(new 
String[]\{"dev2", "deva"}), Nirmala UI will select DEVANAGARI, even if the text 
is in Bengali or Gujarati.

 

Will there by GPOS feature in the future? There are GPOS features such as kern, 
dist, abvm, blwm which needs to be implemented.
 * I'll provide you test codes for GsubWorkerForDevanagariTest.java. I'd like 
to provide input data from Lohit-Devanagari as well as Noto Sans Devanagari, as 
they're SIL.
 * I haven't checked TestFontEmbedding.testBengali(). I'll check it out.


was (Author: javauser):
[~tilman] For Devanagari, the missing top horizontal bar in the third glyph of 
first word in Mangal is by design:

!Screenshot from 2023-12-07 20-46-25.png!
You can see it's also present in Lohit-Devanagari, Baloo, Biryani and Hind 
fonts.
The fact that rkrf feature isn't present in Lohit Devanagari and Mangal, led to 
the creation of createRKRF, given vatu was present. But things are opposite in 
Noto Sans Devanagari. Maybe that's why it won't work in Noto Sans Gujarati as 
well. Devanagari GsubWorker needs improvement.

 

For Gujarati, the repositionGlyphs function is running from index 3, that's why 
the beforeHalfGlyphIds isn't positioning arc vowel ({*}ि{*}) to the starting 
consonant (શ). Changing the starting index to 1 will fix that.
Also, this arc vowel ({*}ि{*}) should also be substituted with wider arc vowel 
glyph (Noto Sans Gujarati present at index 404 called ivowelsigndefaultgujr) if 
its following glyphs are half+consonant, and should happen in applyGsubFeature. 
I'll try by running repositionGlyphs before applyGsubFeature maybe it'll 
capture the substitution condition that way.

 

By FCFS, I mean in Language.java, if the first enum is DEVANAGARI(new 
String[]\{"dev2", "deva"}), Nirmala UI will select DEVANAGARI, even if the text 
is in Bengali or Gujarati.

 

Will there by GPOS feature in the future? There are GPOS features such as kern, 
dist, abvm, blwm which needs to be implemented.
 * I'll provide you test codes for GsubWorkerForDevanagariTest.java. I'd like 
to provide input data from Lohit-Devanagari as well as Noto Sans Devanagari, as 
they're SIL.
 * I haven't checked TestFontEmbedding.testBengali(). I'll check it out.

> GsubWorkerForDevanagari and GsubWorkerForGujarati created
> ---------------------------------------------------------
>
>                 Key: PDFBOX-5729
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5729
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: FontBox
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: JAVA USER
>            Priority: Trivial
>              Labels: GsubWorkerForDevanagari, GsubWorkerForGujarati
>         Attachments: GsubWorkerForDevanagari-1.java, 
> GsubWorkerForDevanagari.java, GsubWorkerForGujarati-1.java, 
> GsubWorkerForGujarati-2.java, GsubWorkerForGujarati.java, 
> NotoSansDevanagari-Regular.ttf, Screenshot from 2023-12-07 20-46-25.png, 
> TiroDevanagariHindi-Regular.ttf, devanagari-example-TiroDevanagariHindi.pdf, 
> devanagari-example-bad.pdf, devanagari-example-notosans.pdf, 
> devanagari-example-siddhanta.pdf, image-2023-12-07-09-54-31-449.png, 
> image-2023-12-07-10-18-33-457.png, image-2023-12-07-10-33-37-499.png, 
> image-2023-12-07-14-39-24-187.png, image-2023-12-07-16-27-22-510.png, 
> screenshot-1.png, screenshot-2.png, screenshot-3.png, screenshot-4.png, 
> screenshot-5.png, screenshot-6.png
>
>
> Created Gsub workers for Devanagari and Gujarati languages.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to