Kurt Jungs Auslieferungszustand

This commit is contained in:
Klaus Wendel, archium GmbH 2021-03-02 13:27:45 +01:00
commit 5afea81825
156 changed files with 30287 additions and 0 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Kurt Jung and contributors acknowledged in the documentation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

29
Makefile Normal file
View File

@ -0,0 +1,29 @@
all : documentation
documentation : doc/index.html doc.go README.md
cov : all
go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html
check :
golint .
go vet -all .
gofmt -s -l .
goreportcard-cli -v | grep -v cyclomatic
README.md : doc/document.md
pandoc --read=markdown --write=gfm < $< > $@
doc/index.html : doc/document.md doc/html.txt
pandoc --read=markdown --write=html --template=doc/html.txt \
--metadata pagetitle="GoFPDF Document Generator" < $< > $@
doc.go : doc/document.md doc/go.awk
pandoc --read=markdown --write=plain $< | awk --assign=package_name=gofpdf --file=doc/go.awk > $@
gofmt -s -w $@
build :
go build -v
clean :
rm -f coverage.html coverage doc/index.html doc.go README.md

282
README.md Normal file
View File

@ -0,0 +1,282 @@
# GoFPDF document generator
[![No Maintenance
Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)
[![MIT
licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/jung-kurt/gofpdf/master/LICENSE)
[![Report](https://goreportcard.com/badge/github.com/jung-kurt/gofpdf)](https://goreportcard.com/report/github.com/jung-kurt/gofpdf)
[![GoDoc](https://img.shields.io/badge/godoc-GoFPDF-blue.svg)](https://godoc.org/github.com/jung-kurt/gofpdf)
![](https://github.com/jung-kurt/gofpdf/raw/master/image/logo_gofpdf.jpg?raw=true)
Package gofpdf implements a PDF document generator with high level
support for text, drawing and images.
## Features
- UTF-8 support
- Choice of measurement unit, page format and margins
- Page header and footer management
- Automatic page breaks, line breaks, and text justification
- Inclusion of JPEG, PNG, GIF, TIFF and basic path-only SVG images
- Colors, gradients and alpha channel transparency
- Outline bookmarks
- Internal and external links
- TrueType, Type1 and encoding support
- Page compression
- Lines, Bézier curves, arcs, and ellipses
- Rotation, scaling, skewing, translation, and mirroring
- Clipping
- Document protection
- Layers
- Templates
- Barcodes
- Charting facility
- Import PDFs as templates
gofpdf has no dependencies other than the Go standard library. All tests
pass on Linux, Mac and Windows platforms.
gofpdf supports UTF-8 TrueType fonts and “right-to-left” languages. Note
that Chinese, Japanese, and Korean characters may not be included in
many general purpose fonts. For these languages, a specialized font (for
example,
[NotoSansSC](https://github.com/jsntn/webfonts/blob/master/NotoSansSC-Regular.ttf)
for simplified Chinese) can be used.
Also, support is provided to automatically translate UTF-8 runes to code
page encodings for languages that have fewer than 256 glyphs.
## We Are Closed
This repository will not be maintained, at least for some unknown
duration. But it is hoped that gofpdf has a bright future in the open
source world. Due to Gos promise of compatibility, gofpdf should
continue to function without modification for a longer time than would
be the case with many other languages.
Forks should be based on the [last viable
commit](https://github.com/jung-kurt/gofpdf/commit/603f56990463f011cb1dbb64ef7f872c1adc009a).
Tools such as
[active-forks](https://techgaun.github.io/active-forks/index.html#jung-kurt/gofpdf)
can be used to select a fork that looks promising for your needs. If a
particular fork looks like it has taken the lead in attracting
followers, this README will be updated to point people in that
direction.
The efforts of all contributors to this project have been deeply
appreciated. Best wishes to all of you.
## Installation
To install the package on your system, run
``` shell
go get github.com/jung-kurt/gofpdf
```
Later, to receive updates, run
``` shell
go get -u -v github.com/jung-kurt/gofpdf/...
```
## Quick Start
The following Go code generates a simple PDF file.
``` go
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddPage()
pdf.SetFont("Arial", "B", 16)
pdf.Cell(40, 10, "Hello, world")
err := pdf.OutputFileAndClose("hello.pdf")
```
See the functions in the
[fpdf\_test.go](https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go)
file (shown as examples in this documentation) for more advanced PDF
examples.
## Errors
If an error occurs in an Fpdf method, an internal error field is set.
After this occurs, Fpdf method calls typically return without performing
any operations and the error state is retained. This error management
scheme facilitates PDF generation since individual method calls do not
need to be examined for failure; it is generally sufficient to wait
until after `Output()` is called. For the same reason, if an error
occurs in the calling application during PDF generation, it may be
desirable for the application to transfer the error to the Fpdf instance
by calling the `SetError()` method or the `SetErrorf()` method. At any
time during the life cycle of the Fpdf instance, the error state can be
determined with a call to `Ok()` or `Err()`. The error itself can be
retrieved with a call to `Error()`.
## Conversion Notes
This package is a relatively straightforward translation from the
original [FPDF](http://www.fpdf.org/) library written in PHP (despite
the caveat in the introduction to [Effective
Go](https://golang.org/doc/effective_go.html)). The API names have been
retained even though the Go idiom would suggest otherwise (for example,
`pdf.GetX()` is used rather than simply `pdf.X()`). The similarity of
the two libraries makes the original FPDF website a good source of
information. It includes a forum and FAQ.
However, some internal changes have been made. Page content is built up
using buffers (of type bytes.Buffer) rather than repeated string
concatenation. Errors are handled as explained above rather than
panicking. Output is generated through an interface of type io.Writer or
io.WriteCloser. A number of the original PHP methods behave differently
based on the type of the arguments that are passed to them; in these
cases additional methods have been exported to provide similar
functionality. Font definition files are produced in JSON rather than
PHP.
## Example PDFs
A side effect of running `go test ./...` is the production of a number
of example PDFs. These can be found in the gofpdf/pdf directory after
the tests complete.
Please note that these examples run in the context of a test. In order
run an example as a standalone application, youll need to examine
[fpdf\_test.go](https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go)
for some helper routines, for example `exampleFilename()` and
`summary()`.
Example PDFs can be compared with reference copies in order to verify
that they have been generated as expected. This comparison will be
performed if a PDF with the same name as the example PDF is placed in
the gofpdf/pdf/reference directory and if the third argument to
`ComparePDFFiles()` in internal/example/example.go is true. (By default
it is false.) The routine that summarizes an example will look for this
file and, if found, will call `ComparePDFFiles()` to check the example
PDF for equality with its reference PDF. If differences exist between
the two files they will be printed to standard output and the test will
fail. If the reference file is missing, the comparison is considered to
succeed. In order to successfully compare two PDFs, the placement of
internal resources must be consistent and the internal creation
timestamps must be the same. To do this, the methods `SetCatalogSort()`
and `SetCreationDate()` need to be called for both files. This is done
automatically for all examples.
## Nonstandard Fonts
Nothing special is required to use the standard PDF fonts (courier,
helvetica, times, zapfdingbats) in your documents other than calling
`SetFont()`.
You should use `AddUTF8Font()` or `AddUTF8FontFromBytes()` to add a
TrueType UTF-8 encoded font. Use `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.
``` shell
./makefont --embed --enc=../font/cp1252.map --dst=../font ../font/calligra.ttf
```
In your PDF generation code, call `AddFont()` to load the font and, as
with the standard fonts, SetFont() to begin using it. Most examples,
including the package example, demonstrate this method. Good sources of
free, open-source fonts include [Google
Fonts](https://fonts.google.com/) and [DejaVu
Fonts](http://dejavu-fonts.org/).
## Related Packages
The [draw2d](https://github.com/llgcode/draw2d) package is a two
dimensional vector graphics library that can generate output in
different forms. It uses gofpdf for its document production mode.
## Contributing Changes
gofpdf is a global community effort and you are invited to make it even
better. If you have implemented a new feature or corrected a problem,
please consider contributing your change to the project. A contribution
that does not directly pertain to the core functionality of gofpdf
should be placed in its own directory directly beneath the `contrib`
directory.
Here are guidelines for making submissions. Your change should
- be compatible with the MIT License
- be properly documented
- be formatted with `go fmt`
- include an example in
[fpdf\_test.go](https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go)
if appropriate
- conform to the standards of [golint](https://github.com/golang/lint)
and [go vet](https://golang.org/cmd/vet/), that is, `golint .` and
`go vet .` should not generate any warnings
- not diminish [test coverage](https://blog.golang.org/cover)
[Pull requests](https://help.github.com/articles/using-pull-requests/)
are the preferred means of accepting your changes.
## License
gofpdf is released under the MIT License. It is copyrighted by Kurt Jung
and the contributors acknowledged below.
## Acknowledgments
This packages code and documentation are closely derived from the
[FPDF](http://www.fpdf.org/) library created by Olivier Plathey, and a
number of font and image resources are copied directly from it. Bruno
Michel has provided valuable assistance with the code. Drawing support
is adapted from the FPDF geometric figures script by David Hernández
Sanz. Transparency support is adapted from the FPDF transparency script
by Martin Hall-May. Support for gradients and clipping is adapted from
FPDF scripts by Andreas Würmser. Support for outline bookmarks is
adapted from Olivier Plathey by Manuel Cornes. Layer support is adapted
from Olivier Plathey. Support for transformations is adapted from the
FPDF transformation script by Moritz Wagner and Andreas Würmser. PDF
protection is adapted from the work of Klemen Vodopivec for the FPDF
product. Lawrence Kesteloot provided code to allow an images extent to
be determined prior to placement. Support for vertical alignment within
a cell was provided by Stefan Schroeder. Ivan Daniluk generalized the
font and image loading code to use the Reader interface while
maintaining backward compatibility. Anthony Starks provided code for the
Polygon function. Robert Lillack provided the Beziergon function and
corrected some naming issues with the internal curve function. Claudio
Felber provided implementations for dashed line drawing and generalized
font loading. Stani Michiels provided support for multi-segment path
drawing with smooth line joins, line join styles, enhanced fill modes,
and has helped greatly with package presentation and tests. Templating
is adapted by Marcus Downing from the FPDF\_Tpl library created by Jan
Slabon and Setasign. Jelmer Snoeck contributed packages that generate a
variety of barcodes and help with registering images on the web. Jelmer
Snoek and Guillermo Pascual augmented the basic HTML functionality with
aligned text. Kent Quirk implemented backwards-compatible support for
reading DPI from images that support it, and for setting DPI manually
and then having it properly taken into account when calculating image
size. Paulo Coutinho provided support for static embedded fonts. Dan
Meyers added support for embedded JavaScript. David Fish added a generic
alias-replacement function to enable, among other things, table of
contents functionality. Andy Bakun identified and corrected a problem in
which the internal catalogs were not sorted stably. Paul Montag added
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. Artem Korotkiy added support of UTF-8 fonts. Dave Barnes added
support for imported objects and templates. Brigham Thompson added
support for rounded rectangles. Joe Westcott added underline
functionality and optimized image storage. Benoit KUGLER contributed
support for rectangles with corners of unequal radius, modification
times, and for file attachments and annotations.
## Roadmap
- Remove all legacy code page font support; use UTF-8 exclusively
- Improve test coverage as reported by the coverage tool.

157
attachments.go Normal file
View File

@ -0,0 +1,157 @@
package gofpdf
import (
"crypto/md5"
"encoding/hex"
"fmt"
"strings"
)
// Attachment defines a content to be included in the pdf, in one
// of the following ways :
// - associated with the document as a whole : see SetAttachments()
// - accessible via a link localized on a page : see AddAttachmentAnnotation()
type Attachment struct {
Content []byte
// Filename is the displayed name of the attachment
Filename string
// Description is only displayed when using AddAttachmentAnnotation(),
// and might be modified by the pdf reader.
Description string
objectNumber int // filled when content is included
}
// return the hex encoded checksum of `data`
func checksum(data []byte) string {
tmp := md5.Sum(data)
sl := make([]byte, len(tmp))
for i, v := range tmp {
sl[i] = v
}
return hex.EncodeToString(sl)
}
// Writes a compressed file like object as ``/EmbeddedFile``. Compressing is
// done with deflate. Includes length, compressed length and MD5 checksum.
func (f *Fpdf) writeCompressedFileObject(content []byte) {
lenUncompressed := len(content)
sum := checksum(content)
compressed := sliceCompress(content)
lenCompressed := len(compressed)
f.newobj()
f.outf("<< /Type /EmbeddedFile /Length %d /Filter /FlateDecode /Params << /CheckSum <%s> /Size %d >> >>\n",
lenCompressed, sum, lenUncompressed)
f.putstream(compressed)
f.out("endobj")
}
// Embed includes the content of `a`, and update its internal reference.
func (f *Fpdf) embed(a *Attachment) {
if a.objectNumber != 0 { // already embedded (objectNumber start at 2)
return
}
oldState := f.state
f.state = 1 // we write file content in the main buffer
f.writeCompressedFileObject(a.Content)
streamID := f.n
f.newobj()
f.outf("<< /Type /Filespec /F () /UF %s /EF << /F %d 0 R >> /Desc %s\n>>",
f.textstring(utf8toutf16(a.Filename)),
streamID,
f.textstring(utf8toutf16(a.Description)))
f.out("endobj")
a.objectNumber = f.n
f.state = oldState
}
// SetAttachments writes attachments as embedded files (document attachment).
// These attachments are global, see AddAttachmentAnnotation() for a link
// anchored in a page. Note that only the last call of SetAttachments is
// useful, previous calls are discarded. Be aware that not all PDF readers
// support document attachments. See the SetAttachment example for a
// demonstration of this method.
func (f *Fpdf) SetAttachments(as []Attachment) {
f.attachments = as
}
// embed current attachments. store object numbers
// for later use by getEmbeddedFiles()
func (f *Fpdf) putAttachments() {
for i, a := range f.attachments {
f.embed(&a)
f.attachments[i] = a
}
}
// return /EmbeddedFiles tree name catalog entry.
func (f Fpdf) getEmbeddedFiles() string {
names := make([]string, len(f.attachments))
for i, as := range f.attachments {
names[i] = fmt.Sprintf("(Attachement%d) %d 0 R ", i+1, as.objectNumber)
}
nameTree := fmt.Sprintf("<< /Names [\n %s \n] >>", strings.Join(names, "\n"))
return nameTree
}
// ---------------------------------- Annotations ----------------------------------
type annotationAttach struct {
*Attachment
x, y, w, h float64 // fpdf coordinates (y diff and scaling done)
}
// AddAttachmentAnnotation puts a link on the current page, on the rectangle
// defined by `x`, `y`, `w`, `h`. This link points towards the content defined
// in `a`, which is embedded in the document. Note than no drawing is done by
// this method : a method like `Cell()` or `Rect()` should be called to
// indicate to the reader that there is a link here. Requiring a pointer to an
// Attachment avoids useless copies in the resulting pdf: attachment pointing
// to the same data will have their content only be included once, and be
// shared amongst all links. Be aware that not all PDF readers support
// annotated attachments. See the AddAttachmentAnnotation example for a
// demonstration of this method.
func (f *Fpdf) AddAttachmentAnnotation(a *Attachment, x, y, w, h float64) {
if a == nil {
return
}
f.pageAttachments[f.page] = append(f.pageAttachments[f.page], annotationAttach{
Attachment: a,
x: x * f.k, y: f.hPt - y*f.k, w: w * f.k, h: h * f.k,
})
}
// embed current annotations attachments. store object numbers
// for later use by putAttachmentAnnotationLinks(), which is
// called for each page.
func (f *Fpdf) putAnnotationsAttachments() {
// avoid duplication
m := map[*Attachment]bool{}
for _, l := range f.pageAttachments {
for _, an := range l {
if m[an.Attachment] { // already embedded
continue
}
f.embed(an.Attachment)
}
}
}
func (f *Fpdf) putAttachmentAnnotationLinks(out *fmtBuffer, page int) {
for _, an := range f.pageAttachments[page] {
x1, y1, x2, y2 := an.x, an.y, an.x+an.w, an.y-an.h
as := fmt.Sprintf("<< /Type /XObject /Subtype /Form /BBox [%.2f %.2f %.2f %.2f] /Length 0 >>",
x1, y1, x2, y2)
as += "\nstream\nendstream"
out.printf("<< /Type /Annot /Subtype /FileAttachment /Rect [%.2f %.2f %.2f %.2f] /Border [0 0 0]\n",
x1, y1, x2, y2)
out.printf("/Contents %s ", f.textstring(utf8toutf16(an.Description)))
out.printf("/T %s ", f.textstring(utf8toutf16(an.Filename)))
out.printf("/AP << /N %s>>", as)
out.printf("/FS %d 0 R >>\n", an.objectNumber)
}
}

146
compare.go Normal file
View File

@ -0,0 +1,146 @@
/*
* Copyright (c) 2015 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package gofpdf
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"sort"
)
type sortType struct {
length int
less func(int, int) bool
swap func(int, int)
}
func (s *sortType) Len() int {
return s.length
}
func (s *sortType) Less(i, j int) bool {
return s.less(i, j)
}
func (s *sortType) Swap(i, j int) {
s.swap(i, j)
}
func gensort(Len int, Less func(int, int) bool, Swap func(int, int)) {
sort.Sort(&sortType{length: Len, less: Less, swap: Swap})
}
func writeBytes(leadStr string, startPos int, sl []byte) {
var pos, max int
var b byte
fmt.Printf("%s %07x", leadStr, startPos)
max = len(sl)
for pos < max {
fmt.Printf(" ")
for k := 0; k < 8; k++ {
if pos < max {
fmt.Printf(" %02x", sl[pos])
} else {
fmt.Printf(" ")
}
pos++
}
}
fmt.Printf(" |")
pos = 0
for pos < max {
b = sl[pos]
if b < 32 || b >= 128 {
b = '.'
}
fmt.Printf("%c", b)
pos++
}
fmt.Printf("|\n")
}
func checkBytes(pos int, sl1, sl2 []byte, printDiff bool) (eq bool) {
eq = bytes.Equal(sl1, sl2)
if !eq && printDiff {
writeBytes("<", pos, sl1)
writeBytes(">", pos, sl2)
}
return
}
// CompareBytes compares the bytes referred to by sl1 with those referred to by
// sl2. Nil is returned if the buffers are equal, otherwise an error.
func CompareBytes(sl1, sl2 []byte, printDiff bool) (err error) {
var posStart, posEnd, len1, len2, length int
var diffs bool
len1 = len(sl1)
len2 = len(sl2)
length = len1
if length > len2 {
length = len2
}
for posStart < length-1 {
posEnd = posStart + 16
if posEnd > length {
posEnd = length
}
if !checkBytes(posStart, sl1[posStart:posEnd], sl2[posStart:posEnd], printDiff) {
diffs = true
}
posStart = posEnd
}
if diffs {
err = fmt.Errorf("documents are different")
}
return
}
// ComparePDFs reads and compares the full contents of the two specified
// readers byte-for-byte. Nil is returned if the buffers are equal, otherwise
// an error.
func ComparePDFs(rdr1, rdr2 io.Reader, printDiff bool) (err error) {
var b1, b2 *bytes.Buffer
_, err = b1.ReadFrom(rdr1)
if err == nil {
_, err = b2.ReadFrom(rdr2)
if err == nil {
err = CompareBytes(b1.Bytes(), b2.Bytes(), printDiff)
}
}
return
}
// ComparePDFFiles reads and compares the full contents of the two specified
// files byte-for-byte. Nil is returned if the file contents are equal, or if
// the second file is missing, otherwise an error.
func ComparePDFFiles(file1Str, file2Str string, printDiff bool) (err error) {
var sl1, sl2 []byte
sl1, err = ioutil.ReadFile(file1Str)
if err == nil {
sl2, err = ioutil.ReadFile(file2Str)
if err == nil {
err = CompareBytes(sl1, sl2, printDiff)
} else {
// Second file is missing; treat this as success
err = nil
}
}
return
}

302
contrib/barcode/barcode.go Normal file
View File

@ -0,0 +1,302 @@
// Copyright (c) 2015 Jelmer Snoeck (Gmail: jelmer.snoeck)
//
// Permission to use, copy, modify, and distribute this software for any purpose
// with or without fee is hereby granted, provided that the above copyright notice
// and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// Package barcode provides helper methods for adding barcodes of different
// types to your pdf document. It relies on the github.com/boombuler/barcode
// package for the barcode creation.
package barcode
import (
"bytes"
"errors"
"image/jpeg"
"io"
"strconv"
"sync"
"github.com/boombuler/barcode"
"github.com/boombuler/barcode/aztec"
"github.com/boombuler/barcode/codabar"
"github.com/boombuler/barcode/code128"
"github.com/boombuler/barcode/code39"
"github.com/boombuler/barcode/datamatrix"
"github.com/boombuler/barcode/ean"
"github.com/boombuler/barcode/qr"
"github.com/boombuler/barcode/twooffive"
"github.com/jung-kurt/gofpdf"
"github.com/ruudk/golang-pdf417"
)
// barcodes represents the barcodes that have been registered through this
// package. They will later be used to be scaled and put on the page.
// RubenN: made this a struct with a mutex to prevent race condition
var barcodes struct {
sync.Mutex
cache map[string]barcode.Barcode
}
// barcodePdf is a partial PDF implementation that only implements a subset of
// functions that are required to add the barcode to the PDF.
type barcodePdf interface {
GetConversionRatio() float64
GetImageInfo(imageStr string) *gofpdf.ImageInfoType
Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, linkStr string)
RegisterImageReader(imgName, tp string, r io.Reader) *gofpdf.ImageInfoType
SetError(err error)
}
// printBarcode internally prints the scaled or unscaled barcode to the PDF. Used by both
// Barcode() and BarcodeUnscalable().
func printBarcode(pdf barcodePdf, code string, x, y float64, w, h *float64, flow bool) {
barcodes.Lock()
unscaled, ok := barcodes.cache[code]
barcodes.Unlock()
if !ok {
err := errors.New("Barcode not found")
pdf.SetError(err)
return
}
bname := uniqueBarcodeName(code, x, y)
info := pdf.GetImageInfo(bname)
scaleToWidth := unscaled.Bounds().Dx()
scaleToHeight := unscaled.Bounds().Dy()
if info == nil {
bcode, err := barcode.Scale(
unscaled,
scaleToWidth,
scaleToHeight,
)
if err != nil {
pdf.SetError(err)
return
}
err = registerScaledBarcode(pdf, bname, bcode)
if err != nil {
pdf.SetError(err)
return
}
}
scaleToWidthF := float64(scaleToWidth)
scaleToHeightF := float64(scaleToHeight)
if w != nil {
scaleToWidthF = *w
}
if h != nil {
scaleToHeightF = *h
}
pdf.Image(bname, x, y, scaleToWidthF, scaleToHeightF, flow, "jpg", 0, "")
}
// BarcodeUnscalable puts a registered barcode in the current page.
//
// Its arguments work in the same way as that of Barcode(). However, it allows for an unscaled
// barcode in the width and/or height dimensions. This can be useful if you want to prevent
// side effects of upscaling.
func BarcodeUnscalable(pdf barcodePdf, code string, x, y float64, w, h *float64, flow bool) {
printBarcode(pdf, code, x, y, w, h, flow)
}
// Barcode puts a registered barcode in the current page.
//
// The size should be specified in the units used to create the PDF document.
// If width or height are left unspecfied, the barcode is not scaled in the unspecified dimensions.
//
// Positioning with x, y and flow is inherited from Fpdf.Image().
func Barcode(pdf barcodePdf, code string, x, y, w, h float64, flow bool) {
printBarcode(pdf, code, x, y, &w, &h, flow)
}
// GetUnscaledBarcodeDimensions returns the width and height of the
// unscaled barcode associated with the given code.
func GetUnscaledBarcodeDimensions(pdf barcodePdf, code string) (w, h float64) {
barcodes.Lock()
unscaled, ok := barcodes.cache[code]
barcodes.Unlock()
if !ok {
err := errors.New("Barcode not found")
pdf.SetError(err)
return
}
return convertFrom96Dpi(pdf, float64(unscaled.Bounds().Dx())),
convertFrom96Dpi(pdf, float64(unscaled.Bounds().Dy()))
}
// Register registers a barcode but does not put it on the page. Use Barcode()
// with the same code to put the barcode on the PDF page.
func Register(bcode barcode.Barcode) string {
barcodes.Lock()
if len(barcodes.cache) == 0 {
barcodes.cache = make(map[string]barcode.Barcode)
}
key := barcodeKey(bcode)
barcodes.cache[key] = bcode
barcodes.Unlock()
return key
}
// RegisterAztec registers a barcode of type Aztec to the PDF, but not to
// the page. Use Barcode() with the return value to put the barcode on the page.
// code is the string to be encoded. minECCPercent is the error correction percentage. 33 is the default.
// userSpecifiedLayers can be a value between -4 and 32 inclusive.
func RegisterAztec(pdf barcodePdf, code string, minECCPercent int, userSpecifiedLayers int) string {
bcode, err := aztec.Encode([]byte(code), minECCPercent, userSpecifiedLayers)
return registerBarcode(pdf, bcode, err)
}
// RegisterCodabar registers a barcode of type Codabar to the PDF, but not to
// the page. Use Barcode() with the return value to put the barcode on the page.
func RegisterCodabar(pdf barcodePdf, code string) string {
bcode, err := codabar.Encode(code)
return registerBarcode(pdf, bcode, err)
}
// RegisterCode128 registers a barcode of type Code128 to the PDF, but not to
// the page. Use Barcode() with the return value to put the barcode on the page.
func RegisterCode128(pdf barcodePdf, code string) string {
bcode, err := code128.Encode(code)
return registerBarcode(pdf, bcode, err)
}
// RegisterCode39 registers a barcode of type Code39 to the PDF, but not to
// the page. Use Barcode() with the return value to put the barcode on the page.
//
// includeChecksum and fullASCIIMode are inherited from code39.Encode().
func RegisterCode39(pdf barcodePdf, code string, includeChecksum, fullASCIIMode bool) string {
bcode, err := code39.Encode(code, includeChecksum, fullASCIIMode)
return registerBarcode(pdf, bcode, err)
}
// RegisterDataMatrix registers a barcode of type DataMatrix to the PDF, but not
// to the page. Use Barcode() with the return value to put the barcode on the
// page.
func RegisterDataMatrix(pdf barcodePdf, code string) string {
bcode, err := datamatrix.Encode(code)
return registerBarcode(pdf, bcode, err)
}
// RegisterPdf417 registers a barcode of type Pdf417 to the PDF, but not to the
// page. code is the string to be encoded. columns specifies the number of
// barcode columns; this should be a value between 1 and 30 inclusive.
// securityLevel specifies an error correction level between zero and 8
// inclusive. Barcodes for use with FedEx must set columns to 10 and
// securityLevel to 5. Use Barcode() with the return value to put the barcode
// on the page.
func RegisterPdf417(pdf barcodePdf, code string, columns int, securityLevel int) string {
bcode := pdf417.Encode(code, columns, securityLevel)
return registerBarcode(pdf, bcode, nil)
}
// RegisterEAN registers a barcode of type EAN to the PDF, but not to the page.
// It will automatically detect if the barcode is EAN8 or EAN13. Use Barcode()
// with the return value to put the barcode on the page.
func RegisterEAN(pdf barcodePdf, code string) string {
bcode, err := ean.Encode(code)
return registerBarcode(pdf, bcode, err)
}
// RegisterQR registers a barcode of type QR to the PDF, but not to the page.
// Use Barcode() with the return value to put the barcode on the page.
//
// The ErrorCorrectionLevel and Encoding mode are inherited from qr.Encode().
func RegisterQR(pdf barcodePdf, code string, ecl qr.ErrorCorrectionLevel, mode qr.Encoding) string {
bcode, err := qr.Encode(code, ecl, mode)
return registerBarcode(pdf, bcode, err)
}
// RegisterTwoOfFive registers a barcode of type TwoOfFive to the PDF, but not
// to the page. Use Barcode() with the return value to put the barcode on the
// page.
//
// The interleaved bool is inherited from twooffive.Encode().
func RegisterTwoOfFive(pdf barcodePdf, code string, interleaved bool) string {
bcode, err := twooffive.Encode(code, interleaved)
return registerBarcode(pdf, bcode, err)
}
// registerBarcode registers a barcode internally using the Register() function.
// In case of an error generating the barcode it will not be registered and will
// set an error on the PDF. It will return a unique key for the barcode type and
// content that can be used to put the barcode on the page.
func registerBarcode(pdf barcodePdf, bcode barcode.Barcode, err error) string {
if err != nil {
pdf.SetError(err)
return ""
}
return Register(bcode)
}
// uniqueBarcodeName makes sure every barcode has a unique name for its
// dimensions. Scaling a barcode image results in quality loss, which could be
// a problem for barcode readers.
func uniqueBarcodeName(code string, x, y float64) string {
xStr := strconv.FormatFloat(x, 'E', -1, 64)
yStr := strconv.FormatFloat(y, 'E', -1, 64)
return "barcode-" + code + "-" + xStr + yStr
}
// barcodeKey combines the code type and code value into a unique identifier for
// a barcode type. This is so that we can store several barcodes with the same
// code but different type in the barcodes map.
func barcodeKey(bcode barcode.Barcode) string {
return bcode.Metadata().CodeKind + bcode.Content()
}
// registerScaledBarcode registers a barcode with its exact dimensions to the
// PDF but does not put it on the page. Use Fpdf.Image() with the same code to
// add the barcode to the page.
func registerScaledBarcode(pdf barcodePdf, code string, bcode barcode.Barcode) error {
buf := new(bytes.Buffer)
err := jpeg.Encode(buf, bcode, nil)
if err != nil {
return err
}
reader := bytes.NewReader(buf.Bytes())
pdf.RegisterImageReader(code, "jpg", reader)
return nil
}
// convertTo96DPI converts the given value, which is based on a 72 DPI value
// like the rest of the PDF document, to a 96 DPI value that is required for
// an Image.
//
// Doing this through the Fpdf.Image() function would mean that it uses a 72 DPI
// value and stretches it to a 96 DPI value. This results in quality loss which
// could be problematic for barcode scanners.
func convertTo96Dpi(pdf barcodePdf, value float64) float64 {
return value * pdf.GetConversionRatio() / 72 * 96
}
// convertFrom96Dpi converts the given value, which is based on a 96 DPI value
// required for an Image, to a 72 DPI value like the rest of the PDF document.
func convertFrom96Dpi(pdf barcodePdf, value float64) float64 {
return value / pdf.GetConversionRatio() * 72 / 96
}

View File

@ -0,0 +1,222 @@
package barcode_test
import (
"testing"
"github.com/boombuler/barcode/code128"
"github.com/boombuler/barcode/qr"
"github.com/jung-kurt/gofpdf"
"github.com/jung-kurt/gofpdf/contrib/barcode"
"github.com/jung-kurt/gofpdf/internal/example"
)
func createPdf() (pdf *gofpdf.Fpdf) {
pdf = gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)
pdf.SetFillColor(200, 200, 220)
pdf.AddPage()
return
}
func ExampleRegister() {
pdf := createPdf()
fileStr := example.Filename("contrib_barcode_Register")
bcode, err := code128.Encode("gofpdf")
if err == nil {
key := barcode.Register(bcode)
var width float64 = 100
var height float64 = 10.0
barcode.BarcodeUnscalable(pdf, key, 15, 15, &width, &height, false)
}
err = pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_Register.pdf
}
func ExampleRegisterCodabar() {
pdf := createPdf()
key := barcode.RegisterCode128(pdf, "codabar")
var width float64 = 100
var height float64 = 10
barcode.BarcodeUnscalable(pdf, key, 15, 15, &width, &height, false)
fileStr := example.Filename("contrib_barcode_RegisterCodabar")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterCodabar.pdf
}
func ExampleRegisterAztec() {
pdf := createPdf()
key := barcode.RegisterAztec(pdf, "aztec", 33, 0)
barcode.Barcode(pdf, key, 15, 15, 100, 100, false)
fileStr := example.Filename("contrib_barcode_RegisterAztec")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterAztec.pdf
}
func ExampleRegisterCode128() {
pdf := createPdf()
key := barcode.RegisterCode128(pdf, "code128")
barcode.Barcode(pdf, key, 15, 15, 100, 10, false)
fileStr := example.Filename("contrib_barcode_RegisterCode128")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterCode128.pdf
}
func ExampleRegisterCode39() {
pdf := createPdf()
key := barcode.RegisterCode39(pdf, "CODE39", false, true)
barcode.Barcode(pdf, key, 15, 15, 100, 10, false)
fileStr := example.Filename("contrib_barcode_RegisterCode39")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterCode39.pdf
}
func ExampleRegisterDataMatrix() {
pdf := createPdf()
key := barcode.RegisterDataMatrix(pdf, "datamatrix")
barcode.Barcode(pdf, key, 15, 15, 20, 20, false)
fileStr := example.Filename("contrib_barcode_RegisterDataMatrix")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterDataMatrix.pdf
}
func ExampleRegisterEAN() {
pdf := createPdf()
key := barcode.RegisterEAN(pdf, "96385074")
barcode.Barcode(pdf, key, 15, 15, 100, 10, false)
fileStr := example.Filename("contrib_barcode_RegisterEAN")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterEAN.pdf
}
func ExampleRegisterQR() {
pdf := createPdf()
key := barcode.RegisterQR(pdf, "qrcode", qr.H, qr.Unicode)
barcode.Barcode(pdf, key, 15, 15, 100, 10, false)
fileStr := example.Filename("contrib_barcode_RegisterQR")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterQR.pdf
}
func ExampleRegisterTwoOfFive() {
pdf := createPdf()
key := barcode.RegisterTwoOfFive(pdf, "1234567895", true)
barcode.Barcode(pdf, key, 15, 15, 100, 10, false)
fileStr := example.Filename("contrib_barcode_RegisterTwoOfFive")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterTwoOfFive.pdf
}
func ExampleRegisterPdf417() {
pdf := createPdf()
key := barcode.RegisterPdf417(pdf, "1234567895", 10, 5)
barcode.Barcode(pdf, key, 15, 15, 100, 10, false)
fileStr := example.Filename("contrib_barcode_RegisterPdf417")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_RegisterPdf417.pdf
}
// TestRegisterCode128 ensures that no panic arises when an invalid barcode is registered.
func TestRegisterCode128(t *testing.T) {
pdf := createPdf()
barcode.RegisterCode128(pdf, "Invalid character: é")
}
// TestBarcodeUnscalable shows that the barcode may be scaled or not by providing optional heights and widths.
func TestBarcodeUnscalable(t *testing.T) {
pdf := createPdf()
key := barcode.RegisterCode128(pdf, "code128")
var width float64 = 100
var height float64 = 10
barcode.BarcodeUnscalable(pdf, key, 15, 15, &width, &height, false)
barcode.BarcodeUnscalable(pdf, key, 15, 35, nil, &height, false)
barcode.BarcodeUnscalable(pdf, key, 15, 55, &width, nil, false)
barcode.BarcodeUnscalable(pdf, key, 15, 75, nil, nil, false)
fileStr := example.Filename("contrib_barcode_Barcode")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_Barcode.pdf
}
// TestGetUnscaledBarcodeDimensions shows that the width and height returned by the function match that of the barcode
func TestGetUnscaledBarcodeDimensions(t *testing.T) {
pdf := createPdf()
key := barcode.RegisterQR(pdf, "qrcode", qr.H, qr.Unicode)
barcode.BarcodeUnscalable(pdf, key, 15, 15, nil, nil, false)
w, h := barcode.GetUnscaledBarcodeDimensions(pdf, key)
pdf.SetDrawColor(255, 0, 0)
pdf.Line(15, 15, 15+w, 15+h)
fileStr := example.Filename("contrib_barcode_GetBarcodeDimensions")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_GetBarcodeDimensions.pdf
}
// TestBarcodeNonIntegerScalingFactors shows that the barcode may be scaled to non-integer sizes
func TestBarcodeNonIntegerScalingFactors(t *testing.T) {
pdf := gofpdf.New("L", "in", "A4", "")
pdf.SetFont("Helvetica", "", 12)
pdf.SetFillColor(200, 200, 220)
pdf.AddPage()
key := barcode.RegisterQR(pdf, "qrcode", qr.H, qr.Unicode)
var scale float64 = 1.5
barcode.BarcodeUnscalable(pdf, key, 0.5, 0.5, &scale, &scale, false)
pdf.SetDrawColor(255, 0, 0)
pdf.Line(0.5, 0.5, 0.5+scale, 0.5+scale)
fileStr := example.Filename("contrib_barcode_BarcodeScaling")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_barcode_BarcodeScaling.pdf
}

View File

@ -0,0 +1,68 @@
package main
// This command demonstrates the use of ghotscript to reduce the size
// of generated PDFs. This is based on a comment made by farkerhaiku:
// https://github.com/jung-kurt/gofpdf/issues/57#issuecomment-185843315
import (
"fmt"
"os"
"os/exec"
"github.com/jung-kurt/gofpdf"
)
func report(fileStr string, err error) {
if err == nil {
var info os.FileInfo
info, err = os.Stat(fileStr)
if err == nil {
fmt.Printf("%s: OK, size %d\n", fileStr, info.Size())
} else {
fmt.Printf("%s: bad stat\n", fileStr)
}
} else {
fmt.Printf("%s: %s\n", fileStr, err)
}
}
func newPdf() (pdf *gofpdf.Fpdf) {
pdf = gofpdf.New("P", "mm", "A4", "../../font")
pdf.SetCompression(false)
pdf.AddFont("Calligrapher", "", "calligra.json")
pdf.AddPage()
pdf.SetFont("Calligrapher", "", 35)
pdf.Cell(0, 10, "Enjoy new fonts with FPDF!")
return
}
func full(name string) {
report(name, newPdf().OutputFileAndClose(name))
}
func min(name string) {
cmd := exec.Command("gs", "-sDEVICE=pdfwrite",
"-dCompatibilityLevel=1.4",
"-dPDFSETTINGS=/screen", "-dNOPAUSE", "-dQUIET",
"-dBATCH", "-sOutputFile="+name, "-")
inPipe, err := cmd.StdinPipe()
if err == nil {
errChan := make(chan error, 1)
go func() {
errChan <- cmd.Start()
}()
err = newPdf().Output(inPipe)
if err == nil {
report(name, <-errChan)
} else {
report(name, err)
}
} else {
report(name, err)
}
}
func main() {
full("full.pdf")
min("min.pdf")
}

143
contrib/gofpdi/gofpdi.go Normal file
View File

@ -0,0 +1,143 @@
/*
Package gofpdi wraps the gofpdi PDF library to import existing PDFs as templates. See github.com/phpdave11/gofpdi
for further information and examples.
Users should call NewImporter() to obtain their own Importer instance to work with.
To retain backwards compatibility, the package offers a default Importer that may be used via global functions. Note
however that use of the default Importer is not thread safe.
*/
package gofpdi
import (
realgofpdi "github.com/phpdave11/gofpdi"
"io"
)
// gofpdiPdf is a partial interface that only implements the functions we need
// from the PDF generator to put the imported PDF templates on the PDF.
type gofpdiPdf interface {
ImportObjects(objs map[string][]byte)
ImportObjPos(objs map[string]map[int]string)
ImportTemplates(tpls map[string]string)
UseImportedTemplate(tplName string, x float64, y float64, w float64, h float64)
SetError(err error)
}
// Importer wraps an Importer from the gofpdi library.
type Importer struct {
fpdi *realgofpdi.Importer
}
// NewImporter creates a new Importer wrapping functionality from the gofpdi library.
func NewImporter() *Importer {
return &Importer{
fpdi: realgofpdi.NewImporter(),
}
}
// ImportPage imports a page of a PDF file with the specified box (/MediaBox,
// /TrimBox, /ArtBox, /CropBox, or /BleedBox). Returns a template id that can
// be used with UseImportedTemplate to draw the template onto the page.
func (i *Importer) ImportPage(f gofpdiPdf, sourceFile string, pageno int, box string) int {
// Set source file for fpdi
i.fpdi.SetSourceFile(sourceFile)
// return template id
return i.getTemplateID(f, pageno, box)
}
// ImportPageFromStream imports a page of a PDF with the specified box
// (/MediaBox, TrimBox, /ArtBox, /CropBox, or /BleedBox). Returns a template id
// that can be used with UseImportedTemplate to draw the template onto the
// page.
func (i *Importer) ImportPageFromStream(f gofpdiPdf, rs *io.ReadSeeker, pageno int, box string) int {
// Set source stream for fpdi
i.fpdi.SetSourceStream(rs)
// return template id
return i.getTemplateID(f, pageno, box)
}
func (i *Importer) getTemplateID(f gofpdiPdf, pageno int, box string) int {
// Import page
tpl := i.fpdi.ImportPage(pageno, box)
// Import objects into current pdf document
// Unordered means that the objects will be returned with a sha1 hash instead of an integer
// The objects themselves may have references to other hashes which will be replaced in ImportObjects()
tplObjIDs := i.fpdi.PutFormXobjectsUnordered()
// Set template names and ids (hashes) in gofpdf
f.ImportTemplates(tplObjIDs)
// Get a map[string]string of the imported objects.
// The map keys will be the ID of each object.
imported := i.fpdi.GetImportedObjectsUnordered()
// Import gofpdi objects into gofpdf
f.ImportObjects(imported)
// Get a map[string]map[int]string of the object hashes and their positions within each object,
// to be replaced with object ids (integers).
importedObjPos := i.fpdi.GetImportedObjHashPos()
// Import gofpdi object hashes and their positions into gopdf
f.ImportObjPos(importedObjPos)
return tpl
}
// UseImportedTemplate draws the template onto the page at x,y. If w is 0, the
// template will be scaled to fit based on h. If h is 0, the template will be
// scaled to fit based on w.
func (i *Importer) UseImportedTemplate(f gofpdiPdf, tplid int, x float64, y float64, w float64, h float64) {
// Get values from fpdi
tplName, scaleX, scaleY, tX, tY := i.fpdi.UseTemplate(tplid, x, y, w, h)
f.UseImportedTemplate(tplName, scaleX, scaleY, tX, tY)
}
// GetPageSizes returns page dimensions for all pages of the imported pdf.
// Result consists of map[<page number>]map[<box>]map[<dimension>]<value>.
// <page number>: page number, note that page numbers start at 1
// <box>: box identifier, e.g. "/MediaBox"
// <dimension>: dimension string, either "w" or "h"
func (i *Importer) GetPageSizes() map[int]map[string]map[string]float64 {
return i.fpdi.GetPageSizes()
}
// Default Importer used by global functions
var fpdi = NewImporter()
// ImportPage imports a page of a PDF file with the specified box (/MediaBox,
// /TrimBox, /ArtBox, /CropBox, or /BleedBox). Returns a template id that can
// be used with UseImportedTemplate to draw the template onto the page.
// Note: This uses the default Importer. Call NewImporter() to obtain a custom Importer.
func ImportPage(f gofpdiPdf, sourceFile string, pageno int, box string) int {
return fpdi.ImportPage(f, sourceFile, pageno, box)
}
// ImportPageFromStream imports a page of a PDF with the specified box
// (/MediaBox, TrimBox, /ArtBox, /CropBox, or /BleedBox). Returns a template id
// that can be used with UseImportedTemplate to draw the template onto the
// page.
// Note: This uses the default Importer. Call NewImporter() to obtain a custom Importer.
func ImportPageFromStream(f gofpdiPdf, rs *io.ReadSeeker, pageno int, box string) int {
return fpdi.ImportPageFromStream(f, rs, pageno, box)
}
// UseImportedTemplate draws the template onto the page at x,y. If w is 0, the
// template will be scaled to fit based on h. If h is 0, the template will be
// scaled to fit based on w.
// Note: This uses the default Importer. Call NewImporter() to obtain a custom Importer.
func UseImportedTemplate(f gofpdiPdf, tplid int, x float64, y float64, w float64, h float64) {
fpdi.UseImportedTemplate(f, tplid, x, y, w, h)
}
// GetPageSizes returns page dimensions for all pages of the imported pdf.
// Result consists of map[<page number>]map[<box>]map[<dimension>]<value>.
// <page number>: page number, note that page numbers start at 1
// <box>: box identifier, e.g. "/MediaBox"
// <dimension>: dimension string, either "w" or "h"
// Note: This uses the default Importer. Call NewImporter() to obtain a custom Importer.
func GetPageSizes() map[int]map[string]map[string]float64 {
return fpdi.GetPageSizes()
}

View File

@ -0,0 +1,76 @@
package gofpdi
import (
"bytes"
"github.com/jung-kurt/gofpdf"
"github.com/jung-kurt/gofpdf/internal/example"
"io"
"sync"
"testing"
)
func ExampleNewImporter() {
// create new pdf
pdf := gofpdf.New("P", "pt", "A4", "")
// for testing purposes, get an arbitrary template pdf as stream
rs, _ := getTemplatePdf()
// create a new Importer instance
imp := NewImporter()
// import first page and determine page sizes
tpl := imp.ImportPageFromStream(pdf, &rs, 1, "/MediaBox")
pageSizes := imp.GetPageSizes()
nrPages := len(imp.GetPageSizes())
// add all pages from template pdf
for i := 1; i <= nrPages; i++ {
pdf.AddPage()
if i > 1 {
tpl = imp.ImportPageFromStream(pdf, &rs, i, "/MediaBox")
}
imp.UseImportedTemplate(pdf, tpl, 0, 0, pageSizes[i]["/MediaBox"]["w"], pageSizes[i]["/MediaBox"]["h"])
}
// output
fileStr := example.Filename("contrib_gofpdi_Importer")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_gofpdi_Importer.pdf
}
func TestGofpdiConcurrent(t *testing.T) {
wg := sync.WaitGroup{}
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
defer wg.Done()
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddPage()
rs, _ := getTemplatePdf()
imp := NewImporter()
tpl := imp.ImportPageFromStream(pdf, &rs, 1, "/MediaBox")
imp.UseImportedTemplate(pdf, tpl, 0, 0, 210.0, 297.0)
// write to bytes buffer
buf := bytes.Buffer{}
if err := pdf.Output(&buf); err != nil {
t.Fail()
}
}()
}
wg.Wait()
}
func getTemplatePdf() (io.ReadSeeker, error) {
tpdf := gofpdf.New("P", "pt", "A4", "")
tpdf.AddPage()
tpdf.SetFont("Arial", "", 12)
tpdf.Text(20, 20, "Example Page 1")
tpdf.AddPage()
tpdf.Text(20, 20, "Example Page 2")
tbuf := bytes.Buffer{}
err := tpdf.Output(&tbuf)
return bytes.NewReader(tbuf.Bytes()), err
}

View File

@ -0,0 +1,43 @@
package httpimg
import (
"io"
"net/http"
"github.com/jung-kurt/gofpdf"
)
// httpimgPdf is a partial interface that only implements the functions we need
// from the PDF generator to put the HTTP images on the PDF.
type httpimgPdf interface {
GetImageInfo(imageStr string) *gofpdf.ImageInfoType
ImageTypeFromMime(mimeStr string) string
RegisterImageReader(imgName, tp string, r io.Reader) *gofpdf.ImageInfoType
SetError(err error)
}
// Register registers a HTTP image. Downloading the image from the provided URL
// and adding it to the PDF but not adding it to the page. Use Image() with the
// same URL to add the image to the page.
func Register(f httpimgPdf, urlStr, tp string) (info *gofpdf.ImageInfoType) {
info = f.GetImageInfo(urlStr)
if info != nil {
return
}
resp, err := http.Get(urlStr)
if err != nil {
f.SetError(err)
return
}
defer resp.Body.Close()
if tp == "" {
tp = f.ImageTypeFromMime(resp.Header["Content-Type"][0])
}
return f.RegisterImageReader(urlStr, tp, resp.Body)
}

View File

@ -0,0 +1,23 @@
package httpimg_test
import (
"github.com/jung-kurt/gofpdf"
"github.com/jung-kurt/gofpdf/contrib/httpimg"
"github.com/jung-kurt/gofpdf/internal/example"
)
func ExampleRegister() {
pdf := gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)
pdf.SetFillColor(200, 200, 220)
pdf.AddPage()
url := "https://github.com/jung-kurt/gofpdf/raw/master/image/logo_gofpdf.jpg?raw=true"
httpimg.Register(pdf, url, "")
pdf.Image(url, 15, 15, 267, 0, false, "", 0, "")
fileStr := example.Filename("contrib_httpimg_Register")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/contrib_httpimg_Register.pdf
}

83
contrib/tiff/tiff.go Normal file
View File

@ -0,0 +1,83 @@
/*
* Copyright (c) 2016 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// Package tiff allows standard (LZW-compressed) TIFF images to be used in
// documents generated with gofpdf.
package tiff
import (
"bytes"
"fmt"
"image"
"image/png"
"io"
"os"
"github.com/jung-kurt/gofpdf"
"golang.org/x/image/tiff"
)
// RegisterReader registers a TIFF image, adding it to the PDF file but not
// adding it to the page. imgName specifies the name that will be used in the
// call to Image() that actually places the image in the document. options
// specifies various image properties; in this case, the ImageType property
// should be set to "tiff". The TIFF image is a reader from the reader
// specified by r.
func RegisterReader(fpdf *gofpdf.Fpdf, imgName string, options gofpdf.ImageOptions, r io.Reader) (info *gofpdf.ImageInfoType) {
var err error
var img image.Image
var buf bytes.Buffer
if fpdf.Ok() {
if options.ImageType == "tiff" || options.ImageType == "tif" {
img, err = tiff.Decode(r)
if err == nil {
err = png.Encode(&buf, img)
if err == nil {
options.ImageType = "png"
info = fpdf.RegisterImageOptionsReader(imgName, options, &buf)
}
}
} else {
err = fmt.Errorf("expecting \"tiff\" or \"tif\" as image type, got \"%s\"", options.ImageType)
}
if err != nil {
fpdf.SetError(err)
}
}
return
}
// RegisterFile registers a TIFF image, adding it to the PDF file but not
// adding it to the page. imgName specifies the name that will be used in the
// call to Image() that actually places the image in the document. options
// specifies various image properties; in this case, the ImageType property
// should be set to "tiff". The TIFF image is read from the file specified by
// tiffFileStr.
func RegisterFile(fpdf *gofpdf.Fpdf, imgName string, options gofpdf.ImageOptions, tiffFileStr string) (info *gofpdf.ImageInfoType) {
var f *os.File
var err error
if fpdf.Ok() {
f, err = os.Open(tiffFileStr)
if err == nil {
info = RegisterReader(fpdf, imgName, options, f)
f.Close()
} else {
fpdf.SetError(err)
}
}
return
}

23
contrib/tiff/tiff_test.go Normal file
View File

@ -0,0 +1,23 @@
package tiff_test
import (
"github.com/jung-kurt/gofpdf"
"github.com/jung-kurt/gofpdf/contrib/tiff"
"github.com/jung-kurt/gofpdf/internal/example"
)
// ExampleRegisterFile demonstrates the loading and display of a TIFF image.
func ExampleRegisterFile() {
pdf := gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)
pdf.SetFillColor(200, 200, 220)
pdf.AddPageFormat("L", gofpdf.SizeType{Wd: 200, Ht: 200})
opt := gofpdf.ImageOptions{ImageType: "tiff", ReadDpi: false}
_ = tiff.RegisterFile(pdf, "sample", opt, "../../image/golang-gopher.tiff")
pdf.Image("sample", 0, 0, 200, 200, false, "", 0, "")
fileStr := example.Filename("Fpdf_Contrib_Tiff")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
// Output:
// Successfully generated ../../pdf/Fpdf_Contrib_Tiff.pdf
}

738
def.go Normal file
View File

@ -0,0 +1,738 @@
/*
* Copyright (c) 2013-2014 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package gofpdf
import (
"bytes"
"crypto/sha1"
"encoding/gob"
"encoding/json"
"fmt"
"io"
"time"
)
// Version of FPDF from which this package is derived
const (
cnFpdfVersion = "1.7"
)
type blendModeType struct {
strokeStr, fillStr, modeStr string
objNum int
}
type gradientType struct {
tp int // 2: linear, 3: radial
clr1Str, clr2Str string
x1, y1, x2, y2, r float64
objNum int
}
const (
// OrientationPortrait represents the portrait orientation.
OrientationPortrait = "portrait"
// OrientationLandscape represents the landscape orientation.
OrientationLandscape = "landscape"
)
const (
// UnitPoint represents the size unit point
UnitPoint = "pt"
// UnitMillimeter represents the size unit millimeter
UnitMillimeter = "mm"
// UnitCentimeter represents the size unit centimeter
UnitCentimeter = "cm"
// UnitInch represents the size unit inch
UnitInch = "inch"
)
const (
// PageSizeA3 represents DIN/ISO A3 page size
PageSizeA3 = "A3"
// PageSizeA4 represents DIN/ISO A4 page size
PageSizeA4 = "A4"
// PageSizeA5 represents DIN/ISO A5 page size
PageSizeA5 = "A5"
// PageSizeLetter represents US Letter page size
PageSizeLetter = "Letter"
// PageSizeLegal represents US Legal page size
PageSizeLegal = "Legal"
)
const (
// BorderNone set no border
BorderNone = ""
// BorderFull sets a full border
BorderFull = "1"
// BorderLeft sets the border on the left side
BorderLeft = "L"
// BorderTop sets the border at the top
BorderTop = "T"
// BorderRight sets the border on the right side
BorderRight = "R"
// BorderBottom sets the border on the bottom
BorderBottom = "B"
)
const (
// LineBreakNone disables linebreak
LineBreakNone = 0
// LineBreakNormal enables normal linebreak
LineBreakNormal = 1
// LineBreakBelow enables linebreak below
LineBreakBelow = 2
)
const (
// AlignLeft left aligns the cell
AlignLeft = "L"
// AlignRight right aligns the cell
AlignRight = "R"
// AlignCenter centers the cell
AlignCenter = "C"
// AlignTop aligns the cell to the top
AlignTop = "T"
// AlignBottom aligns the cell to the bottom
AlignBottom = "B"
// AlignMiddle aligns the cell to the middle
AlignMiddle = "M"
// AlignBaseline aligns the cell to the baseline
AlignBaseline = "B"
)
type colorMode int
const (
colorModeRGB colorMode = iota
colorModeSpot
colorModeCMYK
)
type colorType struct {
r, g, b float64
ir, ig, ib int
mode colorMode
spotStr string // name of current spot color
gray bool
str string
}
// SpotColorType specifies a named spot color value
type spotColorType struct {
id, objID int
val cmykColorType
}
// CMYKColorType specifies an ink-based CMYK color value
type cmykColorType struct {
c, m, y, k byte // 0% to 100%
}
// SizeType fields Wd and Ht specify the horizontal and vertical extents of a
// document element such as a page.
type SizeType struct {
Wd, Ht float64
}
// PointType fields X and Y specify the horizontal and vertical coordinates of
// a point, typically used in drawing.
type PointType struct {
X, Y float64
}
// XY returns the X and Y components of the receiver point.
func (p PointType) XY() (float64, float64) {
return p.X, p.Y
}
// ImageInfoType contains size, color and other information about an image.
// Changes to this structure should be reflected in its GobEncode and GobDecode
// methods.
type ImageInfoType struct {
data []byte // Raw image data
smask []byte // Soft Mask, an 8bit per-pixel transparency mask
n int // Image object number
w float64 // Width
h float64 // Height
cs string // Color space
pal []byte // Image color palette
bpc int // Bits Per Component
f string // Image filter
dp string // DecodeParms
trns []int // Transparency mask
scale float64 // Document scale factor
dpi float64 // Dots-per-inch found from image file (png only)
i string // SHA-1 checksum of the above values.
}
func generateImageID(info *ImageInfoType) (string, error) {
b, err := info.GobEncode()
return fmt.Sprintf("%x", sha1.Sum(b)), err
}
// GobEncode encodes the receiving image to a byte slice.
func (info *ImageInfoType) GobEncode() (buf []byte, err error) {
fields := []interface{}{info.data, info.smask, info.n, info.w, info.h, info.cs,
info.pal, info.bpc, info.f, info.dp, info.trns, info.scale, info.dpi}
w := new(bytes.Buffer)
encoder := gob.NewEncoder(w)
for j := 0; j < len(fields) && err == nil; j++ {
err = encoder.Encode(fields[j])
}
if err == nil {
buf = w.Bytes()
}
return
}
// GobDecode decodes the specified byte buffer (generated by GobEncode) into
// the receiving image.
func (info *ImageInfoType) GobDecode(buf []byte) (err error) {
fields := []interface{}{&info.data, &info.smask, &info.n, &info.w, &info.h,
&info.cs, &info.pal, &info.bpc, &info.f, &info.dp, &info.trns, &info.scale, &info.dpi}
r := bytes.NewBuffer(buf)
decoder := gob.NewDecoder(r)
for j := 0; j < len(fields) && err == nil; j++ {
err = decoder.Decode(fields[j])
}
info.i, err = generateImageID(info)
return
}
// PointConvert returns the value of pt, expressed in points (1/72 inch), as a
// value expressed in the unit of measure specified in New(). Since font
// management in Fpdf uses points, this method can help with line height
// calculations and other methods that require user units.
func (f *Fpdf) PointConvert(pt float64) (u float64) {
return pt / f.k
}
// PointToUnitConvert is an alias for PointConvert.
func (f *Fpdf) PointToUnitConvert(pt float64) (u float64) {
return pt / f.k
}
// UnitToPointConvert returns the value of u, expressed in the unit of measure
// specified in New(), as a value expressed in points (1/72 inch). Since font
// management in Fpdf uses points, this method can help with setting font sizes
// based on the sizes of other non-font page elements.
func (f *Fpdf) UnitToPointConvert(u float64) (pt float64) {
return u * f.k
}
// Extent returns the width and height of the image in the units of the Fpdf
// object.
func (info *ImageInfoType) Extent() (wd, ht float64) {
return info.Width(), info.Height()
}
// Width returns the width of the image in the units of the Fpdf object.
func (info *ImageInfoType) Width() float64 {
return info.w / (info.scale * info.dpi / 72)
}
// Height returns the height of the image in the units of the Fpdf object.
func (info *ImageInfoType) Height() float64 {
return info.h / (info.scale * info.dpi / 72)
}
// SetDpi sets the dots per inch for an image. PNG images MAY have their dpi
// set automatically, if the image specifies it. DPI information is not
// currently available automatically for JPG and GIF images, so if it's
// important to you, you can set it here. It defaults to 72 dpi.
func (info *ImageInfoType) SetDpi(dpi float64) {
info.dpi = dpi
}
type fontFileType struct {
length1, length2 int64
n int
embedded bool
content []byte
fontType string
}
type linkType struct {
x, y, wd, ht float64
link int // Auto-generated internal link ID or...
linkStr string // ...application-provided external link string
}
type intLinkType struct {
page int
y float64
}
// outlineType is used for a sidebar outline of bookmarks
type outlineType struct {
text string
level, parent, first, last, next, prev int
y float64
p int
}
// InitType is used with NewCustom() to customize an Fpdf instance.
// OrientationStr, UnitStr, SizeStr and FontDirStr correspond to the arguments
// accepted by New(). If the Wd and Ht fields of Size are each greater than
// zero, Size will be used to set the default page size rather than SizeStr. Wd
// and Ht are specified in the units of measure indicated by UnitStr.
type InitType struct {
OrientationStr string
UnitStr string
SizeStr string
Size SizeType
FontDirStr string
}
// FontLoader is used to read fonts (JSON font specification and zlib compressed font binaries)
// from arbitrary locations (e.g. files, zip files, embedded font resources).
//
// Open provides an io.Reader for the specified font file (.json or .z). The file name
// never includes a path. Open returns an error if the specified file cannot be opened.
type FontLoader interface {
Open(name string) (io.Reader, error)
}
// Pdf defines the interface used for various methods. It is implemented by the
// main FPDF instance as well as templates.
type Pdf interface {
AddFont(familyStr, styleStr, fileStr string)
AddFontFromBytes(familyStr, styleStr string, jsonFileBytes, zFileBytes []byte)
AddFontFromReader(familyStr, styleStr string, r io.Reader)
AddLayer(name string, visible bool) (layerID int)
AddLink() int
AddPage()
AddPageFormat(orientationStr string, size SizeType)
AddSpotColor(nameStr string, c, m, y, k byte)
AliasNbPages(aliasStr string)
ArcTo(x, y, rx, ry, degRotate, degStart, degEnd float64)
Arc(x, y, rx, ry, degRotate, degStart, degEnd float64, styleStr string)
BeginLayer(id int)
Beziergon(points []PointType, styleStr string)
Bookmark(txtStr string, level int, y float64)
CellFormat(w, h float64, txtStr, borderStr string, ln int, alignStr string, fill bool, link int, linkStr string)
Cellf(w, h float64, fmtStr string, args ...interface{})
Cell(w, h float64, txtStr string)
Circle(x, y, r float64, styleStr string)
ClearError()
ClipCircle(x, y, r float64, outline bool)
ClipEllipse(x, y, rx, ry float64, outline bool)
ClipEnd()
ClipPolygon(points []PointType, outline bool)
ClipRect(x, y, w, h float64, outline bool)
ClipRoundedRect(x, y, w, h, r float64, outline bool)
ClipText(x, y float64, txtStr string, outline bool)
Close()
ClosePath()
CreateTemplateCustom(corner PointType, size SizeType, fn func(*Tpl)) Template
CreateTemplate(fn func(*Tpl)) Template
CurveBezierCubicTo(cx0, cy0, cx1, cy1, x, y float64)
CurveBezierCubic(x0, y0, cx0, cy0, cx1, cy1, x1, y1 float64, styleStr string)
CurveCubic(x0, y0, cx0, cy0, x1, y1, cx1, cy1 float64, styleStr string)
CurveTo(cx, cy, x, y float64)
Curve(x0, y0, cx, cy, x1, y1 float64, styleStr string)
DrawPath(styleStr string)
Ellipse(x, y, rx, ry, degRotate float64, styleStr string)
EndLayer()
Err() bool
Error() error
GetAlpha() (alpha float64, blendModeStr string)
GetAutoPageBreak() (auto bool, margin float64)
GetCellMargin() float64
GetConversionRatio() float64
GetDrawColor() (int, int, int)
GetDrawSpotColor() (name string, c, m, y, k byte)
GetFillColor() (int, int, int)
GetFillSpotColor() (name string, c, m, y, k byte)
GetFontDesc(familyStr, styleStr string) FontDescType
GetFontSize() (ptSize, unitSize float64)
GetImageInfo(imageStr string) (info *ImageInfoType)
GetLineWidth() float64
GetMargins() (left, top, right, bottom float64)
GetPageSizeStr(sizeStr string) (size SizeType)
GetPageSize() (width, height float64)
GetStringWidth(s string) float64
GetTextColor() (int, int, int)
GetTextSpotColor() (name string, c, m, y, k byte)
GetX() float64
GetXY() (float64, float64)
GetY() float64
HTMLBasicNew() (html HTMLBasicType)
Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, linkStr string)
ImageOptions(imageNameStr string, x, y, w, h float64, flow bool, options ImageOptions, link int, linkStr string)
ImageTypeFromMime(mimeStr string) (tp string)
LinearGradient(x, y, w, h float64, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2 float64)
LineTo(x, y float64)
Line(x1, y1, x2, y2 float64)
LinkString(x, y, w, h float64, linkStr string)
Link(x, y, w, h float64, link int)
Ln(h float64)
MoveTo(x, y float64)
MultiCell(w, h float64, txtStr, borderStr, alignStr string, fill bool)
Ok() bool
OpenLayerPane()
OutputAndClose(w io.WriteCloser) error
OutputFileAndClose(fileStr string) error
Output(w io.Writer) error
PageCount() int
PageNo() int
PageSize(pageNum int) (wd, ht float64, unitStr string)
PointConvert(pt float64) (u float64)
PointToUnitConvert(pt float64) (u float64)
Polygon(points []PointType, styleStr string)
RadialGradient(x, y, w, h float64, r1, g1, b1, r2, g2, b2 int, x1, y1, x2, y2, r float64)
RawWriteBuf(r io.Reader)
RawWriteStr(str string)
Rect(x, y, w, h float64, styleStr string)
RegisterAlias(alias, replacement string)
RegisterImage(fileStr, tp string) (info *ImageInfoType)
RegisterImageOptions(fileStr string, options ImageOptions) (info *ImageInfoType)
RegisterImageOptionsReader(imgName string, options ImageOptions, r io.Reader) (info *ImageInfoType)
RegisterImageReader(imgName, tp string, r io.Reader) (info *ImageInfoType)
SetAcceptPageBreakFunc(fnc func() bool)
SetAlpha(alpha float64, blendModeStr string)
SetAuthor(authorStr string, isUTF8 bool)
SetAutoPageBreak(auto bool, margin float64)
SetCatalogSort(flag bool)
SetCellMargin(margin float64)
SetCompression(compress bool)
SetCreationDate(tm time.Time)
SetCreator(creatorStr string, isUTF8 bool)
SetDashPattern(dashArray []float64, dashPhase float64)
SetDisplayMode(zoomStr, layoutStr string)
SetDrawColor(r, g, b int)
SetDrawSpotColor(nameStr string, tint byte)
SetError(err error)
SetErrorf(fmtStr string, args ...interface{})
SetFillColor(r, g, b int)
SetFillSpotColor(nameStr string, tint byte)
SetFont(familyStr, styleStr string, size float64)
SetFontLoader(loader FontLoader)
SetFontLocation(fontDirStr string)
SetFontSize(size float64)
SetFontStyle(styleStr string)
SetFontUnitSize(size float64)
SetFooterFunc(fnc func())
SetFooterFuncLpi(fnc func(lastPage bool))
SetHeaderFunc(fnc func())
SetHeaderFuncMode(fnc func(), homeMode bool)
SetHomeXY()
SetJavascript(script string)
SetKeywords(keywordsStr string, isUTF8 bool)
SetLeftMargin(margin float64)
SetLineCapStyle(styleStr string)
SetLineJoinStyle(styleStr string)
SetLineWidth(width float64)
SetLink(link int, y float64, page int)
SetMargins(left, top, right float64)
SetPageBoxRec(t string, pb PageBox)
SetPageBox(t string, x, y, wd, ht float64)
SetPage(pageNum int)
SetProtection(actionFlag byte, userPassStr, ownerPassStr string)
SetRightMargin(margin float64)
SetSubject(subjectStr string, isUTF8 bool)
SetTextColor(r, g, b int)
SetTextSpotColor(nameStr string, tint byte)
SetTitle(titleStr string, isUTF8 bool)
SetTopMargin(margin float64)
SetUnderlineThickness(thickness float64)
SetXmpMetadata(xmpStream []byte)
SetX(x float64)
SetXY(x, y float64)
SetY(y float64)
SplitLines(txt []byte, w float64) [][]byte
String() string
SVGBasicWrite(sb *SVGBasicType, scale float64)
Text(x, y float64, txtStr string)
TransformBegin()
TransformEnd()
TransformMirrorHorizontal(x float64)
TransformMirrorLine(angle, x, y float64)
TransformMirrorPoint(x, y float64)
TransformMirrorVertical(y float64)
TransformRotate(angle, x, y float64)
TransformScale(scaleWd, scaleHt, x, y float64)
TransformScaleX(scaleWd, x, y float64)
TransformScaleXY(s, x, y float64)
TransformScaleY(scaleHt, x, y float64)
TransformSkew(angleX, angleY, x, y float64)
TransformSkewX(angleX, x, y float64)
TransformSkewY(angleY, x, y float64)
Transform(tm TransformMatrix)
TransformTranslate(tx, ty float64)
TransformTranslateX(tx float64)
TransformTranslateY(ty float64)
UnicodeTranslatorFromDescriptor(cpStr string) (rep func(string) string)
UnitToPointConvert(u float64) (pt float64)
UseTemplateScaled(t Template, corner PointType, size SizeType)
UseTemplate(t Template)
WriteAligned(width, lineHeight float64, textStr, alignStr string)
Writef(h float64, fmtStr string, args ...interface{})
Write(h float64, txtStr string)
WriteLinkID(h float64, displayStr string, linkID int)
WriteLinkString(h float64, displayStr, targetStr string)
}
// PageBox defines the coordinates and extent of the various page box types
type PageBox struct {
SizeType
PointType
}
// Fpdf is the principal structure for creating a single PDF document
type Fpdf struct {
isCurrentUTF8 bool // is current font used in utf-8 mode
isRTL bool // is is right to left mode enabled
page int // current page number
n int // current object number
offsets []int // array of object offsets
templates map[string]Template // templates used in this document
templateObjects map[string]int // template object IDs within this document
importedObjs map[string][]byte // imported template objects (gofpdi)
importedObjPos map[string]map[int]string // imported template objects hashes and their positions (gofpdi)
importedTplObjs map[string]string // imported template names and IDs (hashed) (gofpdi)
importedTplIDs map[string]int // imported template ids hash to object id int (gofpdi)
buffer fmtBuffer // buffer holding in-memory PDF
pages []*bytes.Buffer // slice[page] of page content; 1-based
state int // current document state
compress bool // compression flag
k float64 // scale factor (number of points in user unit)
defOrientation string // default orientation
curOrientation string // current orientation
stdPageSizes map[string]SizeType // standard page sizes
defPageSize SizeType // default page size
defPageBoxes map[string]PageBox // default page size
curPageSize SizeType // current page size
pageSizes map[int]SizeType // used for pages with non default sizes or orientations
pageBoxes map[int]map[string]PageBox // used to define the crop, trim, bleed and art boxes
unitStr string // unit of measure for all rendered objects except fonts
wPt, hPt float64 // dimensions of current page in points
w, h float64 // dimensions of current page in user unit
lMargin float64 // left margin
tMargin float64 // top margin
rMargin float64 // right margin
bMargin float64 // page break margin
cMargin float64 // cell margin
x, y float64 // current position in user unit
lasth float64 // height of last printed cell
lineWidth float64 // line width in user unit
fontpath string // path containing fonts
fontLoader FontLoader // used to load font files from arbitrary locations
coreFonts map[string]bool // array of core font names
fonts map[string]fontDefType // array of used fonts
fontFiles map[string]fontFileType // array of font files
diffs []string // array of encoding differences
fontFamily string // current font family
fontStyle string // current font style
underline bool // underlining flag
strikeout bool // strike out flag
currentFont fontDefType // current font info
fontSizePt float64 // current font size in points
fontSize float64 // current font size in user unit
ws float64 // word spacing
images map[string]*ImageInfoType // array of used images
aliasMap map[string]string // map of alias->replacement
pageLinks [][]linkType // pageLinks[page][link], both 1-based
links []intLinkType // array of internal links
attachments []Attachment // slice of content to embed globally
pageAttachments [][]annotationAttach // 1-based array of annotation for file attachments (per page)
outlines []outlineType // array of outlines
outlineRoot int // root of outlines
autoPageBreak bool // automatic page breaking
acceptPageBreak func() bool // returns true to accept page break
pageBreakTrigger float64 // threshold used to trigger page breaks
inHeader bool // flag set when processing header
headerFnc func() // function provided by app and called to write header
headerHomeMode bool // set position to home after headerFnc is called
inFooter bool // flag set when processing footer
footerFnc func() // function provided by app and called to write footer
footerFncLpi func(bool) // function provided by app and called to write footer with last page flag
zoomMode string // zoom display mode
layoutMode string // layout display mode
xmp []byte // XMP metadata
producer string // producer
title string // title
subject string // subject
author string // author
keywords string // keywords
creator string // creator
creationDate time.Time // override for document CreationDate value
modDate time.Time // override for document ModDate value
aliasNbPagesStr string // alias for total number of pages
pdfVersion string // PDF version number
fontDirStr string // location of font definition files
capStyle int // line cap style: butt 0, round 1, square 2
joinStyle int // line segment join style: miter 0, round 1, bevel 2
dashArray []float64 // dash array
dashPhase float64 // dash phase
blendList []blendModeType // slice[idx] of alpha transparency modes, 1-based
blendMap map[string]int // map into blendList
blendMode string // current blend mode
alpha float64 // current transpacency
gradientList []gradientType // slice[idx] of gradient records
clipNest int // Number of active clipping contexts
transformNest int // Number of active transformation contexts
err error // Set if error occurs during life cycle of instance
protect protectType // document protection structure
layer layerRecType // manages optional layers in document
catalogSort bool // sort resource catalogs in document
nJs int // JavaScript object number
javascript *string // JavaScript code to include in the PDF
colorFlag bool // indicates whether fill and text colors are different
color struct {
// Composite values of colors
draw, fill, text colorType
}
spotColorMap map[string]spotColorType // Map of named ink-based colors
userUnderlineThickness float64 // A custom user underline thickness multiplier.
}
type encType struct {
uv int
name string
}
type encListType [256]encType
type fontBoxType struct {
Xmin, Ymin, Xmax, Ymax int
}
// Font flags for FontDescType.Flags as defined in the pdf specification.
const (
// FontFlagFixedPitch is set if all glyphs have the same width (as
// opposed to proportional or variable-pitch fonts, which have
// different widths).
FontFlagFixedPitch = 1 << 0
// FontFlagSerif is set if glyphs have serifs, which are short
// strokes drawn at an angle on the top and bottom of glyph stems.
// (Sans serif fonts do not have serifs.)
FontFlagSerif = 1 << 1
// FontFlagSymbolic is set if font contains glyphs outside the
// Adobe standard Latin character set. This flag and the
// Nonsymbolic flag shall not both be set or both be clear.
FontFlagSymbolic = 1 << 2
// FontFlagScript is set if glyphs resemble cursive handwriting.
FontFlagScript = 1 << 3
// FontFlagNonsymbolic is set if font uses the Adobe standard
// Latin character set or a subset of it.
FontFlagNonsymbolic = 1 << 5
// FontFlagItalic is set if glyphs have dominant vertical strokes
// that are slanted.
FontFlagItalic = 1 << 6
// FontFlagAllCap is set if font contains no lowercase letters;
// typically used for display purposes, such as for titles or
// headlines.
FontFlagAllCap = 1 << 16
// SmallCap is set if font contains both uppercase and lowercase
// letters. The uppercase letters are similar to those in the
// regular version of the same typeface family. The glyphs for the
// lowercase letters have the same shapes as the corresponding
// uppercase letters, but they are sized and their proportions
// adjusted so that they have the same size and stroke weight as
// lowercase glyphs in the same typeface family.
SmallCap = 1 << 18
// ForceBold determines whether bold glyphs shall be painted with
// extra pixels even at very small text sizes by a conforming
// reader. If the ForceBold flag is set, features of bold glyphs
// may be thickened at small text sizes.
ForceBold = 1 << 18
)
// FontDescType (font descriptor) specifies metrics and other
// attributes of a font, as distinct from the metrics of individual
// glyphs (as defined in the pdf specification).
type FontDescType struct {
// The maximum height above the baseline reached by glyphs in this
// font (for example for "S"). The height of glyphs for accented
// characters shall be excluded.
Ascent int
// The maximum depth below the baseline reached by glyphs in this
// font. The value shall be a negative number.
Descent int
// The vertical coordinate of the top of flat capital letters,
// measured from the baseline (for example "H").
CapHeight int
// A collection of flags defining various characteristics of the
// font. (See the FontFlag* constants.)
Flags int
// A rectangle, expressed in the glyph coordinate system, that
// shall specify the font bounding box. This should be the smallest
// rectangle enclosing the shape that would result if all of the
// glyphs of the font were placed with their origins coincident
// and then filled.
FontBBox fontBoxType
// The angle, expressed in degrees counterclockwise from the
// vertical, of the dominant vertical strokes of the font. (The
// 9-oclock position is 90 degrees, and the 3-oclock position
// is 90 degrees.) The value shall be negative for fonts that
// slope to the right, as almost all italic fonts do.
ItalicAngle int
// The thickness, measured horizontally, of the dominant vertical
// stems of glyphs in the font.
StemV int
// The width to use for character codes whose widths are not
// specified in a font dictionarys Widths array. This shall have
// a predictable effect only if all such codes map to glyphs whose
// actual widths are the same as the value of the MissingWidth
// entry. (Default value: 0.)
MissingWidth int
}
type fontDefType struct {
Tp string // "Core", "TrueType", ...
Name string // "Courier-Bold", ...
Desc FontDescType // Font descriptor
Up int // Underline position
Ut int // Underline thickness
Cw []int // Character width by ordinal
Enc string // "cp1252", ...
Diff string // Differences from reference encoding
File string // "Redressed.z"
Size1, Size2 int // Type1 values
OriginalSize int // Size of uncompressed font file
N int // Set by font loader
DiffN int // Position of diff in app array, set by font loader
i string // 1-based position in font list, set by font loader, not this program
utf8File *utf8FontFile // UTF-8 font
usedRunes map[int]int // Array of used runes
}
// generateFontID generates a font Id from the font definition
func generateFontID(fdt fontDefType) (string, error) {
// file can be different if generated in different instance
fdt.File = ""
b, err := json.Marshal(&fdt)
return fmt.Sprintf("%x", sha1.Sum(b)), err
}
type fontInfoType struct {
Data []byte
File string
OriginalSize int
FontName string
Bold bool
IsFixedPitch bool
UnderlineThickness int
UnderlinePosition int
Widths []int
Size1, Size2 uint32
Desc FontDescType
}

291
doc.go Normal file
View File

@ -0,0 +1,291 @@
/*
Package gofpdf implements a PDF document generator with high level
support for text, drawing and images.
Features
- UTF-8 support
- Choice of measurement unit, page format and margins
- Page header and footer management
- Automatic page breaks, line breaks, and text justification
- Inclusion of JPEG, PNG, GIF, TIFF and basic path-only SVG images
- Colors, gradients and alpha channel transparency
- Outline bookmarks
- Internal and external links
- TrueType, Type1 and encoding support
- Page compression
- Lines, Bézier curves, arcs, and ellipses
- Rotation, scaling, skewing, translation, and mirroring
- Clipping
- Document protection
- Layers
- Templates
- Barcodes
- Charting facility
- Import PDFs as templates
gofpdf has no dependencies other than the Go standard library. All tests
pass on Linux, Mac and Windows platforms.
gofpdf supports UTF-8 TrueType fonts and right-to-left languages. Note
that Chinese, Japanese, and Korean characters may not be included in
many general purpose fonts. For these languages, a specialized font (for
example, NotoSansSC for simplified Chinese) can be used.
Also, support is provided to automatically translate UTF-8 runes to code
page encodings for languages that have fewer than 256 glyphs.
We Are Closed
This repository will not be maintained, at least for some unknown
duration. But it is hoped that gofpdf has a bright future in the open
source world. Due to Gos promise of compatibility, gofpdf should
continue to function without modification for a longer time than would
be the case with many other languages.
Forks should be based on the last viable commit. Tools such as
active-forks can be used to select a fork that looks promising for your
needs. If a particular fork looks like it has taken the lead in
attracting followers, this README will be updated to point people in
that direction.
The efforts of all contributors to this project have been deeply
appreciated. Best wishes to all of you.
Installation
To install the package on your system, run
go get github.com/jung-kurt/gofpdf
Later, to receive updates, run
go get -u -v github.com/jung-kurt/gofpdf/...
Quick Start
The following Go code generates a simple PDF file.
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddPage()
pdf.SetFont("Arial", "B", 16)
pdf.Cell(40, 10, "Hello, world")
err := pdf.OutputFileAndClose("hello.pdf")
See the functions in the fpdf_test.go file (shown as examples in this
documentation) for more advanced PDF examples.
Errors
If an error occurs in an Fpdf method, an internal error field is set.
After this occurs, Fpdf method calls typically return without performing
any operations and the error state is retained. This error management
scheme facilitates PDF generation since individual method calls do not
need to be examined for failure; it is generally sufficient to wait
until after Output() is called. For the same reason, if an error occurs
in the calling application during PDF generation, it may be desirable
for the application to transfer the error to the Fpdf instance by
calling the SetError() method or the SetErrorf() method. At any time
during the life cycle of the Fpdf instance, the error state can be
determined with a call to Ok() or Err(). The error itself can be
retrieved with a call to Error().
Conversion Notes
This package is a relatively straightforward translation from the
original FPDF library written in PHP (despite the caveat in the
introduction to Effective Go). The API names have been retained even
though the Go idiom would suggest otherwise (for example, pdf.GetX() is
used rather than simply pdf.X()). The similarity of the two libraries
makes the original FPDF website a good source of information. It
includes a forum and FAQ.
However, some internal changes have been made. Page content is built up
using buffers (of type bytes.Buffer) rather than repeated string
concatenation. Errors are handled as explained above rather than
panicking. Output is generated through an interface of type io.Writer or
io.WriteCloser. A number of the original PHP methods behave differently
based on the type of the arguments that are passed to them; in these
cases additional methods have been exported to provide similar
functionality. Font definition files are produced in JSON rather than
PHP.
Example PDFs
A side effect of running go test ./... is the production of a number of
example PDFs. These can be found in the gofpdf/pdf directory after the
tests complete.
Please note that these examples run in the context of a test. In order
run an example as a standalone application, youll need to examine
fpdf_test.go for some helper routines, for example exampleFilename() and
summary().
Example PDFs can be compared with reference copies in order to verify
that they have been generated as expected. This comparison will be
performed if a PDF with the same name as the example PDF is placed in
the gofpdf/pdf/reference directory and if the third argument to
ComparePDFFiles() in internal/example/example.go is true. (By default it
is false.) The routine that summarizes an example will look for this
file and, if found, will call ComparePDFFiles() to check the example PDF
for equality with its reference PDF. If differences exist between the
two files they will be printed to standard output and the test will
fail. If the reference file is missing, the comparison is considered to
succeed. In order to successfully compare two PDFs, the placement of
internal resources must be consistent and the internal creation
timestamps must be the same. To do this, the methods SetCatalogSort()
and SetCreationDate() need to be called for both files. This is done
automatically for all examples.
Nonstandard Fonts
Nothing special is required to use the standard PDF fonts (courier,
helvetica, times, zapfdingbats) in your documents other than calling
SetFont().
You should use AddUTF8Font() or AddUTF8FontFromBytes() to add a TrueType
UTF-8 encoded font. Use 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
In your PDF generation code, call AddFont() to load the font and, as
with the standard fonts, SetFont() to begin using it. Most examples,
including the package example, demonstrate this method. Good sources of
free, open-source fonts include Google Fonts and DejaVu Fonts.
Related Packages
The draw2d package is a two dimensional vector graphics library that can
generate output in different forms. It uses gofpdf for its document
production mode.
Contributing Changes
gofpdf is a global community effort and you are invited to make it even
better. If you have implemented a new feature or corrected a problem,
please consider contributing your change to the project. A contribution
that does not directly pertain to the core functionality of gofpdf
should be placed in its own directory directly beneath the contrib
directory.
Here are guidelines for making submissions. Your change should
- be compatible with the MIT License
- be properly documented
- be formatted with go fmt
- include an example in fpdf_test.go if appropriate
- conform to the standards of golint and go vet, that is, golint . and
go vet . should not generate any warnings
- not diminish test coverage
Pull requests are the preferred means of accepting your changes.
License
gofpdf is released under the MIT License. It is copyrighted by Kurt Jung
and the contributors acknowledged below.
Acknowledgments
This packages code and documentation are closely derived from the FPDF
library created by Olivier Plathey, and a number of font and image
resources are copied directly from it. Bruno Michel has provided
valuable assistance with the code. Drawing support is adapted from the
FPDF geometric figures script by David Hernández Sanz. Transparency
support is adapted from the FPDF transparency script by Martin Hall-May.
Support for gradients and clipping is adapted from FPDF scripts by
Andreas Würmser. Support for outline bookmarks is adapted from Olivier
Plathey by Manuel Cornes. Layer support is adapted from Olivier Plathey.
Support for transformations is adapted from the FPDF transformation
script by Moritz Wagner and Andreas Würmser. PDF protection is adapted
from the work of Klemen Vodopivec for the FPDF product. Lawrence
Kesteloot provided code to allow an images extent to be determined
prior to placement. Support for vertical alignment within a cell was
provided by Stefan Schroeder. Ivan Daniluk generalized the font and
image loading code to use the Reader interface while maintaining
backward compatibility. Anthony Starks provided code for the Polygon
function. Robert Lillack provided the Beziergon function and corrected
some naming issues with the internal curve function. Claudio Felber
provided implementations for dashed line drawing and generalized font
loading. Stani Michiels provided support for multi-segment path drawing
with smooth line joins, line join styles, enhanced fill modes, and has
helped greatly with package presentation and tests. Templating is
adapted by Marcus Downing from the FPDF_Tpl library created by Jan
Slabon and Setasign. Jelmer Snoeck contributed packages that generate a
variety of barcodes and help with registering images on the web. Jelmer
Snoek and Guillermo Pascual augmented the basic HTML functionality with
aligned text. Kent Quirk implemented backwards-compatible support for
reading DPI from images that support it, and for setting DPI manually
and then having it properly taken into account when calculating image
size. Paulo Coutinho provided support for static embedded fonts. Dan
Meyers added support for embedded JavaScript. David Fish added a generic
alias-replacement function to enable, among other things, table of
contents functionality. Andy Bakun identified and corrected a problem in
which the internal catalogs were not sorted stably. Paul Montag added
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. Artem Korotkiy added support of UTF-8 fonts. Dave Barnes added
support for imported objects and templates. Brigham Thompson added
support for rounded rectangles. Joe Westcott added underline
functionality and optimized image storage. Benoit KUGLER contributed
support for rectangles with corners of unequal radius, modification
times, and for file attachments and annotations.
Roadmap
- Remove all legacy code page font support; use UTF-8 exclusively
- Improve test coverage as reported by the coverage tool.
*/
package gofpdf

288
doc/document.md Normal file
View File

@ -0,0 +1,288 @@
# GoFPDF document generator
[![No Maintenance Intended][badge-no-maintain]][unmaintained]
[![MIT licensed][badge-mit]][license]
[![Report][badge-report]][report]
[![GoDoc][badge-doc]][godoc]
![][logo]
Package gofpdf implements a PDF document generator with high level support for
text, drawing and images.
## Features
* UTF-8 support
* Choice of measurement unit, page format and margins
* Page header and footer management
* Automatic page breaks, line breaks, and text justification
* Inclusion of JPEG, PNG, GIF, TIFF and basic path-only SVG images
* Colors, gradients and alpha channel transparency
* Outline bookmarks
* Internal and external links
* TrueType, Type1 and encoding support
* Page compression
* Lines, Bézier curves, arcs, and ellipses
* Rotation, scaling, skewing, translation, and mirroring
* Clipping
* Document protection
* Layers
* Templates
* Barcodes
* Charting facility
* Import PDFs as templates
gofpdf has no dependencies other than the Go standard library. All tests pass
on Linux, Mac and Windows platforms.
gofpdf supports UTF-8 TrueType fonts and "right-to-left" languages. Note that
Chinese, Japanese, and Korean characters may not be included in many general
purpose fonts. For these languages, a specialized font (for example,
[NotoSansSC][noto] for simplified Chinese) can be used.
Also, support is provided to automatically translate UTF-8 runes to code page
encodings for languages that have fewer than 256 glyphs.
## We Are Closed
This repository will not be maintained, at least for some unknown duration. But
it is hoped that gofpdf has a bright future in the open source world. Due to
Go's promise of compatibility, gofpdf should continue to function without
modification for a longer time than would be the case with many other
languages.
Forks should be based on the [last viable commit][last-commit]. Tools such as
[active-forks][gofpdf-fork] can be used to select a fork that looks promising
for your needs. If a particular fork looks like it has taken the lead in
attracting followers, this README will be updated to point people in that
direction.
The efforts of all contributors to this project have been deeply appreciated.
Best wishes to all of you.
## Installation
To install the package on your system, run
```shell
go get github.com/jung-kurt/gofpdf
```
Later, to receive updates, run
```shell
go get -u -v github.com/jung-kurt/gofpdf/...
```
## Quick Start
The following Go code generates a simple PDF file.
```go
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddPage()
pdf.SetFont("Arial", "B", 16)
pdf.Cell(40, 10, "Hello, world")
err := pdf.OutputFileAndClose("hello.pdf")
```
See the functions in the [fpdf_test.go][fpdf-test] file (shown as examples in
this documentation) for more advanced PDF examples.
## Errors
If an error occurs in an Fpdf method, an internal error field is set. After
this occurs, Fpdf method calls typically return without performing any
operations and the error state is retained. This error management scheme
facilitates PDF generation since individual method calls do not need to be
examined for failure; it is generally sufficient to wait until after `Output()`
is called. For the same reason, if an error occurs in the calling application
during PDF generation, it may be desirable for the application to transfer the
error to the Fpdf instance by calling the `SetError()` method or the
`SetErrorf()` method. At any time during the life cycle of the Fpdf instance,
the error state can be determined with a call to `Ok()` or `Err()`. The error
itself can be retrieved with a call to `Error()`.
## Conversion Notes
This package is a relatively straightforward translation from the original
[FPDF][fpdf-site] library written in PHP (despite the caveat in the
introduction to [Effective Go][effective-go]). The
API names have been retained even though the Go idiom would suggest otherwise
(for example, `pdf.GetX()` is used rather than simply `pdf.X()`). The
similarity of the two libraries makes the original FPDF website a good source
of information. It includes a forum and FAQ.
However, some internal changes have been made. Page content is built up using
buffers (of type bytes.Buffer) rather than repeated string concatenation.
Errors are handled as explained above rather than panicking. Output is
generated through an interface of type io.Writer or io.WriteCloser. A number of
the original PHP methods behave differently based on the type of the arguments
that are passed to them; in these cases additional methods have been exported
to provide similar functionality. Font definition files are produced in JSON
rather than PHP.
## Example PDFs
A side effect of running `go test ./...` is the production of a number of
example PDFs. These can be found in the gofpdf/pdf directory after the tests
complete.
Please note that these examples run in the context of a test. In order run an
example as a standalone application, you'll need to examine
[fpdf_test.go][fpdf-test] for some helper routines, for example
`exampleFilename()` and `summary()`.
Example PDFs can be compared with reference copies in order to verify that they
have been generated as expected. This comparison will be performed if a PDF
with the same name as the example PDF is placed in the gofpdf/pdf/reference
directory and if the third argument to `ComparePDFFiles()` in
internal/example/example.go is true. (By default it is false.) The routine that
summarizes an example will look for this file and, if found, will call
`ComparePDFFiles()` to check the example PDF for equality with its reference PDF.
If differences exist between the two files they will be printed to standard
output and the test will fail. If the reference file is missing, the comparison
is considered to succeed. In order to successfully compare two PDFs, the
placement of internal resources must be consistent and the internal creation
timestamps must be the same. To do this, the methods `SetCatalogSort()` and
`SetCreationDate()` need to be called for both files. This is done automatically
for all examples.
## Nonstandard Fonts
Nothing special is required to use the standard PDF fonts (courier, helvetica,
times, zapfdingbats) in your documents other than calling `SetFont()`.
You should use `AddUTF8Font()` or `AddUTF8FontFromBytes()` to add a TrueType
UTF-8 encoded font. Use `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.
```shell
./makefont --embed --enc=../font/cp1252.map --dst=../font ../font/calligra.ttf
```
In your PDF generation code, call `AddFont()` to load the font and, as with the
standard fonts, SetFont() to begin using it. Most examples, including the
package example, demonstrate this method. Good sources of free, open-source
fonts include [Google Fonts][gfont] and [DejaVu Fonts][dfont].
## Related Packages
The [draw2d][draw2d-site] package is a two dimensional vector graphics library that
can generate output in different forms. It uses gofpdf for its document
production mode.
## Contributing Changes
gofpdf is a global community effort and you are invited to make it even better.
If you have implemented a new feature or corrected a problem, please consider
contributing your change to the project. A contribution that does not directly
pertain to the core functionality of gofpdf should be placed in its own
directory directly beneath the `contrib` directory.
Here are guidelines for making submissions. Your change should
* be compatible with the MIT License
* be properly documented
* be formatted with `go fmt`
* include an example in [fpdf_test.go][test] if appropriate
* conform to the standards of [golint][lint] and
[go vet][vet], that is, `golint .` and
`go vet .` should not generate any warnings
* not diminish [test coverage][coverage]
[Pull requests][pr] are the preferred means of accepting your changes.
## License
gofpdf is released under the MIT License. It is copyrighted by Kurt Jung and
the contributors acknowledged below.
## Acknowledgments
This package's code and documentation are closely derived from the [FPDF][fpdf-site]
library created by Olivier Plathey, and a number of font and image resources
are copied directly from it. Bruno Michel has provided valuable assistance with
the code. Drawing support is adapted from the FPDF geometric figures script by
David Hernández Sanz. Transparency support is adapted from the FPDF
transparency script by Martin Hall-May. Support for gradients and clipping is
adapted from FPDF scripts by Andreas Würmser. Support for outline bookmarks is
adapted from Olivier Plathey by Manuel Cornes. Layer support is adapted from
Olivier Plathey. Support for transformations is adapted from the FPDF
transformation script by Moritz Wagner and Andreas Würmser. PDF protection is
adapted from the work of Klemen Vodopivec for the FPDF product. Lawrence
Kesteloot provided code to allow an image's extent to be determined prior to
placement. Support for vertical alignment within a cell was provided by Stefan
Schroeder. Ivan Daniluk generalized the font and image loading code to use the
Reader interface while maintaining backward compatibility. Anthony Starks
provided code for the Polygon function. Robert Lillack provided the Beziergon
function and corrected some naming issues with the internal curve function.
Claudio Felber provided implementations for dashed line drawing and generalized
font loading. Stani Michiels provided support for multi-segment path drawing
with smooth line joins, line join styles, enhanced fill modes, and has helped
greatly with package presentation and tests. Templating is adapted by Marcus
Downing from the FPDF_Tpl library created by Jan Slabon and Setasign. Jelmer
Snoeck contributed packages that generate a variety of barcodes and help with
registering images on the web. Jelmer Snoek and Guillermo Pascual augmented the
basic HTML functionality with aligned text. Kent Quirk implemented
backwards-compatible support for reading DPI from images that support it, and
for setting DPI manually and then having it properly taken into account when
calculating image size. Paulo Coutinho provided support for static embedded
fonts. Dan Meyers added support for embedded JavaScript. David Fish added a
generic alias-replacement function to enable, among other things, table of
contents functionality. Andy Bakun identified and corrected a problem in which
the internal catalogs were not sorted stably. Paul Montag added 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. Artem Korotkiy added support of
UTF-8 fonts. Dave Barnes added support for imported objects and templates.
Brigham Thompson added support for rounded rectangles. Joe Westcott added
underline functionality and optimized image storage. Benoit KUGLER contributed
support for rectangles with corners of unequal radius, modification times, and
for file attachments and annotations.
## Roadmap
* Remove all legacy code page font support; use UTF-8 exclusively
* Improve test coverage as reported by the coverage tool.
[badge-author]: https://img.shields.io/badge/author-Kurt_Jung-blue.svg
[badge-doc]: https://img.shields.io/badge/godoc-GoFPDF-blue.svg
[badge-github]: https://img.shields.io/badge/project-Git_Hub-blue.svg
[badge-mit]: https://img.shields.io/badge/license-MIT-blue.svg
[badge-no-maintain]: http://unmaintained.tech/badge.svg
[badge-report]: https://goreportcard.com/badge/github.com/jung-kurt/gofpdf
[badge-status]: https://travis-ci.org/jung-kurt/gofpdf.svg?branch=master
[coverage]: https://blog.golang.org/cover
[dfont]: http://dejavu-fonts.org/
[draw2d-site]: https://github.com/llgcode/draw2d
[effective-go]: https://golang.org/doc/effective_go.html
[fpdf-site]: http://www.fpdf.org/
[fpdf-test]: https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go
[gfont]: https://fonts.google.com/
[github]: https://github.com/jung-kurt/gofpdf
[godoc]: https://godoc.org/github.com/jung-kurt/gofpdf
[gofpdf-fork]: https://techgaun.github.io/active-forks/index.html#jung-kurt/gofpdf
[issue109]: https://github.com/jung-kurt/gofpdf/issues/109
[jung]: https://github.com/jung-kurt/
[last-commit]: https://github.com/jung-kurt/gofpdf/commit/603f56990463f011cb1dbb64ef7f872c1adc009a
[license]: https://raw.githubusercontent.com/jung-kurt/gofpdf/master/LICENSE
[lint]: https://github.com/golang/lint
[logo]: https://github.com/jung-kurt/gofpdf/raw/master/image/logo_gofpdf.jpg?raw=true
[noto]: https://github.com/jsntn/webfonts/blob/master/NotoSansSC-Regular.ttf
[pr]: https://help.github.com/articles/using-pull-requests/
[report]: https://goreportcard.com/report/github.com/jung-kurt/gofpdf
[status]: https://travis-ci.org/jung-kurt/gofpdf
[test]: https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go
[unmaintained]: http://unmaintained.tech/
[vet]: https://golang.org/cmd/vet/

13
doc/go.awk Normal file
View File

@ -0,0 +1,13 @@
BEGIN { show = 0 ; print "/*" }
/^\-/ { trim = 1 ; print "" }
/^Package/ { show = 1 }
!NF { trim = 0 }
trim { sub("^ +", "", $0) }
show { print $0 }
END { print "*/\npackage " package_name }

68
doc/html.txt Normal file
View File

@ -0,0 +1,68 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1 maximum-scale=1 minimum-scale=1 user-scalable=0" />
<title>GoFPDF Document Generator</title>
<style>
body {
max-width: 800px;
font-family: sans-serif;
padding: 1em;
}
img {
max-width: 800px;
}
h1,
h2,
h3 {
color: #345;
}
.syntax {
display: block;
white-space: pre;
font-family: monospace;
background-color: #efe;
border: 1px solid #474;
margin: 1em 0;
padding: 0.25em 1.5em;
}
.warning {
background-color: #ffd;
border: 1px solid #665;
margin: 1em 0;
padding: 0 1em;
}
.key {
color: #131;
font-weight: bold;
}
.subkey {
font-style: italic;
}
pre {
margin: 1.5em 0;
background-color: #eee;
padding: 1em;
overflow-x: scroll;
}
$if(highlighting-css)$
$highlighting-css$
$endif$
</style>
</head>
<body>
$body$
</body>
</html>

559
embedded.go Normal file
View File

@ -0,0 +1,559 @@
/*
* Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package gofpdf
// Embedded standard fonts
import (
"strings"
)
var embeddedFontList = map[string]string{
"courierBI": `{"Tp":"Core","Name":"Courier-BoldOblique","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}`,
"courierB": `{"Tp":"Core","Name":"Courier-Bold","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}`,
"courierI": `{"Tp":"Core","Name":"Courier-Oblique","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}`,
"courier": `{"Tp":"Core","Name":"Courier","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}`,
"helveticaBI": `{"Tp":"Core","Name":"Helvetica-BoldOblique","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,556,350,278,556,500,1000,556,556,333,1000,667,333,1000,350,611,350,350,278,278,500,500,350,556,1000,333,1000,556,333,944,350,500,667,278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]}`,
"helveticaB": `{"Tp":"Core","Name":"Helvetica-Bold","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,556,350,278,556,500,1000,556,556,333,1000,667,333,1000,350,611,350,350,278,278,500,500,350,556,1000,333,1000,556,333,944,350,500,667,278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]}`,
"helveticaI": `{"Tp":"Core","Name":"Helvetica-Oblique","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,556,350,222,556,333,1000,556,556,333,1000,667,333,1000,350,611,350,350,222,222,333,333,350,556,1000,333,1000,500,333,944,350,500,667,278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]}`,
"helvetica": `{"Tp":"Core","Name":"Helvetica","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,556,350,222,556,333,1000,556,556,333,1000,667,333,1000,350,611,350,350,222,222,333,333,350,556,1000,333,1000,500,333,944,350,500,667,278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]}`,
"timesBI": `{"Tp":"Core","Name":"Times-BoldItalic","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,350,500,350,333,500,500,1000,500,500,333,1000,556,333,944,350,611,350,350,333,333,500,500,350,500,1000,333,1000,389,333,722,350,389,611,250,389,500,500,500,500,220,500,333,747,266,500,606,333,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444]}`,
"timesB": `{"Tp":"Core","Name":"Times-Bold","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,555,500,500,1000,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,350,500,350,333,500,500,1000,500,500,333,1000,556,333,1000,350,667,350,350,333,333,500,500,350,500,1000,333,1000,389,333,722,350,444,722,250,333,500,500,500,500,220,500,333,747,300,500,570,333,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1000,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500]}`,
"timesI": `{"Tp":"Core","Name":"Times-Italic","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,350,500,350,333,500,556,889,500,500,333,1000,500,333,944,350,556,350,350,333,333,556,556,350,500,889,333,980,389,333,667,350,389,556,250,389,500,500,500,500,275,500,333,760,276,500,675,333,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444]}`,
"times": `{"Tp":"Core","Name":"Times-Roman","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,350,500,350,333,500,444,1000,500,500,333,1000,556,333,889,350,611,350,350,333,333,444,444,350,500,1000,333,980,389,333,722,350,444,722,250,333,500,500,500,500,200,500,333,760,276,500,564,333,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500]}`,
"zapfdingbats": `{"Tp":"Core","Name":"ZapfDingbats","Up":-100,"Ut":50,"Cw":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,0,390,390,317,317,276,276,509,509,410,410,234,234,334,334,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,0,874,760,946,771,865,771,888,967,888,831,873,927,970,918,0]}`,
}
func (f *Fpdf) coreFontReader(familyStr, styleStr string) (r *strings.Reader) {
key := familyStr + styleStr
str, ok := embeddedFontList[key]
if ok {
r = strings.NewReader(str)
} else {
f.SetErrorf("could not locate \"%s\" among embedded core font definition files", key)
}
return
}
var embeddedMapList = map[string]string{
"cp1250": `
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+015A Sacute
!8D U+0164 Tcaron
!8E U+017D Zcaron
!8F U+0179 Zacute
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+015B sacute
!9D U+0165 tcaron
!9E U+017E zcaron
!9F U+017A zacute
!A0 U+00A0 space
!A1 U+02C7 caron
!A2 U+02D8 breve
!A3 U+0141 Lslash
!A4 U+00A4 currency
!A5 U+0104 Aogonek
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+015E Scedilla
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+02DB ogonek
!B3 U+0142 lslash
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+0105 aogonek
!BA U+015F scedilla
!BB U+00BB guillemotright
!BC U+013D Lcaron
!BD U+02DD hungarumlaut
!BE U+013E lcaron
!BF U+017C zdotaccent
!C0 U+0154 Racute
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0139 Lacute
!C6 U+0106 Cacute
!C7 U+00C7 Ccedilla
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+011A Ecaron
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+010E Dcaron
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+0147 Ncaron
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0158 Rcaron
!D9 U+016E Uring
!DA U+00DA Uacute
!DB U+0170 Uhungarumlaut
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+0162 Tcommaaccent
!DF U+00DF germandbls
!E0 U+0155 racute
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+013A lacute
!E6 U+0107 cacute
!E7 U+00E7 ccedilla
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+011B ecaron
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+010F dcaron
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+0148 ncaron
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0159 rcaron
!F9 U+016F uring
!FA U+00FA uacute
!FB U+0171 uhungarumlaut
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+0163 tcommaaccent
!FF U+02D9 dotaccent
`,
"cp1252": `
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+0152 OE
!8E U+017D Zcaron
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+0153 oe
!9E U+017E zcaron
!9F U+0178 Ydieresis
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis
`,
}

474
font.go Normal file
View File

@ -0,0 +1,474 @@
/*
* Copyright (c) 2013 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package gofpdf
// Utility to generate font definition files
// Version: 1.2
// Date: 2011-06-18
// Author: Olivier PLATHEY
// Port to Go: Kurt Jung, 2013-07-15
import (
"bufio"
"compress/zlib"
"encoding/binary"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
)
func baseNoExt(fileStr string) string {
str := filepath.Base(fileStr)
extLen := len(filepath.Ext(str))
if extLen > 0 {
str = str[:len(str)-extLen]
}
return str
}
func loadMap(encodingFileStr string) (encList encListType, err error) {
// printf("Encoding file string [%s]\n", encodingFileStr)
var f *os.File
// f, err = os.Open(encodingFilepath(encodingFileStr))
f, err = os.Open(encodingFileStr)
if err == nil {
defer f.Close()
for j := range encList {
encList[j].uv = -1
encList[j].name = ".notdef"
}
scanner := bufio.NewScanner(f)
var enc encType
var pos int
for scanner.Scan() {
// "!3F U+003F question"
_, err = fmt.Sscanf(scanner.Text(), "!%x U+%x %s", &pos, &enc.uv, &enc.name)
if err == nil {
if pos < 256 {
encList[pos] = enc
} else {
err = fmt.Errorf("map position 0x%2X exceeds 0xFF", pos)
return
}
} else {
return
}
}
if err = scanner.Err(); err != nil {
return
}
}
return
}
// getInfoFromTrueType returns information from a TrueType font
func getInfoFromTrueType(fileStr string, msgWriter io.Writer, embed bool, encList encListType) (info fontInfoType, err error) {
info.Widths = make([]int, 256)
var ttf TtfType
ttf, err = TtfParse(fileStr)
if err != nil {
return
}
if embed {
if !ttf.Embeddable {
err = fmt.Errorf("font license does not allow embedding")
return
}
info.Data, err = ioutil.ReadFile(fileStr)
if err != nil {
return
}
info.OriginalSize = len(info.Data)
}
k := 1000.0 / float64(ttf.UnitsPerEm)
info.FontName = ttf.PostScriptName
info.Bold = ttf.Bold
info.Desc.ItalicAngle = int(ttf.ItalicAngle)
info.IsFixedPitch = ttf.IsFixedPitch
info.Desc.Ascent = round(k * float64(ttf.TypoAscender))
info.Desc.Descent = round(k * float64(ttf.TypoDescender))
info.UnderlineThickness = round(k * float64(ttf.UnderlineThickness))
info.UnderlinePosition = round(k * float64(ttf.UnderlinePosition))
info.Desc.FontBBox = fontBoxType{
round(k * float64(ttf.Xmin)),
round(k * float64(ttf.Ymin)),
round(k * float64(ttf.Xmax)),
round(k * float64(ttf.Ymax)),
}
// printf("FontBBox\n")
// dump(info.Desc.FontBBox)
info.Desc.CapHeight = round(k * float64(ttf.CapHeight))
info.Desc.MissingWidth = round(k * float64(ttf.Widths[0]))
var wd int
for j := 0; j < len(info.Widths); j++ {
wd = info.Desc.MissingWidth
if encList[j].name != ".notdef" {
uv := encList[j].uv
pos, ok := ttf.Chars[uint16(uv)]
if ok {
wd = round(k * float64(ttf.Widths[pos]))
} else {
fmt.Fprintf(msgWriter, "Character %s is missing\n", encList[j].name)
}
}
info.Widths[j] = wd
}
// printf("getInfoFromTrueType/FontBBox\n")
// dump(info.Desc.FontBBox)
return
}
type segmentType struct {
marker uint8
tp uint8
size uint32
data []byte
}
func segmentRead(r io.Reader) (s segmentType, err error) {
if err = binary.Read(r, binary.LittleEndian, &s.marker); err != nil {
return
}
if s.marker != 128 {
err = fmt.Errorf("font file is not a valid binary Type1")
return
}
if err = binary.Read(r, binary.LittleEndian, &s.tp); err != nil {
return
}
if err = binary.Read(r, binary.LittleEndian, &s.size); err != nil {
return
}
s.data = make([]byte, s.size)
_, err = r.Read(s.data)
return
}
// -rw-r--r-- 1 root root 9532 2010-04-22 11:27 /usr/share/fonts/type1/mathml/Symbol.afm
// -rw-r--r-- 1 root root 37744 2010-04-22 11:27 /usr/share/fonts/type1/mathml/Symbol.pfb
// getInfoFromType1 return information from a Type1 font
func getInfoFromType1(fileStr string, msgWriter io.Writer, embed bool, encList encListType) (info fontInfoType, err error) {
info.Widths = make([]int, 256)
if embed {
var f *os.File
f, err = os.Open(fileStr)
if err != nil {
return
}
defer f.Close()
// Read first segment
var s1, s2 segmentType
s1, err = segmentRead(f)
if err != nil {
return
}
s2, err = segmentRead(f)
if err != nil {
return
}
info.Data = s1.data
info.Data = append(info.Data, s2.data...)
info.Size1 = s1.size
info.Size2 = s2.size
}
afmFileStr := fileStr[0:len(fileStr)-3] + "afm"
size, ok := fileSize(afmFileStr)
if !ok {
err = fmt.Errorf("font file (ATM) %s not found", afmFileStr)
return
} else if size == 0 {
err = fmt.Errorf("font file (AFM) %s empty or not readable", afmFileStr)
return
}
var f *os.File
f, err = os.Open(afmFileStr)
if err != nil {
return
}
defer f.Close()
scanner := bufio.NewScanner(f)
var fields []string
var wd int
var wt, name string
wdMap := make(map[string]int)
for scanner.Scan() {
fields = strings.Fields(strings.TrimSpace(scanner.Text()))
// Comment Generated by FontForge 20080203
// FontName Symbol
// C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
if len(fields) >= 2 {
switch fields[0] {
case "C":
if wd, err = strconv.Atoi(fields[4]); err == nil {
name = fields[7]
wdMap[name] = wd
}
case "FontName":
info.FontName = fields[1]
case "Weight":
wt = strings.ToLower(fields[1])
case "ItalicAngle":
info.Desc.ItalicAngle, err = strconv.Atoi(fields[1])
case "Ascender":
info.Desc.Ascent, err = strconv.Atoi(fields[1])
case "Descender":
info.Desc.Descent, err = strconv.Atoi(fields[1])
case "UnderlineThickness":
info.UnderlineThickness, err = strconv.Atoi(fields[1])
case "UnderlinePosition":
info.UnderlinePosition, err = strconv.Atoi(fields[1])
case "IsFixedPitch":
info.IsFixedPitch = fields[1] == "true"
case "FontBBox":
if info.Desc.FontBBox.Xmin, err = strconv.Atoi(fields[1]); err == nil {
if info.Desc.FontBBox.Ymin, err = strconv.Atoi(fields[2]); err == nil {
if info.Desc.FontBBox.Xmax, err = strconv.Atoi(fields[3]); err == nil {
info.Desc.FontBBox.Ymax, err = strconv.Atoi(fields[4])
}
}
}
case "CapHeight":
info.Desc.CapHeight, err = strconv.Atoi(fields[1])
case "StdVW":
info.Desc.StemV, err = strconv.Atoi(fields[1])
}
}
if err != nil {
return
}
}
if err = scanner.Err(); err != nil {
return
}
if info.FontName == "" {
err = fmt.Errorf("the field FontName missing in AFM file %s", afmFileStr)
return
}
info.Bold = wt == "bold" || wt == "black"
var missingWd int
missingWd, ok = wdMap[".notdef"]
if ok {
info.Desc.MissingWidth = missingWd
}
for j := 0; j < len(info.Widths); j++ {
info.Widths[j] = info.Desc.MissingWidth
}
for j := 0; j < len(info.Widths); j++ {
name = encList[j].name
if name != ".notdef" {
wd, ok = wdMap[name]
if ok {
info.Widths[j] = wd
} else {
fmt.Fprintf(msgWriter, "Character %s is missing\n", name)
}
}
}
// printf("getInfoFromType1/FontBBox\n")
// dump(info.Desc.FontBBox)
return
}
func makeFontDescriptor(info *fontInfoType) {
if info.Desc.CapHeight == 0 {
info.Desc.CapHeight = info.Desc.Ascent
}
info.Desc.Flags = 1 << 5
if info.IsFixedPitch {
info.Desc.Flags |= 1
}
if info.Desc.ItalicAngle != 0 {
info.Desc.Flags |= 1 << 6
}
if info.Desc.StemV == 0 {
if info.Bold {
info.Desc.StemV = 120
} else {
info.Desc.StemV = 70
}
}
// printf("makeFontDescriptor/FontBBox\n")
// dump(info.Desc.FontBBox)
}
// makeFontEncoding builds differences from reference encoding
func makeFontEncoding(encList encListType, refEncFileStr string) (diffStr string, err error) {
var refList encListType
if refList, err = loadMap(refEncFileStr); err != nil {
return
}
var buf fmtBuffer
last := 0
for j := 32; j < 256; j++ {
if encList[j].name != refList[j].name {
if j != last+1 {
buf.printf("%d ", j)
}
last = j
buf.printf("/%s ", encList[j].name)
}
}
diffStr = strings.TrimSpace(buf.String())
return
}
func makeDefinitionFile(fileStr, tpStr, encodingFileStr string, embed bool, encList encListType, info fontInfoType) error {
var err error
var def fontDefType
def.Tp = tpStr
def.Name = info.FontName
makeFontDescriptor(&info)
def.Desc = info.Desc
// printf("makeDefinitionFile/FontBBox\n")
// dump(def.Desc.FontBBox)
def.Up = info.UnderlinePosition
def.Ut = info.UnderlineThickness
def.Cw = info.Widths
def.Enc = baseNoExt(encodingFileStr)
// fmt.Printf("encodingFileStr [%s], def.Enc [%s]\n", encodingFileStr, def.Enc)
// fmt.Printf("reference [%s]\n", filepath.Join(filepath.Dir(encodingFileStr), "cp1252.map"))
def.Diff, err = makeFontEncoding(encList, filepath.Join(filepath.Dir(encodingFileStr), "cp1252.map"))
if err != nil {
return err
}
def.File = info.File
def.Size1 = int(info.Size1)
def.Size2 = int(info.Size2)
def.OriginalSize = info.OriginalSize
// printf("Font definition file [%s]\n", fileStr)
var buf []byte
buf, err = json.Marshal(def)
if err != nil {
return err
}
var f *os.File
f, err = os.Create(fileStr)
if err != nil {
return err
}
defer f.Close()
_, err = f.Write(buf)
if err != nil {
return err
}
err = f.Close()
if err != nil {
return err
}
return err
}
// MakeFont generates a font definition file in JSON format. A definition file
// of this type is required to use non-core fonts in the PDF documents that
// gofpdf generates. See the makefont utility in the gofpdf package for a
// command line interface to this function.
//
// fontFileStr is the name of the TrueType file (extension .ttf), OpenType file
// (extension .otf) or binary Type1 file (extension .pfb) from which to
// generate a definition file. If an OpenType file is specified, it must be one
// that is based on TrueType outlines, not PostScript outlines; this cannot be
// determined from the file extension alone. If a Type1 file is specified, a
// metric file with the same pathname except with the extension .afm must be
// present.
//
// encodingFileStr is the name of the encoding file that corresponds to the
// font.
//
// dstDirStr is the name of the directory in which to save the definition file
// and, if embed is true, the compressed font file.
//
// msgWriter is the writer that is called to display messages throughout the
// process. Use nil to turn off messages.
//
// embed is true if the font is to be embedded in the PDF files.
func MakeFont(fontFileStr, encodingFileStr, dstDirStr string, msgWriter io.Writer, embed bool) error {
if msgWriter == nil {
msgWriter = ioutil.Discard
}
if !fileExist(fontFileStr) {
return fmt.Errorf("font file not found: %s", fontFileStr)
}
extStr := strings.ToLower(fontFileStr[len(fontFileStr)-3:])
// printf("Font file extension [%s]\n", extStr)
var tpStr string
switch extStr {
case "ttf":
fallthrough
case "otf":
tpStr = "TrueType"
case "pfb":
tpStr = "Type1"
default:
return fmt.Errorf("unrecognized font file extension: %s", extStr)
}
var info fontInfoType
encList, err := loadMap(encodingFileStr)
if err != nil {
return err
}
// printf("Encoding table\n")
// dump(encList)
if tpStr == "TrueType" {
info, err = getInfoFromTrueType(fontFileStr, msgWriter, embed, encList)
if err != nil {
return err
}
} else {
info, err = getInfoFromType1(fontFileStr, msgWriter, embed, encList)
if err != nil {
return err
}
}
baseStr := baseNoExt(fontFileStr)
// fmt.Printf("Base [%s]\n", baseStr)
if embed {
var f *os.File
info.File = baseStr + ".z"
zFileStr := filepath.Join(dstDirStr, info.File)
f, err = os.Create(zFileStr)
if err != nil {
return err
}
defer f.Close()
cmp := zlib.NewWriter(f)
_, err = cmp.Write(info.Data)
if err != nil {
return err
}
err = cmp.Close()
if err != nil {
return err
}
fmt.Fprintf(msgWriter, "Font file compressed: %s\n", zFileStr)
}
defFileStr := filepath.Join(dstDirStr, baseStr+".json")
err = makeDefinitionFile(defFileStr, tpStr, encodingFileStr, embed, encList, info)
if err != nil {
return err
}
fmt.Fprintf(msgWriter, "Font definition file successfully generated: %s\n", defFileStr)
return nil
}

View File

@ -0,0 +1,272 @@
StartFontMetrics 2.0
Comment Generated by FontForge 20141024
Comment Creation Date: Thu Jul 23 17:38:06 2015
FontName CalligrapherRegular
FullName Calligrapher Regular
FamilyName Calligrapher
Weight Thin
Notice (Generated by Fontographer 3.5)
ItalicAngle 0
IsFixedPitch false
UnderlinePosition -190
UnderlineThickness 20
Version Altsys Fontographer 3.5 5/26/92
EncodingScheme ISO10646-1
FontBBox -173 -234 1328 899
CapHeight 677
XHeight 677
Ascender 756
Descender -219
StartCharMetrics 250
C 32 ; WX 282 ; N space ; B 0 0 0 0 ;
C 33 ; WX 324 ; N exclam ; B 67 -16 251 718 ;
C 34 ; WX 405 ; N quotedbl ; B 60 460 353 718 ;
C 35 ; WX 584 ; N numbersign ; B 35 0 549 701 ;
C 36 ; WX 632 ; N dollar ; B 32 -126 595 814 ;
C 37 ; WX 980 ; N percent ; B 35 -16 945 703 ;
C 38 ; WX 776 ; N ampersand ; B 41 -17 811 670 ;
C 39 ; WX 259 ; N quotesingle ; B 72 460 206 718 ;
C 40 ; WX 299 ; N parenleft ; B 57 -119 299 785 ;
C 41 ; WX 299 ; N parenright ; B 0 -119 242 785 ;
C 42 ; WX 377 ; N asterisk ; B 35 407 342 714 ;
C 43 ; WX 600 ; N plus ; B 47 0 553 506 ;
C 44 ; WX 259 ; N comma ; B 35 -67 224 162 ;
C 45 ; WX 432 ; N hyphen ; B 28 249 404 377 ;
C 46 ; WX 254 ; N period ; B 43 -16 227 162 ;
C 47 ; WX 597 ; N slash ; B 7 -14 591 714 ;
C 48 ; WX 529 ; N zero ; B 21 -18 508 583 ;
C 49 ; WX 298 ; N one ; B 8 -15 233 582 ;
C 50 ; WX 451 ; N two ; B 17 -8 430 588 ;
C 51 ; WX 359 ; N three ; B 11 -54 337 582 ;
C 52 ; WX 525 ; N four ; B 18 -20 519 602 ;
C 53 ; WX 423 ; N five ; B 10 -55 420 582 ;
C 54 ; WX 464 ; N six ; B 23 -14 447 589 ;
C 55 ; WX 417 ; N seven ; B 8 -18 415 589 ;
C 56 ; WX 457 ; N eight ; B 19 -16 432 583 ;
C 57 ; WX 479 ; N nine ; B 26 -16 450 588 ;
C 58 ; WX 275 ; N colon ; B 59 -16 242 491 ;
C 59 ; WX 282 ; N semicolon ; B 54 -67 245 491 ;
C 60 ; WX 600 ; N less ; B 47 -8 553 514 ;
C 61 ; WX 600 ; N equal ; B 47 98 553 408 ;
C 62 ; WX 600 ; N greater ; B 47 -8 553 514 ;
C 63 ; WX 501 ; N question ; B 21 -16 473 721 ;
C 64 ; WX 800 ; N at ; B 29 -12 771 730 ;
C 65 ; WX 743 ; N A ; B -23 -14 754 721 ;
C 66 ; WX 636 ; N B ; B -42 -7 608 706 ;
C 67 ; WX 598 ; N C ; B 27 -12 572 712 ;
C 68 ; WX 712 ; N D ; B -42 -11 684 705 ;
C 69 ; WX 608 ; N E ; B -21 0 608 708 ;
C 70 ; WX 562 ; N F ; B -21 -18 584 716 ;
C 71 ; WX 680 ; N G ; B 29 -8 668 714 ;
C 72 ; WX 756 ; N H ; B 70 -17 777 728 ;
C 73 ; WX 308 ; N I ; B 14 -15 238 718 ;
C 74 ; WX 314 ; N J ; B 7 -223 244 727 ;
C 75 ; WX 676 ; N K ; B 14 -16 683 725 ;
C 76 ; WX 552 ; N L ; B 14 -8 580 713 ;
C 77 ; WX 1041 ; N M ; B 42 -17 1017 739 ;
C 78 ; WX 817 ; N N ; B -42 -17 747 736 ;
C 79 ; WX 729 ; N O ; B 32 -16 698 709 ;
C 80 ; WX 569 ; N P ; B -35 -15 570 716 ;
C 81 ; WX 698 ; N Q ; B 27 -201 1328 715 ;
C 82 ; WX 674 ; N R ; B -35 -20 696 712 ;
C 83 ; WX 618 ; N S ; B 31 -16 589 709 ;
C 84 ; WX 673 ; N T ; B -21 -20 702 714 ;
C 85 ; WX 805 ; N U ; B 0 -19 804 722 ;
C 86 ; WX 753 ; N V ; B -28 -20 788 729 ;
C 87 ; WX 1238 ; N W ; B -28 -17 1273 736 ;
C 88 ; WX 716 ; N X ; B 7 -38 709 731 ;
C 89 ; WX 754 ; N Y ; B -35 -17 789 747 ;
C 90 ; WX 599 ; N Z ; B 30 -5 584 748 ;
C 91 ; WX 315 ; N bracketleft ; B 93 -124 322 718 ;
C 92 ; WX 463 ; N backslash ; B -21 -18 484 736 ;
C 93 ; WX 315 ; N bracketright ; B -7 -124 222 718 ;
C 94 ; WX 600 ; N asciicircum ; B 63 266 537 658 ;
C 95 ; WX 547 ; N underscore ; B -7 -198 554 -163 ;
C 96 ; WX 278 ; N grave ; B -1 541 214 693 ;
C 97 ; WX 581 ; N a ; B 21 -16 581 494 ;
C 98 ; WX 564 ; N b ; B -24 -17 543 792 ;
C 99 ; WX 440 ; N c ; B 21 -17 422 490 ;
C 100 ; WX 571 ; N d ; B 0 -15 550 659 ;
C 101 ; WX 450 ; N e ; B 28 -23 428 493 ;
C 102 ; WX 347 ; N f ; B -35 -14 474 785 ;
C 103 ; WX 628 ; N g ; B 19 -219 612 496 ;
C 104 ; WX 611 ; N h ; B -29 -18 569 785 ;
C 105 ; WX 283 ; N i ; B -14 -15 241 679 ;
C 106 ; WX 283 ; N j ; B -14 -234 241 679 ;
C 107 ; WX 560 ; N k ; B -24 -15 582 789 ;
C 108 ; WX 252 ; N l ; B -28 -15 210 789 ;
C 109 ; WX 976 ; N m ; B -21 -16 927 494 ;
C 110 ; WX 595 ; N n ; B -28 -15 574 493 ;
C 111 ; WX 508 ; N o ; B 27 -17 485 490 ;
C 112 ; WX 549 ; N p ; B -28 -216 526 496 ;
C 113 ; WX 540 ; N q ; B 28 -219 491 493 ;
C 114 ; WX 395 ; N r ; B -21 -19 430 492 ;
C 115 ; WX 441 ; N s ; B 34 -15 413 493 ;
C 116 ; WX 307 ; N t ; B -21 -16 378 621 ;
C 117 ; WX 614 ; N u ; B -14 -18 558 501 ;
C 118 ; WX 556 ; N v ; B -28 -20 569 483 ;
C 119 ; WX 915 ; N w ; B -28 -17 928 495 ;
C 120 ; WX 559 ; N x ; B 14 -17 546 500 ;
C 121 ; WX 597 ; N y ; B -21 -227 541 500 ;
C 122 ; WX 452 ; N z ; B 28 -5 442 515 ;
C 123 ; WX 315 ; N braceleft ; B 6 -118 309 718 ;
C 124 ; WX 222 ; N bar ; B 63 -18 159 730 ;
C 125 ; WX 315 ; N braceright ; B 6 -118 309 718 ;
C 126 ; WX 600 ; N asciitilde ; B 69 166 531 340 ;
C 160 ; WX 282 ; N nonbreakingspace ; B 0 0 0 0 ;
C 161 ; WX 324 ; N exclamdown ; B 69 -203 253 531 ;
C 162 ; WX 450 ; N cent ; B 27 -122 437 592 ;
C 163 ; WX 640 ; N sterling ; B 0 -9 619 716 ;
C 164 ; WX 518 ; N currency ; B 3 72 515 586 ;
C 165 ; WX 603 ; N yen ; B -28 -65 631 747 ;
C 166 ; WX 0 ; N brokenbar ; B 0 0 0 0 ;
C 167 ; WX 519 ; N section ; B -50 -216 524 762 ;
C 168 ; WX 254 ; N dieresis ; B -20 554 308 682 ;
C 169 ; WX 800 ; N copyright ; B 29 -12 771 730 ;
C 170 ; WX 349 ; N ordfeminine ; B 13 385 349 717 ;
C 171 ; WX 0 ; N guillemotleft ; B 0 0 0 0 ;
C 172 ; WX 0 ; N logicalnot ; B 0 0 0 0 ;
C 173 ; WX 432 ; N hyphen ; B 28 249 404 377 ;
C 174 ; WX 800 ; N registered ; B 29 -12 771 730 ;
C 175 ; WX 278 ; N macron ; B -47 584 325 665 ;
C 176 ; WX 0 ; N degree ; B 0 0 0 0 ;
C 177 ; WX 0 ; N plusminus ; B 0 0 0 0 ;
C 178 ; WX 0 ; N twosuperior ; B 0 0 0 0 ;
C 179 ; WX 0 ; N threesuperior ; B 0 0 0 0 ;
C 180 ; WX 278 ; N acute ; B 49 536 279 693 ;
C 181 ; WX 614 ; N mu ; B -14 -231 558 501 ;
C 182 ; WX 0 ; N paragraph ; B 0 0 0 0 ;
C 183 ; WX 254 ; N periodcentered ; B 43 278 227 456 ;
C 184 ; WX 278 ; N cedilla ; B -8 -216 231 6 ;
C 185 ; WX 0 ; N onesuperior ; B 0 0 0 0 ;
C 186 ; WX 305 ; N ordmasculine ; B 16 373 291 702 ;
C 187 ; WX 0 ; N guillemotright ; B 0 0 0 0 ;
C 188 ; WX 0 ; N onequarter ; B 0 0 0 0 ;
C 189 ; WX 0 ; N onehalf ; B 0 0 0 0 ;
C 190 ; WX 0 ; N threequarters ; B 0 0 0 0 ;
C 191 ; WX 501 ; N questiondown ; B 15 -196 467 541 ;
C 192 ; WX 743 ; N Agrave ; B -23 -14 754 893 ;
C 193 ; WX 743 ; N Aacute ; B -23 -14 754 893 ;
C 194 ; WX 743 ; N Acircumflex ; B -23 -14 754 877 ;
C 195 ; WX 743 ; N Atilde ; B -23 -14 754 889 ;
C 196 ; WX 743 ; N Adieresis ; B -23 -14 754 882 ;
C 197 ; WX 743 ; N Aring ; B -23 -14 754 899 ;
C 198 ; WX 1060 ; N AE ; B -29 -14 1053 708 ;
C 199 ; WX 598 ; N Ccedilla ; B 27 -183 572 712 ;
C 200 ; WX 608 ; N Egrave ; B -21 0 608 893 ;
C 201 ; WX 608 ; N Eacute ; B -21 0 608 893 ;
C 202 ; WX 608 ; N Ecircumflex ; B -21 0 608 877 ;
C 203 ; WX 608 ; N Edieresis ; B -21 0 608 882 ;
C 204 ; WX 308 ; N Igrave ; B 14 -15 264 893 ;
C 205 ; WX 308 ; N Iacute ; B 14 -15 274 893 ;
C 206 ; WX 308 ; N Icircumflex ; B 1 -15 307 877 ;
C 207 ; WX 308 ; N Idieresis ; B -15 -15 313 882 ;
C 208 ; WX 0 ; N Eth ; B 0 0 0 0 ;
C 209 ; WX 817 ; N Ntilde ; B -42 -17 747 889 ;
C 210 ; WX 729 ; N Ograve ; B 32 -16 698 893 ;
C 211 ; WX 729 ; N Oacute ; B 32 -16 698 893 ;
C 212 ; WX 729 ; N Ocircumflex ; B 32 -16 698 877 ;
C 213 ; WX 729 ; N Otilde ; B 32 -16 698 889 ;
C 214 ; WX 729 ; N Odieresis ; B 32 -16 698 882 ;
C 215 ; WX 0 ; N multiply ; B 0 0 0 0 ;
C 216 ; WX 729 ; N Oslash ; B 14 -24 724 709 ;
C 217 ; WX 805 ; N Ugrave ; B 0 -19 804 893 ;
C 218 ; WX 805 ; N Uacute ; B 0 -19 804 893 ;
C 219 ; WX 805 ; N Ucircumflex ; B 0 -19 804 877 ;
C 220 ; WX 805 ; N Udieresis ; B 0 -19 804 882 ;
C 221 ; WX 0 ; N Yacute ; B 0 0 0 0 ;
C 222 ; WX 0 ; N Thorn ; B 0 0 0 0 ;
C 223 ; WX 688 ; N germandbls ; B -35 -15 668 785 ;
C 224 ; WX 581 ; N agrave ; B 21 -16 581 693 ;
C 225 ; WX 581 ; N aacute ; B 21 -16 581 693 ;
C 226 ; WX 581 ; N acircumflex ; B 21 -16 581 677 ;
C 227 ; WX 581 ; N atilde ; B 21 -16 581 689 ;
C 228 ; WX 581 ; N adieresis ; B 21 -16 581 682 ;
C 229 ; WX 581 ; N aring ; B 21 -16 581 734 ;
C 230 ; WX 792 ; N ae ; B 21 -23 773 494 ;
C 231 ; WX 440 ; N ccedilla ; B 21 -183 422 490 ;
C 232 ; WX 450 ; N egrave ; B 28 -23 428 693 ;
C 233 ; WX 450 ; N eacute ; B 28 -23 428 693 ;
C 234 ; WX 450 ; N ecircumflex ; B 28 -23 432 677 ;
C 235 ; WX 450 ; N edieresis ; B 28 -23 428 682 ;
C 236 ; WX 283 ; N igrave ; B -14 -15 244 693 ;
C 237 ; WX 283 ; N iacute ; B -14 -15 269 693 ;
C 238 ; WX 283 ; N icircumflex ; B -14 -15 297 677 ;
C 239 ; WX 283 ; N idieresis ; B -25 -15 303 682 ;
C 240 ; WX 0 ; N eth ; B 0 0 0 0 ;
C 241 ; WX 595 ; N ntilde ; B -28 -15 574 689 ;
C 242 ; WX 508 ; N ograve ; B 27 -17 485 693 ;
C 243 ; WX 508 ; N oacute ; B 27 -17 485 693 ;
C 244 ; WX 508 ; N ocircumflex ; B 27 -17 485 677 ;
C 245 ; WX 508 ; N otilde ; B 27 -17 485 689 ;
C 246 ; WX 508 ; N odieresis ; B 27 -17 485 682 ;
C 247 ; WX 0 ; N divide ; B 0 0 0 0 ;
C 248 ; WX 508 ; N oslash ; B -8 -54 496 589 ;
C 249 ; WX 614 ; N ugrave ; B -14 -18 558 693 ;
C 250 ; WX 614 ; N uacute ; B -14 -18 558 693 ;
C 251 ; WX 614 ; N ucircumflex ; B -14 -18 558 677 ;
C 252 ; WX 614 ; N udieresis ; B -14 -18 558 682 ;
C 253 ; WX 0 ; N yacute ; B 0 0 0 0 ;
C 254 ; WX 0 ; N thorn ; B 0 0 0 0 ;
C 255 ; WX 597 ; N ydieresis ; B -21 -227 541 682 ;
C -1 ; WX 283 ; N dotlessi ; B -14 -15 227 499 ;
C -1 ; WX 0 ; N Lslash ; B 0 0 0 0 ;
C -1 ; WX 0 ; N lslash ; B 0 0 0 0 ;
C -1 ; WX 1064 ; N OE ; B 32 -16 1055 709 ;
C -1 ; WX 790 ; N oe ; B 27 -23 764 493 ;
C -1 ; WX 0 ; N Scaron ; B 0 0 0 0 ;
C -1 ; WX 0 ; N scaron ; B 0 0 0 0 ;
C -1 ; WX 754 ; N Ydieresis ; B -35 -17 789 882 ;
C -1 ; WX 0 ; N Zcaron ; B 0 0 0 0 ;
C -1 ; WX 0 ; N zcaron ; B 0 0 0 0 ;
C -1 ; WX 0 ; N florin ; B 0 0 0 0 ;
C -1 ; WX 278 ; N hungarumlaut ; B -51 531 379 693 ;
C -1 ; WX 278 ; N circumflex ; B -14 557 292 677 ;
C -1 ; WX 278 ; N caron ; B -14 557 292 677 ;
C -1 ; WX 278 ; N macron ; B -47 584 325 665 ;
C -1 ; WX 278 ; N breve ; B -32 545 310 698 ;
C -1 ; WX 254 ; N dotaccent ; B 88 554 220 682 ;
C -1 ; WX 278 ; N ring ; B 11 532 267 734 ;
C -1 ; WX 278 ; N ogonek ; B 32 -216 226 6 ;
C -1 ; WX 278 ; N tilde ; B -44 563 326 689 ;
C -1 ; WX 611 ; N summation ; B -29 -18 569 785 ;
C -1 ; WX 411 ; N Omega ; B 34 -15 413 677 ;
C -1 ; WX 283 ; N pi ; B -14 -234 297 677 ;
C -1 ; WX 300 ; N endash ; B 0 245 300 350 ;
C -1 ; WX 600 ; N emdash ; B 0 245 600 350 ;
C -1 ; WX 259 ; N quoteleft ; B 35 489 224 717 ;
C -1 ; WX 259 ; N quoteright ; B 35 489 224 717 ;
C -1 ; WX 0 ; N quotesinglbase ; B 0 0 0 0 ;
C -1 ; WX 470 ; N quotedblleft ; B 35 489 443 717 ;
C -1 ; WX 470 ; N quotedblright ; B 35 487 443 717 ;
C -1 ; WX 0 ; N quotedblbase ; B 0 0 0 0 ;
C -1 ; WX 0 ; N dagger ; B 0 0 0 0 ;
C -1 ; WX 0 ; N daggerdbl ; B 0 0 0 0 ;
C -1 ; WX 500 ; N bullet ; B 70 179 430 539 ;
C -1 ; WX 780 ; N ellipsis ; B 43 -16 747 162 ;
C -1 ; WX 0 ; N perthousand ; B 0 0 0 0 ;
C -1 ; WX 0 ; N guilsinglleft ; B 0 0 0 0 ;
C -1 ; WX 0 ; N guilsinglright ; B 0 0 0 0 ;
C -1 ; WX 990 ; N trademark ; B 62 306 928 718 ;
C -1 ; WX 756 ; N partialdiff ; B 70 -17 777 877 ;
C -1 ; WX 614 ; N Delta ; B -14 -18 558 698 ;
C -1 ; WX 314 ; N product ; B 7 -223 317 877 ;
C -1 ; WX 0 ; N minus ; B 0 0 0 0 ;
C -1 ; WX 167 ; N fraction ; B -173 -28 310 686 ;
C -1 ; WX 254 ; N periodcentered ; B 43 278 227 456 ;
C -1 ; WX 760 ; N radical ; B 30 0 730 700 ;
C -1 ; WX 440 ; N infinity ; B 21 -17 422 677 ;
C -1 ; WX 618 ; N integral ; B 31 -16 589 877 ;
C -1 ; WX 805 ; N approxequal ; B 0 -19 804 854 ;
C -1 ; WX 598 ; N notequal ; B 27 -12 572 877 ;
C -1 ; WX 680 ; N lessequal ; B 29 -8 668 877 ;
C -1 ; WX 628 ; N greaterequal ; B 19 -219 612 677 ;
C -1 ; WX 795 ; N lozenge ; B 35 0 760 727 ;
C -1 ; WX 795 ; N apple ; B 35 0 760 727 ;
C -1 ; WX 0 ; N fi ; B 0 0 0 0 ;
C -1 ; WX 0 ; N fl ; B 0 0 0 0 ;
C -1 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
C -1 ; WX 0 ; N .null ; B 0 0 0 0 ;
C -1 ; WX 282 ; N nonmarkingreturn ; B 0 0 0 0 ;
EndCharMetrics
EndFontMetrics

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
{"Tp":"TrueType","Name":"DejaVuSansCondensed","Desc":{"Ascent":760,"Descent":-240,"CapHeight":760,"Flags":32,"FontBBox":{"Xmin":-918,"Ymin":-463,"Xmax":1614,"Ymax":1232},"ItalicAngle":0,"StemV":70,"MissingWidth":540},"Up":-63,"Ut":44,"Cw":[540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,540,286,360,414,754,572,855,702,247,351,351,450,754,286,325,286,303,572,572,572,572,572,572,572,572,572,572,303,303,754,754,754,478,900,615,617,628,693,568,518,697,677,265,265,590,501,776,673,708,542,708,625,571,549,659,615,890,616,549,616,351,303,351,754,450,450,551,571,495,571,554,316,571,570,250,250,521,250,876,570,550,571,571,370,469,353,570,532,736,532,532,472,572,303,572,754,540,708,549,286,473,466,900,450,450,572,1208,984,360,940,639,708,677,563,286,286,466,466,531,450,900,540,900,812,360,809,543,586,588,286,548,532,265,572,549,303,450,568,900,628,550,754,325,900,265,450,754,265,250,473,572,572,286,554,936,494,550,250,571,469,250,615,617,617,549,703,568,969,577,673,673,639,677,776,677,708,677,542,628,549,548,774,616,699,617,962,984,749,794,617,628,971,625,551,555,530,473,622,554,811,479,584,584,543,575,679,588,550,588,571,495,524,532,769,532,612,532,823,848,636,710,530,494,757,541],"Enc":"cp1251","Diff":"128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097","File":"","Size1":0,"Size2":0,"OriginalSize":0,"N":0,"DiffN":0}

Binary file not shown.

1
font/calligra.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"TrueType","Name":"CalligrapherRegular","Desc":{"Ascent":899,"Descent":-234,"CapHeight":899,"Flags":32,"FontBBox":{"Xmin":-173,"Ymin":-234,"Xmax":1328,"Ymax":899},"ItalicAngle":0,"StemV":70,"MissingWidth":800},"Up":-200,"Ut":20,"Cw":[800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,800,282,324,405,584,632,980,776,259,299,299,377,600,259,432,254,597,529,298,451,359,525,423,464,417,457,479,275,282,600,600,600,501,800,743,636,598,712,608,562,680,756,308,314,676,552,1041,817,729,569,698,674,618,673,805,753,1238,716,754,599,315,463,315,600,547,278,581,564,440,571,450,347,628,611,283,283,560,252,976,595,508,549,540,395,441,307,614,556,915,559,597,452,315,222,315,600,800,800,800,0,0,0,780,0,0,278,0,0,0,1064,800,0,800,800,259,259,470,470,500,300,600,278,990,0,0,790,800,800,754,282,324,450,640,518,603,0,519,254,800,349,0,0,432,800,278,0,0,0,0,278,614,0,254,278,0,305,0,0,0,0,501,743,743,743,743,743,743,1060,598,608,608,608,608,308,308,308,308,0,817,729,729,729,729,729,0,729,805,805,805,805,0,0,688,581,581,581,581,581,581,792,440,450,450,450,450,283,283,283,283,0,595,508,508,508,508,508,0,508,614,614,614,614,0,0,597],"Enc":"cp1252","Diff":"","File":"calligra.z","Size1":0,"Size2":0,"OriginalSize":40120,"N":0,"DiffN":0}

BIN
font/calligra.ttf Normal file

Binary file not shown.

BIN
font/calligra.z Normal file

Binary file not shown.

1
font/courier.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Courier","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}

1
font/courierb.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Courier-Bold","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}

1
font/courierbi.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Courier-BoldOblique","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}

1
font/courieri.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Courier-Oblique","Up":-100,"Ut":50,"I":256,"Cw":[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]}

251
font/cp1250.map Normal file
View File

@ -0,0 +1,251 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+015A Sacute
!8D U+0164 Tcaron
!8E U+017D Zcaron
!8F U+0179 Zacute
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+015B sacute
!9D U+0165 tcaron
!9E U+017E zcaron
!9F U+017A zacute
!A0 U+00A0 space
!A1 U+02C7 caron
!A2 U+02D8 breve
!A3 U+0141 Lslash
!A4 U+00A4 currency
!A5 U+0104 Aogonek
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+015E Scedilla
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+02DB ogonek
!B3 U+0142 lslash
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+0105 aogonek
!BA U+015F scedilla
!BB U+00BB guillemotright
!BC U+013D Lcaron
!BD U+02DD hungarumlaut
!BE U+013E lcaron
!BF U+017C zdotaccent
!C0 U+0154 Racute
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0139 Lacute
!C6 U+0106 Cacute
!C7 U+00C7 Ccedilla
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+011A Ecaron
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+010E Dcaron
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+0147 Ncaron
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0158 Rcaron
!D9 U+016E Uring
!DA U+00DA Uacute
!DB U+0170 Uhungarumlaut
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+0162 Tcommaaccent
!DF U+00DF germandbls
!E0 U+0155 racute
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+013A lacute
!E6 U+0107 cacute
!E7 U+00E7 ccedilla
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+011B ecaron
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+010F dcaron
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+0148 ncaron
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0159 rcaron
!F9 U+016F uring
!FA U+00FA uacute
!FB U+0171 uhungarumlaut
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+0163 tcommaaccent
!FF U+02D9 dotaccent

255
font/cp1251.map Normal file
View File

@ -0,0 +1,255 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0402 afii10051
!81 U+0403 afii10052
!82 U+201A quotesinglbase
!83 U+0453 afii10100
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+20AC Euro
!89 U+2030 perthousand
!8A U+0409 afii10058
!8B U+2039 guilsinglleft
!8C U+040A afii10059
!8D U+040C afii10061
!8E U+040B afii10060
!8F U+040F afii10145
!90 U+0452 afii10099
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9A U+0459 afii10106
!9B U+203A guilsinglright
!9C U+045A afii10107
!9D U+045C afii10109
!9E U+045B afii10108
!9F U+045F afii10193
!A0 U+00A0 space
!A1 U+040E afii10062
!A2 U+045E afii10110
!A3 U+0408 afii10057
!A4 U+00A4 currency
!A5 U+0490 afii10050
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+0401 afii10023
!A9 U+00A9 copyright
!AA U+0404 afii10053
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+0407 afii10056
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+0406 afii10055
!B3 U+0456 afii10103
!B4 U+0491 afii10098
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+0451 afii10071
!B9 U+2116 afii61352
!BA U+0454 afii10101
!BB U+00BB guillemotright
!BC U+0458 afii10105
!BD U+0405 afii10054
!BE U+0455 afii10102
!BF U+0457 afii10104
!C0 U+0410 afii10017
!C1 U+0411 afii10018
!C2 U+0412 afii10019
!C3 U+0413 afii10020
!C4 U+0414 afii10021
!C5 U+0415 afii10022
!C6 U+0416 afii10024
!C7 U+0417 afii10025
!C8 U+0418 afii10026
!C9 U+0419 afii10027
!CA U+041A afii10028
!CB U+041B afii10029
!CC U+041C afii10030
!CD U+041D afii10031
!CE U+041E afii10032
!CF U+041F afii10033
!D0 U+0420 afii10034
!D1 U+0421 afii10035
!D2 U+0422 afii10036
!D3 U+0423 afii10037
!D4 U+0424 afii10038
!D5 U+0425 afii10039
!D6 U+0426 afii10040
!D7 U+0427 afii10041
!D8 U+0428 afii10042
!D9 U+0429 afii10043
!DA U+042A afii10044
!DB U+042B afii10045
!DC U+042C afii10046
!DD U+042D afii10047
!DE U+042E afii10048
!DF U+042F afii10049
!E0 U+0430 afii10065
!E1 U+0431 afii10066
!E2 U+0432 afii10067
!E3 U+0433 afii10068
!E4 U+0434 afii10069
!E5 U+0435 afii10070
!E6 U+0436 afii10072
!E7 U+0437 afii10073
!E8 U+0438 afii10074
!E9 U+0439 afii10075
!EA U+043A afii10076
!EB U+043B afii10077
!EC U+043C afii10078
!ED U+043D afii10079
!EE U+043E afii10080
!EF U+043F afii10081
!F0 U+0440 afii10082
!F1 U+0441 afii10083
!F2 U+0442 afii10084
!F3 U+0443 afii10085
!F4 U+0444 afii10086
!F5 U+0445 afii10087
!F6 U+0446 afii10088
!F7 U+0447 afii10089
!F8 U+0448 afii10090
!F9 U+0449 afii10091
!FA U+044A afii10092
!FB U+044B afii10093
!FC U+044C afii10094
!FD U+044D afii10095
!FE U+044E afii10096
!FF U+044F afii10097

251
font/cp1252.map Normal file
View File

@ -0,0 +1,251 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+0152 OE
!8E U+017D Zcaron
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+0153 oe
!9E U+017E zcaron
!9F U+0178 Ydieresis
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis

239
font/cp1253.map Normal file
View File

@ -0,0 +1,239 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8B U+2039 guilsinglleft
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9B U+203A guilsinglright
!A0 U+00A0 space
!A1 U+0385 dieresistonos
!A2 U+0386 Alphatonos
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+2015 afii00208
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+0384 tonos
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+0388 Epsilontonos
!B9 U+0389 Etatonos
!BA U+038A Iotatonos
!BB U+00BB guillemotright
!BC U+038C Omicrontonos
!BD U+00BD onehalf
!BE U+038E Upsilontonos
!BF U+038F Omegatonos
!C0 U+0390 iotadieresistonos
!C1 U+0391 Alpha
!C2 U+0392 Beta
!C3 U+0393 Gamma
!C4 U+0394 Delta
!C5 U+0395 Epsilon
!C6 U+0396 Zeta
!C7 U+0397 Eta
!C8 U+0398 Theta
!C9 U+0399 Iota
!CA U+039A Kappa
!CB U+039B Lambda
!CC U+039C Mu
!CD U+039D Nu
!CE U+039E Xi
!CF U+039F Omicron
!D0 U+03A0 Pi
!D1 U+03A1 Rho
!D3 U+03A3 Sigma
!D4 U+03A4 Tau
!D5 U+03A5 Upsilon
!D6 U+03A6 Phi
!D7 U+03A7 Chi
!D8 U+03A8 Psi
!D9 U+03A9 Omega
!DA U+03AA Iotadieresis
!DB U+03AB Upsilondieresis
!DC U+03AC alphatonos
!DD U+03AD epsilontonos
!DE U+03AE etatonos
!DF U+03AF iotatonos
!E0 U+03B0 upsilondieresistonos
!E1 U+03B1 alpha
!E2 U+03B2 beta
!E3 U+03B3 gamma
!E4 U+03B4 delta
!E5 U+03B5 epsilon
!E6 U+03B6 zeta
!E7 U+03B7 eta
!E8 U+03B8 theta
!E9 U+03B9 iota
!EA U+03BA kappa
!EB U+03BB lambda
!EC U+03BC mu
!ED U+03BD nu
!EE U+03BE xi
!EF U+03BF omicron
!F0 U+03C0 pi
!F1 U+03C1 rho
!F2 U+03C2 sigma1
!F3 U+03C3 sigma
!F4 U+03C4 tau
!F5 U+03C5 upsilon
!F6 U+03C6 phi
!F7 U+03C7 chi
!F8 U+03C8 psi
!F9 U+03C9 omega
!FA U+03CA iotadieresis
!FB U+03CB upsilondieresis
!FC U+03CC omicrontonos
!FD U+03CD upsilontonos
!FE U+03CE omegatonos

249
font/cp1254.map Normal file
View File

@ -0,0 +1,249 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+0152 OE
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+0153 oe
!9F U+0178 Ydieresis
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+011E Gbreve
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0130 Idotaccent
!DE U+015E Scedilla
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+011F gbreve
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0131 dotlessi
!FE U+015F scedilla
!FF U+00FF ydieresis

233
font/cp1255.map Normal file
View File

@ -0,0 +1,233 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8B U+2039 guilsinglleft
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9B U+203A guilsinglright
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+20AA afii57636
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00D7 multiply
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD sfthyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 middot
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00F7 divide
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+05B0 afii57799
!C1 U+05B1 afii57801
!C2 U+05B2 afii57800
!C3 U+05B3 afii57802
!C4 U+05B4 afii57793
!C5 U+05B5 afii57794
!C6 U+05B6 afii57795
!C7 U+05B7 afii57798
!C8 U+05B8 afii57797
!C9 U+05B9 afii57806
!CB U+05BB afii57796
!CC U+05BC afii57807
!CD U+05BD afii57839
!CE U+05BE afii57645
!CF U+05BF afii57841
!D0 U+05C0 afii57842
!D1 U+05C1 afii57804
!D2 U+05C2 afii57803
!D3 U+05C3 afii57658
!D4 U+05F0 afii57716
!D5 U+05F1 afii57717
!D6 U+05F2 afii57718
!D7 U+05F3 gereshhebrew
!D8 U+05F4 gershayimhebrew
!E0 U+05D0 afii57664
!E1 U+05D1 afii57665
!E2 U+05D2 afii57666
!E3 U+05D3 afii57667
!E4 U+05D4 afii57668
!E5 U+05D5 afii57669
!E6 U+05D6 afii57670
!E7 U+05D7 afii57671
!E8 U+05D8 afii57672
!E9 U+05D9 afii57673
!EA U+05DA afii57674
!EB U+05DB afii57675
!EC U+05DC afii57676
!ED U+05DD afii57677
!EE U+05DE afii57678
!EF U+05DF afii57679
!F0 U+05E0 afii57680
!F1 U+05E1 afii57681
!F2 U+05E2 afii57682
!F3 U+05E3 afii57683
!F4 U+05E4 afii57684
!F5 U+05E5 afii57685
!F6 U+05E6 afii57686
!F7 U+05E7 afii57687
!F8 U+05E8 afii57688
!F9 U+05E9 afii57689
!FA U+05EA afii57690
!FD U+200E afii299
!FE U+200F afii300

244
font/cp1257.map Normal file
View File

@ -0,0 +1,244 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8B U+2039 guilsinglleft
!8D U+00A8 dieresis
!8E U+02C7 caron
!8F U+00B8 cedilla
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9B U+203A guilsinglright
!9D U+00AF macron
!9E U+02DB ogonek
!A0 U+00A0 space
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00D8 Oslash
!A9 U+00A9 copyright
!AA U+0156 Rcommaaccent
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00C6 AE
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00F8 oslash
!B9 U+00B9 onesuperior
!BA U+0157 rcommaaccent
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00E6 ae
!C0 U+0104 Aogonek
!C1 U+012E Iogonek
!C2 U+0100 Amacron
!C3 U+0106 Cacute
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+0118 Eogonek
!C7 U+0112 Emacron
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0179 Zacute
!CB U+0116 Edotaccent
!CC U+0122 Gcommaaccent
!CD U+0136 Kcommaaccent
!CE U+012A Imacron
!CF U+013B Lcommaaccent
!D0 U+0160 Scaron
!D1 U+0143 Nacute
!D2 U+0145 Ncommaaccent
!D3 U+00D3 Oacute
!D4 U+014C Omacron
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0172 Uogonek
!D9 U+0141 Lslash
!DA U+015A Sacute
!DB U+016A Umacron
!DC U+00DC Udieresis
!DD U+017B Zdotaccent
!DE U+017D Zcaron
!DF U+00DF germandbls
!E0 U+0105 aogonek
!E1 U+012F iogonek
!E2 U+0101 amacron
!E3 U+0107 cacute
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+0119 eogonek
!E7 U+0113 emacron
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+017A zacute
!EB U+0117 edotaccent
!EC U+0123 gcommaaccent
!ED U+0137 kcommaaccent
!EE U+012B imacron
!EF U+013C lcommaaccent
!F0 U+0161 scaron
!F1 U+0144 nacute
!F2 U+0146 ncommaaccent
!F3 U+00F3 oacute
!F4 U+014D omacron
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0173 uogonek
!F9 U+0142 lslash
!FA U+015B sacute
!FB U+016B umacron
!FC U+00FC udieresis
!FD U+017C zdotaccent
!FE U+017E zcaron
!FF U+02D9 dotaccent

247
font/cp1258.map Normal file
View File

@ -0,0 +1,247 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8B U+2039 guilsinglleft
!8C U+0152 OE
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9B U+203A guilsinglright
!9C U+0153 oe
!9F U+0178 Ydieresis
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+0300 gravecomb
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+0110 Dcroat
!D1 U+00D1 Ntilde
!D2 U+0309 hookabovecomb
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+01A0 Ohorn
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+01AF Uhorn
!DE U+0303 tildecomb
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+0301 acutecomb
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+0111 dcroat
!F1 U+00F1 ntilde
!F2 U+0323 dotbelowcomb
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+01A1 ohorn
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+01B0 uhorn
!FE U+20AB dong
!FF U+00FF ydieresis

225
font/cp874.map Normal file
View File

@ -0,0 +1,225 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!85 U+2026 ellipsis
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!A0 U+00A0 space
!A1 U+0E01 kokaithai
!A2 U+0E02 khokhaithai
!A3 U+0E03 khokhuatthai
!A4 U+0E04 khokhwaithai
!A5 U+0E05 khokhonthai
!A6 U+0E06 khorakhangthai
!A7 U+0E07 ngonguthai
!A8 U+0E08 chochanthai
!A9 U+0E09 chochingthai
!AA U+0E0A chochangthai
!AB U+0E0B sosothai
!AC U+0E0C chochoethai
!AD U+0E0D yoyingthai
!AE U+0E0E dochadathai
!AF U+0E0F topatakthai
!B0 U+0E10 thothanthai
!B1 U+0E11 thonangmonthothai
!B2 U+0E12 thophuthaothai
!B3 U+0E13 nonenthai
!B4 U+0E14 dodekthai
!B5 U+0E15 totaothai
!B6 U+0E16 thothungthai
!B7 U+0E17 thothahanthai
!B8 U+0E18 thothongthai
!B9 U+0E19 nonuthai
!BA U+0E1A bobaimaithai
!BB U+0E1B poplathai
!BC U+0E1C phophungthai
!BD U+0E1D fofathai
!BE U+0E1E phophanthai
!BF U+0E1F fofanthai
!C0 U+0E20 phosamphaothai
!C1 U+0E21 momathai
!C2 U+0E22 yoyakthai
!C3 U+0E23 roruathai
!C4 U+0E24 ruthai
!C5 U+0E25 lolingthai
!C6 U+0E26 luthai
!C7 U+0E27 wowaenthai
!C8 U+0E28 sosalathai
!C9 U+0E29 sorusithai
!CA U+0E2A sosuathai
!CB U+0E2B hohipthai
!CC U+0E2C lochulathai
!CD U+0E2D oangthai
!CE U+0E2E honokhukthai
!CF U+0E2F paiyannoithai
!D0 U+0E30 saraathai
!D1 U+0E31 maihanakatthai
!D2 U+0E32 saraaathai
!D3 U+0E33 saraamthai
!D4 U+0E34 saraithai
!D5 U+0E35 saraiithai
!D6 U+0E36 sarauethai
!D7 U+0E37 saraueethai
!D8 U+0E38 sarauthai
!D9 U+0E39 sarauuthai
!DA U+0E3A phinthuthai
!DF U+0E3F bahtthai
!E0 U+0E40 saraethai
!E1 U+0E41 saraaethai
!E2 U+0E42 saraothai
!E3 U+0E43 saraaimaimuanthai
!E4 U+0E44 saraaimaimalaithai
!E5 U+0E45 lakkhangyaothai
!E6 U+0E46 maiyamokthai
!E7 U+0E47 maitaikhuthai
!E8 U+0E48 maiekthai
!E9 U+0E49 maithothai
!EA U+0E4A maitrithai
!EB U+0E4B maichattawathai
!EC U+0E4C thanthakhatthai
!ED U+0E4D nikhahitthai
!EE U+0E4E yamakkanthai
!EF U+0E4F fongmanthai
!F0 U+0E50 zerothai
!F1 U+0E51 onethai
!F2 U+0E52 twothai
!F3 U+0E53 threethai
!F4 U+0E54 fourthai
!F5 U+0E55 fivethai
!F6 U+0E56 sixthai
!F7 U+0E57 seventhai
!F8 U+0E58 eightthai
!F9 U+0E59 ninethai
!FA U+0E5A angkhankhuthai
!FB U+0E5B khomutthai

1
font/helvetica.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Helvetica","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,556,350,222,556,333,1000,556,556,333,1000,667,333,1000,350,611,350,350,222,222,333,333,350,556,1000,333,1000,500,333,944,350,500,667,278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]}

1
font/helvetica_1251.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"TrueType","Name":"ArialMT","Desc":{"Ascent":728,"Descent":-210,"CapHeight":728,"Flags":32,"FontBBox":{"Xmin":-665,"Ymin":-325,"Xmax":2028,"Ymax":1037},"ItalicAngle":0,"StemV":70,"MissingWidth":750},"Up":-106,"Ut":73,"Cw":[750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,750,865,542,222,365,333,1000,556,556,556,1000,1057,333,1010,583,854,719,556,222,222,333,333,350,556,1000,750,1000,906,333,813,438,556,552,278,635,500,500,556,489,260,556,667,737,719,556,584,333,737,278,400,549,278,222,411,576,537,278,556,1073,510,556,222,667,500,278,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542],"Enc":"cp1251","Diff":"128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097","File":"helvetica_1251.z","Size1":0,"Size2":0,"OriginalSize":275572,"I":0,"N":0,"DiffN":0}

BIN
font/helvetica_1251.z Normal file

Binary file not shown.

1
font/helvetica_1253.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"TrueType","Name":"ArialMT","Desc":{"Ascent":728,"Descent":-210,"CapHeight":728,"Flags":32,"FontBBox":{"Xmin":-665,"Ymin":-325,"Xmax":2028,"Ymax":1037},"ItalicAngle":0,"StemV":70,"MissingWidth":750},"Up":-106,"Ut":73,"Cw":[750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,750,556,750,222,556,333,1000,556,556,750,1000,750,333,750,750,750,750,750,222,222,333,333,350,556,1000,750,1000,750,333,750,750,750,750,278,333,667,556,556,556,260,556,333,737,750,556,584,333,737,1000,400,549,333,333,333,576,537,278,784,838,384,556,774,834,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,750,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,750],"Enc":"cp1253","Diff":"136 /.notdef 138 /.notdef 140 /.notdef 142 /.notdef 152 /.notdef 154 /.notdef 156 /.notdef 158 /.notdef /.notdef 161 /dieresistonos /Alphatonos 170 /.notdef 175 /afii00208 180 /tonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef","File":"helvetica_1253.z","Size1":0,"Size2":0,"OriginalSize":275572,"I":0,"N":0,"DiffN":0}

BIN
font/helvetica_1253.z Normal file

Binary file not shown.

1
font/helveticab.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Helvetica-Bold","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,556,350,278,556,500,1000,556,556,333,1000,667,333,1000,350,611,350,350,278,278,500,500,350,556,1000,333,1000,556,333,944,350,500,667,278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]}

1
font/helveticabi.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Helvetica-BoldOblique","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,556,350,278,556,500,1000,556,556,333,1000,667,333,1000,350,611,350,350,278,278,500,500,350,556,1000,333,1000,556,333,944,350,500,667,278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]}

1
font/helveticai.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Helvetica-Oblique","Up":-100,"Ut":50,"Cw":[278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,556,350,222,556,333,1000,556,556,333,1000,667,333,1000,350,611,350,350,222,222,333,333,350,556,1000,333,1000,500,333,944,350,500,667,278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]}

256
font/iso-8859-1.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis

248
font/iso-8859-11.map Normal file
View File

@ -0,0 +1,248 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0E01 kokaithai
!A2 U+0E02 khokhaithai
!A3 U+0E03 khokhuatthai
!A4 U+0E04 khokhwaithai
!A5 U+0E05 khokhonthai
!A6 U+0E06 khorakhangthai
!A7 U+0E07 ngonguthai
!A8 U+0E08 chochanthai
!A9 U+0E09 chochingthai
!AA U+0E0A chochangthai
!AB U+0E0B sosothai
!AC U+0E0C chochoethai
!AD U+0E0D yoyingthai
!AE U+0E0E dochadathai
!AF U+0E0F topatakthai
!B0 U+0E10 thothanthai
!B1 U+0E11 thonangmonthothai
!B2 U+0E12 thophuthaothai
!B3 U+0E13 nonenthai
!B4 U+0E14 dodekthai
!B5 U+0E15 totaothai
!B6 U+0E16 thothungthai
!B7 U+0E17 thothahanthai
!B8 U+0E18 thothongthai
!B9 U+0E19 nonuthai
!BA U+0E1A bobaimaithai
!BB U+0E1B poplathai
!BC U+0E1C phophungthai
!BD U+0E1D fofathai
!BE U+0E1E phophanthai
!BF U+0E1F fofanthai
!C0 U+0E20 phosamphaothai
!C1 U+0E21 momathai
!C2 U+0E22 yoyakthai
!C3 U+0E23 roruathai
!C4 U+0E24 ruthai
!C5 U+0E25 lolingthai
!C6 U+0E26 luthai
!C7 U+0E27 wowaenthai
!C8 U+0E28 sosalathai
!C9 U+0E29 sorusithai
!CA U+0E2A sosuathai
!CB U+0E2B hohipthai
!CC U+0E2C lochulathai
!CD U+0E2D oangthai
!CE U+0E2E honokhukthai
!CF U+0E2F paiyannoithai
!D0 U+0E30 saraathai
!D1 U+0E31 maihanakatthai
!D2 U+0E32 saraaathai
!D3 U+0E33 saraamthai
!D4 U+0E34 saraithai
!D5 U+0E35 saraiithai
!D6 U+0E36 sarauethai
!D7 U+0E37 saraueethai
!D8 U+0E38 sarauthai
!D9 U+0E39 sarauuthai
!DA U+0E3A phinthuthai
!DF U+0E3F bahtthai
!E0 U+0E40 saraethai
!E1 U+0E41 saraaethai
!E2 U+0E42 saraothai
!E3 U+0E43 saraaimaimuanthai
!E4 U+0E44 saraaimaimalaithai
!E5 U+0E45 lakkhangyaothai
!E6 U+0E46 maiyamokthai
!E7 U+0E47 maitaikhuthai
!E8 U+0E48 maiekthai
!E9 U+0E49 maithothai
!EA U+0E4A maitrithai
!EB U+0E4B maichattawathai
!EC U+0E4C thanthakhatthai
!ED U+0E4D nikhahitthai
!EE U+0E4E yamakkanthai
!EF U+0E4F fongmanthai
!F0 U+0E50 zerothai
!F1 U+0E51 onethai
!F2 U+0E52 twothai
!F3 U+0E53 threethai
!F4 U+0E54 fourthai
!F5 U+0E55 fivethai
!F6 U+0E56 sixthai
!F7 U+0E57 seventhai
!F8 U+0E58 eightthai
!F9 U+0E59 ninethai
!FA U+0E5A angkhankhuthai
!FB U+0E5B khomutthai

256
font/iso-8859-15.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+20AC Euro
!A5 U+00A5 yen
!A6 U+0160 Scaron
!A7 U+00A7 section
!A8 U+0161 scaron
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+017D Zcaron
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+017E zcaron
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+0152 OE
!BD U+0153 oe
!BE U+0178 Ydieresis
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis

256
font/iso-8859-16.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0104 Aogonek
!A2 U+0105 aogonek
!A3 U+0141 Lslash
!A4 U+20AC Euro
!A5 U+201E quotedblbase
!A6 U+0160 Scaron
!A7 U+00A7 section
!A8 U+0161 scaron
!A9 U+00A9 copyright
!AA U+0218 Scommaaccent
!AB U+00AB guillemotleft
!AC U+0179 Zacute
!AD U+00AD hyphen
!AE U+017A zacute
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+010C Ccaron
!B3 U+0142 lslash
!B4 U+017D Zcaron
!B5 U+201D quotedblright
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+017E zcaron
!B9 U+010D ccaron
!BA U+0219 scommaaccent
!BB U+00BB guillemotright
!BC U+0152 OE
!BD U+0153 oe
!BE U+0178 Ydieresis
!BF U+017C zdotaccent
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0106 Cacute
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+015A Sacute
!D8 U+0170 Uhungarumlaut
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0118 Eogonek
!DE U+021A Tcommaaccent
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+0107 cacute
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+015B sacute
!F8 U+0171 uhungarumlaut
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0119 eogonek
!FE U+021B tcommaaccent
!FF U+00FF ydieresis

256
font/iso-8859-2.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0104 Aogonek
!A2 U+02D8 breve
!A3 U+0141 Lslash
!A4 U+00A4 currency
!A5 U+013D Lcaron
!A6 U+015A Sacute
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+0160 Scaron
!AA U+015E Scedilla
!AB U+0164 Tcaron
!AC U+0179 Zacute
!AD U+00AD hyphen
!AE U+017D Zcaron
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+0105 aogonek
!B2 U+02DB ogonek
!B3 U+0142 lslash
!B4 U+00B4 acute
!B5 U+013E lcaron
!B6 U+015B sacute
!B7 U+02C7 caron
!B8 U+00B8 cedilla
!B9 U+0161 scaron
!BA U+015F scedilla
!BB U+0165 tcaron
!BC U+017A zacute
!BD U+02DD hungarumlaut
!BE U+017E zcaron
!BF U+017C zdotaccent
!C0 U+0154 Racute
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0139 Lacute
!C6 U+0106 Cacute
!C7 U+00C7 Ccedilla
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+011A Ecaron
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+010E Dcaron
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+0147 Ncaron
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0158 Rcaron
!D9 U+016E Uring
!DA U+00DA Uacute
!DB U+0170 Uhungarumlaut
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+0162 Tcommaaccent
!DF U+00DF germandbls
!E0 U+0155 racute
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+013A lacute
!E6 U+0107 cacute
!E7 U+00E7 ccedilla
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+011B ecaron
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+010F dcaron
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+0148 ncaron
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0159 rcaron
!F9 U+016F uring
!FA U+00FA uacute
!FB U+0171 uhungarumlaut
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+0163 tcommaaccent
!FF U+02D9 dotaccent

256
font/iso-8859-4.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0104 Aogonek
!A2 U+0138 kgreenlandic
!A3 U+0156 Rcommaaccent
!A4 U+00A4 currency
!A5 U+0128 Itilde
!A6 U+013B Lcommaaccent
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+0160 Scaron
!AA U+0112 Emacron
!AB U+0122 Gcommaaccent
!AC U+0166 Tbar
!AD U+00AD hyphen
!AE U+017D Zcaron
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+0105 aogonek
!B2 U+02DB ogonek
!B3 U+0157 rcommaaccent
!B4 U+00B4 acute
!B5 U+0129 itilde
!B6 U+013C lcommaaccent
!B7 U+02C7 caron
!B8 U+00B8 cedilla
!B9 U+0161 scaron
!BA U+0113 emacron
!BB U+0123 gcommaaccent
!BC U+0167 tbar
!BD U+014A Eng
!BE U+017E zcaron
!BF U+014B eng
!C0 U+0100 Amacron
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+012E Iogonek
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+0116 Edotaccent
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+012A Imacron
!D0 U+0110 Dcroat
!D1 U+0145 Ncommaaccent
!D2 U+014C Omacron
!D3 U+0136 Kcommaaccent
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+0172 Uogonek
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0168 Utilde
!DE U+016A Umacron
!DF U+00DF germandbls
!E0 U+0101 amacron
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+012F iogonek
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+0117 edotaccent
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+012B imacron
!F0 U+0111 dcroat
!F1 U+0146 ncommaaccent
!F2 U+014D omacron
!F3 U+0137 kcommaaccent
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+0173 uogonek
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0169 utilde
!FE U+016B umacron
!FF U+02D9 dotaccent

256
font/iso-8859-5.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0401 afii10023
!A2 U+0402 afii10051
!A3 U+0403 afii10052
!A4 U+0404 afii10053
!A5 U+0405 afii10054
!A6 U+0406 afii10055
!A7 U+0407 afii10056
!A8 U+0408 afii10057
!A9 U+0409 afii10058
!AA U+040A afii10059
!AB U+040B afii10060
!AC U+040C afii10061
!AD U+00AD hyphen
!AE U+040E afii10062
!AF U+040F afii10145
!B0 U+0410 afii10017
!B1 U+0411 afii10018
!B2 U+0412 afii10019
!B3 U+0413 afii10020
!B4 U+0414 afii10021
!B5 U+0415 afii10022
!B6 U+0416 afii10024
!B7 U+0417 afii10025
!B8 U+0418 afii10026
!B9 U+0419 afii10027
!BA U+041A afii10028
!BB U+041B afii10029
!BC U+041C afii10030
!BD U+041D afii10031
!BE U+041E afii10032
!BF U+041F afii10033
!C0 U+0420 afii10034
!C1 U+0421 afii10035
!C2 U+0422 afii10036
!C3 U+0423 afii10037
!C4 U+0424 afii10038
!C5 U+0425 afii10039
!C6 U+0426 afii10040
!C7 U+0427 afii10041
!C8 U+0428 afii10042
!C9 U+0429 afii10043
!CA U+042A afii10044
!CB U+042B afii10045
!CC U+042C afii10046
!CD U+042D afii10047
!CE U+042E afii10048
!CF U+042F afii10049
!D0 U+0430 afii10065
!D1 U+0431 afii10066
!D2 U+0432 afii10067
!D3 U+0433 afii10068
!D4 U+0434 afii10069
!D5 U+0435 afii10070
!D6 U+0436 afii10072
!D7 U+0437 afii10073
!D8 U+0438 afii10074
!D9 U+0439 afii10075
!DA U+043A afii10076
!DB U+043B afii10077
!DC U+043C afii10078
!DD U+043D afii10079
!DE U+043E afii10080
!DF U+043F afii10081
!E0 U+0440 afii10082
!E1 U+0441 afii10083
!E2 U+0442 afii10084
!E3 U+0443 afii10085
!E4 U+0444 afii10086
!E5 U+0445 afii10087
!E6 U+0446 afii10088
!E7 U+0447 afii10089
!E8 U+0448 afii10090
!E9 U+0449 afii10091
!EA U+044A afii10092
!EB U+044B afii10093
!EC U+044C afii10094
!ED U+044D afii10095
!EE U+044E afii10096
!EF U+044F afii10097
!F0 U+2116 afii61352
!F1 U+0451 afii10071
!F2 U+0452 afii10099
!F3 U+0453 afii10100
!F4 U+0454 afii10101
!F5 U+0455 afii10102
!F6 U+0456 afii10103
!F7 U+0457 afii10104
!F8 U+0458 afii10105
!F9 U+0459 afii10106
!FA U+045A afii10107
!FB U+045B afii10108
!FC U+045C afii10109
!FD U+00A7 section
!FE U+045E afii10110
!FF U+045F afii10193

250
font/iso-8859-7.map Normal file
View File

@ -0,0 +1,250 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+2018 quoteleft
!A2 U+2019 quoteright
!A3 U+00A3 sterling
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AF U+2015 afii00208
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+0384 tonos
!B5 U+0385 dieresistonos
!B6 U+0386 Alphatonos
!B7 U+00B7 periodcentered
!B8 U+0388 Epsilontonos
!B9 U+0389 Etatonos
!BA U+038A Iotatonos
!BB U+00BB guillemotright
!BC U+038C Omicrontonos
!BD U+00BD onehalf
!BE U+038E Upsilontonos
!BF U+038F Omegatonos
!C0 U+0390 iotadieresistonos
!C1 U+0391 Alpha
!C2 U+0392 Beta
!C3 U+0393 Gamma
!C4 U+0394 Delta
!C5 U+0395 Epsilon
!C6 U+0396 Zeta
!C7 U+0397 Eta
!C8 U+0398 Theta
!C9 U+0399 Iota
!CA U+039A Kappa
!CB U+039B Lambda
!CC U+039C Mu
!CD U+039D Nu
!CE U+039E Xi
!CF U+039F Omicron
!D0 U+03A0 Pi
!D1 U+03A1 Rho
!D3 U+03A3 Sigma
!D4 U+03A4 Tau
!D5 U+03A5 Upsilon
!D6 U+03A6 Phi
!D7 U+03A7 Chi
!D8 U+03A8 Psi
!D9 U+03A9 Omega
!DA U+03AA Iotadieresis
!DB U+03AB Upsilondieresis
!DC U+03AC alphatonos
!DD U+03AD epsilontonos
!DE U+03AE etatonos
!DF U+03AF iotatonos
!E0 U+03B0 upsilondieresistonos
!E1 U+03B1 alpha
!E2 U+03B2 beta
!E3 U+03B3 gamma
!E4 U+03B4 delta
!E5 U+03B5 epsilon
!E6 U+03B6 zeta
!E7 U+03B7 eta
!E8 U+03B8 theta
!E9 U+03B9 iota
!EA U+03BA kappa
!EB U+03BB lambda
!EC U+03BC mu
!ED U+03BD nu
!EE U+03BE xi
!EF U+03BF omicron
!F0 U+03C0 pi
!F1 U+03C1 rho
!F2 U+03C2 sigma1
!F3 U+03C3 sigma
!F4 U+03C4 tau
!F5 U+03C5 upsilon
!F6 U+03C6 phi
!F7 U+03C7 chi
!F8 U+03C8 psi
!F9 U+03C9 omega
!FA U+03CA iotadieresis
!FB U+03CB upsilondieresis
!FC U+03CC omicrontonos
!FD U+03CD upsilontonos
!FE U+03CE omegatonos

256
font/iso-8859-9.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+011E Gbreve
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0130 Idotaccent
!DE U+015E Scedilla
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+011F gbreve
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0131 dotlessi
!FE U+015F scedilla
!FF U+00FF ydieresis

256
font/koi8-r.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+2500 SF100000
!81 U+2502 SF110000
!82 U+250C SF010000
!83 U+2510 SF030000
!84 U+2514 SF020000
!85 U+2518 SF040000
!86 U+251C SF080000
!87 U+2524 SF090000
!88 U+252C SF060000
!89 U+2534 SF070000
!8A U+253C SF050000
!8B U+2580 upblock
!8C U+2584 dnblock
!8D U+2588 block
!8E U+258C lfblock
!8F U+2590 rtblock
!90 U+2591 ltshade
!91 U+2592 shade
!92 U+2593 dkshade
!93 U+2320 integraltp
!94 U+25A0 filledbox
!95 U+2219 periodcentered
!96 U+221A radical
!97 U+2248 approxequal
!98 U+2264 lessequal
!99 U+2265 greaterequal
!9A U+00A0 space
!9B U+2321 integralbt
!9C U+00B0 degree
!9D U+00B2 twosuperior
!9E U+00B7 periodcentered
!9F U+00F7 divide
!A0 U+2550 SF430000
!A1 U+2551 SF240000
!A2 U+2552 SF510000
!A3 U+0451 afii10071
!A4 U+2553 SF520000
!A5 U+2554 SF390000
!A6 U+2555 SF220000
!A7 U+2556 SF210000
!A8 U+2557 SF250000
!A9 U+2558 SF500000
!AA U+2559 SF490000
!AB U+255A SF380000
!AC U+255B SF280000
!AD U+255C SF270000
!AE U+255D SF260000
!AF U+255E SF360000
!B0 U+255F SF370000
!B1 U+2560 SF420000
!B2 U+2561 SF190000
!B3 U+0401 afii10023
!B4 U+2562 SF200000
!B5 U+2563 SF230000
!B6 U+2564 SF470000
!B7 U+2565 SF480000
!B8 U+2566 SF410000
!B9 U+2567 SF450000
!BA U+2568 SF460000
!BB U+2569 SF400000
!BC U+256A SF540000
!BD U+256B SF530000
!BE U+256C SF440000
!BF U+00A9 copyright
!C0 U+044E afii10096
!C1 U+0430 afii10065
!C2 U+0431 afii10066
!C3 U+0446 afii10088
!C4 U+0434 afii10069
!C5 U+0435 afii10070
!C6 U+0444 afii10086
!C7 U+0433 afii10068
!C8 U+0445 afii10087
!C9 U+0438 afii10074
!CA U+0439 afii10075
!CB U+043A afii10076
!CC U+043B afii10077
!CD U+043C afii10078
!CE U+043D afii10079
!CF U+043E afii10080
!D0 U+043F afii10081
!D1 U+044F afii10097
!D2 U+0440 afii10082
!D3 U+0441 afii10083
!D4 U+0442 afii10084
!D5 U+0443 afii10085
!D6 U+0436 afii10072
!D7 U+0432 afii10067
!D8 U+044C afii10094
!D9 U+044B afii10093
!DA U+0437 afii10073
!DB U+0448 afii10090
!DC U+044D afii10095
!DD U+0449 afii10091
!DE U+0447 afii10089
!DF U+044A afii10092
!E0 U+042E afii10048
!E1 U+0410 afii10017
!E2 U+0411 afii10018
!E3 U+0426 afii10040
!E4 U+0414 afii10021
!E5 U+0415 afii10022
!E6 U+0424 afii10038
!E7 U+0413 afii10020
!E8 U+0425 afii10039
!E9 U+0418 afii10026
!EA U+0419 afii10027
!EB U+041A afii10028
!EC U+041B afii10029
!ED U+041C afii10030
!EE U+041D afii10031
!EF U+041E afii10032
!F0 U+041F afii10033
!F1 U+042F afii10049
!F2 U+0420 afii10034
!F3 U+0421 afii10035
!F4 U+0422 afii10036
!F5 U+0423 afii10037
!F6 U+0416 afii10024
!F7 U+0412 afii10019
!F8 U+042C afii10046
!F9 U+042B afii10045
!FA U+0417 afii10025
!FB U+0428 afii10042
!FC U+042D afii10047
!FD U+0429 afii10043
!FE U+0427 afii10041
!FF U+042A afii10044

256
font/koi8-u.map Normal file
View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+2500 SF100000
!81 U+2502 SF110000
!82 U+250C SF010000
!83 U+2510 SF030000
!84 U+2514 SF020000
!85 U+2518 SF040000
!86 U+251C SF080000
!87 U+2524 SF090000
!88 U+252C SF060000
!89 U+2534 SF070000
!8A U+253C SF050000
!8B U+2580 upblock
!8C U+2584 dnblock
!8D U+2588 block
!8E U+258C lfblock
!8F U+2590 rtblock
!90 U+2591 ltshade
!91 U+2592 shade
!92 U+2593 dkshade
!93 U+2320 integraltp
!94 U+25A0 filledbox
!95 U+2022 bullet
!96 U+221A radical
!97 U+2248 approxequal
!98 U+2264 lessequal
!99 U+2265 greaterequal
!9A U+00A0 space
!9B U+2321 integralbt
!9C U+00B0 degree
!9D U+00B2 twosuperior
!9E U+00B7 periodcentered
!9F U+00F7 divide
!A0 U+2550 SF430000
!A1 U+2551 SF240000
!A2 U+2552 SF510000
!A3 U+0451 afii10071
!A4 U+0454 afii10101
!A5 U+2554 SF390000
!A6 U+0456 afii10103
!A7 U+0457 afii10104
!A8 U+2557 SF250000
!A9 U+2558 SF500000
!AA U+2559 SF490000
!AB U+255A SF380000
!AC U+255B SF280000
!AD U+0491 afii10098
!AE U+255D SF260000
!AF U+255E SF360000
!B0 U+255F SF370000
!B1 U+2560 SF420000
!B2 U+2561 SF190000
!B3 U+0401 afii10023
!B4 U+0404 afii10053
!B5 U+2563 SF230000
!B6 U+0406 afii10055
!B7 U+0407 afii10056
!B8 U+2566 SF410000
!B9 U+2567 SF450000
!BA U+2568 SF460000
!BB U+2569 SF400000
!BC U+256A SF540000
!BD U+0490 afii10050
!BE U+256C SF440000
!BF U+00A9 copyright
!C0 U+044E afii10096
!C1 U+0430 afii10065
!C2 U+0431 afii10066
!C3 U+0446 afii10088
!C4 U+0434 afii10069
!C5 U+0435 afii10070
!C6 U+0444 afii10086
!C7 U+0433 afii10068
!C8 U+0445 afii10087
!C9 U+0438 afii10074
!CA U+0439 afii10075
!CB U+043A afii10076
!CC U+043B afii10077
!CD U+043C afii10078
!CE U+043D afii10079
!CF U+043E afii10080
!D0 U+043F afii10081
!D1 U+044F afii10097
!D2 U+0440 afii10082
!D3 U+0441 afii10083
!D4 U+0442 afii10084
!D5 U+0443 afii10085
!D6 U+0436 afii10072
!D7 U+0432 afii10067
!D8 U+044C afii10094
!D9 U+044B afii10093
!DA U+0437 afii10073
!DB U+0448 afii10090
!DC U+044D afii10095
!DD U+0449 afii10091
!DE U+0447 afii10089
!DF U+044A afii10092
!E0 U+042E afii10048
!E1 U+0410 afii10017
!E2 U+0411 afii10018
!E3 U+0426 afii10040
!E4 U+0414 afii10021
!E5 U+0415 afii10022
!E6 U+0424 afii10038
!E7 U+0413 afii10020
!E8 U+0425 afii10039
!E9 U+0418 afii10026
!EA U+0419 afii10027
!EB U+041A afii10028
!EC U+041B afii10029
!ED U+041C afii10030
!EE U+041D afii10031
!EF U+041E afii10032
!F0 U+041F afii10033
!F1 U+042F afii10049
!F2 U+0420 afii10034
!F3 U+0421 afii10035
!F4 U+0422 afii10036
!F5 U+0423 afii10037
!F6 U+0416 afii10024
!F7 U+0412 afii10019
!F8 U+042C afii10046
!F9 U+042B afii10045
!FA U+0417 afii10025
!FB U+0428 afii10042
!FC U+042D afii10047
!FD U+0429 afii10043
!FE U+0427 afii10041
!FF U+042A afii10044

1
font/times.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Times-Roman","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,350,500,350,333,500,444,1000,500,500,333,1000,556,333,889,350,611,350,350,333,333,444,444,350,500,1000,333,980,389,333,722,350,444,722,250,333,500,500,500,500,200,500,333,760,276,500,564,333,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500]}

1
font/timesb.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Times-Bold","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,555,500,500,1000,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,350,500,350,333,500,500,1000,500,500,333,1000,556,333,1000,350,667,350,350,333,333,500,500,350,500,1000,333,1000,389,333,722,350,444,722,250,333,500,500,500,500,220,500,333,747,300,500,570,333,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1000,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500]}

1
font/timesbi.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Times-BoldItalic","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,350,500,350,333,500,500,1000,500,500,333,1000,556,333,944,350,611,350,350,333,333,500,500,350,500,1000,333,1000,389,333,722,350,389,611,250,389,500,500,500,500,220,500,333,747,266,500,606,333,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444]}

1
font/timesi.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"Times-Italic","Up":-100,"Ut":50,"Cw":[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,350,500,350,333,500,556,889,500,500,333,1000,500,333,944,350,556,350,350,333,333,556,556,350,500,889,333,980,389,333,667,350,389,556,250,389,500,500,500,500,275,500,333,760,276,500,675,333,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444]}

1
font/zapfdingbats.json Normal file
View File

@ -0,0 +1 @@
{"Tp":"Core","Name":"ZapfDingbats","Up":-100,"Ut":50,"Cw":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,0,390,390,317,317,276,276,509,509,410,410,234,234,334,334,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,0,874,760,946,771,865,771,888,967,888,831,873,927,970,918,0]}

4998
fpdf.go Normal file

File diff suppressed because it is too large Load Diff

2924
fpdf_test.go Normal file

File diff suppressed because it is too large Load Diff

213
fpdftrans.go Normal file
View File

@ -0,0 +1,213 @@
package gofpdf
import (
"fmt"
"math"
)
// Routines in this file are translated from the work of Moritz Wagner and
// Andreas Würmser.
// TransformMatrix is used for generalized transformations of text, drawings
// and images.
type TransformMatrix struct {
A, B, C, D, E, F float64
}
// TransformBegin sets up a transformation context for subsequent text,
// drawings and images. The typical usage is to immediately follow a call to
// this method with a call to one or more of the transformation methods such as
// TransformScale(), TransformSkew(), etc. This is followed by text, drawing or
// image output and finally a call to TransformEnd(). All transformation
// contexts must be properly ended prior to outputting the document.
func (f *Fpdf) TransformBegin() {
f.transformNest++
f.out("q")
}
// TransformScaleX scales the width of the following text, drawings and images.
// scaleWd is the percentage scaling factor. (x, y) is center of scaling.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformScaleX(scaleWd, x, y float64) {
f.TransformScale(scaleWd, 100, x, y)
}
// TransformScaleY scales the height of the following text, drawings and
// images. scaleHt is the percentage scaling factor. (x, y) is center of
// scaling.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformScaleY(scaleHt, x, y float64) {
f.TransformScale(100, scaleHt, x, y)
}
// TransformScaleXY uniformly scales the width and height of the following
// text, drawings and images. s is the percentage scaling factor for both width
// and height. (x, y) is center of scaling.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformScaleXY(s, x, y float64) {
f.TransformScale(s, s, x, y)
}
// TransformScale generally scales the following text, drawings and images.
// scaleWd and scaleHt are the percentage scaling factors for width and height.
// (x, y) is center of scaling.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformScale(scaleWd, scaleHt, x, y float64) {
if scaleWd == 0 || scaleHt == 0 {
f.err = fmt.Errorf("scale factor cannot be zero")
return
}
y = (f.h - y) * f.k
x *= f.k
scaleWd /= 100
scaleHt /= 100
f.Transform(TransformMatrix{scaleWd, 0, 0,
scaleHt, x * (1 - scaleWd), y * (1 - scaleHt)})
}
// TransformMirrorHorizontal horizontally mirrors the following text, drawings
// and images. x is the axis of reflection.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformMirrorHorizontal(x float64) {
f.TransformScale(-100, 100, x, f.y)
}
// TransformMirrorVertical vertically mirrors the following text, drawings and
// images. y is the axis of reflection.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformMirrorVertical(y float64) {
f.TransformScale(100, -100, f.x, y)
}
// TransformMirrorPoint symmetrically mirrors the following text, drawings and
// images on the point specified by (x, y).
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformMirrorPoint(x, y float64) {
f.TransformScale(-100, -100, x, y)
}
// TransformMirrorLine symmetrically mirrors the following text, drawings and
// images on the line defined by angle and the point (x, y). angles is
// specified in degrees and measured counter-clockwise from the 3 o'clock
// position.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformMirrorLine(angle, x, y float64) {
f.TransformScale(-100, 100, x, y)
f.TransformRotate(-2*(angle-90), x, y)
}
// TransformTranslateX moves the following text, drawings and images
// horizontally by the amount specified by tx.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformTranslateX(tx float64) {
f.TransformTranslate(tx, 0)
}
// TransformTranslateY moves the following text, drawings and images vertically
// by the amount specified by ty.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformTranslateY(ty float64) {
f.TransformTranslate(0, ty)
}
// TransformTranslate moves the following text, drawings and images
// horizontally and vertically by the amounts specified by tx and ty.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformTranslate(tx, ty float64) {
f.Transform(TransformMatrix{1, 0, 0, 1, tx * f.k, -ty * f.k})
}
// TransformRotate rotates the following text, drawings and images around the
// center point (x, y). angle is specified in degrees and measured
// counter-clockwise from the 3 o'clock position.
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformRotate(angle, x, y float64) {
y = (f.h - y) * f.k
x *= f.k
angle = angle * math.Pi / 180
var tm TransformMatrix
tm.A = math.Cos(angle)
tm.B = math.Sin(angle)
tm.C = -tm.B
tm.D = tm.A
tm.E = x + tm.B*y - tm.A*x
tm.F = y - tm.A*y - tm.B*x
f.Transform(tm)
}
// TransformSkewX horizontally skews the following text, drawings and images
// keeping the point (x, y) stationary. angleX ranges from -90 degrees (skew to
// the left) to 90 degrees (skew to the right).
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformSkewX(angleX, x, y float64) {
f.TransformSkew(angleX, 0, x, y)
}
// TransformSkewY vertically skews the following text, drawings and images
// keeping the point (x, y) stationary. angleY ranges from -90 degrees (skew to
// the bottom) to 90 degrees (skew to the top).
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformSkewY(angleY, x, y float64) {
f.TransformSkew(0, angleY, x, y)
}
// TransformSkew generally skews the following text, drawings and images
// keeping the point (x, y) stationary. angleX ranges from -90 degrees (skew to
// the left) to 90 degrees (skew to the right). angleY ranges from -90 degrees
// (skew to the bottom) to 90 degrees (skew to the top).
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformSkew(angleX, angleY, x, y float64) {
if angleX <= -90 || angleX >= 90 || angleY <= -90 || angleY >= 90 {
f.err = fmt.Errorf("skew values must be between -90° and 90°")
return
}
x *= f.k
y = (f.h - y) * f.k
var tm TransformMatrix
tm.A = 1
tm.B = math.Tan(angleY * math.Pi / 180)
tm.C = math.Tan(angleX * math.Pi / 180)
tm.D = 1
tm.E = -tm.C * y
tm.F = -tm.B * x
f.Transform(tm)
}
// Transform generally transforms the following text, drawings and images
// according to the specified matrix. It is typically easier to use the various
// methods such as TransformRotate() and TransformMirrorVertical() instead.
func (f *Fpdf) Transform(tm TransformMatrix) {
if f.transformNest > 0 {
f.outf("%.5f %.5f %.5f %.5f %.5f %.5f cm",
tm.A, tm.B, tm.C, tm.D, tm.E, tm.F)
} else if f.err == nil {
f.err = fmt.Errorf("transformation context is not active")
}
}
// TransformEnd applies a transformation that was begun with a call to TransformBegin().
//
// The TransformBegin() example demonstrates this method.
func (f *Fpdf) TransformEnd() {
if f.transformNest > 0 {
f.transformNest--
f.out("Q")
} else {
f.err = fmt.Errorf("error attempting to end transformation operation out of sequence")
}
}

12
go.mod Normal file
View File

@ -0,0 +1,12 @@
module github.com/jung-kurt/gofpdf
go 1.12
require (
github.com/boombuler/barcode v1.0.0
github.com/phpdave11/gofpdi v1.0.7
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a
)
replace gofpdf => ./

20
go.sum Normal file
View File

@ -0,0 +1,20 @@
github.com/boombuler/barcode v1.0.0 h1:s1TvRnXwL2xJRaccrdcBQMZxq6X7DvsMogtmJeHDdrc=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/phpdave11/gofpdi v1.0.7 h1:k2oy4yhkQopCK+qW8KjCla0iU2RpDow+QUDmH9DDt44=
github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58 h1:nlG4Wa5+minh3S9LVFtNoY+GVRiudA2e3EVfcCi3RCA=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/image v0.0.0-20190902063713-cb417be4ba39 h1:4dQcAORh9oYBwVSBVIkP489LUPC+f1HBkTYXgmqfR+o=
golang.org/x/image v0.0.0-20190902063713-cb417be4ba39/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a h1:gHevYm0pO4QUbwy8Dmdr01R5r1BuKtfYqRqF0h/Cbh0=
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

446
grid.go Normal file
View File

@ -0,0 +1,446 @@
package gofpdf
import (
"math"
"strconv"
)
func unused(args ...interface{}) {
}
// RGBType holds fields for red, green and blue color components (0..255)
type RGBType struct {
R, G, B int
}
// RGBAType holds fields for red, green and blue color components (0..255) and
// an alpha transparency value (0..1)
type RGBAType struct {
R, G, B int
Alpha float64
}
// StateType holds various commonly used drawing values for convenient
// retrieval (StateGet()) and restore (Put) methods.
type StateType struct {
clrDraw, clrText, clrFill RGBType
lineWd float64
fontSize float64
alpha float64
blendStr string
cellMargin float64
}
// StateGet returns a variable that contains common state values.
func StateGet(pdf *Fpdf) (st StateType) {
st.clrDraw.R, st.clrDraw.G, st.clrDraw.B = pdf.GetDrawColor()
st.clrFill.R, st.clrFill.G, st.clrFill.B = pdf.GetFillColor()
st.clrText.R, st.clrText.G, st.clrText.B = pdf.GetTextColor()
st.lineWd = pdf.GetLineWidth()
_, st.fontSize = pdf.GetFontSize()
st.alpha, st.blendStr = pdf.GetAlpha()
st.cellMargin = pdf.GetCellMargin()
return
}
// Put sets the common state values contained in the state structure
// specified by st.
func (st StateType) Put(pdf *Fpdf) {
pdf.SetDrawColor(st.clrDraw.R, st.clrDraw.G, st.clrDraw.B)
pdf.SetFillColor(st.clrFill.R, st.clrFill.G, st.clrFill.B)
pdf.SetTextColor(st.clrText.R, st.clrText.G, st.clrText.B)
pdf.SetLineWidth(st.lineWd)
pdf.SetFontUnitSize(st.fontSize)
pdf.SetAlpha(st.alpha, st.blendStr)
pdf.SetCellMargin(st.cellMargin)
}
// TickFormatFncType defines a callback for label drawing.
type TickFormatFncType func(val float64, precision int) string
// defaultFormatter returns the string form of val with precision decimal places.
func defaultFormatter(val float64, precision int) string {
return strconv.FormatFloat(val, 'f', precision, 64)
}
// GridType assists with the generation of graphs. It allows the application to
// work with logical data coordinates rather than page coordinates and assists
// with the drawing of a background grid.
type GridType struct {
// Chart coordinates in page units
x, y, w, h float64
// X, Y, Wd, Ht float64
// Slopes and intercepts scale data points to graph coordinates linearly
xm, xb, ym, yb float64
// Tickmarks
xTicks, yTicks []float64
// Labels are inside of graph boundary
XLabelIn, YLabelIn bool
// Labels on X-axis should be rotated
XLabelRotate bool
// Formatters; use nil to eliminate labels
XTickStr, YTickStr TickFormatFncType
// Subdivisions between tickmarks
XDiv, YDiv int
// Formatting precision
xPrecision, yPrecision int
// Line and label colors
ClrText, ClrMain, ClrSub RGBAType
// Line thickness
WdMain, WdSub float64
// Label height in points
TextSize float64
}
// linear returns the slope and y-intercept of the straight line joining the
// two specified points. For scaling purposes, associate the arguments as
// follows: x1: observed low value, y1: desired low value, x2: observed high
// value, y2: desired high value.
func linear(x1, y1, x2, y2 float64) (slope, intercept float64) {
if x2 != x1 {
slope = (y2 - y1) / (x2 - x1)
intercept = y2 - x2*slope
}
return
}
// linearTickmark returns the slope and intercept that will linearly map data
// values (the range of which is specified by the tickmark slice tm) to page
// values (the range of which is specified by lo and hi).
func linearTickmark(tm []float64, lo, hi float64) (slope, intercept float64) {
ln := len(tm)
if ln > 0 {
slope, intercept = linear(tm[0], lo, tm[ln-1], hi)
}
return
}
// NewGrid returns a variable of type GridType that is initialized to draw on a
// rectangle of width w and height h with the upper left corner positioned at
// point (x, y). The coordinates are in page units, that is, the same as those
// specified in New().
//
// The returned variable is initialized with a very simple default tickmark
// layout that ranges from 0 to 1 in both axes. Prior to calling Grid(), the
// application may establish a more suitable tickmark layout by calling the
// methods TickmarksContainX() and TickmarksContainY(). These methods bound the
// data range with appropriate boundaries and divisions. Alternatively, if the
// exact extent and divisions of the tickmark layout are known, the methods
// TickmarksExtentX() and TickmarksExtentY may be called instead.
func NewGrid(x, y, w, h float64) (grid GridType) {
grid.x = x
grid.y = y
grid.w = w
grid.h = h
grid.TextSize = 7 // Points
grid.TickmarksExtentX(0, 1, 1)
grid.TickmarksExtentY(0, 1, 1)
grid.XLabelIn = false
grid.YLabelIn = false
grid.XLabelRotate = false
grid.XDiv = 10
grid.YDiv = 10
grid.ClrText = RGBAType{R: 0, G: 0, B: 0, Alpha: 1}
grid.ClrMain = RGBAType{R: 128, G: 160, B: 128, Alpha: 1}
grid.ClrSub = RGBAType{R: 192, G: 224, B: 192, Alpha: 1}
grid.WdMain = 0.1
grid.WdSub = 0.1
grid.YTickStr = defaultFormatter
grid.XTickStr = defaultFormatter
return
}
// WdAbs returns the absolute value of dataWd, specified in logical data units,
// that has been converted to the unit of measure specified in New().
func (g GridType) WdAbs(dataWd float64) float64 {
return math.Abs(g.xm * dataWd)
}
// Wd converts dataWd, specified in logical data units, to the unit of measure
// specified in New().
func (g GridType) Wd(dataWd float64) float64 {
return g.xm * dataWd
}
// XY converts dataX and dataY, specified in logical data units, to the X and Y
// position on the current page.
func (g GridType) XY(dataX, dataY float64) (x, y float64) {
return g.xm*dataX + g.xb, g.ym*dataY + g.yb
}
// Pos returns the point, in page units, indicated by the relative positions
// xRel and yRel. These are values between 0 and 1. xRel specifies the relative
// position between the grid's left and right edges. yRel specifies the
// relative position between the grid's bottom and top edges.
func (g GridType) Pos(xRel, yRel float64) (x, y float64) {
x = g.w*xRel + g.x
y = g.h*(1-yRel) + g.y
return
}
// X converts dataX, specified in logical data units, to the X position on the
// current page.
func (g GridType) X(dataX float64) float64 {
return g.xm*dataX + g.xb
}
// HtAbs returns the absolute value of dataHt, specified in logical data units,
// that has been converted to the unit of measure specified in New().
func (g GridType) HtAbs(dataHt float64) float64 {
return math.Abs(g.ym * dataHt)
}
// Ht converts dataHt, specified in logical data units, to the unit of measure
// specified in New().
func (g GridType) Ht(dataHt float64) float64 {
return g.ym * dataHt
}
// Y converts dataY, specified in logical data units, to the Y position on the
// current page.
func (g GridType) Y(dataY float64) float64 {
return g.ym*dataY + g.yb
}
// XRange returns the minimum and maximum values for the current tickmark
// sequence. These correspond to the data values of the graph's left and right
// edges.
func (g GridType) XRange() (min, max float64) {
min = g.xTicks[0]
max = g.xTicks[len(g.xTicks)-1]
return
}
// YRange returns the minimum and maximum values for the current tickmark
// sequence. These correspond to the data values of the graph's bottom and top
// edges.
func (g GridType) YRange() (min, max float64) {
min = g.yTicks[0]
max = g.yTicks[len(g.yTicks)-1]
return
}
// TickmarksContainX sets the tickmarks to be shown by Grid() in the horizontal
// dimension. The argument min and max specify the minimum and maximum values
// to be contained within the grid. The tickmark values that are generated are
// suitable for general purpose graphs.
//
// See TickmarkExtentX() for an alternative to this method to be used when the
// exact values of the tickmarks are to be set by the application.
func (g *GridType) TickmarksContainX(min, max float64) {
g.xTicks, g.xPrecision = Tickmarks(min, max)
g.xm, g.xb = linearTickmark(g.xTicks, g.x, g.x+g.w)
}
// TickmarksContainY sets the tickmarks to be shown by Grid() in the vertical
// dimension. The argument min and max specify the minimum and maximum values
// to be contained within the grid. The tickmark values that are generated are
// suitable for general purpose graphs.
//
// See TickmarkExtentY() for an alternative to this method to be used when the
// exact values of the tickmarks are to be set by the application.
func (g *GridType) TickmarksContainY(min, max float64) {
g.yTicks, g.yPrecision = Tickmarks(min, max)
g.ym, g.yb = linearTickmark(g.yTicks, g.y+g.h, g.y)
}
func extent(min, div float64, count int) (tm []float64, precision int) {
tm = make([]float64, count+1)
for j := 0; j <= count; j++ {
tm[j] = min
min += div
}
precision = TickmarkPrecision(div)
return
}
// TickmarksExtentX sets the tickmarks to be shown by Grid() in the horizontal
// dimension. count specifies number of major tickmark subdivisions to be
// graphed. min specifies the leftmost data value. div specifies, in data
// units, the extent of each major tickmark subdivision.
//
// See TickmarkContainX() for an alternative to this method to be used when
// viewer-friendly tickmarks are to be determined automatically.
func (g *GridType) TickmarksExtentX(min, div float64, count int) {
g.xTicks, g.xPrecision = extent(min, div, count)
g.xm, g.xb = linearTickmark(g.xTicks, g.x, g.x+g.w)
}
// TickmarksExtentY sets the tickmarks to be shown by Grid() in the vertical
// dimension. count specifies number of major tickmark subdivisions to be
// graphed. min specifies the bottommost data value. div specifies, in data
// units, the extent of each major tickmark subdivision.
//
// See TickmarkContainY() for an alternative to this method to be used when
// viewer-friendly tickmarks are to be determined automatically.
func (g *GridType) TickmarksExtentY(min, div float64, count int) {
g.yTicks, g.yPrecision = extent(min, div, count)
g.ym, g.yb = linearTickmark(g.yTicks, g.y+g.h, g.y)
}
// func (g *GridType) SetXExtent(dataLf, paperLf, dataRt, paperRt float64) {
// g.xm, g.xb = linear(dataLf, paperLf, dataRt, paperRt)
// }
// func (g *GridType) SetYExtent(dataTp, paperTp, dataBt, paperBt float64) {
// g.ym, g.yb = linear(dataTp, paperTp, dataBt, paperBt)
// }
func lineAttr(pdf *Fpdf, clr RGBAType, lineWd float64) {
pdf.SetLineWidth(lineWd)
pdf.SetAlpha(clr.Alpha, "Normal")
pdf.SetDrawColor(clr.R, clr.G, clr.B)
}
// Grid generates a graph-paperlike set of grid lines on the current page.
func (g GridType) Grid(pdf *Fpdf) {
var st StateType
var yLen, xLen int
var textSz, halfTextSz, yMin, yMax, xMin, xMax, yDiv, xDiv float64
var str string
var strOfs, strWd, tp, bt, lf, rt, drawX, drawY float64
xLen = len(g.xTicks)
yLen = len(g.yTicks)
if xLen > 1 && yLen > 1 {
st = StateGet(pdf)
line := func(x1, y1, x2, y2 float64, heavy bool) {
if heavy {
lineAttr(pdf, g.ClrMain, g.WdMain)
} else {
lineAttr(pdf, g.ClrSub, g.WdSub)
}
pdf.Line(x1, y1, x2, y2)
}
textSz = pdf.PointToUnitConvert(g.TextSize)
halfTextSz = textSz / 2
pdf.SetAutoPageBreak(false, 0)
pdf.SetFontUnitSize(textSz)
strOfs = pdf.GetStringWidth("0")
pdf.SetFillColor(255, 255, 255)
pdf.SetCellMargin(0)
xMin = g.xTicks[0]
xMax = g.xTicks[xLen-1]
yMin = g.yTicks[0]
yMax = g.yTicks[yLen-1]
lf = g.X(xMin)
rt = g.X(xMax)
bt = g.Y(yMin)
tp = g.Y(yMax)
// Verticals along X axis
xDiv = g.xTicks[1] - g.xTicks[0]
if g.XDiv > 0 {
xDiv = xDiv / float64(g.XDiv)
}
xDiv = g.Wd(xDiv)
for j, x := range g.xTicks {
drawX = g.X(x)
line(drawX, tp, drawX, bt, true)
if j < xLen-1 {
for k := 1; k < g.XDiv; k++ {
drawX += xDiv
line(drawX, tp, drawX, bt, false)
}
}
}
// Horizontals along Y axis
yDiv = g.yTicks[1] - g.yTicks[0]
if g.YDiv > 0 {
yDiv = yDiv / float64(g.YDiv)
}
yDiv = g.Ht(yDiv)
for j, y := range g.yTicks {
drawY = g.Y(y)
line(lf, drawY, rt, drawY, true)
if j < yLen-1 {
for k := 1; k < g.YDiv; k++ {
drawY += yDiv
line(lf, drawY, rt, drawY, false)
}
}
}
// X labels
if g.XTickStr != nil {
drawY = bt
for _, x := range g.xTicks {
str = g.XTickStr(x, g.xPrecision)
strWd = pdf.GetStringWidth(str)
drawX = g.X(x)
if g.XLabelRotate {
pdf.TransformBegin()
pdf.TransformRotate(90, drawX, drawY)
if g.XLabelIn {
pdf.SetXY(drawX+strOfs, drawY-halfTextSz)
} else {
pdf.SetXY(drawX-strOfs-strWd, drawY-halfTextSz)
}
pdf.CellFormat(strWd, textSz, str, "", 0, "L", true, 0, "")
pdf.TransformEnd()
} else {
drawX -= strWd / 2.0
if g.XLabelIn {
pdf.SetXY(drawX, drawY-textSz-strOfs)
} else {
pdf.SetXY(drawX, drawY+strOfs)
}
pdf.CellFormat(strWd, textSz, str, "", 0, "L", true, 0, "")
}
}
}
// Y labels
if g.YTickStr != nil {
drawX = lf
for _, y := range g.yTicks {
// str = strconv.FormatFloat(y, 'f', g.yPrecision, 64)
str = g.YTickStr(y, g.yPrecision)
strWd = pdf.GetStringWidth(str)
if g.YLabelIn {
pdf.SetXY(drawX+strOfs, g.Y(y)-halfTextSz)
} else {
pdf.SetXY(lf-strOfs-strWd, g.Y(y)-halfTextSz)
}
pdf.CellFormat(strWd, textSz, str, "", 0, "L", true, 0, "")
}
}
// Restore drawing attributes
st.Put(pdf)
}
}
// Plot plots a series of count line segments from xMin to xMax. It repeatedly
// calls fnc(x) to retrieve the y value associate with x. The currently
// selected line drawing attributes are used.
func (g GridType) Plot(pdf *Fpdf, xMin, xMax float64, count int, fnc func(x float64) (y float64)) {
if count > 0 {
var x, delta, drawX0, drawY0, drawX1, drawY1 float64
delta = (xMax - xMin) / float64(count)
x = xMin
for j := 0; j <= count; j++ {
if j == 0 {
drawX1 = g.X(x)
drawY1 = g.Y(fnc(x))
} else {
pdf.Line(drawX0, drawY0, drawX1, drawY1)
}
x += delta
drawX0 = drawX1
drawY0 = drawY1
drawX1 = g.X(x)
drawY1 = g.Y(fnc(x))
}
}
}

220
htmlbasic.go Normal file
View File

@ -0,0 +1,220 @@
/*
* Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package gofpdf
import (
"regexp"
"strings"
)
// HTMLBasicSegmentType defines a segment of literal text in which the current
// attributes do not vary, or an open tag or a close tag.
type HTMLBasicSegmentType struct {
Cat byte // 'O' open tag, 'C' close tag, 'T' text
Str string // Literal text unchanged, tags are lower case
Attr map[string]string // Attribute keys are lower case
}
// HTMLBasicTokenize returns a list of HTML tags and literal elements. This is
// done with regular expressions, so the result is only marginally better than
// useless.
func HTMLBasicTokenize(htmlStr string) (list []HTMLBasicSegmentType) {
// This routine is adapted from http://www.fpdf.org/
list = make([]HTMLBasicSegmentType, 0, 16)
htmlStr = strings.Replace(htmlStr, "\n", " ", -1)
htmlStr = strings.Replace(htmlStr, "\r", "", -1)
tagRe, _ := regexp.Compile(`(?U)<.*>`)
attrRe, _ := regexp.Compile(`([^=]+)=["']?([^"']+)`)
capList := tagRe.FindAllStringIndex(htmlStr, -1)
if capList != nil {
var seg HTMLBasicSegmentType
var parts []string
pos := 0
for _, cap := range capList {
if pos < cap[0] {
seg.Cat = 'T'
seg.Str = htmlStr[pos:cap[0]]
seg.Attr = nil
list = append(list, seg)
}
if htmlStr[cap[0]+1] == '/' {
seg.Cat = 'C'
seg.Str = strings.ToLower(htmlStr[cap[0]+2 : cap[1]-1])
seg.Attr = nil
list = append(list, seg)
} else {
// Extract attributes
parts = strings.Split(htmlStr[cap[0]+1:cap[1]-1], " ")
if len(parts) > 0 {
for j, part := range parts {
if j == 0 {
seg.Cat = 'O'
seg.Str = strings.ToLower(parts[0])
seg.Attr = make(map[string]string)
} else {
attrList := attrRe.FindAllStringSubmatch(part, -1)
if attrList != nil {
for _, attr := range attrList {
seg.Attr[strings.ToLower(attr[1])] = attr[2]
}
}
}
}
list = append(list, seg)
}
}
pos = cap[1]
}
if len(htmlStr) > pos {
seg.Cat = 'T'
seg.Str = htmlStr[pos:]
seg.Attr = nil
list = append(list, seg)
}
} else {
list = append(list, HTMLBasicSegmentType{Cat: 'T', Str: htmlStr, Attr: nil})
}
return
}
// HTMLBasicType is used for rendering a very basic subset of HTML. It supports
// only hyperlinks and bold, italic and underscore attributes. In the Link
// structure, the ClrR, ClrG and ClrB fields (0 through 255) define the color
// of hyperlinks. The Bold, Italic and Underscore values define the hyperlink
// style.
type HTMLBasicType struct {
pdf *Fpdf
Link struct {
ClrR, ClrG, ClrB int
Bold, Italic, Underscore bool
}
}
// HTMLBasicNew returns an instance that facilitates writing basic HTML in the
// specified PDF file.
func (f *Fpdf) HTMLBasicNew() (html HTMLBasicType) {
html.pdf = f
html.Link.ClrR, html.Link.ClrG, html.Link.ClrB = 0, 0, 128
html.Link.Bold, html.Link.Italic, html.Link.Underscore = false, false, true
return
}
// Write prints text from the current position using the currently selected
// font. See HTMLBasicNew() to create a receiver that is associated with the
// PDF document instance. The text can be encoded with a basic subset of HTML
// that includes hyperlinks and tags for italic (I), bold (B), underscore
// (U) and center (CENTER) attributes. When the right margin is reached a line
// break occurs and text continues from the left margin. Upon method exit, the
// current position is left at the end of the text.
//
// lineHt indicates the line height in the unit of measure specified in New().
func (html *HTMLBasicType) Write(lineHt float64, htmlStr string) {
var boldLvl, italicLvl, underscoreLvl, linkBold, linkItalic, linkUnderscore int
var textR, textG, textB = html.pdf.GetTextColor()
var hrefStr string
if html.Link.Bold {
linkBold = 1
}
if html.Link.Italic {
linkItalic = 1
}
if html.Link.Underscore {
linkUnderscore = 1
}
setStyle := func(boldAdj, italicAdj, underscoreAdj int) {
styleStr := ""
boldLvl += boldAdj
if boldLvl > 0 {
styleStr += "B"
}
italicLvl += italicAdj
if italicLvl > 0 {
styleStr += "I"
}
underscoreLvl += underscoreAdj
if underscoreLvl > 0 {
styleStr += "U"
}
html.pdf.SetFont("", styleStr, 0)
}
putLink := func(urlStr, txtStr string) {
// Put a hyperlink
html.pdf.SetTextColor(html.Link.ClrR, html.Link.ClrG, html.Link.ClrB)
setStyle(linkBold, linkItalic, linkUnderscore)
html.pdf.WriteLinkString(lineHt, txtStr, urlStr)
setStyle(-linkBold, -linkItalic, -linkUnderscore)
html.pdf.SetTextColor(textR, textG, textB)
}
list := HTMLBasicTokenize(htmlStr)
var ok bool
alignStr := "L"
for _, el := range list {
switch el.Cat {
case 'T':
if len(hrefStr) > 0 {
putLink(hrefStr, el.Str)
hrefStr = ""
} else {
if alignStr == "C" || alignStr == "R" {
html.pdf.WriteAligned(0, lineHt, el.Str, alignStr)
} else {
html.pdf.Write(lineHt, el.Str)
}
}
case 'O':
switch el.Str {
case "b":
setStyle(1, 0, 0)
case "i":
setStyle(0, 1, 0)
case "u":
setStyle(0, 0, 1)
case "br":
html.pdf.Ln(lineHt)
case "center":
html.pdf.Ln(lineHt)
alignStr = "C"
case "right":
html.pdf.Ln(lineHt)
alignStr = "R"
case "left":
html.pdf.Ln(lineHt)
alignStr = "L"
case "a":
hrefStr, ok = el.Attr["href"]
if !ok {
hrefStr = ""
}
}
case 'C':
switch el.Str {
case "b":
setStyle(-1, 0, 0)
case "i":
setStyle(0, -1, 0)
case "u":
setStyle(0, 0, -1)
case "center":
html.pdf.Ln(lineHt)
alignStr = "L"
case "right":
html.pdf.Ln(lineHt)
alignStr = "L"
}
}
}
}

BIN
image/doc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

20
image/doc.svg Normal file
View File

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" width="109" height="20">
<linearGradient id="a" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<rect rx="3" width="109" height="20" fill="#555" />
<rect rx="3" x="44" width="65" height="20" fill="#5272B4" />
<path fill="#5272B4" d="M44 0h4v20h-4z" />
<rect rx="3" width="109" height="20" fill="url(#a)" />
<g fill="#fff" text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11">
<text x="23" y="15" fill="#010101" fill-opacity=".3">
godoc</text>
<text x="23" y="14">godoc</text>
<text x="75.5" y="15" fill="#010101" fill-opacity=".3">
reference</text>
<text x="75.5" y="14">reference</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 809 B

BIN
image/fpdf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
image/gofpdf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
image/golang-gopher.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
image/golang-gopher.tiff Normal file

Binary file not shown.

BIN
image/logo-gray.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
image/logo-progressive.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
image/logo-rgb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
image/logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
image/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
image/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
image/logo_gofpdf.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
image/mit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

20
image/mit.svg Normal file
View File

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" width="109" height="20">
<linearGradient id="a" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<rect rx="3" width="109" height="20" fill="#555" />
<rect rx="3" x="64" width="45" height="20" fill="#7b5" />
<path fill="#7b5" d="M64 0h4v20h-4z" />
<rect rx="3" width="109" height="20" fill="url(#a)" />
<g fill="#fff" text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11">
<text x="30" y="15" fill="#010101" fill-opacity=".3">
license</text>
<text x="30" y="14">license</text>
<text x="85" y="15" fill="#010101" fill-opacity=".3">
MIT</text>
<text x="85" y="14">MIT</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 791 B

73
image/signature.svg Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="1106" width="3990">
<path
d="m 234.43804,111.69821 c 50.21866,26.50627 126.75595,-3.87395 151.46369,-35.941621 24.70774,-32.067668 10.41159,-51.980992 -16.41089,-58.072772 -26.82248,-6.09178 -42.17661,10.494756 -57.68933,33.13636 -15.51272,22.641602 -22.3395,49.640453 -26.04984,89.319923 -3.71034,39.67947 -2.57151,103.67609 -16.65175,144.69433 -14.08024,41.01824 -40.79012,59.98014 -80.0876,71.50199 -39.29748,11.52185 -96.607494,6.67866 -126.372407,-24.20296 -29.764916,-30.88162 -24.693439,-84.55794 0.62001,-107.05538 25.313453,-22.49744 49.916587,-21.8463 53.386947,18.74456 3.47036,40.59086 -77.347635,106.99944 -102.157295,102.59574 -24.80966,-4.4037 -9.1930819,0 -13.78962288,0" />
<path
d="m 535.44946,262.31206 c 16.02735,-13.54645 29.98118,-31.39768 32.51139,-52.84016 1.4974,-10.24434 -1.94415,-22.06454 -11.64632,-27.13714 -22.66026,-14.31032 -51.37591,-9.68663 -75.27088,-1.12303 -29.57925,11.19994 -56.66841,28.48168 -80.87983,48.69857 -15.56749,13.48245 -30.31327,28.65126 -40.17476,46.87113 -10.56334,25.04076 5.93271,58.80187 33.76392,62.35287 20.97698,3.69753 41.31134,-5.15667 59.15595,-15.26739 23.68053,-12.07041 45.37059,-27.68722 65.11773,-45.42392 5.85816,-4.99109 11.66007,-10.04795 17.4228,-15.14884" />
<path
d="m 605.17805,221.06416 c -39.71057,22.89155 -90.21146,57.33437 -110.62013,81.46882 -20.40867,24.13445 1.74636,32.16167 21.51346,33.96557 19.7671,1.8039 40.22731,-5.81242 63.90833,-18.83825 23.68102,-13.02583 54.88215,-39.05314 73.09016,-60.24005 18.20801,-21.18691 37.84165,-41.69088 43.78312,-57.46575 5.94147,-15.77487 6.81292,-20.38898 -2.3045,-26.03079" />
<path
d="m 576.69736,336.95111 c 59.46452,-49.53559 110.50457,-110.94455 181.15663,-145.53797 21.55772,-14.53068 69.21456,-30.38164 74.52476,8.12435 2.15457,32.87115 -24.99905,56.36851 -41.3729,81.85669 -11.33394,14.91071 -34.85688,47.22341 -38.29416,51.12061 38.40925,-59.07476 94.0006,-105.23813 152.94098,-142.74425 21.53324,-14.17578 76.3474,-17.732 63.14039,22.44093 -6.44013,30.30909 -29.58192,52.20309 -51.31162,72.13403 -22.35245,20.18703 -11.93986,55.81184 21.21245,48.89199 28.04358,-1.72994 49.86098,-21.80465 73.62851,-34.51546 51.0484,-39.90132 89.3284,-97.12351 150.3008,-123.60116 30.7216,-12.02494 70.5868,-23.14241 98.2954,1.38478 22.9075,21.32517 9.8573,56.2678 -7.0675,76.93906 -18.1931,26.99594 -44.6741,46.96256 -74.8471,58.94304 -34.0583,20.33195 -79.3725,18.48794 -110.8061,-6.03301 -1.0838,-0.69666 -2.2533,-1.23366 -3.4004,-1.81269" />
<path
d="m 1145.2696,144.64925 c -19.2615,48.72397 -39.2763,98.0821 -71.8076,139.71403 -28.4578,44.00142 -46.4445,94.33551 -79.72453,135.30113 -23.78316,32.93768 -48.80204,65.54924 -80.01549,91.86673 -19.47895,6.1922 -20.04137,-20.7923 -14.66105,-32.91267 12.83153,-36.25521 37.22095,-66.57625 54.90924,-100.3885 22.07476,-38.69659 54.05253,-69.56182 85.74383,-100.24739" />
<path
d="m 1067.4918,308.53814 c 41.6055,37.74324 106.1656,40.87499 155.2476,16.47425 79.7307,-33.80513 147.627,-88.69981 215.7912,-140.91414 38.5692,-31.19936 75.8068,-66.58379 98.2999,-111.442691 5.2858,-16.340836 11.2358,-38.191353 -2.3042,-51.988823 -24.8579,-9.392422 -44.7459,19.21292 -62.7133,32.466761 -42.206,41.159272 -75.9104,90.348773 -105.7076,140.969903 -18.1332,33.9424 -36.3441,60.40033 -45.1009,105.84746 -4.8684,25.26636 17.3519,40.01019 38.489,36.24378 27.2382,-1.27906 52.1821,-14.06224 77.2642,-23.5167 20.2617,-9.77194 38.052,-23.75443 55.7341,-37.47313" />
<path
d="m 1509.1585,216.87147 c 45.3671,35.48031 84.7434,37.23796 135.7328,25.17331 14.925,-4.86754 25.7515,-17.97315 30.1445,-32.73996 6.2047,-12.9545 -0.2899,-27.91555 -12.929,-33.8982 -19.5006,-12.36806 -44.6888,-10.55607 -64.9092,-0.92535 -33.4028,14.45512 -59.4353,40.93033 -84.563,66.45243 -13.9248,16.55902 -22.671,38.06079 -22.9956,59.74639 0.7543,12.73146 10.7427,22.65661 22.5942,25.94215 28.6381,11.95988 61.6748,18.05546 91.8527,8.36881 20.1474,-7.27059 39.868,-15.91987 58.8894,-25.73255 22.7573,-13.36221 41.3454,-32.41648 60.072,-50.72036" />
<path
d="m 1779.9918,343.26036 c 28.6993,3.03127 63.3496,2.62457 82.7159,-22.45172 21.6447,-19.99229 43.1941,-48.10952 35.6329,-79.45221 -4.1368,-22.17497 -33.5802,-38.22486 -52.1616,-22.03003 -31.7488,22.47063 -31.372,70.25063 -12.8813,101.12391 23.6727,38.55114 74.0602,50.51158 116.164,41.35476 54.0203,-10.31179 104.4208,-53.87389 110.9357,-110.27278 0.7888,-32.83995 0.7757,-65.72269 4.9445,-98.36663 3.9298,-42.7466 9.9471,-89.084405 39.2166,-122.675002 17.104,-18.491716 51.2258,-26.9233518 69.4545,-5.555968 14.6931,19.194858 3.0296,45.294939 -10.7419,61.486039 -16.3416,25.138501 -48.7197,29.136431 -75.3811,36.237431 -26.4792,5.77658 -58.6276,2.75073 -76.1034,-20.51069 -9.6512,-10.713121 -20.4603,-22.768271 -20.6837,-38.053993" />
<path
d="m 2245.2696,122.42703 c -3.9166,0.81691 -6.5582,5.39919 -5.219,9.18763 1.2777,3.63173 4.3682,6.64885 8.1357,7.58096 2.108,0.12035 4.1149,-1.67454 4.2375,-3.78089 0.7885,-3.73488 0.2701,-7.91813 -2.1144,-10.99661 -1.2461,-1.37634 -3.1464,-2.37225 -5.0398,-1.99109" />
<path
d="m 2219.5751,170.3437 c -29.9457,39.95653 -58.8628,80.7409 -86.118,122.56461 -5.4378,11.43956 -6.9218,27.24913 2.6137,36.94004 11.5344,8.50012 26.6093,3.95387 39.1614,0.62975 31.967,-8.46295 63.2786,-21.86206 88.264,-43.97857 15.2095,-12.48824 29.1196,-26.55137 41.4956,-41.85028" />
<path
d="m 2487.38,203.45563 c -3.3292,-19.2489 -24.4513,-30.55681 -42.8081,-28.63327 -39.0192,-1.47124 -74.6768,18.22839 -106.1126,39.27122 -27.4601,19.28281 -52.9628,45.12902 -62.0025,78.30592 -2.9108,24.00347 18.676,49.02117 43.417,46.57579 41.4005,-0.49369 78.4941,-23.55071 108.3115,-50.5202 26.5153,-22.3804 52.8121,-49.50782 59.1947,-84.99946" />
<path
d="m 2515.4085,226.5937 c -48.3542,24.84206 -95.4271,57.89871 -121.9801,106.67545 -38.548,57.86235 -85.0736,109.83278 -130.7587,162.02483 -14.3416,13.79585 -31.8449,28.78802 -52.8206,28.38924 -22.4201,-5.81296 -20.145,-35.44311 -3.7589,-46.92382 18.3472,-20.65863 39.7594,-38.46949 61.3752,-55.55681 37.3089,-27.01631 74.2659,-55.34905 116.5753,-74.2272 45.8819,-21.27356 92.5741,-41.44894 133.4511,-71.77058" />
<path
d="m 2561.9362,176.5937 c -11.728,39.55572 -31.7885,76.05727 -54.1537,110.51619 -11.367,17.27415 -23.5479,34.0347 -36.8185,49.90047" />
<path
d="m 2471.6585,334.92703 c 39.4203,-54.93792 84.2673,-108.82208 144.2119,-142.13528 20.4555,-10.53089 43.6781,-13.18946 66.1233,-16.24748 15.4075,-2.13385 35.1588,8.90133 33.4692,26.24623 -2.9508,16.37726 -14.16,29.73489 -22.9962,43.3486 -13.3021,19.00229 -30.5436,36.66009 -36.611,59.58253 -4.3581,18.38699 14.1449,34.91044 31.9547,29.10574 16.8023,-4.83584 31.073,-15.60156 46.3125,-23.86514 23.356,-14.17855 45.5509,-30.69352 63.9244,-51.0352" />
<path
d="m 2945.2696,276.5937 c 22.3825,-18.04222 43.6601,-40.96167 49.1836,-70.14766 1.6596,-16.7076 -14.1662,-31.70685 -30.5059,-31.31677 -38.4972,-6.9588 -76.9683,9.1156 -108.0208,30.84253 -27.6063,19.08076 -55.1974,41.48489 -69.2262,72.82154 -7.1903,18.94072 -2.0574,44.40278 17.325,53.92146 22.3966,12.66022 50.5757,7.55107 71.8376,-5.02642 25.3952,-13.7463 46.7256,-33.50699 69.4067,-51.09468" />
<path
d="m 3032.0751,221.03814 c -34.9663,24.39777 -159.9904,94.46573 -91.1404,111.19476 49.5078,12.02932 120.689,-54.55505 178.2367,-101.75128 57.5477,-47.19623 164.1423,-136.348841 176.2724,-205.706175 12.1301,-69.357335 -35.8274,25.038279 -57.6617,62.402284 -21.8343,37.364011 -53.1817,114.582201 -93.4244,175.681151 -55.9422,84.93494 14.2268,97.70016 78.695,54.07139 43.4593,-29.41104 56.0463,-39.23804 79.8558,-64.64213" />
<path
d="m 3119.5751,163.39925 c 51.3284,2.8018 102.806,4.27265 154.1667,1.38889" />
<path
d="m 3359.1585,166.17703 c -26.0554,38.94967 -53.443,76.90675 -75.3826,118.80876 -8.2374,15.73252 -12.8945,40.55439 6.2938,47.64921 25.3545,6.43589 34.5616,-2.95338 49.294,-7.34667 48.0292,-19.31164 87.8533,-54.50776 122.854,-93.37814 15.42,-20.923 30.5124,-42.09003 46.9408,-62.26134" />
<path
d="m 3511.2418,168.95481 c -31.3786,34.96488 -59.3857,72.92099 -84.9995,112.24284 -6.288,13.61689 -16.1644,29.28735 -9.8599,44.58789 7.0942,13.41865 25.2642,10.69636 37.6171,7.93765 31.8778,-9.70921 58.1068,-31.49347 83.8755,-51.77583 20.5616,-16.72078 38.3203,-36.60992 53.5974,-58.18739 14.5478,-17.73424 29.2159,-35.93086 39.6787,-56.3568 4.934,-18.95097 -28.1547,-19.20088 -17.7187,-0.12487 9.5405,17.82935 32.3392,18.53167 50.1021,19.48194 16.3122,-3.37266 23.3898,15.5346 12.9603,26.5127 -6.8718,8.02389 -13.7478,15.769 -19.1588,24.9829 -16.8576,24.69747 -36.847,48.68268 -44.6449,78.10881 -3.0723,19.33042 19.5849,33.62972 36.7818,27.38476 35.6706,-8.34057 67.9833,-26.49985 99.2689,-44.93349" />
<path
d="m 3763.3251,216.87147 c 33.1817,22.33062 74.828,35.62344 114.8149,27.5851 15.6821,-3.20582 30.2525,-10.71137 43.1524,-19.942 17.3248,-14.2012 16.9209,-44.79145 -2.1675,-57.28603 -13.4925,-8.89012 -30.6833,-5.87659 -45.6599,-3.46265 -33.5763,7.00049 -61.9142,28.29846 -85.8989,51.8761 -25.4017,22.73023 -42.112,57.70516 -36.9155,92.17467 6.3894,18.1743 25.3211,28.36102 43.6991,29.78005 26.397,2.30348 52.8197,-3.96515 77.6246,-12.547 39.816,-14.49663 75.2011,-38.73414 108.0175,-65.12268" />
<path
d="m 127.96633,989.9893 q -30.652774,0 -60.833949,-8.48849 -29.709599,-8.96003 -49.515998,-23.57904 l 12.732685,-75.45295 h 2.829486 q 20.749561,15.09059 44.800188,23.57904 24.050628,8.48846 46.686518,8.48846 44.32861,0 44.32861,-32.0675 0,-12.26111 -6.60214,-20.27798 -6.13055,-8.48846 -22.1643,-15.56217 L 91.183006,824.46436 Q 57.700762,809.37377 39.309106,783.43682 21.38903,757.49987 21.38903,723.07446 q 0,-31.59592 14.619009,-54.70339 15.09059,-23.57904 41.970703,-36.31173 27.351698,-12.73268 63.663428,-12.73268 26.88012,0 53.28865,7.07371 26.40853,7.07372 42.91386,18.39166 l -12.2611,71.20872 h -2.82949 Q 208.13508,705.62597 187.8571,699.967 q -19.8064,-6.13056 -39.14121,-6.13056 -41.49913,0 -41.49913,28.29486 0,11.31794 6.60214,19.33482 7.07371,8.01687 22.1643,14.61901 l 42.44228,19.33482 q 40.55597,18.39165 58.47604,42.91386 17.92008,24.05063 17.92008,59.89078 0,33.95383 -16.03376,59.4192 -15.56217,24.99379 -43.85702,38.66963 -28.29486,13.67588 -66.96449,13.67588 z"/>
<path
d="m 355.73912,985.27346 q -33.95383,0 -53.76023,-18.86324 -19.8064,-18.86323 -19.8064,-50.45916 0,-66.96449 89.1288,-74.98136 l 58.00446,-5.18739 v -2.35791 q 0,-16.50533 -9.9032,-23.57905 -9.43162,-7.54529 -30.18118,-7.54529 -20.74956,0 -43.85703,5.18739 -23.10747,4.71581 -36.78331,12.73268 h -3.30107 l 12.2611,-66.96449 q 41.49913,-16.97691 87.71406,-16.97691 106.10571,0 106.10571,103.27622 v 73.56663 q 0,19.8064 2.82948,37.25489 3.30107,17.4485 8.48846,27.3517 v 3.77264 h -76.39611 q -7.07371,-16.03375 -8.48846,-35.36857 h -3.30106 q -8.96004,17.92008 -30.18118,28.76644 -21.22115,10.37478 -48.57284,10.37478 z m 6.13055,-76.86769 q 0,19.33482 23.10747,19.33482 19.8064,0 32.0675,-11.31795 12.26111,-11.31794 12.26111,-28.76643 v -5.65897 l -38.19806,3.30106 q -29.23802,2.82949 -29.23802,23.10747 z"/>
<path
d="M 565.59215,981.50081 V 741.9377 h 76.39611 v 41.9707 h 3.30107 q 8.48845,-22.63588 26.88011,-34.89699 18.86324,-12.73268 43.38544,-12.73268 51.40233,0 70.26556,44.32861 h 1.88633 q 10.84636,-22.16431 30.18118,-33.01067 19.33482,-11.31794 45.27177,-11.31794 41.49912,0 63.19184,27.35169 22.16431,26.88012 22.16431,75.92453 V 981.50081 H 863.6313 V 847.10025 q 0,-39.14122 -30.18118,-39.14122 -15.56217,0 -24.99379,11.78952 -8.96004,11.31795 -8.96004,30.65276 v 131.0995 H 714.61172 V 847.57183 q 0,-39.6128 -30.18118,-39.6128 -15.56217,0 -24.99379,11.78952 -8.96003,11.78953 -8.96003,32.53909 v 129.21317 z"/>
<path
d="M 1001.8042,1099.396 V 741.9377 h 80.6403 v 35.36857 h 3.7726 q 22.1643,-41.02754 70.2656,-41.02754 31.1243,0 54.2318,15.56217 23.1075,15.56217 35.8402,43.85703 12.7326,27.82327 12.7326,66.02133 0,37.72647 -12.7326,66.02133 -12.7327,28.29485 -35.8402,43.85702 -23.1075,15.56219 -54.2318,15.56219 -42.9139,0 -66.0213,-33.01068 h -3.7727 V 1099.396 Z m 125.9121,-183.91652 q 21.2211,0 33.4822,-14.14742 12.2611,-14.61901 12.2611,-39.14122 0,-25.46537 -12.2611,-39.6128 -11.7895,-14.61901 -33.4822,-14.61901 -20.7496,0 -33.0107,14.61901 -12.2611,14.14743 -12.2611,39.14122 0,24.52221 12.2611,39.14121 12.2611,14.61901 33.0107,14.61901 z"/>
<path
d="M 1302.2008,981.50081 V 613.66769 h 84.8846 v 367.83312 z"/>
<path
d="m 1557.797,987.1598 q -58.9477,0 -93.3731,-33.48226 -33.9538,-33.48225 -33.9538,-91.95828 0,-39.6128 16.0338,-67.43608 16.5053,-28.29485 44.8002,-42.91386 28.7664,-15.09059 65.0781,-15.09059 55.6466,0 84.413,33.01066 29.238,32.53909 29.238,92.90145 v 12.73268 l -153.7354,15.09059 q 5.659,16.97692 19.8064,24.05063 14.619,7.07371 35.8402,7.07371 24.0506,0 46.2149,-5.65897 22.6359,-6.13055 33.9539,-12.2611 h 3.301 l -12.2611,66.96449 q -14.1474,6.13055 -37.7265,11.31794 -23.579,5.65899 -47.6296,5.65899 z m -2.8295,-188.63239 q -15.5622,0 -26.8801,9.43162 -10.8464,9.43162 -14.619,32.0675 l 79.2256,-7.54529 q -3.3011,-17.92008 -13.2043,-25.93695 -9.9032,-8.01688 -24.5222,-8.01688 z"/>
<path
d="m 1912.4242,989.9893 q -30.6527,0 -60.8339,-8.48849 -29.7096,-8.96003 -49.516,-23.57904 l 12.7327,-75.45295 h 2.8295 q 20.7495,15.09059 44.8002,23.57904 24.0506,8.48846 46.6865,8.48846 44.3286,0 44.3286,-32.0675 0,-12.26111 -6.6022,-20.27798 -6.1305,-8.48846 -22.1643,-15.56217 l -49.0444,-22.16431 q -33.4822,-15.09059 -51.8739,-41.02754 -17.9201,-25.93695 -17.9201,-60.36236 0,-31.59592 14.6191,-54.70339 15.0905,-23.57904 41.9707,-36.31173 27.3517,-12.73268 63.6634,-12.73268 26.8801,0 53.2886,7.07371 26.4086,7.07372 42.9139,18.39166 l -12.2611,71.20872 h -2.8295 q -14.619,-10.37478 -34.897,-16.03375 -19.8064,-6.13056 -39.1412,-6.13056 -41.4991,0 -41.4991,28.29486 0,11.31794 6.6021,19.33482 7.0737,8.01687 22.1643,14.61901 l 42.4423,19.33482 q 40.556,18.39165 58.476,42.91386 17.9201,24.05063 17.9201,59.89078 0,33.95383 -16.0337,59.4192 -15.5622,24.99379 -43.8571,38.66963 -28.2948,13.67588 -66.9645,13.67588 z"/>
<path
d="m 2124.6348,714.11442 q -23.1075,0 -37.2549,-13.67584 -14.1474,-14.14743 -14.1474,-35.36857 0,-21.22114 14.1474,-34.89699 14.1474,-14.14743 37.2549,-14.14743 23.1075,0 37.2549,14.14743 14.1474,13.67585 14.1474,34.89699 0,21.22114 -14.1474,35.36857 -14.1474,13.67584 -37.2549,13.67584 z m -42.4423,267.38639 V 741.9377 h 84.8846 v 239.56311 z"/>
<path
d="m 2329.7719,1105.055 q -27.8233,0 -53.7602,-6.6021 -25.937,-6.1306 -41.9707,-16.5053 l 14.1474,-66.493 h 3.3011 q 13.2042,8.0169 30.6527,12.7327 17.9201,5.1874 34.897,5.1874 31.5959,0 48.5729,-17.4485 16.9769,-17.4485 16.9769,-49.98756 v -17.44849 h -3.7727 q -23.1074,33.01066 -66.0213,33.01066 -31.1243,0 -54.2318,-15.09059 -23.1075,-15.56217 -35.8402,-42.91386 -12.7326,-27.82328 -12.7326,-64.60659 0,-37.25489 12.7326,-64.60659 12.7327,-27.35169 35.8402,-42.44228 23.1075,-15.56217 54.2318,-15.56217 24.9938,0 44.8002,11.31794 19.8064,11.31794 29.238,30.65276 h 3.3011 q 0.9431,-10.37478 3.301,-20.27798 2.3579,-9.9032 5.1874,-16.03375 h 80.1688 v 3.77265 q -6.1306,11.31794 -8.9601,29.7096 -2.3579,18.39165 -2.3579,34.89699 v 154.67854 q 0,67.43612 -35.8401,103.74782 -35.3686,36.3117 -101.8615,36.3117 z m 11.7895,-194.29133 q 20.7496,0 33.0107,-14.14742 12.2611,-14.14743 12.2611,-37.72648 0,-23.57905 -12.2611,-37.72647 -12.2611,-14.14743 -33.0107,-14.14743 -21.6927,0 -33.9538,14.14743 -11.7895,13.67584 -11.7895,38.19805 0,23.57905 12.2611,37.72648 12.2611,13.67584 33.4822,13.67584 z"/>
<path
d="M 2523.1198,981.50081 V 741.9377 h 76.3961 v 41.9707 h 3.301 q 8.4885,-22.63588 27.8233,-34.89699 19.3348,-12.73268 46.6865,-12.73268 40.556,0 63.6635,27.35169 23.579,27.3517 23.579,75.92453 v 141.94586 h -84.8846 V 849.45815 q 0,-41.49912 -33.9538,-41.49912 -17.4485,0 -27.8233,12.2611 -9.9032,12.26111 -9.9032,33.95383 v 127.32685 z"/>
<path
d="m 2875.8613,985.27346 q -33.9538,0 -53.7602,-18.86324 -19.8064,-18.86323 -19.8064,-50.45916 0,-66.96449 89.1288,-74.98136 l 58.0044,-5.18739 v -2.35791 q 0,-16.50533 -9.9032,-23.57905 -9.4316,-7.54529 -30.1812,-7.54529 -20.7495,0 -43.857,5.18739 -23.1075,4.71581 -36.7833,12.73268 h -3.3011 l 12.2611,-66.96449 q 41.4991,-16.97691 87.7141,-16.97691 106.1057,0 106.1057,103.27622 v 73.56663 q 0,19.8064 2.8295,37.25489 3.301,17.4485 8.4884,27.3517 v 3.77264 h -76.3961 q -7.0737,-16.03375 -8.4884,-35.36857 h -3.3011 q -8.96,17.92008 -30.1812,28.76644 -21.2211,10.37478 -48.5728,10.37478 z m 6.1305,-76.86769 q 0,19.33482 23.1075,19.33482 19.8064,0 32.0675,-11.31795 12.2611,-11.31794 12.2611,-28.76643 v -5.65897 l -38.198,3.30106 q -29.2381,2.82949 -29.2381,23.10747 z"/>
<path
d="M 3060.7205,807.95903 V 741.9377 h 40.5559 v -67.90765 h 84.8846 v 67.90765 h 58.9476 l -10.8464,66.02133 H 3186.161 V 863.134 q 0,50.93074 44.8002,50.93074 h 14.1474 l -10.8464,68.85082 h -35.3685 q -45.7434,0 -71.6803,-26.88012 -25.937,-26.88011 -25.937,-74.98136 v -73.09505 z"/>
<path
d="m 3394.1277,987.1598 q -54.7034,0 -85.8278,-30.65278 -31.1243,-31.12434 -31.1243,-86.77089 V 741.9377 h 84.8846 v 129.68476 q 0,21.22114 8.4884,32.53908 8.4885,11.31794 23.5791,11.31794 15.0905,0 23.579,-11.31794 8.4885,-11.31794 8.4885,-32.53908 V 741.9377 h 84.8845 v 127.79843 q 0,55.64655 -31.1243,86.77089 -31.1244,30.65278 -85.8277,30.65278 z"/>
<path
d="M 3562.4816,981.50081 V 741.9377 h 76.3961 v 46.68651 h 3.3011 q 16.5053,-52.34548 65.0781,-52.34548 14.1475,0 23.1075,5.65897 v 83.94141 h -3.3011 q -12.7327,-5.18739 -27.8232,-5.18739 -24.9938,0 -38.6697,16.50533 -13.2042,16.50533 -13.2042,44.32861 v 99.97515 z"/>
<path
d="m 3877.0254,987.1598 q -58.9477,0 -93.3731,-33.48226 -33.9538,-33.48225 -33.9538,-91.95828 0,-39.6128 16.0338,-67.43608 16.5053,-28.29485 44.8001,-42.91386 28.7665,-15.09059 65.0782,-15.09059 55.6466,0 84.413,33.01066 29.238,32.53909 29.238,92.90145 v 12.73268 l -153.7354,15.09059 q 5.659,16.97692 19.8064,24.05063 14.619,7.07371 35.8402,7.07371 24.0506,0 46.2149,-5.65897 22.6359,-6.13055 33.9538,-12.2611 h 3.3011 l -12.2611,66.96449 q -14.1474,6.13055 -37.7265,11.31794 -23.579,5.65899 -47.6296,5.65899 z m -2.8295,-188.63239 q -15.5622,0 -26.8801,9.43162 -10.8464,9.43162 -14.6191,32.0675 l 79.2256,-7.54529 q -3.301,-17.92008 -13.2042,-25.93695 -9.9032,-8.01688 -24.5222,-8.01688 z"/>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

BIN
image/sweden.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

143
internal/example/example.go Normal file
View File

@ -0,0 +1,143 @@
// Copyright (c) 2015 Kurt Jung (Gmail: kurt.w.jung)
//
// Permission to use, copy, modify, and distribute this software for any purpose
// with or without fee is hereby granted, provided that the above copyright notice
// and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// Package example provides some helper routines for the test packages of
// gofpdf and its various contributed packages located beneath the contrib
// directory.
package example
import (
"fmt"
"os"
"path/filepath"
"strings"
"time"
"github.com/jung-kurt/gofpdf"
)
var gofpdfDir string
func init() {
setRoot()
gofpdf.SetDefaultCompression(false)
gofpdf.SetDefaultCatalogSort(true)
gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC))
gofpdf.SetDefaultModificationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC))
}
// setRoot assigns the relative path to the gofpdfDir directory based on current working
// directory
func setRoot() {
wdStr, err := os.Getwd()
if err == nil {
gofpdfDir = ""
list := strings.Split(filepath.ToSlash(wdStr), "/")
for j := len(list) - 1; j >= 0 && list[j] != "gofpdf"; j-- {
gofpdfDir = filepath.Join(gofpdfDir, "..")
}
} else {
panic(err)
}
}
// ImageFile returns a qualified filename in which the path to the image
// directory is prepended to the specified filename.
func ImageFile(fileStr string) string {
return filepath.Join(gofpdfDir, "image", fileStr)
}
// FontDir returns the path to the font directory.
func FontDir() string {
return filepath.Join(gofpdfDir, "font")
}
// FontFile returns a qualified filename in which the path to the font
// directory is prepended to the specified filename.
func FontFile(fileStr string) string {
return filepath.Join(FontDir(), fileStr)
}
// TextFile returns a qualified filename in which the path to the text
// directory is prepended to the specified filename.
func TextFile(fileStr string) string {
return filepath.Join(gofpdfDir, "text", fileStr)
}
// PdfDir returns the path to the PDF output directory.
func PdfDir() string {
return filepath.Join(gofpdfDir, "pdf")
}
// PdfFile returns a qualified filename in which the path to the PDF output
// directory is prepended to the specified filename.
func PdfFile(fileStr string) string {
return filepath.Join(PdfDir(), fileStr)
}
// Filename returns a qualified filename in which the example PDF directory
// path is prepended and the suffix ".pdf" is appended to the specified
// filename.
func Filename(baseStr string) string {
return PdfFile(baseStr + ".pdf")
}
// referenceCompare compares the specified file with the file's reference copy
// located in the 'reference' subdirectory. All bytes of the two files are
// compared except for the value of the /CreationDate field in the PDF. This
// function succeeds if both files are equivalent except for their
// /CreationDate values or if the reference file does not exist.
func referenceCompare(fileStr string) (err error) {
var refFileStr, refDirStr, dirStr, baseFileStr string
dirStr, baseFileStr = filepath.Split(fileStr)
refDirStr = filepath.Join(dirStr, "reference")
err = os.MkdirAll(refDirStr, 0755)
if err == nil {
refFileStr = filepath.Join(refDirStr, baseFileStr)
err = gofpdf.ComparePDFFiles(fileStr, refFileStr, false)
}
return
}
// Summary generates a predictable report for use by test examples. If the
// specified error is nil, the filename delimiters are normalized and the
// filename printed to standard output with a success message. If the specified
// error is not nil, its String() value is printed to standard output.
func Summary(err error, fileStr string) {
if err == nil {
fileStr = filepath.ToSlash(fileStr)
fmt.Printf("Successfully generated %s\n", fileStr)
} else {
fmt.Println(err)
}
}
// SummaryCompare generates a predictable report for use by test examples. If
// the specified error is nil, the generated file is compared with a reference
// copy for byte-for-byte equality. If the files match, then the filename
// delimiters are normalized and the filename printed to standard output with a
// success message. If the files do not match, this condition is reported on
// standard output. If the specified error is not nil, its String() value is
// printed to standard output.
func SummaryCompare(err error, fileStr string) {
if err == nil {
err = referenceCompare(fileStr)
}
if err == nil {
fileStr = filepath.ToSlash(fileStr)
fmt.Printf("Successfully generated %s\n", fileStr)
} else {
fmt.Println(err)
}
}

View File

@ -0,0 +1,31 @@
/*
* Copyright (c) 2015 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package example_test
import (
"errors"
"github.com/jung-kurt/gofpdf/internal/example"
)
// ExampleFilename tests the Filename() and Summary() functions.
func ExampleFilename() {
fileStr := example.Filename("example")
example.Summary(errors.New("printer on fire"), fileStr)
// Output:
// printer on fire
}

View File

@ -0,0 +1,24 @@
TRG= ../files.go
JSON= ../../../font/calligra.json
Z= ../../../font/calligra.z
${TRG} : ${JSON} ${Z} ./bin
echo "package files" > ${TRG}
echo "" >> ${TRG}
echo "// CalligraJson is embedded byte slice for calligra.json" >> ${TRG}
echo "var CalligraJson = []byte{" >> ${TRG}
./bin < ${JSON} >> ${TRG}
echo "}" >> ${TRG}
echo "" >> ${TRG}
echo "// CalligraZ is embedded byte slice for calligra.z" >> ${TRG}
echo "var CalligraZ = []byte{" >> ${TRG}
./bin < ${Z} >> ${TRG}
echo "}" >> ${TRG}
gofmt -s -w ${TRG}
./bin : bin.go
go build -v
clean :
rm -f ./bin ${TRG}

28
internal/files/bin/bin.go Normal file
View File

@ -0,0 +1,28 @@
package main
import (
"fmt"
"io/ioutil"
"os"
)
func main() {
var buf []byte
var pos int
var b byte
var err error
buf, err = ioutil.ReadAll(os.Stdin)
if err == nil {
for _, b = range buf {
fmt.Printf("0x%02X, ", b)
pos++
if pos >= 16 {
fmt.Println("")
pos = 0
}
}
}
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
}
}

1691
internal/files/files.go Normal file

File diff suppressed because it is too large Load Diff

82
label.go Normal file
View File

@ -0,0 +1,82 @@
package gofpdf
// Adapted from Nice Numbers for Graph Labels by Paul Heckbert from "Graphics
// Gems", Academic Press, 1990
// Paul Heckbert 2 Dec 88
// https://github.com/erich666/GraphicsGems
// LICENSE
// This code repository predates the concept of Open Source, and predates most
// licenses along such lines. As such, the official license truly is:
// EULA: The Graphics Gems code is copyright-protected. In other words, you
// cannot claim the text of the code as your own and resell it. Using the code
// is permitted in any program, product, or library, non-commercial or
// commercial. Giving credit is not required, though is a nice gesture. The
// code comes as-is, and if there are any flaws or problems with any Gems code,
// nobody involved with Gems - authors, editors, publishers, or webmasters -
// are to be held responsible. Basically, don't be a jerk, and remember that
// anything free comes with no guarantee.
import (
"math"
)
// niceNum returns a "nice" number approximately equal to x. The number is
// rounded if round is true, converted to its ceiling otherwise.
func niceNum(val float64, round bool) float64 {
var nf float64
exp := int(math.Floor(math.Log10(val)))
f := val / math.Pow10(exp)
if round {
switch {
case f < 1.5:
nf = 1
case f < 3.0:
nf = 2
case f < 7.0:
nf = 5
default:
nf = 10
}
} else {
switch {
case f <= 1:
nf = 1
case f <= 2.0:
nf = 2
case f <= 5.0:
nf = 5
default:
nf = 10
}
}
return nf * math.Pow10(exp)
}
// TickmarkPrecision returns an appropriate precision value for label
// formatting.
func TickmarkPrecision(div float64) int {
return int(math.Max(-math.Floor(math.Log10(div)), 0))
}
// Tickmarks returns a slice of tickmarks appropriate for a chart axis and an
// appropriate precision for formatting purposes. The values min and max will
// be contained within the tickmark range.
func Tickmarks(min, max float64) (list []float64, precision int) {
if max > min {
spread := niceNum(max-min, false)
d := niceNum((spread / 4), true)
graphMin := math.Floor(min/d) * d
graphMax := math.Ceil(max/d) * d
precision = TickmarkPrecision(d)
for x := graphMin; x < graphMax+0.5*d; x += d {
list = append(list, x)
}
}
return
}

121
layer.go Normal file
View File

@ -0,0 +1,121 @@
/*
* Copyright (c) 2014 Kurt Jung (Gmail: kurt.w.jung)
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package gofpdf
// Routines in this file are translated from
// http://www.fpdf.org/en/script/script97.php
type layerType struct {
name string
visible bool
objNum int // object number
}
type layerRecType struct {
list []layerType
currentLayer int
openLayerPane bool
}
func (f *Fpdf) layerInit() {
f.layer.list = make([]layerType, 0)
f.layer.currentLayer = -1
f.layer.openLayerPane = false
}
// AddLayer defines a layer that can be shown or hidden when the document is
// displayed. name specifies the layer name that the document reader will
// display in the layer list. visible specifies whether the layer will be
// initially visible. The return value is an integer ID that is used in a call
// to BeginLayer().
func (f *Fpdf) AddLayer(name string, visible bool) (layerID int) {
layerID = len(f.layer.list)
f.layer.list = append(f.layer.list, layerType{name: name, visible: visible})
return
}
// BeginLayer is called to begin adding content to the specified layer. All
// content added to the page between a call to BeginLayer and a call to
// EndLayer is added to the layer specified by id. See AddLayer for more
// details.
func (f *Fpdf) BeginLayer(id int) {
f.EndLayer()
if id >= 0 && id < len(f.layer.list) {
f.outf("/OC /OC%d BDC", id)
f.layer.currentLayer = id
}
}
// EndLayer is called to stop adding content to the currently active layer. See
// BeginLayer for more details.
func (f *Fpdf) EndLayer() {
if f.layer.currentLayer >= 0 {
f.out("EMC")
f.layer.currentLayer = -1
}
}
// OpenLayerPane advises the document reader to open the layer pane when the
// document is initially displayed.
func (f *Fpdf) OpenLayerPane() {
f.layer.openLayerPane = true
}
func (f *Fpdf) layerEndDoc() {
if len(f.layer.list) > 0 {
if f.pdfVersion < "1.5" {
f.pdfVersion = "1.5"
}
}
}
func (f *Fpdf) layerPutLayers() {
for j, l := range f.layer.list {
f.newobj()
f.layer.list[j].objNum = f.n
f.outf("<</Type /OCG /Name %s>>", f.textstring(utf8toutf16(l.name)))
f.out("endobj")
}
}
func (f *Fpdf) layerPutResourceDict() {
if len(f.layer.list) > 0 {
f.out("/Properties <<")
for j, layer := range f.layer.list {
f.outf("/OC%d %d 0 R", j, layer.objNum)
}
f.out(">>")
}
}
func (f *Fpdf) layerPutCatalog() {
if len(f.layer.list) > 0 {
onStr := ""
offStr := ""
for _, layer := range f.layer.list {
onStr += sprintf("%d 0 R ", layer.objNum)
if !layer.visible {
offStr += sprintf("%d 0 R ", layer.objNum)
}
}
f.outf("/OCProperties <</OCGs [%s] /D <</OFF [%s] /Order [%s]>>>>", onStr, offStr, onStr)
if f.layer.openLayerPane {
f.out("/PageMode /UseOC")
}
}
}

59
list/list.go Normal file
View File

@ -0,0 +1,59 @@
package main
import (
"fmt"
"os"
"path/filepath"
"strings"
)
func matchTail(str, tailStr string) (match bool, headStr string) {
sln := len(str)
ln := len(tailStr)
if sln > ln {
match = str[sln-ln:] == tailStr
if match {
headStr = str[:sln-ln]
}
}
return
}
func matchHead(str, headStr string) (match bool, tailStr string) {
ln := len(headStr)
if len(str) > ln {
match = str[:ln] == headStr
if match {
tailStr = str[ln:]
}
}
return
}
func main() {
var err error
var ok bool
var showStr, name string
err = filepath.Walk("pdf/reference", func(path string, info os.FileInfo, err error) error {
if info.Mode().IsRegular() {
name = filepath.Base(path)
ok, name = matchTail(name, ".pdf")
if ok {
name = strings.Replace(name, "_", " ", -1)
ok, showStr = matchHead(name, "Fpdf ")
if ok {
fmt.Printf("[%s](%s)\n", showStr, path)
} else {
ok, showStr = matchHead(name, "contrib ")
if ok {
fmt.Printf("[%s](%s)\n", showStr, path)
}
}
}
}
return nil
})
if err != nil {
fmt.Println(err)
}
}

Some files were not shown because too many files have changed in this diff Show More