Display hyphen when breaking words
sbrunecker opened this issue · comments
I need to generate documents with German strings that tend to be quite long. Before generating the html I separate words into syllables and add soft hyphens.
Consider the following example:
<table class="table table-bordered">
<thead>
<tr>
<th>Spalte 1</th>
<th>Spalte 2</th>
<th>Spalte 3</th>
<th>Spalte 4</th>
<th>Spalte 5</th>
</tr>
</thead>
<tbody>
<tr>
<td>Haft­pflicht­ver­si­che­rung</td>
<td>Bundesausbildungsförderungsgesetz</td>
<td>Gleichgewichtsdichtegradientenzentrifugation</td>
<td>Hähnchenmast</td>
<td>Ertragsschadenversicherung Mastgeflügel</td>
</tr>
</tbody>
</table>
In Chrome, a hyphen is displayed when printing this example:
When generating with openhtmltopdf, no hyphen is displayed:
How can I get hyphens as in Chrome?
Thanks @sbrunecker,
Your concise and useful sample, as well as screenshots, allowed me to focus on implementing soft-hyphens rather than coming up with test cases. It should all work now including justification and letter-spacing support.
I'm planning a release in the near future unless something comes up.
Dan.