[jira] [Comment Edited] (FOP-2810) [PATCH] Incomplete implementation of the simulate-style flag
[ https://issues.apache.org/jira/browse/FOP-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16602187#comment-16602187 ] Chris Bowditch edited comment on FOP-2810 at 9/3/18 3:05 PM: - I have managed to replicate this using a document with a mixture of Western and Arabic scripts, but unfortunately its a confidential XSL-FO, so I can't share it here. was (Author: cbowditch): I have managed to replicate this using a document with a mixture of Western and Arabic scripts, but unfortunately its a confidential XSL-FO, so I can't share it here. I also noticed a side issue; The Simulated font styles are reported as missing when they shouldn't be cos we are simulating them! > [PATCH] Incomplete implementation of the simulate-style flag > > > Key: FOP-2810 > URL: https://issues.apache.org/jira/browse/FOP-2810 > Project: FOP > Issue Type: Bug > Components: font/unqualified >Affects Versions: 2.3 >Reporter: Dan Caprioara >Assignee: Chris Bowditch >Priority: Major > Fix For: trunk > > Original Estimate: 1h > Remaining Estimate: 1h > > The CustomFont.getSimulateStyle() is used only in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDX(int, int, String, > FontTriplet, int, int, int[]) > {code} > But not in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDP(int, int, String, > FontTriplet, int, int, int[][]) > {code} > As a result some of the font styling is not applied. > Modifying the above method with the following patch seem to fix the problem: > {code:java} > ... >boolean simulateStyle = tf instanceof CustomFont && ((CustomFont) > tf).getSimulateStyle(); > > // PATCH START > // Taken from #drawTextWithDX method > double shear = 0; > > if (simulateStyle) { > //Adding this breaks the PDF: generator.add("q\n") > if (triplet.getWeight() == 700) { > generator.add("2 Tr 0.31543 w\n"); > } > if (triplet.getStyle().equals("italic")) { > shear = 0.333; > } > } > // PATCH END > tu.writeTextMatrix(new AffineTransform(1, 0, shear, -1, x / > 1000f, y / 1000f)); > tu.updateTf(fk, fsPoints, true); >generator.updateCharacterSpacing(letterSpacing / 1000f); > ... > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FOP-2810) [PATCH] Incomplete implementation of the simulate-style flag
[ https://issues.apache.org/jira/browse/FOP-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16602187#comment-16602187 ] Chris Bowditch commented on FOP-2810: - I have managed to replicate this using a document with a mixture of Western and Arabic scripts, but unfortunately its a confidential XSL-FO, so I can't share it here. I also noticed a side issue; The Simulated font styles are reported as missing when they shouldn't be cos we are simulating them! > [PATCH] Incomplete implementation of the simulate-style flag > > > Key: FOP-2810 > URL: https://issues.apache.org/jira/browse/FOP-2810 > Project: FOP > Issue Type: Bug > Components: font/unqualified >Affects Versions: 2.3 >Reporter: Dan Caprioara >Assignee: Chris Bowditch >Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > The CustomFont.getSimulateStyle() is used only in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDX(int, int, String, > FontTriplet, int, int, int[]) > {code} > But not in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDP(int, int, String, > FontTriplet, int, int, int[][]) > {code} > As a result some of the font styling is not applied. > Modifying the above method with the following patch seem to fix the problem: > {code:java} > ... >boolean simulateStyle = tf instanceof CustomFont && ((CustomFont) > tf).getSimulateStyle(); > > // PATCH START > // Taken from #drawTextWithDX method > double shear = 0; > > if (simulateStyle) { > //Adding this breaks the PDF: generator.add("q\n") > if (triplet.getWeight() == 700) { > generator.add("2 Tr 0.31543 w\n"); > } > if (triplet.getStyle().equals("italic")) { > shear = 0.333; > } > } > // PATCH END > tu.writeTextMatrix(new AffineTransform(1, 0, shear, -1, x / > 1000f, y / 1000f)); > tu.updateTf(fk, fsPoints, true); >generator.updateCharacterSpacing(letterSpacing / 1000f); > ... > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (FOP-2810) [PATCH] Incomplete implementation of the simulate-style flag
[ https://issues.apache.org/jira/browse/FOP-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Bowditch updated FOP-2810: Summary: [PATCH] Incomplete implementation of the simulate-style flag (was: Incomplete implementation of the simulate-style flag) > [PATCH] Incomplete implementation of the simulate-style flag > > > Key: FOP-2810 > URL: https://issues.apache.org/jira/browse/FOP-2810 > Project: FOP > Issue Type: Bug > Components: font/unqualified >Affects Versions: 2.3 >Reporter: Dan Caprioara >Assignee: Chris Bowditch >Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > The CustomFont.getSimulateStyle() is used only in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDX(int, int, String, > FontTriplet, int, int, int[]) > {code} > But not in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDP(int, int, String, > FontTriplet, int, int, int[][]) > {code} > As a result some of the font styling is not applied. > Modifying the above method with the following patch seem to fix the problem: > {code:java} > ... >boolean simulateStyle = tf instanceof CustomFont && ((CustomFont) > tf).getSimulateStyle(); > > // PATCH START > // Taken from #drawTextWithDX method > double shear = 0; > > if (simulateStyle) { > //Adding this breaks the PDF: generator.add("q\n") > if (triplet.getWeight() == 700) { > generator.add("2 Tr 0.31543 w\n"); > } > if (triplet.getStyle().equals("italic")) { > shear = 0.333; > } > } > // PATCH END > tu.writeTextMatrix(new AffineTransform(1, 0, shear, -1, x / > 1000f, y / 1000f)); > tu.updateTf(fk, fsPoints, true); >generator.updateCharacterSpacing(letterSpacing / 1000f); > ... > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (FOP-2810) Incomplete implementation of the simulate-style flag
[ https://issues.apache.org/jira/browse/FOP-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Bowditch reassigned FOP-2810: --- Assignee: Chris Bowditch > Incomplete implementation of the simulate-style flag > > > Key: FOP-2810 > URL: https://issues.apache.org/jira/browse/FOP-2810 > Project: FOP > Issue Type: Bug > Components: font/unqualified >Affects Versions: 2.3 >Reporter: Dan Caprioara >Assignee: Chris Bowditch >Priority: Major > Original Estimate: 1h > Remaining Estimate: 1h > > The CustomFont.getSimulateStyle() is used only in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDX(int, int, String, > FontTriplet, int, int, int[]) > {code} > But not in: > {code:java} > org.apache.fop.render.pdf.PDFPainter.drawTextWithDP(int, int, String, > FontTriplet, int, int, int[][]) > {code} > As a result some of the font styling is not applied. > Modifying the above method with the following patch seem to fix the problem: > {code:java} > ... >boolean simulateStyle = tf instanceof CustomFont && ((CustomFont) > tf).getSimulateStyle(); > > // PATCH START > // Taken from #drawTextWithDX method > double shear = 0; > > if (simulateStyle) { > //Adding this breaks the PDF: generator.add("q\n") > if (triplet.getWeight() == 700) { > generator.add("2 Tr 0.31543 w\n"); > } > if (triplet.getStyle().equals("italic")) { > shear = 0.333; > } > } > // PATCH END > tu.writeTextMatrix(new AffineTransform(1, 0, shear, -1, x / > 1000f, y / 1000f)); > tu.updateTf(fk, fsPoints, true); >generator.updateCharacterSpacing(letterSpacing / 1000f); > ... > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (FOP-2775) Japanese characters turn into "###" from XML/XSL to PDF conversion
[ https://issues.apache.org/jira/browse/FOP-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Bowditch closed FOP-2775. --- Resolution: Not A Bug > Japanese characters turn into "###" from XML/XSL to PDF conversion > -- > > Key: FOP-2775 > URL: https://issues.apache.org/jira/browse/FOP-2775 > Project: FOP > Issue Type: Bug > Components: renderer/pdf >Affects Versions: 2.0 >Reporter: Neha >Priority: Major > Attachments: FOPProject.zip, fop.xconf, > image-2018-08-31-11-05-39-202.png > > > We are having trouble making Japanese language output with FOP when trying to > convert XML/XSL file to PDF file. The characters used in Japanese turns into > *###* in PDF file. > > Attaching the project for reference. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FOP-2775) Japanese characters turn into "###" from XML/XSL to PDF conversion
[ https://issues.apache.org/jira/browse/FOP-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16601929#comment-16601929 ] Chris Bowditch commented on FOP-2775: - [~nrathi] This is a question about font configuration, not a bug. Please can you discuss it on fop-user mailing list instead of here. > Japanese characters turn into "###" from XML/XSL to PDF conversion > -- > > Key: FOP-2775 > URL: https://issues.apache.org/jira/browse/FOP-2775 > Project: FOP > Issue Type: Bug > Components: renderer/pdf >Affects Versions: 2.0 >Reporter: Neha >Priority: Major > Attachments: FOPProject.zip, fop.xconf, > image-2018-08-31-11-05-39-202.png > > > We are having trouble making Japanese language output with FOP when trying to > convert XML/XSL file to PDF file. The characters used in Japanese turns into > *###* in PDF file. > > Attaching the project for reference. -- This message was sent by Atlassian JIRA (v7.6.3#76005)