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

John Hewson edited comment on PDFBOX-3550 at 11/3/16 8:55 PM:
--------------------------------------------------------------

So I e-mailed Glenn and asked him about this:

{quote} I see that FOP has its own GSUB and GPOS support and shaping engine. I 
wanted to ask you why that is - why does FOP not use AWT for shaping?{quote}

And he replied:

{quote}Primarily because it is implementation and platform dependent as to 
behavior and support for specific scripts. Also, it may or may not be 
debuggable or fixable depending on which VM is used.{quote}

Which makes sense (bear in mind that this was six years ago). But given that 
there are far fewer JVMs on the landscape nowadays, and that HarfBuzz is 
becoming the de facto standard OpenType shaper in open source software, we 
should be good. Especially going forwards - which is the direction that we care 
about the most.


was (Author: jahewson):
So I e-mailed Glenn and asked him about this:

{quote} I see that FOP has its own GSUB and GPOS support and shaping engine. I 
wanted to ask you why that is - why does FOP not use AWT for shaping?{quote}

And he replied:

{quote}Primarily because it is implementation and platform dependent as to 
behavior and support for specific scripts. Also, it may or may not be 
debuggable or fixable depending on which VM is used.{quote}

Which makes sense. But given that there are far fewer JVMs on the landscape 
nowadays, and that HarfBuzz is becoming the de facto standard OpenType shaper 
in open source software, we should be good. Especially going forwards - which 
is the direction that we care about the most.

> OpenType Shaping
> ----------------
>
>                 Key: PDFBOX-3550
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3550
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: FontBox, PDModel
>         Environment: All
>            Reporter: Omid Pourhadi
>              Labels: unicode
>         Attachments: BYekan.ttf
>
>
> the problem is, in some languages letters need to be joined together for 
> example, consider this word 
> {color:red}
> سلام 
> {color}
> but after creating a pdf it contorts to 
> {color:red}
> س‌ل‌ام
> {color}
> with extra semi-spaces. I think this is a bug in pdfbox and definetly is not 
> related to font.
> {code:title=SampleCode.java|borderStyle=solid}
> public class SampleCode
> {
>     public static void main(String[] args) throws IOException
>     {
>         
>         PDDocument document = new PDDocument();
>       //this font perfectly works in iText and JasperReport with the same text
>         PDFont titleFont = PDType0Font.load(document, 
> SampleCode.class.getResourceAsStream("/BYekan.ttf"));
>         PDPage page = new PDPage(PDRectangle.A4);
>         document.addPage(page);
>         PDPageContentStream contentStream = new PDPageContentStream(document, 
> page);
>         contentStream.beginText();
>         contentStream.setFont(titleFont, 12);
>         contentStream.newLineAtOffset(0, 100);
>         contentStream.showText("سلام");
>         contentStream.endText();
>         contentStream.close();
>         
>       
>         document.save(new File("/home/omidp/temp/htmltopdf/output.pdf"));
>         document.close();
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to