asciidoctor-pdf: Break non-breaking hyphen
My test code:
Aaaa bbbbbb ccccccccc ddddd eeeeeeeee ffffffffffffff gggggggggggg hhhhhhh iiiiiii RFC{nbsp}P{nbsp}IEC{nbsp}60870‑5‑104
Render:
> asciidoctor --version
Asciidoctor 1.5.4 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]) (lc:IBM866 fs:Windows-1251 in:- ex:IBM866)
> asciidoctor-pdf --version
Asciidoctor PDF 1.5.0.alpha.11 using Asciidoctor 1.5.4 [http://asciidoctor.org]
Runtime Environment (ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]) (lc:IBM866 fs:Windows-1251 in:- ex:IBM866)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- resolves #462 add non-breaking hyphen to built-in fonts - non-breaking hyphen must be included in font or else arranger inadvertently introduces line break opportunity when partitioning glyph int... — committed to mojavelinux/asciidoctor-pdf by mojavelinux 8 years ago
- resolves #462 add non-breaking hyphen to built-in fonts - non-breaking hyphen must be included in font or else arranger inadvertently introduces line break opportunity when partitioning glyph int... — committed to mojavelinux/asciidoctor-pdf by mojavelinux 8 years ago
- resolves #462 add non-breaking hyphen to built-in fonts - The non-breaking hyphen glyph must be included in font or else Prawn's text arranger inadvertently introduces a line break opportunity when... — committed to mojavelinux/asciidoctor-pdf by mojavelinux 8 years ago
- resolves #462 add non-breaking hyphen to built-in fonts (PR #550) - The non-breaking hyphen glyph must be included in font or else Prawn's text arranger inadvertently introduces a line break oppor... — committed to vogellacompany/asciidoctor-pdf by mojavelinux 8 years ago
\o/ 🍻
This is a permanent solution, but very specific to this use case. If something causes the hyphen to be isolated in a fragment by itself (for instance, if you try to bold it), then the line will break there. The general solution is to figure out why Prawn is allowing breaks at the boundaries of fragments, since fragments are merely an internal data structure that should have no bearing on line wrapping behavior. In other words, it’s a bug in Prawn.