diff options
author | hyzgh <31174102+hyzgh@users.noreply.github.com> | 2019-08-20 19:50:37 +0800 |
---|---|---|
committer | hyzgh <31174102+hyzgh@users.noreply.github.com> | 2019-08-21 18:08:30 +0800 |
commit | 5cb8bab84fe08b93191ed0385c016592d2ac7cc4 (patch) | |
tree | a30d2d0265082e83b54a85d647255d74cd59c319 /splittext.go | |
parent | bd30e05dff3288bc54bb696a45c4ec45ceb1156d (diff) |
fix split line bug
Change-Id: I224a7ec1af8386dcbef757c76389fb88316401bc
Diffstat (limited to 'splittext.go')
-rw-r--r-- | splittext.go | 3 |
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 { |