[jira] [Created] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread liu (Jira)
liu created PDFBOX-5843:
---

 Summary: There is an exception when getting embedded font, is it 
compatible?
 Key: PDFBOX-5843
 URL: https://issues.apache.org/jira/browse/PDFBOX-5843
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 3.0.2 PDFBox, 2.0.31
Reporter: liu
 Attachments: 123.pdf





--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread liu (Jira)


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

liu updated PDFBOX-5843:

Attachment: screenshot-1.png

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, screenshot-1.png
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread liu (Jira)


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

liu commented on PDFBOX-5843:
-

!screenshot-1.png|width=442,height=239!

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, screenshot-1.png
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread liu (Jira)


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

liu updated PDFBOX-5843:

Component/s: FontBox

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, screenshot-1.png
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr updated PDFBOX-5843:

Attachment: screenshot-2.png

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, screenshot-1.png, screenshot-2.png
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5843:
-

I'm wondering whether something is wrong on our side. The fdindex contains many 
empty entries. When I tried to skip these, I got this rendering:
 !screenshot-2.png! 

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, screenshot-1.png, screenshot-2.png
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread liu (Jira)


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

liu updated PDFBOX-5843:

Attachment: image-2024-06-19-16-49-40-186.png

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr updated PDFBOX-5843:

Attachment: xxx.cff

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5843:
-

Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that position and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-78, 63, 362, 64, 158, 63, 69, 61, HSTEM|, 664, 69, VSTEM|, 67, 290, RMOVETO|, 
54, -35, 57, -42, 52, -43, -54, -90, -68, -64, -81, -40, 15, -12, 20, -25, 8, 
-16, 85, 47, 70, 65, 57, 90, 43, -39, 37, -39, 25, -33, 47, 56, RCURVELINE|, 
-27, 35, -42, 41, -49, 41, 55, 112, 36, 143, 16, 182, -42, -55, -153, HLINETO|, 
14, 70, 12, 69, 9, 63, -66, 4, RCURVELINE|, -7, -63, -12, -71, -14, -72, 
RRCURVETO|, -110, -63, 97, HLINETO|, -22, -105, -27, -102, -24, -72, 
RRCURVETO|, 286, 279, RMOVETO|, -16, -135, -31, -112, -43, -92, -39, 30, -42, 
30, -40, 26, 21, 73, 22, 89, 19, 91, RRCURVETO|, 460, -39, 12902, ENDCHAR|]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The many negative values are a "zone of interest".

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Comment Edited] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr edited comment on PDFBOX-5843 at 6/19/24 2:16 PM:
--

Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that position and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-78, 63, 362, 64, 158, 63, 69, 61, HSTEM|, 664, 69, VSTEM|, 67, 290, RMOVETO|, 
54, -35, 57, -42, 52, -43, -54, -90, -68, -64, -81, -40, 15, -12, 20, -25, 8, 
-16, 85, 47, 70, 65, 57, 90, 43, -39, 37, -39, 25, -33, 47, 56, RCURVELINE|, 
-27, 35, -42, 41, -49, 41, 55, 112, 36, 143, 16, 182, -42, -55, -153, HLINETO|, 
14, 70, 12, 69, 9, 63, -66, 4, RCURVELINE|, -7, -63, -12, -71, -14, -72, 
RRCURVETO|, -110, -63, 97, HLINETO|, -22, -105, -27, -102, -24, -72, 
RRCURVETO|, 286, 279, RMOVETO|, -16, -135, -31, -112, -43, -92, -39, 30, -42, 
30, -40, 26, 21, 73, 22, 89, 19, 91, RRCURVETO|, 460, -39, 12902, ENDCHAR|]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The many negative values are a "zone of interest".


