Skip to content

Commit

Permalink
revise warning about fallback font
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed May 23, 2024
1 parent 456b67a commit b0b3c05
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/modules/theme/pages/fallback-font.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ CAUTION: Using the fallback font slows down PDF generation slightly because it h
Its use is not recommended for large documents.
Instead, it's best to select primary fonts that have all the characters you need.

WARNING: If the PDF generator (Prawn) makes use of the fallback font to render a character, that will introduce a break opportunity, regardless of what role is set on the span of text or what the adjacent characters are (e.g., `{nbsp}`).
When Prawn uses a fallback font, it disrupts assumptions about line wrapping.
[WARNING]
====
If the PDF generator (Prawn) makes use of the fallback font to render a character, that will introduce a break opportunity, regardless of what role is set on the span of text or what characters are adjacent (e.g., `\{nbsp}`).
When Prawn makes use of a fallback font, it disrupts assumptions about line wrapping.
In order to assign the fallback font to the character, Prawn must create a dedicated fragment for that character.
In other words, using the fallback font to resolve the glyph for a character creates a fragment.
In other words, using the fallback font to resolve the glyph for a character introduces a new fragment.
A fragment boundary always creates an artificial break opportunity in the text.
The best way to ensure that the no-break boundaries are honored is to ensure that the primary font contains glyphs for all the characters in the manuscript, as well as any required characters for using a custom font with Asciidoctor PDF.
====

== Requirements

Expand Down

0 comments on commit b0b3c05

Please sign in to comment.