[
https://issues.apache.org/jira/browse/PDFBOX-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17370880#comment-17370880
]
Frenchfrie commented on PDFBOX-5219:
------------------------------------
Hi [~lehmi], thanks for your interest in this topic :).
I do not base this assertion on any specification but on my own user experience.
I could create PDF with emojis correctly handled as characters through Google
Docs "download"->"as PDF'" feature. It renders correctly in Firefox and
LibreOffice Draw but emojis are blackened in XReader. In each app, I can
correctly copy paste theses as characters.
After some digging, I found that there is a Windows-compatible version of the
Noto emoji font ("_which is the same font but with an additional empty {{glyf}}
table and {{cmap}} format 4 subtable. This is required by Windows 10 if you
want to install the_ font." [from their Github
Page|https://github.com/googlefonts/noto-emoji#building-notocoloremoji]) and
could generate a PDF using it and PDFBox but they render white in XReader and
Firefox (I can select and copy them but not see them) and render as expected in
LibreOffice Draw.
LibreOffice Draw does recognize the correct font in both cases.
I tried to join the documents but it does not seem to work. Maybe I should
reopen the ticket for it to work?
> 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
> Attachments: emo.pdf
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]