was (Author: tilman):
Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that position and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-78, 63, 362, 64, 158, 63, 69, 61, HSTEM|, 664, 69, VSTEM|, 67, 290, RMOVETO|, 
54, -35, 57, -42, 52, -43, -54, -90, -68, -64, -81, -40, 15, -12, 20, -25, 8, 
-16, 85, 47, 70, 65, 57, 90, 43, -39, 37, -39, 25, -33, 47, 56, RCURVELINE|, 
-27, 35, -42, 41, -49, 41, 55, 112, 36, 143, 16, 182, -42, -55, -153, HLINETO|, 
14, 70, 12, 69, 9, 63, -66, 4, RCURVELINE|, -7, -63, -12, -71, -14, -72, 
RRCURVETO|, -110, -63, 97, HLINETO|, -22, -105, -27, -102, -24, -72, 
RRCURVETO|, 286, 279, RMOVETO|, -16, -135, -31, -112, -43, -92, -39, 30, -42, 
30, -40, 26, 21, 73, 22, 89, 19, 91, RRCURVETO|, 460, -39, 12902, ENDCHAR|]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The many negative values are a "zone of interest".

> There is an exception when getting embedded font, is it compatible?
> ---

[jira] [Comment Edited] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr edited comment on PDFBOX-5843 at 6/19/24 2:17 PM:
--

Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that position and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-79, 67, 592, 63, HSTEM|, 164, 64, 388, 66, VSTEM|, 453, 414, RMOVETO|, -29, 
-122, -48, -120, -64, -78, 17, -9, 28, -18, 13, -10, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 63, 22, RCURVELINE|, 
-17, 92, -52, 139, -59, 106, RRCURVETO|, -353, 414, RMOVETO|, -33, -149, -57, 
-145, -74, -94, 16, -10, 26, -22, 12, -11, 36, 49, 33, 60, 29, 68, RRCURVETO|, 
160, -575, HLINETO|, -13, -5, -4, -12, -14, -43, -1, 2, -49, VHCURVETO|, 10, 
-19, 11, 9342, 8, 21, 39, VVCURVETO|, 575, 200, VLINETO|, -9, -53, -10, -55, 
-7, -37, 57, -11, RCURVELINE|, 13, 53, 18, 86, 13, 72, -46, -55, -419, 
HLINETO|, 21, 56, 18, 60, 14, 60, RRCURVETO|, -265, 16, -102]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The many negative values are a "zone of interest".The many negative values are 
a "zone of interest".


was (Author: tilman):
Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that position and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-78, 63, 362, 64, 158, 63, 69, 61, HSTEM|, 664, 69, VSTEM|, 67, 290, RMOVETO|, 
54, -35, 57, -42, 52, -43, -54, -90, -68, -64, -81, -40, 15, -12, 20, -25, 8, 
-16, 85, 47, 70, 65, 57, 90, 43, -39, 37, -39, 25, -33, 47, 56, RCURVELINE|, 
-27, 35, -42, 41, -49, 41, 55, 112, 36, 143, 16, 182, -42, -55, -153, HLINETO|, 
14, 70, 12, 69, 9, 63, -66, 4, RCURVELINE|, -7, -63, -12, -71, -14, -72, 
RRCURVETO|, -110, -63, 97, HLINETO|, -22, -105, -27, -102, -24, -72, 
RRCURVETO|, 286, 279, RMOVETO|, -16, -135, -31, -112, -43, -92, -39, 30, -42, 
30, -40, 26, 21, 73, 22, 89, 19, 91, RRCURVETO|, 460, -39, 12902, ENDCHAR|]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The many negative values 

[jira] [Commented] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5843:
-

It turns out to be completely different. I ran a 2.0.1 source code build with 
the change and hit an ArrayOutofBoundsException in 
CFFCIDFont.getLocalSubrIndex(). That means we can't just skip empty entries. 
Now I get this:
 !screenshot-3.png! 
I'll investigate some more but it seems promising.

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, screenshot-3.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Updated] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr updated PDFBOX-5843:

Attachment: screenshot-3.png

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, screenshot-3.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Comment Edited] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr edited comment on PDFBOX-5843 at 6/19/24 3:38 PM:
--

Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that offset and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-79, 67, 592, 63, HSTEM|, 164, 64, 388, 66, VSTEM|, 453, 414, RMOVETO|, -29, 
-122, -48, -120, -64, -78, 17, -9, 28, -18, 13, -10, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 63, 22, RCURVELINE|, 
-17, 92, -52, 139, -59, 106, RRCURVETO|, -353, 414, RMOVETO|, -33, -149, -57, 
-145, -74, -94, 16, -10, 26, -22, 12, -11, 36, 49, 33, 60, 29, 68, RRCURVETO|, 
160, -575, HLINETO|, -13, -5, -4, -12, -14, -43, -1, 2, -49, VHCURVETO|, 10, 
-19, 11, 9342, 8, 21, 39, VVCURVETO|, 575, 200, VLINETO|, -9, -53, -10, -55, 
-7, -37, 57, -11, RCURVELINE|, 13, 53, 18, 86, 13, 72, -46, -55, -419, 
HLINETO|, 21, 56, 18, 60, 14, 60, RRCURVETO|, -265, 16, -102]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The many negative values are a "zone of interest".


