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

Maruan Sahyoun edited comment on PDFBOX-4189 at 4/15/18 8:34 AM:
-----------------------------------------------------------------

The patch is a great and - given several questions we had in the past - 
important addition to PDFBox.

On the longer run I'd see some additions we might conceptually already think 
about and/or start introducing in the public API. As I haven't reviewed the 
patch the below list is meant to be a hint for possible addition. They may 
already be included

For correct text positioning using mixed language information from the 
following tables might be useful:
- GPOS: to adjust the glyph position
- BASE: baseline offsets on a script-by-script basis.
- JSTF: justification information, including whitespace and Kashida adjustments.
- BIDI Mirroring: https://www.unicode.org/Public/10.0.0/ucd/BidiMirroring.txt

To allow the user to override the language system identified by the script 
being used we might want to add {{setLanguage/getLanguage}} so that can be 
called prior to {{showText}} if an override needs to be done.

Putting that into an internal {{layout}} method as John suggested would also 
allow us to put it behind a feature flag where one could enable/disable the 
processing. We might also mark that feature as **experimental** and specify 
which languages it has been tested with (to some extend).

This is mainly meant to understand which capabilities belong where as I'm 
looking to add the processing to layout of interactive form field values.


was (Author: msahyoun):
The patch is a great and - given several questions we had in the past - 
important addition to PDFBox.

On the longer run I'd see some additions we might conceptually already think 
about and/or start introducing in the public API. As I haven't reviewed the 
patch the below list is meant to be a hint for possible addition. They may 
already be included

For correct text positioning using mixed language information from the 
following tables might be useful:
- GPOS: to adjust the glyph position
- BASE: baseline offsets on a script-by-script basis.
- JSTF: justification information, including whitespace and Kashida adjustments.
- BIDI Mirroring: https://www.unicode.org/Public/10.0.0/ucd/BidiMirroring.txt

To allow the user to override the language system identified by the script 
being used we might want to add {{setLanguage/getLanguage}} so that can be 
called prior to {{showText}} if an override needs to be done.

Putting that into an internal {{layout}} method as John suggested would also 
allow us to put it behind a feature flag where one could enable/disable the 
processing. We might also mark that feature as **experimental** and specify 
which languages it has been tested with (to some extend).

> Enable rendering of Indian languages, by reading and utilizing the GSUB table
> -----------------------------------------------------------------------------
>
>                 Key: PDFBOX-4189
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4189
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>            Reporter: Palash Ray
>            Priority: Major
>         Attachments: Bengali-text-after.pdf, Bengali-text-before.pdf
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Implemented proper rendering of Indian languages, which need extensive Glyph 
> substitution. The GSUB table has been read and used effectively to replace 
> some compound words with their respective Glyphs. All tests are passing. I 
> have tested this for the Bengali font. Please review these changes and let me 
> know if it makes sense to incorporate these.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to