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

John Hewson commented on PDFBOX-3550:
-------------------------------------

Good question. I've done some research and the issue of complex text was first 
raised in FOP-959 in Dec 2004, when FOP was at version 0.2 and supported Java 
1.3. Complex text support was not added to Java [until 
1.4|http://docs.oracle.com/javase/7/docs/technotes/guides/2d/14_features.html]. 
There's even a comment that "There had been a patch [...] which required Java 
1.4" and so was rejected. Another patch using ICU4J was provided, but there 
were concerns about adding such a large dependency, so it never happened.

Finally, six years later [in April 
2010|https://issues.apache.org/jira/browse/FOP-959?focusedCommentId=13518285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13518285]
 Glenn Adams (who at the time was not a contributor) adds the "homebrew" GSUB 
and GPOS implementation as a patch, without any prior discussion or 
explanation. Finally, two years later, and with Adams now a contributor, the 
patch is merged into trunk.

What I'm not seeing is that anyone even considered using AWT. It's literally 
not mentioned.

I'm concerned that the FOP code only supports fewer than 20 scripts, is 
effectively maintained by just one individual (Glenn) and has bugs which are 
several years old FOP-2355, FOP-2092, FOP-2210, FOP-2454.

> 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