asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.13k stars 500 forks source link

Incorrect warning about missing character in fallback font when using inline image #2492

Closed mojavelinux closed 5 months ago

mojavelinux commented 5 months ago

When an inline image falls in the part of a paragraph that gets split onto the next page, and the theme uses at least one fallback font, Asciidoctor PDF incorrectly warns about the fallback font missing character the \u2063. This character is only a placeholder for the inline image and is not meant to be rendered. However, when Prawn analyzes the fragments that fall to the next page, it sees the placeholder and tries to find the font for it. Asciidoctor PDF should intercept this analysis in Prawn and skip the image fragment.

The reason Prawn sees the placeholder is because the image arranger has already run on the paragraph when the fragments get split across pages. In other words, the text of the image fragment is now a placeholder. Although the placeholder is never rendered, it's present when Prawn is analyzing the font support for the glyphs in the remaining fragments.

mojavelinux commented 5 months ago

Related to #2453.