summaryrefslogtreecommitdiff
path: root/doc.go
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-05-06 07:55:23 -0400
committerKurt <kurt.w.jung@gmail.com>2019-05-06 07:55:23 -0400
commitce58337af2deb2d3f26d0d2f9f1a18f4da64f638 (patch)
tree409af3f52d5795611c9d5a76e6436e6e60f5df6f /doc.go
parent30a37b5fca264d688cf7a87cf1f9d0b627d45202 (diff)
Convey changes made in README to doc/document.txt so pandoc can generate README and doc.go
Diffstat (limited to 'doc.go')
-rw-r--r--doc.go37
1 files changed, 19 insertions, 18 deletions
diff --git a/doc.go b/doc.go
index 17a9bc1..1042302 100644
--- a/doc.go
+++ b/doc.go
@@ -40,15 +40,15 @@ Features
- Charting facility
+- UTF-8 support
+
gofpdf has no dependencies other than the Go standard library. All tests
pass on Linux, Mac and Windows platforms.
-Like FPDF version 1.7, from which gofpdf is derived, this package does
-not yet support UTF-8 fonts. In particular, languages that require more
-than one code page such as Chinese, Japanese, and Arabic are not
-currently supported. This is explained in issue 109. However, support is
-provided to automatically translate UTF-8 runes to code page encodings
-for languages that have fewer than 256 glyphs.
+gofpdf supports UTF-8 fonts and “right-to-left” languages.
+
+Also, support is provided to automatically translate UTF-8 runes to code
+page encodings for languages that have fewer than 256 glyphs.
Installation
@@ -147,14 +147,18 @@ Nothing special is required to use the standard PDF fonts (courier,
helvetica, times, zapfdingbats) in your documents other than calling
SetFont().
-In order to use a different TrueType or Type1 font, you will need to
-generate a font definition file and, if the font will be embedded into
-PDFs, a compressed version of the font file. This is done by calling the
-MakeFont() function or using the included makefont command line utility.
-To create the utility, cd into the makefont subdirectory and run
-go build. This will produce a standalone executable named makefont.
-Select the appropriate encoding file from the font subdirectory and run
-the command as in the following example.
+You should use AddUTF8Font or AddUTF8FontFromBytes to add UTF-8 TTF
+font. RTL() and LTR() methods switch between “right-to-left” and
+“left-to-right” mode.
+
+In order to use a different non-UTF-8 TrueType or Type1 font, you will
+need to generate a font definition file and, if the font will be
+embedded into PDFs, a compressed version of the font file. This is done
+by calling the MakeFont function or using the included makefont command
+line utility. To create the utility, cd into the makefont subdirectory
+and run “go build”. This will produce a standalone executable named
+makefont. Select the appropriate encoding file from the font
+subdirectory and run the command as in the following example.
./makefont --embed --enc=../font/cp1252.map --dst=../font ../font/calligra.ttf
@@ -246,15 +250,12 @@ encoding and decoding functionality for templates, including images that
are embedded in templates; this allows templates to be stored
independently of gofpdf. Paul also added support for page boxes used in
printing PDF documents. Wojciech Matusiak added supported for word
-spacing.
+spacing. Artem Korotkiy added support of UTF-8 fonts.
Roadmap
-- Handle UTF-8 source text natively. Until then, automatic translation
-of UTF-8 runes to code page bytes is provided.
-
- Improve test coverage as reported by the coverage tool.
*/
package gofpdf