You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Frenchfrie (Jira)" <ji...@apache.org> on 2021/06/17 15:52:00 UTC

[jira] [Updated] (PDFBOX-5219) TTFParser can't parse font with legitimately no 'loca' table

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

Frenchfrie updated PDFBOX-5219:
-------------------------------
    Description: 
Some fonts legitimately do not have a 'loca' table as specified in [Apple documentation|https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6loca.html]:

??The {{'loca'}} table only used with fonts that have TrueType outlines (that is, a [{{'glyf'}} table|https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html]). Fonts that have no TrueType outlines do not require a {{'loca'}} table.??

This has led to some misunderstanding in the NotoColorEmoji google font project as testified by those issues :

[https://github.com/googlefonts/noto-emoji/issues/190]

[https://github.com/googlefonts/noto-emoji/issues/288]

Also reproduced with JoyPixels.ttf from [https://www.joypixels.com/] installed through [package manager|https://archlinux.org/packages/community/any/ttf-joypixels/].

 

The TTFParser class just do not accept this font based on the absence of the 'loca' table and it can be verified with the simple test:
{code:java}
PDType0Font.load(doc, getClass().getResourceAsStream("NotoColorEmoji.ttf"), false);
{code}

  was:
Some fonts legitimately do not have a 'loca' table as specified in [Apple documentation|https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6loca.html]:

??The {{'loca'}} table only used with fonts that have TrueType outlines (that is, a [{{'glyf'}} table|https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html]). Fonts that have no TrueType outlines do not require a {{'loca'}} table.??

This has led to some misunderstanding in the NotoColorEmoji google font project as testified by those issues :

[https://github.com/googlefonts/noto-emoji/issues/190]

[https://github.com/googlefonts/noto-emoji/issues/288]

 

The TTFParser class just do not accept this font based on the absence of the 'loca' table and it can be verified with the simple test:
{code:java}
PDType0Font.load(doc, getClass().getResourceAsStream("NotoColorEmoji.ttf"), false);
{code}


> TTFParser can't parse font with legitimately no 'loca' table
> ------------------------------------------------------------
>
>                 Key: PDFBOX-5219
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5219
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox, PDModel
>    Affects Versions: 2.0.23
>         Environment: ➜ uname -a
> Linux frenchfrie-pc 5.10.42-1-MANJARO #1 SMP PREEMPT Thu Jun 3 14:37:11 UTC 2021 x86_64 GNU/Linux
>            Reporter: Frenchfrie
>            Priority: Major
>
> Some fonts legitimately do not have a 'loca' table as specified in [Apple documentation|https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6loca.html]:
> ??The {{'loca'}} table only used with fonts that have TrueType outlines (that is, a [{{'glyf'}} table|https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html]). Fonts that have no TrueType outlines do not require a {{'loca'}} table.??
> This has led to some misunderstanding in the NotoColorEmoji google font project as testified by those issues :
> [https://github.com/googlefonts/noto-emoji/issues/190]
> [https://github.com/googlefonts/noto-emoji/issues/288]
> Also reproduced with JoyPixels.ttf from [https://www.joypixels.com/] installed through [package manager|https://archlinux.org/packages/community/any/ttf-joypixels/].
>  
> The TTFParser class just do not accept this font based on the absence of the 'loca' table and it can be verified with the simple test:
> {code:java}
> PDType0Font.load(doc, getClass().getResourceAsStream("NotoColorEmoji.ttf"), false);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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