simon steiner (JIRA | 3 Aug 10:37 2015
Picon

[jira] [Assigned] (FOP-2494) Unable to use Ubuntu Mono Font


     [
https://issues.apache.org/jira/browse/FOP-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner reassigned FOP-2494:
----------------------------------

    Assignee: simon steiner

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: Ubuntu 14.04, Java 8u45
>            Reporter: Harshad
>            Assignee: simon steiner
>         Attachments: output.pdf, patch.diff
>
>
> I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is
auto-detecting the fonts:
> {code}
> Unable to load font file: file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf
> java.lang.ArrayIndexOutOfBoundsException: 1047                                                                                               
>   at org.apache.fop.fonts.truetype.OpenFont.readPostScript(OpenFont.java:1320)
(Continue reading)

simon steiner (JIRA | 3 Aug 10:37 2015
Picon

[jira] [Updated] (FOP-2494) Unable to use Ubuntu Mono Font


     [
https://issues.apache.org/jira/browse/FOP-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner updated FOP-2494:
-------------------------------
    Assignee: Robert Meyer  (was: simon steiner)

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: Ubuntu 14.04, Java 8u45
>            Reporter: Harshad
>            Assignee: Robert Meyer
>         Attachments: output.pdf, patch.diff
>
>
> I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is
auto-detecting the fonts:
> {code}
> Unable to load font file: file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf
> java.lang.ArrayIndexOutOfBoundsException: 1047                                                                                               
>   at org.apache.fop.fonts.truetype.OpenFont.readPostScript(OpenFont.java:1320)
>   at org.apache.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:736)
(Continue reading)

simon steiner (JIRA | 3 Aug 10:37 2015
Picon

[jira] [Closed] (FOP-2494) Unable to use Ubuntu Mono Font


     [
https://issues.apache.org/jira/browse/FOP-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner closed FOP-2494.
------------------------------
    Resolution: Fixed

Closed for Rob as he didnt have rights

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: Ubuntu 14.04, Java 8u45
>            Reporter: Harshad
>            Assignee: Robert Meyer
>         Attachments: output.pdf, patch.diff
>
>
> I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is
auto-detecting the fonts:
> {code}
> Unable to load font file: file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf
> java.lang.ArrayIndexOutOfBoundsException: 1047                                                                                               
(Continue reading)

simon steiner (JIRA | 3 Aug 10:35 2015
Picon

[jira] [Updated] (FOP-2494) Unable to use Ubuntu Mono Font


     [
https://issues.apache.org/jira/browse/FOP-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon steiner updated FOP-2494:
-------------------------------
    Assignee:     (was: Robert Meyer)

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: Ubuntu 14.04, Java 8u45
>            Reporter: Harshad
>         Attachments: output.pdf, patch.diff
>
>
> I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is
auto-detecting the fonts:
> {code}
> Unable to load font file: file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf
> java.lang.ArrayIndexOutOfBoundsException: 1047                                                                                               
>   at org.apache.fop.fonts.truetype.OpenFont.readPostScript(OpenFont.java:1320)
>   at org.apache.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:736)
>   at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:109)
(Continue reading)

buildbot | 3 Aug 10:00 2015
Picon

buildbot failure in ASF Buildbot on fop-trunk

The Buildbot has detected a new failure on builder fop-trunk while building ASF Buildbot. Full details are
available at:
    http://ci.apache.org/builders/fop-trunk/builds/26

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: orcus_ubuntu

Build Reason: The Nightly scheduler named 'fopNightly' triggered this build
Build Source Stamp: [branch xmlgraphics/fop/trunk] HEAD
Blamelist: 

BUILD FAILED: failed

Sincerely,
 -The Buildbot

Robert Meyer (JIRA | 1 Aug 17:39 2015
Picon

[jira] [Commented] (FOP-2494) Unable to use Ubuntu Mono Font


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

Robert Meyer commented on FOP-2494:
-----------------------------------

Fixed in http://svn.apache.org/viewvc?view=revision&revision=1693719

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: Ubuntu 14.04, Java 8u45
>            Reporter: Harshad
>            Assignee: Robert Meyer
>         Attachments: output.pdf, patch.diff
>
>
> I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is
auto-detecting the fonts:
> {code}
> Unable to load font file: file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf
> java.lang.ArrayIndexOutOfBoundsException: 1047                                                                                               
(Continue reading)

Robert Meyer (JIRA | 1 Aug 16:49 2015
Picon

[jira] [Updated] (FOP-2494) Unable to use Ubuntu Mono Font


     [
https://issues.apache.org/jira/browse/FOP-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Meyer updated FOP-2494:
------------------------------
    Attachment: output.pdf
                patch.diff

I've attached the patch and will apply this shortly. I've also attached a document showing all the ubuntu
fonts embedded in a document to show they're working.

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
>    Affects Versions: 2.0
>         Environment: Ubuntu 14.04, Java 8u45
>            Reporter: Harshad
>            Assignee: Robert Meyer
>         Attachments: output.pdf, patch.diff
>
>
> I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is
auto-detecting the fonts:
> {code}
(Continue reading)

buildbot | 1 Aug 13:48 2015
Picon

buildbot success in ASF Buildbot on fop-trunk

The Buildbot has detected a restored build on builder fop-trunk while building ASF Buildbot. Full details
are available at:
    http://ci.apache.org/builders/fop-trunk/builds/24

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: orcus_ubuntu

Build Reason: The Nightly scheduler named 'fopNightly' triggered this build
Build Source Stamp: [branch xmlgraphics/fop/trunk] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot

Robert Meyer (JIRA | 1 Aug 01:32 2015
Picon

[jira] [Issue Comment Deleted] (FOP-2494) Unable to use Ubuntu Mono Font


     [
https://issues.apache.org/jira/browse/FOP-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Meyer updated FOP-2494:
------------------------------
    Comment: was deleted

(was: I've been investigating this and have found the method we were using to identify the number of
character names in the post table was flawed. In the case of the UbuntuMono-R.ttf font there are 1296
characters. 258 of these come under the standard encoding whereas everything else should have an
associated name in the table. Unfortunately what we were doing was to read the post table and use the glyph
ID array to determine how many of those are greater than 258 by looping through them. The problem here is the
fact that the indexes aren't necessarily in a complete order. Therefore although we may count only 1046
characters that are greater than 258, the index array may do the following:

1,2,3,5,6,7,9,10,11,12...etc

The maximum glyph ID in this case is 1315, which minus 258 is 1057. As such a fix for this will be to set the size
of the Strings array (and subsequently read) upon the maximum glyph index taken from that set. It's a
fairly simple fix and will post a patch and commit after I've done some further testing tomorrow.)

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
(Continue reading)

Robert Meyer (JIRA | 1 Aug 01:28 2015
Picon

[jira] [Commented] (FOP-2494) Unable to use Ubuntu Mono Font


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

Robert Meyer commented on FOP-2494:
-----------------------------------

I've spent a bit of time looking at this and have found that the method by which we set the size of the glyph
strings array is flawed. In the case of the UbuntuMono-R.ttf font there are 1296 glyphs. The post table
which is used to store the names of the characters with their associated glyph index. What we were doing was
looping through the index array (which precedes the name array) and counting the number of glyphs with
ID's greater than 258 (the number of glyphs in the default encoding). This would work fine if the glyph
index array was always complete but in this case it's not e.g.

1,2,3,5,6,9,10,11,12 etc...

The maximum glyph ID in this font is 1315 which, minus 258, equals 1057 which is the actual number of names in
the array. Because we were only counting them we only got 1046, hence the error. As such to fix this it's
simply a case of setting the character name array to the maximum glyph ID found minus 258. I'll post a patch
tomorrow after I have done some further testing.

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
(Continue reading)

Robert Meyer (JIRA | 1 Aug 01:17 2015
Picon

[jira] [Commented] (FOP-2494) Unable to use Ubuntu Mono Font


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

Robert Meyer commented on FOP-2494:
-----------------------------------

I've been investigating this and have found the method we were using to identify the number of character
names in the post table was flawed. In the case of the UbuntuMono-R.ttf font there are 1296 characters. 258
of these come under the standard encoding whereas everything else should have an associated name in the
table. Unfortunately what we were doing was to read the post table and use the glyph ID array to determine
how many of those are greater than 258 by looping through them. The problem here is the fact that the indexes
aren't necessarily in a complete order. Therefore although we may count only 1046 characters that are
greater than 258, the index array may do the following:

1,2,3,5,6,7,9,10,11,12...etc

The maximum glyph ID in this case is 1315, which minus 258 is 1057. As such a fix for this will be to set the size
of the Strings array (and subsequently read) upon the maximum glyph index taken from that set. It's a
fairly simple fix and will post a patch and commit after I've done some further testing tomorrow.

> Unable to use Ubuntu Mono Font
> ------------------------------
>
>                 Key: FOP-2494
>                 URL: https://issues.apache.org/jira/browse/FOP-2494
>             Project: FOP
>          Issue Type: Bug
>          Components: font/opentype
(Continue reading)


Gmane