Skip to content

Commit

Permalink
For #21 - Replace non-breaking space (and other space characters) wit…
Browse files Browse the repository at this point in the history
…h normal space if not present in font.

Thanks @rototor
  • Loading branch information
danfickle committed Apr 19, 2016
1 parent 0059a49 commit 1e5d831
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ CHANGELOG

head - 0.0.1-RC3-SNAPSHOT
========
+ [Replaced non-breaking spaces - and other unusual spaces - with normal space if font does not support them](https://github.com/danfickle/openhtmltopdf/issues/21) Thanks @rototor
+ [Added a method for adding a PDF font using an input stream](https://github.com/danfickle/openhtmltopdf/issues/20) Thanks @aleksandr-m
+ [Added support for plugging in an external URI resolver](https://github.com/danfickle/openhtmltopdf/issues/18)
+ [Added support for plugging in an external cache](https://github.com/danfickle/openhtmltopdf/issues/18)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,12 @@ else if (replace.fontDescription != current.des) {
sb = new StringBuilder();
}

sb.append(replace.replacement);
if (Character.isSpaceChar(unicode)) {
sb.append(' ');
}
else {
sb.append(replace.replacement);
}
}
}

Expand Down

0 comments on commit 1e5d831

Please sign in to comment.