summaryrefslogtreecommitdiff
path: root/splittext.go
diff options
context:
space:
mode:
authorhyzgh <31174102+hyzgh@users.noreply.github.com>2019-08-20 19:50:37 +0800
committerhyzgh <31174102+hyzgh@users.noreply.github.com>2019-08-21 18:08:30 +0800
commit5cb8bab84fe08b93191ed0385c016592d2ac7cc4 (patch)
treea30d2d0265082e83b54a85d647255d74cd59c319 /splittext.go
parentbd30e05dff3288bc54bb696a45c4ec45ceb1156d (diff)
fix split line bug
Change-Id: I224a7ec1af8386dcbef757c76389fb88316401bc
Diffstat (limited to 'splittext.go')
-rw-r--r--splittext.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/splittext.go b/splittext.go
index 3902199..525f93b 100644
--- a/splittext.go
+++ b/splittext.go
@@ -26,8 +26,7 @@ func (f *Fpdf) SplitText(txt string, w float64) (lines []string) {
for i < nb {
c := s[i]
l += cw[c]
- if unicode.IsSpace(c) {
- // if c == ' ' || c == '\t' || c == '\n' {
+ if unicode.IsSpace(c) || isChinese(c) {
sep = i
}
if c == '\n' || l > wmax {