forked from danfickle/openhtmltopdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request danfickle#587 from vipcxj/open-dev-v1
Fixes danfickle#302 nowrap text inside wrap text breaking.
- Loading branch information
Showing
8 changed files
with
111 additions
and
4 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
Binary file added
BIN
+5.92 KB
...pdf-examples/src/main/resources/visualtest/expected/text/line-wrap-nowrap-span-nested.pdf
Binary file not shown.
Binary file added
BIN
+4.14 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/text/line-wrap-nowrap-span.pdf
Binary file not shown.
Binary file added
BIN
+2.89 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/text/nowrap.pdf
Binary file not shown.
31 changes: 31 additions & 0 deletions
31
...ltopdf-examples/src/main/resources/visualtest/html/text/line-wrap-nowrap-span-nested.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 300px 350px; | ||
margin: 10px; | ||
} | ||
body { | ||
margin: 20px; | ||
max-width: 280px; | ||
color: red; | ||
border: 1px solid pink; | ||
} | ||
.nowrap { | ||
white-space: nowrap; | ||
color: blue; | ||
} | ||
.wrap { | ||
white-space: normal; | ||
color: red; | ||
} | ||
</style> | ||
</head> | ||
<body style="font-family: 'TestFont'; font-size: 20px;"> | ||
Text should wrap before <span class="nowrap">a very long <span class="wrap">unwrappable wrap</span> span some more very long</span> | ||
|
||
Text should wrap before <span class="nowrap">a very long <span class="wrap">unwrappable</span> nowrap span some more very long</span> | ||
|
||
Text should wrap before <span class="nowrap">a very long <span class="wrap">unwrappable <span class="nowrap">wrap some more content testing 123</span></span> nowrap span some more very long</span> | ||
</body> | ||
</html> |
36 changes: 36 additions & 0 deletions
36
openhtmltopdf-examples/src/main/resources/visualtest/html/text/nowrap.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 21cm 9cm; | ||
} | ||
/* Unrelated workaround for bug where top/bottom margin | ||
* on page does not collapse correctly. */ | ||
p:first-child { | ||
margin-top: 0; | ||
} | ||
p:last-child { | ||
margin-bottom: 0; | ||
} | ||
</style> | ||
</head> | ||
<body style="border: 1px solid black;"> | ||
<div style="width:90%; line-height: 1.3;"> | ||
<p> | ||
Some text.Some text.Some text.Some text.Some text.Some text.Some text.Some text. | ||
<span style="white-space: nowrap; border-bottom: 1px solid red;">This text should be at next line.</span> | ||
Other text. Other text. Other text. Other text. Other text. Other text. Other text. | ||
</p> | ||
<p> | ||
Some text.Some text. | ||
<span style="white-space: nowrap; border-bottom: 1px solid red;">This text should not be at next line.</span> | ||
Other text. Other text. Other text. Other text. Other text. Other text. Other text. | ||
</p> | ||
<p> | ||
Some text.Some text.Some text.Some text.Some text.Some text.Some text.Some text. | ||
<span style="white-space: nowrap; border-bottom: 1px solid red;">This is a very very very very very very very very very very very very very very very very very very very very very very long nowrap text.</span> | ||
Other text. Other text. Other text. Other text. Other text. Other text. Other text. | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
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