was (Author: tilman):
Lets assume that the font is correct. I fixed the bug locally that empty 
entries now get skipped in CFFParser.java, by adding {{if (bytes.length == 0) 
continue;}} after {{for (byte[] bytes : fdIndex)}}.

My first thought was that something goes wrong with the offsets because there 
is more than one fdindex entry. But I haven't been able to prove this.

I also tried to install FontForge but it doesn't show anything.

readIndexData char strings:
code 9987 len 153 at offset 298684
code 12431 len 245 at offset 301280
code 14225 len 135 at offset 303318

for code 9987 (which has this "over the top" path) I checked that position and 
length make sense, all the other bytes before/after are 0x0e, which is ENDCHAR

type2 charstring:
[-79, 67, 592, 63, HSTEM|, 164, 64, 388, 66, VSTEM|, 453, 414, RMOVETO|, -29, 
-122, -48, -120, -64, -78, 17, -9, 28, -18, 13, -10, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 63, 22, RCURVELINE|, 
-17, 92, -52, 139, -59, 106, RRCURVETO|, -353, 414, RMOVETO|, -33, -149, -57, 
-145, -74, -94, 16, -10, 26, -22, 12, -11, 36, 49, 33, 60, 29, 68, RRCURVETO|, 
160, -575, HLINETO|, -13, -5, -4, -12, -14, -43, -1, 2, -49, VHCURVETO|, 10, 
-19, 11, 9342, 8, 21, 39, VVCURVETO|, 575, 200, VLINETO|, -9, -53, -10, -55, 
-7, -37, 57, -11, RCURVELINE|, 13, 53, 18, 86, 13, 72, -46, -55, -419, 
HLINETO|, 21, 56, 18, 60, 14, 60, RRCURVETO|, -265, 16, -102]

converted to type1 sequence:
[0, 1000.0, HSBW|, 453, 414, RMOVETO|, -29, -122, -48, -120, -64, -78, 
RRCURVETO|, 17, -9, 28, -18, 13, -10, RRCURVETO|, 62, 84, 54, 127, 33, 132, 
RRCURVETO|, CLOSEPATH|, 242, 1, RMOVETO|, 56, -106, 52, -142, 17, -92, 
RRCURVETO|, 63, 22, RLINETO|, -17, 92, -52, 139, -59, 106, RRCURVETO|, 
CLOSEPATH|, -353, 414, RMOVETO|, -33, -149, -57, -145, -74, -94, RRCURVETO|, 
16, -10, 26, -22, 12, -11, RRCURVETO|, 36, 49, 33, 60, 29, 68, RRCURVETO|, 160, 
HLINETO|, -575, VLINETO|, 0, -13, -5, -4, -12, 0, RRCURVETO|, -14, 0, -43, -1, 
-49, 2, RRCURVETO|, 0, 10, -19, 11, 0, 9342, RRCURVETO|, 575, VLINETO|, 200, 
HLINETO|, -9, -53, -10, -55, -7, -37, RRCURVETO|, 57, -11, RLINETO|, 13, 
HLINETO|, 53, VLINETO|, 18, HLINETO|, 86, VLINETO|, 13, HLINETO|, 72, VLINETO|, 
-46, HLINETO|, -55, VLINETO|, -419, HLINETO|, 21, 56, 18, 60, 14, 60, 
RRCURVETO|]

The man

Jenkins build is back to normal : PDFBox » PDFBox-2.0.x » Apache PDFBox parent #1251

2024-06-19 Thread Apache Jenkins Server
See 



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



[jira] [Commented] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr commented on PDFBOX-5843:
-

Fixed in 1918445, 1918446, 1918447, 1918448, 1918449, 1918450 (svn2jira is 
down). Thanks for the report!

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Priority: Major
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, screenshot-3.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Resolved] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread Tilman Hausherr (Jira)


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

Tilman Hausherr resolved PDFBOX-5843.
-
Fix Version/s: 2.0.32
   3.0.3 PDFBox
   4.0.0
 Assignee: Tilman Hausherr
   Resolution: Fixed

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 2.0.32, 3.0.3 PDFBox, 4.0.0
>
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, screenshot-3.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (PDFBOX-5843) There is an exception when getting embedded font, is it compatible?

2024-06-19 Thread liu (Jira)


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

liu commented on PDFBOX-5843:
-

(y) so cool !

> There is an exception when getting embedded font, is it compatible?
> ---
>
> Key: PDFBOX-5843
> URL: https://issues.apache.org/jira/browse/PDFBOX-5843
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.31, 3.0.2 PDFBox
>Reporter: liu
>Assignee: Tilman Hausherr
>Priority: Major
> Fix For: 2.0.32, 3.0.3 PDFBox, 4.0.0
>
> Attachments: 123.pdf, image-2024-06-19-16-49-40-186.png, 
> screenshot-1.png, screenshot-2.png, screenshot-3.png, xxx.cff
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (PDFBOX-5660) Improve code quality (5)

2024-06-19 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on PDFBOX-5660:
-

Commit 1918465 from Tilman Hausherr in branch 'pdfbox/branches/3.0'
[ https://svn.apache.org/r1918465 ]

PDFBOX-5660: simplify

> Improve code quality (5)
> 
>
> Key: PDFBOX-5660
> URL: https://issues.apache.org/jira/browse/PDFBOX-5660
> Project: PDFBox
>  Issue Type: Improvement
>Reporter: Tilman Hausherr
>Priority: Minor
> Attachments: AnnotationSample.Standard.pdf, 
> DRY_refactoring_Typ2CharStringParser.patch, 
> Removed_the_readFully_method_in_the_PfbParser_class_and_replaced__with_calling_readAllByte.patch,
>  
> Simplify_list_and_map_operations,_use_known_size_when_creating_StringBuilder.patch,
>  Simplify_string_conversion_in_PDFHighlighter.patch, 
> Update_string_handling_and_regex_in_several_classes.patch, 
> avoid_multiple_unboxing.patch, code_cleanup.patch, 
> do_not_create_temporary_File_instance.patch, 
> extract_common_code,_move_toUpperCase()_out_of_loop.patch, 
> fix_HTML_error_in_Javadoc.patch, fix_javadoc_problems.patch, 
> introduce_COSArray_of(float___)_to_make_the_code_more_concise_and_avoid_creating_and_copyi.patch,
>  introduce_StringUtil_class_for_reusable_functionality.patch, 
> introduce_constants_COSFLOAT_ZERO_and_COSFloat_ONE_to_avoid_creating_unnecessary_instances.patch,
>  make_inner_class_static.patch, refactor_isEndOfName.patch, 
> remove_code_duplication_in_Type2CharStringParser.patch, 
> remove_obsolete_class_NullOutputStream.patch, 
> remove_unnecessary_calls_to_toString()_String_valueOf().patch, 
> replace_System_getProperty()_calls.patch, screenshot-1.png, 
> simplify_hashCode()_and_equals(),_test_name_first_because_Map_equals()_is_expensive.patch,
>  simplify_stream_operations.patch, use_Map_ofEntries().patch, 
> use_Math_min()_to_make_code_more_readable.patch, use_Objects_equals().patch, 
> use_String_isEmpty()_Collection_isEmpty()_instead_of_checking_length_size.patch,
>  use_String_join().patch, use_switch_for_readability.patch, 
> use_try-with-resources_(since_Java_9_the_variable_declaration_in_the_try_is_not_necessary_.patch
>
>
> This is a longterm issue for the task to improve code quality, by using the 
> SonarQube report, hints in different IDEs, the FindBugs tool and other code 
> quality tools.
> This is a follow-up of PDFBOX-4892, which was getting too long.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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