diff options
author | Stanislav Seletskiy <s.seletskiy@gmail.com> | 2019-07-18 15:00:05 +0300 |
---|---|---|
committer | Stanislav Seletskiy <s.seletskiy@gmail.com> | 2019-07-18 15:13:20 +0300 |
commit | 09261e84da53502557bf24a24fdc36e7cc215ddf (patch) | |
tree | 94c4be8cad7170c138cea8ad284eb73fde89380a /contrib/ghostscript | |
parent | 3aaf0b1a66c0ab02d925917376898a5856061d59 (diff) |
fix utf8 text wrapping
UTF8 text splitted correctly by SplitText function in WriteAligned
method:
https://github.com/jung-kurt/gofpdf/blob/3aaf0b1a66c0ab02d925917376898a5856061d59/fpdf.go#L2811
Then, lines of text are written via Write function, and if text is
already wrapped by given width it will be printed using 'last chunk' case:
https://github.com/jung-kurt/gofpdf/blob/3aaf0b1a66c0ab02d925917376898a5856061d59/fpdf.go#L2747,L2754
But in this case, gofpdf does not move cursor to the next cell, which
cause all text to be printed on the same line without actual wrapping.
This commit makes workaround for it by explicitly setting right margin
to force automatic line break case:
https://github.com/jung-kurt/gofpdf/blob/3aaf0b1a66c0ab02d925917376898a5856061d59/fpdf.go#L2705
Diffstat (limited to 'contrib/ghostscript')
0 files changed, 0 insertions, 0 deletions