-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add special handling for Soft Hyphen (SHY) unicode symbol to DOCX emi… (
#1180) Add special handling for Soft Hyphen (SHY) unicode symbol to DOCX emitter and PDF emitter as follows: The SOFT HYPHEN Hyphen Unicode symbol (often abbreviated as "SHY", code point 173 = '\u00ad' ) is something like a shy dash: It is invisible except when line-breaking occurs at this place. Its intention is to mark good locations for hyphenation. For US/English readers: Long words are quite common in some languages, so hyphenation is much more important there than in English texts. For example, the German word "Bundestag" (the parliament) can be hyphenated as "Bun-des-tag". Let's assume that the text ist stored as "Bun\u00addes\u00adtag"(with a SHY symbol instead of the ASCII MINUS symbol between the syllables). If a line-break occurs, this may result in "Bundes-" at the end of line 1 and "tag" at the start of line 2. TTF fonts usually calculate a width of 0 for this symbol. BIRT behaves like the CSS property hyphens: auto is set (see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Text/Wrapping_Text). But until now, BIRT did not handle the SHY symbol correctly with the PDF emitter and (in some cases) with the DOCX emitter. This PR adds special handling for the SHY symbol to the DOCX emitter and PDF emitters to handle this correctly. Other emitters are not changed.
- Loading branch information
Showing
4 changed files
with
239 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters