summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Matusiak <wmatusiak@gmail.com>2019-02-21 02:25:10 +0100
committerWojciech Matusiak <wmatusiak@gmail.com>2019-02-21 02:25:10 +0100
commit6a80039fd927b21892b75a206d8a36cccb60dd37 (patch)
treea35f7fdbadc39eb440667a052da75eff87f8a3b7
parent5e8bff406205400b6d067dc6d96666dedc2cf32a (diff)
Adds the ability to set word spacing.
-rw-r--r--fpdf.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/fpdf.go b/fpdf.go
index bc047b1..3f4c1a3 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -1897,6 +1897,11 @@ func (f *Fpdf) Text(x, y float64, txtStr string) {
f.out(s)
}
+// SetWordSpacing sets spacing between words of following text
+func (f *Fpdf) SetWordSpacing(space float64) {
+ f.out(sprintf("%.3f Tw", space*f.k))
+}
+
// SetAcceptPageBreakFunc allows the application to control where page breaks
// occur.
//