diff --git a/.gitignore b/.gitignore index b6e4a89..8ebd65c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ dst -*pdf \ No newline at end of file +*.pdf \ No newline at end of file diff --git a/internal/pdf/annotator/circle.go b/internal/pdf/annotator/circle.go new file mode 100644 index 0000000..e4e0887 --- /dev/null +++ b/internal/pdf/annotator/circle.go @@ -0,0 +1,126 @@ +package annotator + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + pdfcore "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + pdf "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +type CircleAnnotationDef struct { + X float64 + Y float64 + Width float64 + Height float64 + FillEnabled bool // Show fill? + FillColor *pdf.PdfColorDeviceRGB + BorderEnabled bool // Show border? + BorderWidth float64 + BorderColor *pdf.PdfColorDeviceRGB + Opacity float64 // Alpha value (0-1). +} + +// Creates a circle/ellipse annotation object with appearance stream that can be added to page PDF annotations. +func CreateCircleAnnotation(circDef CircleAnnotationDef) (*pdf.PdfAnnotation, error) { + circAnnotation := pdf.NewPdfAnnotationCircle() + + if circDef.BorderEnabled { + r, g, b := circDef.BorderColor.R(), circDef.BorderColor.G(), circDef.BorderColor.B() + circAnnotation.C = pdfcore.MakeArrayFromFloats([]float64{r, g, b}) + bs := pdf.NewBorderStyle() + bs.SetBorderWidth(circDef.BorderWidth) + circAnnotation.BS = bs.ToPdfObject() + } + + if circDef.FillEnabled { + r, g, b := circDef.FillColor.R(), circDef.FillColor.G(), circDef.FillColor.B() + circAnnotation.IC = pdfcore.MakeArrayFromFloats([]float64{r, g, b}) + } else { + circAnnotation.IC = pdfcore.MakeArrayFromIntegers([]int{}) // No fill. + } + + if circDef.Opacity < 1.0 { + circAnnotation.CA = pdfcore.MakeFloat(circDef.Opacity) + } + + // Make the appearance stream (for uniform appearance). + apDict, bbox, err := makeCircleAnnotationAppearanceStream(circDef) + if err != nil { + return nil, err + } + + circAnnotation.AP = apDict + circAnnotation.Rect = pdfcore.MakeArrayFromFloats([]float64{bbox.Llx, bbox.Lly, bbox.Urx, bbox.Ury}) + + return circAnnotation.PdfAnnotation, nil + +} + +func makeCircleAnnotationAppearanceStream(circDef CircleAnnotationDef) (*pdfcore.PdfObjectDictionary, *pdf.PdfRectangle, error) { + form := pdf.NewXObjectForm() + form.Resources = pdf.NewPdfPageResources() + + gsName := "" + if circDef.Opacity < 1.0 { + // Create graphics state with right opacity. + gsState := pdfcore.MakeDict() + gsState.Set("ca", pdfcore.MakeFloat(circDef.Opacity)) + gsState.Set("CA", pdfcore.MakeFloat(circDef.Opacity)) + err := form.Resources.AddExtGState("gs1", gsState) + if err != nil { + common.Log.Debug("Unable to add extgstate gs1") + return nil, nil, err + } + + gsName = "gs1" + } + + content, localBbox, globalBbox, err := drawPdfCircle(circDef, gsName) + if err != nil { + return nil, nil, err + } + + err = form.SetContentStream(content, nil) + if err != nil { + return nil, nil, err + } + + // Local bounding box for the XObject Form. + form.BBox = localBbox.ToPdfObject() + + apDict := pdfcore.MakeDict() + apDict.Set("N", form.ToPdfObject()) + + return apDict, globalBbox, nil +} + +func drawPdfCircle(circDef CircleAnnotationDef, gsName string) ([]byte, *pdf.PdfRectangle, *pdf.PdfRectangle, error) { + // The annotation is drawn locally in a relative coordinate system with 0,0 as the origin rather than an offset. + circle := draw.Circle{ + X: circDef.X, + Y: circDef.Y, + Width: circDef.Width, + Height: circDef.Height, + FillEnabled: circDef.FillEnabled, + FillColor: circDef.FillColor, + BorderEnabled: circDef.BorderEnabled, + BorderWidth: circDef.BorderWidth, + BorderColor: circDef.BorderColor, + Opacity: circDef.Opacity, + } + + content, localBbox, err := circle.Draw(gsName) + if err != nil { + return nil, nil, nil, err + } + + // Bounding box - global page coordinate system (with offset). + globalBbox := &pdf.PdfRectangle{} + globalBbox.Llx = circDef.X + localBbox.Llx + globalBbox.Lly = circDef.Y + localBbox.Lly + globalBbox.Urx = circDef.X + localBbox.Urx + globalBbox.Ury = circDef.Y + localBbox.Ury + + return content, localBbox, globalBbox, nil +} diff --git a/internal/pdf/annotator/line.go b/internal/pdf/annotator/line.go new file mode 100644 index 0000000..8b400f1 --- /dev/null +++ b/internal/pdf/annotator/line.go @@ -0,0 +1,133 @@ +package annotator + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + pdfcore "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + pdf "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Defines a line between point 1 (X1,Y1) and point 2 (X2,Y2). The line ending styles can be none (regular line), +// or arrows at either end. The line also has a specified width, color and opacity. +type LineAnnotationDef struct { + X1 float64 + Y1 float64 + X2 float64 + Y2 float64 + LineColor *pdf.PdfColorDeviceRGB + Opacity float64 // Alpha value (0-1). + LineWidth float64 + LineEndingStyle1 draw.LineEndingStyle // Line ending style of point 1. + LineEndingStyle2 draw.LineEndingStyle // Line ending style of point 2. +} + +// Creates a line annotation object that can be added to page PDF annotations. +func CreateLineAnnotation(lineDef LineAnnotationDef) (*pdf.PdfAnnotation, error) { + // Line annotation. + lineAnnotation := pdf.NewPdfAnnotationLine() + + // Line endpoint locations. + lineAnnotation.L = pdfcore.MakeArrayFromFloats([]float64{lineDef.X1, lineDef.Y1, lineDef.X2, lineDef.Y2}) + + // Line endings. + le1 := pdfcore.MakeName("None") + if lineDef.LineEndingStyle1 == draw.LineEndingStyleArrow { + le1 = pdfcore.MakeName("ClosedArrow") + } + le2 := pdfcore.MakeName("None") + if lineDef.LineEndingStyle2 == draw.LineEndingStyleArrow { + le2 = pdfcore.MakeName("ClosedArrow") + } + lineAnnotation.LE = pdfcore.MakeArray(le1, le2) + + // Opacity. + if lineDef.Opacity < 1.0 { + lineAnnotation.CA = pdfcore.MakeFloat(lineDef.Opacity) + } + + r, g, b := lineDef.LineColor.R(), lineDef.LineColor.G(), lineDef.LineColor.B() + lineAnnotation.IC = pdfcore.MakeArrayFromFloats([]float64{r, g, b}) // fill color of line endings, rgb 0-1. + lineAnnotation.C = pdfcore.MakeArrayFromFloats([]float64{r, g, b}) // line color, rgb 0-1. + bs := pdf.NewBorderStyle() + bs.SetBorderWidth(lineDef.LineWidth) // Line width: 3 points. + lineAnnotation.BS = bs.ToPdfObject() + + // Make the appearance stream (for uniform appearance). + apDict, bbox, err := makeLineAnnotationAppearanceStream(lineDef) + if err != nil { + return nil, err + } + lineAnnotation.AP = apDict + + // The rect specifies the location and dimensions of the annotation. Technically if the annotation could not + // be displayed if it goes outside these bounds, although rarely enforced. + lineAnnotation.Rect = pdfcore.MakeArrayFromFloats([]float64{bbox.Llx, bbox.Lly, bbox.Urx, bbox.Ury}) + + return lineAnnotation.PdfAnnotation, nil +} + +func makeLineAnnotationAppearanceStream(lineDef LineAnnotationDef) (*pdfcore.PdfObjectDictionary, *pdf.PdfRectangle, error) { + form := pdf.NewXObjectForm() + form.Resources = pdf.NewPdfPageResources() + + gsName := "" + if lineDef.Opacity < 1.0 { + // Create graphics state with right opacity. + gsState := pdfcore.MakeDict() + gsState.Set("ca", pdfcore.MakeFloat(lineDef.Opacity)) + err := form.Resources.AddExtGState("gs1", gsState) + if err != nil { + common.Log.Debug("Unable to add extgstate gs1") + return nil, nil, err + } + + gsName = "gs1" + } + + content, localBbox, globalBbox, err := drawPdfLine(lineDef, gsName) + if err != nil { + return nil, nil, err + } + + err = form.SetContentStream(content, nil) + if err != nil { + return nil, nil, err + } + + // Local bounding box for the XObject Form. + form.BBox = localBbox.ToPdfObject() + + apDict := pdfcore.MakeDict() + apDict.Set("N", form.ToPdfObject()) + + return apDict, globalBbox, nil +} + +func drawPdfLine(lineDef LineAnnotationDef, gsName string) ([]byte, *pdf.PdfRectangle, *pdf.PdfRectangle, error) { + // The annotation is drawn locally in a relative coordinate system with 0,0 as the origin rather than an offset. + line := draw.Line{ + X1: 0, + Y1: 0, + X2: lineDef.X2 - lineDef.X1, + Y2: lineDef.Y2 - lineDef.Y1, + LineColor: lineDef.LineColor, + Opacity: lineDef.Opacity, + LineWidth: lineDef.LineWidth, + LineEndingStyle1: lineDef.LineEndingStyle1, + LineEndingStyle2: lineDef.LineEndingStyle2, + } + + content, localBbox, err := line.Draw(gsName) + if err != nil { + return nil, nil, nil, err + } + + // Bounding box - global page coordinate system (with offset). + globalBbox := &pdf.PdfRectangle{} + globalBbox.Llx = lineDef.X1 + localBbox.Llx + globalBbox.Lly = lineDef.Y1 + localBbox.Lly + globalBbox.Urx = lineDef.X1 + localBbox.Urx + globalBbox.Ury = lineDef.Y1 + localBbox.Ury + + return content, localBbox, globalBbox, nil +} diff --git a/internal/pdf/annotator/rectangle.go b/internal/pdf/annotator/rectangle.go new file mode 100644 index 0000000..12c5e8d --- /dev/null +++ b/internal/pdf/annotator/rectangle.go @@ -0,0 +1,129 @@ +package annotator + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + pdfcore "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + pdf "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// A rectangle defined with a specified Width and Height and a lower left corner at (X,Y). The rectangle can +// optionally have a border and a filling color. +// The Width/Height includes the border (if any specified). +type RectangleAnnotationDef struct { + X float64 + Y float64 + Width float64 + Height float64 + FillEnabled bool // Show fill? + FillColor *pdf.PdfColorDeviceRGB + BorderEnabled bool // Show border? + BorderWidth float64 + BorderColor *pdf.PdfColorDeviceRGB + Opacity float64 // Alpha value (0-1). +} + +// Creates a rectangle annotation object that can be added to page PDF annotations. +func CreateRectangleAnnotation(rectDef RectangleAnnotationDef) (*pdf.PdfAnnotation, error) { + rectAnnotation := pdf.NewPdfAnnotationSquare() + + if rectDef.BorderEnabled { + r, g, b := rectDef.BorderColor.R(), rectDef.BorderColor.G(), rectDef.BorderColor.B() + rectAnnotation.C = pdfcore.MakeArrayFromFloats([]float64{r, g, b}) + bs := pdf.NewBorderStyle() + bs.SetBorderWidth(rectDef.BorderWidth) + rectAnnotation.BS = bs.ToPdfObject() + } + + if rectDef.FillEnabled { + r, g, b := rectDef.FillColor.R(), rectDef.FillColor.G(), rectDef.FillColor.B() + rectAnnotation.IC = pdfcore.MakeArrayFromFloats([]float64{r, g, b}) + } else { + rectAnnotation.IC = pdfcore.MakeArrayFromIntegers([]int{}) // No fill. + } + + if rectDef.Opacity < 1.0 { + rectAnnotation.CA = pdfcore.MakeFloat(rectDef.Opacity) + } + + // Make the appearance stream (for uniform appearance). + apDict, bbox, err := makeRectangleAnnotationAppearanceStream(rectDef) + if err != nil { + return nil, err + } + + rectAnnotation.AP = apDict + rectAnnotation.Rect = pdfcore.MakeArrayFromFloats([]float64{bbox.Llx, bbox.Lly, bbox.Urx, bbox.Ury}) + + return rectAnnotation.PdfAnnotation, nil + +} + +func makeRectangleAnnotationAppearanceStream(rectDef RectangleAnnotationDef) (*pdfcore.PdfObjectDictionary, *pdf.PdfRectangle, error) { + form := pdf.NewXObjectForm() + form.Resources = pdf.NewPdfPageResources() + + gsName := "" + if rectDef.Opacity < 1.0 { + // Create graphics state with right opacity. + gsState := pdfcore.MakeDict() + gsState.Set("ca", pdfcore.MakeFloat(rectDef.Opacity)) + gsState.Set("CA", pdfcore.MakeFloat(rectDef.Opacity)) + err := form.Resources.AddExtGState("gs1", gsState) + if err != nil { + common.Log.Debug("Unable to add extgstate gs1") + return nil, nil, err + } + + gsName = "gs1" + } + + content, localBbox, globalBbox, err := drawPdfRectangle(rectDef, gsName) + if err != nil { + return nil, nil, err + } + + err = form.SetContentStream(content, nil) + if err != nil { + return nil, nil, err + } + + // Local bounding box for the XObject Form. + form.BBox = localBbox.ToPdfObject() + + apDict := pdfcore.MakeDict() + apDict.Set("N", form.ToPdfObject()) + + return apDict, globalBbox, nil +} + +func drawPdfRectangle(rectDef RectangleAnnotationDef, gsName string) ([]byte, *pdf.PdfRectangle, *pdf.PdfRectangle, error) { + // The annotation is drawn locally in a relative coordinate system with 0,0 as the origin rather than an offset. + rect := draw.Rectangle{ + X: 0, + Y: 0, + Width: rectDef.Width, + Height: rectDef.Height, + FillEnabled: rectDef.FillEnabled, + FillColor: rectDef.FillColor, + BorderEnabled: rectDef.BorderEnabled, + BorderWidth: 2 * rectDef.BorderWidth, + BorderColor: rectDef.BorderColor, + Opacity: rectDef.Opacity, + } + + content, localBbox, err := rect.Draw(gsName) + if err != nil { + return nil, nil, nil, err + } + + // Bounding box - global page coordinate system (with offset). + globalBbox := &pdf.PdfRectangle{} + globalBbox.Llx = rectDef.X + localBbox.Llx + globalBbox.Lly = rectDef.Y + localBbox.Lly + globalBbox.Urx = rectDef.X + localBbox.Urx + globalBbox.Ury = rectDef.Y + localBbox.Ury + + return content, localBbox, globalBbox, nil +} diff --git a/internal/pdf/cmap/cmap.go b/internal/pdf/cmap/cmap.go new file mode 100644 index 0000000..80c8198 --- /dev/null +++ b/internal/pdf/cmap/cmap.go @@ -0,0 +1,401 @@ +package cmap + +import ( + "bytes" + "errors" + "io" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// CMap represents a character code to unicode mapping used in PDF files. +type CMap struct { + *cMapParser + + // Text encoder to look up runes from input glyph names. + encoder textencoding.TextEncoder + + // map of character code to string (sequence of runes) for 1-4 byte codes separately. + codeMap [4]map[uint64]string + + name string + ctype int + codespaces []codespace +} + +// codespace represents a single codespace range used in the CMap. +type codespace struct { + numBytes int + low uint64 + high uint64 +} + +// Name returns the name of the CMap. +func (cmap *CMap) Name() string { + return cmap.name +} + +// Type returns the type of the CMap. +func (cmap *CMap) Type() int { + return cmap.ctype +} + +// CharcodeBytesToUnicode converts a byte array of charcodes to a unicode string representation. +func (cmap *CMap) CharcodeBytesToUnicode(src []byte) string { + var buf bytes.Buffer + + // Maximum number of possible bytes per code. + maxLen := 4 + + i := 0 + for i < len(src) { + var code uint64 + var j int + for j = 0; j < maxLen && i+j < len(src); j++ { + b := src[i+j] + + code <<= 8 + code |= uint64(b) + + tgt, has := cmap.codeMap[j][code] + if has { + buf.WriteString(tgt) + break + } else if j == maxLen-1 || i+j == len(src)-1 { + break + } + } + i += j + 1 + } + + return buf.String() +} + +// CharcodeToUnicode converts a single character code to unicode string. +// Note that CharcodeBytesToUnicode is typically more efficient. +func (cmap *CMap) CharcodeToUnicode(srcCode uint64) string { + // Search through different code lengths. + for numBytes := 1; numBytes <= 4; numBytes++ { + if c, has := cmap.codeMap[numBytes-1][srcCode]; has { + return c + } + } + + // Not found. + return "?" +} + +// newCMap returns an initialized CMap. +func newCMap() *CMap { + cmap := &CMap{} + cmap.codespaces = []codespace{} + cmap.codeMap = [4]map[uint64]string{} + // Maps for 1-4 bytes are initialized. Minimal overhead if not used (most commonly used are 1-2 bytes). + cmap.codeMap[0] = map[uint64]string{} + cmap.codeMap[1] = map[uint64]string{} + cmap.codeMap[2] = map[uint64]string{} + cmap.codeMap[3] = map[uint64]string{} + return cmap +} + +// LoadCmapFromData parses CMap data in memory through a byte vector and returns a CMap which +// can be used for character code to unicode conversion. +func LoadCmapFromData(data []byte) (*CMap, error) { + cmap := newCMap() + cmap.cMapParser = newCMapParser(data) + + err := cmap.parse() + if err != nil { + return cmap, err + } + + return cmap, nil +} + +// parse parses the CMap file and loads into the CMap structure. +func (cmap *CMap) parse() error { + for { + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + + common.Log.Debug("error parsing CMap: %v", err) + return err + } + + if op, isOp := o.(cmapOperand); isOp { + common.Log.Trace("Operand: %s", op.Operand) + + switch op.Operand { + case begincodespacerange: + err := cmap.parseCodespaceRange() + if err != nil { + return err + } + case beginbfchar: + err := cmap.parseBfchar() + if err != nil { + return err + } + case beginbfrange: + err := cmap.parseBfrange() + if err != nil { + return err + } + } + } else if n, isName := o.(cmapName); isName { + if n.Name == cmapname { + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + name, ok := o.(cmapName) + if !ok { + return errors.New("CMap name not a name") + } + cmap.name = name.Name + } else if n.Name == cmaptype { + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + typeInt, ok := o.(cmapInt) + if !ok { + return errors.New("CMap type not an integer") + } + cmap.ctype = int(typeInt.val) + } + } else { + common.Log.Trace("Unhandled object: %T %#v", o, o) + } + } + + return nil +} + +// parseCodespaceRange parses the codespace range section of a CMap. +func (cmap *CMap) parseCodespaceRange() error { + for { + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + + hexLow, isHex := o.(cmapHexString) + if !isHex { + if op, isOperand := o.(cmapOperand); isOperand { + if op.Operand == endcodespacerange { + return nil + } + return errors.New("unexpected operand") + } + } + + o, err = cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + hexHigh, ok := o.(cmapHexString) + if !ok { + return errors.New("non-hex high") + } + + if hexLow.numBytes != hexHigh.numBytes { + return errors.New("unequal number of bytes in range") + } + + low := hexToUint64(hexLow) + high := hexToUint64(hexHigh) + numBytes := hexLow.numBytes + + cspace := codespace{numBytes: numBytes, low: low, high: high} + cmap.codespaces = append(cmap.codespaces, cspace) + + common.Log.Trace("Codespace low: 0x%X, high: 0x%X", low, high) + } + + return nil +} + +// parseBfchar parses a bfchar section of a CMap file. +func (cmap *CMap) parseBfchar() error { + for { + // Src code. + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + var srcCode uint64 + var numBytes int + + switch v := o.(type) { + case cmapOperand: + if v.Operand == endbfchar { + return nil + } + return errors.New("unexpected operand") + case cmapHexString: + srcCode = hexToUint64(v) + numBytes = v.numBytes + default: + return errors.New("unexpected type") + } + + // Target code. + o, err = cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + var toCode string + + switch v := o.(type) { + case cmapOperand: + if v.Operand == endbfchar { + return nil + } + return errors.New("unexpected operand") + case cmapHexString: + toCode = hexToString(v) + case cmapName: + toCode = "?" + if cmap.encoder != nil { + if r, found := cmap.encoder.GlyphToRune(v.Name); found { + toCode = string(r) + } + } + default: + return errors.New("unexpected type") + } + + if numBytes <= 0 || numBytes > 4 { + return errors.New("invalid code length") + } + + cmap.codeMap[numBytes-1][srcCode] = toCode + } + + return nil +} + +// parseBfrange parses a bfrange section of a CMap file. +func (cmap *CMap) parseBfrange() error { + for { + // The specifications are in pairs of 3. + // + // where target can be either as a hex code, or a list. + + // Src code from. + var srcCodeFrom uint64 + var numBytes int + { + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + + switch v := o.(type) { + case cmapOperand: + if v.Operand == endbfrange { + return nil + } + return errors.New("unexpected operand") + case cmapHexString: + srcCodeFrom = hexToUint64(v) + numBytes = v.numBytes + default: + return errors.New("unexpected type") + } + } + + // Src code to. + var srcCodeTo uint64 + { + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + + switch v := o.(type) { + case cmapOperand: + if v.Operand == endbfrange { + return nil + } + return errors.New("unexpected operand") + case cmapHexString: + srcCodeTo = hexToUint64(v) + default: + return errors.New("unexpected type") + } + } + + // target(s). + o, err := cmap.parseObject() + if err != nil { + if err == io.EOF { + break + } + return err + } + + if numBytes <= 0 || numBytes > 4 { + return errors.New("invalid code length") + } + + switch v := o.(type) { + case cmapArray: + sc := srcCodeFrom + for _, o := range v.Array { + hexs, ok := o.(cmapHexString) + if !ok { + return errors.New("non-hex string in array") + } + cmap.codeMap[numBytes-1][sc] = hexToString(hexs) + sc++ + } + if sc != srcCodeTo+1 { + return errors.New("invalid number of items in array") + } + case cmapHexString: + // , maps [from,to] to [dstCode,dstCode+to-from]. + // in hex format. + target := hexToUint64(v) + i := uint64(0) + for sc := srcCodeFrom; sc <= srcCodeTo; sc++ { + r := target + i + cmap.codeMap[numBytes-1][sc] = string(r) + i++ + } + default: + return errors.New("unexpected type") + } + } + + return nil +} diff --git a/internal/pdf/cmap/const.go b/internal/pdf/cmap/const.go new file mode 100644 index 0000000..6588287 --- /dev/null +++ b/internal/pdf/cmap/const.go @@ -0,0 +1,13 @@ +package cmap + +const ( + begincodespacerange = "begincodespacerange" + endcodespacerange = "endcodespacerange" + beginbfchar = "beginbfchar" + endbfchar = "endbfchar" + beginbfrange = "beginbfrange" + endbfrange = "endbfrange" + + cmapname = "CMapName" + cmaptype = "CMapType" +) diff --git a/internal/pdf/cmap/parser.go b/internal/pdf/cmap/parser.go new file mode 100644 index 0000000..052c846 --- /dev/null +++ b/internal/pdf/cmap/parser.go @@ -0,0 +1,467 @@ +package cmap + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io" + "strconv" + + "encoding/hex" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// cMapParser parses CMap character to unicode mapping files. +type cMapParser struct { + reader *bufio.Reader +} + +// cMapParser creates a new instance of the PDF CMap parser from input data. +func newCMapParser(content []byte) *cMapParser { + parser := cMapParser{} + + buffer := bytes.NewBuffer(content) + parser.reader = bufio.NewReader(buffer) + + return &parser +} + +// Detect the signature at the current file position and parse +// the corresponding object. +func (p *cMapParser) parseObject() (cmapObject, error) { + p.skipSpaces() + for { + bb, err := p.reader.Peek(2) + if err != nil { + return nil, err + } + + if bb[0] == '%' { + p.parseComment() + p.skipSpaces() + continue + } else if bb[0] == '/' { + name, err := p.parseName() + return name, err + } else if bb[0] == '(' { + str, err := p.parseString() + return str, err + } else if bb[0] == '[' { + arr, err := p.parseArray() + return arr, err + } else if (bb[0] == '<') && (bb[1] == '<') { + dict, err := p.parseDict() + return dict, err + } else if bb[0] == '<' { + shex, err := p.parseHexString() + return shex, err + } else if core.IsDecimalDigit(bb[0]) || (bb[0] == '-' && core.IsDecimalDigit(bb[1])) { + number, err := p.parseNumber() + if err != nil { + return nil, err + } + return number, nil + } else { + // Operand? + operand, err := p.parseOperand() + if err != nil { + return nil, err + } + + return operand, nil + } + } +} + +// Skip over any spaces. Returns the number of spaces skipped and +// an error if any. +func (p *cMapParser) skipSpaces() (int, error) { + cnt := 0 + for { + bb, err := p.reader.Peek(1) + if err != nil { + return 0, err + } + if core.IsWhiteSpace(bb[0]) { + p.reader.ReadByte() + cnt++ + } else { + break + } + } + + return cnt, nil +} + +// parseComment reads a comment line starting with '%'. +func (p *cMapParser) parseComment() (string, error) { + var r bytes.Buffer + + _, err := p.skipSpaces() + if err != nil { + return r.String(), err + } + + isFirst := true + for { + bb, err := p.reader.Peek(1) + if err != nil { + common.Log.Debug("error %s", err.Error()) + return r.String(), err + } + if isFirst && bb[0] != '%' { + return r.String(), errors.New("comment should start with %") + } + isFirst = false + if (bb[0] != '\r') && (bb[0] != '\n') { + b, _ := p.reader.ReadByte() + r.WriteByte(b) + } else { + break + } + } + return r.String(), nil +} + +// Parse a name starting with '/'. +func (p *cMapParser) parseName() (cmapName, error) { + name := "" + nameStarted := false + for { + bb, err := p.reader.Peek(1) + if err == io.EOF { + break // Can happen when loading from object stream. + } + if err != nil { + return cmapName{name}, err + } + + if !nameStarted { + // Should always start with '/', otherwise not valid. + if bb[0] == '/' { + nameStarted = true + p.reader.ReadByte() + } else { + common.Log.Debug("error Name starting with %s (% x)", bb, bb) + return cmapName{name}, fmt.Errorf("invalid name: (%c)", bb[0]) + } + } else { + if core.IsWhiteSpace(bb[0]) { + break + } else if (bb[0] == '/') || (bb[0] == '[') || (bb[0] == '(') || (bb[0] == ']') || (bb[0] == '<') || (bb[0] == '>') { + break // Looks like start of next statement. + } else if bb[0] == '#' { + hexcode, err := p.reader.Peek(3) + if err != nil { + return cmapName{name}, err + } + p.reader.Discard(3) + + code, err := hex.DecodeString(string(hexcode[1:3])) + if err != nil { + return cmapName{name}, err + } + name += string(code) + } else { + b, _ := p.reader.ReadByte() + name += string(b) + } + } + } + + return cmapName{name}, nil +} + +// A string starts with '(' and ends with ')'. +func (p *cMapParser) parseString() (cmapString, error) { + p.reader.ReadByte() + + buf := bytes.Buffer{} + + count := 1 + for { + bb, err := p.reader.Peek(1) + if err != nil { + return cmapString{buf.String()}, err + } + + if bb[0] == '\\' { // Escape sequence. + p.reader.ReadByte() // Skip the escape \ byte. + b, err := p.reader.ReadByte() + if err != nil { + return cmapString{buf.String()}, err + } + + // Octal '\ddd' number (base 8). + if core.IsOctalDigit(b) { + bb, err := p.reader.Peek(2) + if err != nil { + return cmapString{buf.String()}, err + } + + numeric := []byte{} + numeric = append(numeric, b) + for _, val := range bb { + if core.IsOctalDigit(val) { + numeric = append(numeric, val) + } else { + break + } + } + p.reader.Discard(len(numeric) - 1) + + common.Log.Trace("Numeric string \"%s\"", numeric) + code, err := strconv.ParseUint(string(numeric), 8, 32) + if err != nil { + return cmapString{buf.String()}, err + } + buf.WriteByte(byte(code)) + continue + } + + switch b { + case 'n': + buf.WriteByte('\n') + case 'r': + buf.WriteByte('\r') + case 't': + buf.WriteByte('\t') + case 'b': + buf.WriteByte('\b') + case 'f': + buf.WriteByte('\f') + case '(': + buf.WriteByte('(') + case ')': + buf.WriteByte(')') + case '\\': + buf.WriteByte('\\') + } + + continue + } else if bb[0] == '(' { + count++ + } else if bb[0] == ')' { + count-- + if count == 0 { + p.reader.ReadByte() + break + } + } + + b, _ := p.reader.ReadByte() + buf.WriteByte(b) + } + + return cmapString{buf.String()}, nil +} + +// Starts with '<' ends with '>'. +// Currently not converting the hex codes to characters. +func (p *cMapParser) parseHexString() (cmapHexString, error) { + p.reader.ReadByte() + + hextable := []byte("0123456789abcdefABCDEF") + + buf := bytes.Buffer{} + + //tmp := []byte{} + for { + p.skipSpaces() + + bb, err := p.reader.Peek(1) + if err != nil { + return cmapHexString{numBytes: 0, b: []byte("")}, err + } + + if bb[0] == '>' { + p.reader.ReadByte() + break + } + + b, _ := p.reader.ReadByte() + if bytes.IndexByte(hextable, b) >= 0 { + buf.WriteByte(b) + } + } + + if buf.Len()%2 == 1 { + buf.WriteByte('0') + } + numBytes := buf.Len() / 2 + + hexb, _ := hex.DecodeString(buf.String()) + return cmapHexString{numBytes: numBytes, b: hexb}, nil +} + +// Starts with '[' ends with ']'. Can contain any kinds of direct objects. +func (p *cMapParser) parseArray() (cmapArray, error) { + arr := cmapArray{} + arr.Array = []cmapObject{} + + p.reader.ReadByte() + + for { + p.skipSpaces() + + bb, err := p.reader.Peek(1) + if err != nil { + return arr, err + } + + if bb[0] == ']' { + p.reader.ReadByte() + break + } + + obj, err := p.parseObject() + if err != nil { + return arr, err + } + arr.Array = append(arr.Array, obj) + } + + return arr, nil +} + +// Reads and parses a PDF dictionary object enclosed with '<<' and '>>' +func (p *cMapParser) parseDict() (cmapDict, error) { + common.Log.Trace("Reading PDF Dict!") + + dict := makeDict() + + // Pass the '<<' + c, _ := p.reader.ReadByte() + if c != '<' { + return dict, errors.New("invalid dict") + } + c, _ = p.reader.ReadByte() + if c != '<' { + return dict, errors.New("invalid dict") + } + + for { + p.skipSpaces() + + bb, err := p.reader.Peek(2) + if err != nil { + return dict, err + } + + if (bb[0] == '>') && (bb[1] == '>') { + p.reader.ReadByte() + p.reader.ReadByte() + break + } + + key, err := p.parseName() + common.Log.Trace("Key: %s", key.Name) + if err != nil { + common.Log.Debug("error Returning name err %s", err) + return dict, err + } + + p.skipSpaces() + + val, err := p.parseObject() + if err != nil { + return dict, err + } + dict.Dict[key.Name] = val + + // Skip "def" which optionally follows key value dict definitions in CMaps. + p.skipSpaces() + bb, err = p.reader.Peek(3) + if err != nil { + return dict, err + } + if string(bb) == "def" { + p.reader.Discard(3) + } + + } + + return dict, nil +} + +func (p *cMapParser) parseNumber() (cmapObject, error) { + isFloat := false + allowSigns := true + + numStr := bytes.Buffer{} + for { + bb, err := p.reader.Peek(1) + if err == io.EOF { + break + } + if err != nil { + return nil, err + } + if allowSigns && (bb[0] == '-' || bb[0] == '+') { + // Only appear in the beginning, otherwise serves as a delimiter. + b, _ := p.reader.ReadByte() + numStr.WriteByte(b) + allowSigns = false // Only allowed in beginning, and after e (exponential). + } else if core.IsDecimalDigit(bb[0]) { + b, _ := p.reader.ReadByte() + numStr.WriteByte(b) + } else if bb[0] == '.' { + b, _ := p.reader.ReadByte() + numStr.WriteByte(b) + isFloat = true + } else if bb[0] == 'e' { + // Exponential number format. + b, _ := p.reader.ReadByte() + numStr.WriteByte(b) + isFloat = true + allowSigns = true + } else { + break + } + } + + if isFloat { + fVal, err := strconv.ParseFloat(numStr.String(), 64) + o := cmapFloat{fVal} + return o, err + } + intVal, err := strconv.ParseInt(numStr.String(), 10, 64) + o := cmapInt{intVal} + return o, err +} + +// An operand is a text command represented by a word. +func (p *cMapParser) parseOperand() (cmapOperand, error) { + op := cmapOperand{} + + buf := bytes.Buffer{} + for { + bb, err := p.reader.Peek(1) + if err != nil { + if err == io.EOF { + break + } + return op, err + } + if core.IsDelimiter(bb[0]) { + break + } + if core.IsWhiteSpace(bb[0]) { + break + } + + b, _ := p.reader.ReadByte() + buf.WriteByte(b) + } + + if buf.Len() == 0 { + return op, fmt.Errorf("invalid operand (empty)") + } + + op.Operand = buf.String() + + return op, nil +} diff --git a/internal/pdf/cmap/primitives.go b/internal/pdf/cmap/primitives.go new file mode 100644 index 0000000..2ba6f99 --- /dev/null +++ b/internal/pdf/cmap/primitives.go @@ -0,0 +1,43 @@ +package cmap + +type cmapObject interface { +} + +type cmapName struct { + Name string +} + +type cmapOperand struct { + Operand string +} + +type cmapHexString struct { + numBytes int // original number of bytes in the raw representation + b []byte +} + +type cmapString struct { + String string +} + +type cmapArray struct { + Array []cmapObject +} + +type cmapDict struct { + Dict map[string]cmapObject +} + +type cmapFloat struct { + val float64 +} + +type cmapInt struct { + val int64 +} + +func makeDict() cmapDict { + d := cmapDict{} + d.Dict = map[string]cmapObject{} + return d +} diff --git a/internal/pdf/cmap/utils.go b/internal/pdf/cmap/utils.go new file mode 100644 index 0000000..ae2ad25 --- /dev/null +++ b/internal/pdf/cmap/utils.go @@ -0,0 +1,29 @@ +package cmap + +import "bytes" + +func hexToUint64(shex cmapHexString) uint64 { + val := uint64(0) + + for _, v := range shex.b { + val <<= 8 + val |= uint64(v) + } + + return val +} + +func hexToString(shex cmapHexString) string { + var buf bytes.Buffer + + // Assumes unicode in format with 2 bytes HH and LL representing a rune. + for i := 0; i < len(shex.b)-1; i += 2 { + b1 := uint64(shex.b[i]) + b2 := uint64(shex.b[i+1]) + r := rune((b1 << 8) | b2) + + buf.WriteRune(r) + } + + return buf.String() +} diff --git a/internal/pdf/common/logging.go b/internal/pdf/common/logging.go new file mode 100644 index 0000000..24eb062 --- /dev/null +++ b/internal/pdf/common/logging.go @@ -0,0 +1,122 @@ +package common + +import ( + "fmt" + "os" + "path/filepath" + "runtime" +) + +type Logger interface { + Error(format string, args ...any) + Warning(format string, args ...any) + Notice(format string, args ...any) + Info(format string, args ...any) + Debug(format string, args ...any) + Trace(format string, args ...any) +} + +// Dummy Logger does nothing. +type DummyLogger struct{} + +func (this DummyLogger) Error(format string, args ...any) { +} + +func (this DummyLogger) Warning(format string, args ...any) { +} + +func (this DummyLogger) Notice(format string, args ...any) { +} + +func (this DummyLogger) Info(format string, args ...any) { +} + +func (this DummyLogger) Debug(format string, args ...any) { +} + +func (this DummyLogger) Trace(format string, args ...any) { +} + +// Simple Console Logger that the tests use. +type LogLevel int + +const ( + LogLevelTrace LogLevel = 5 + LogLevelDebug LogLevel = 4 + LogLevelInfo LogLevel = 3 + LogLevelNotice LogLevel = 2 + LogLevelWarning LogLevel = 1 + LogLevelError LogLevel = 0 +) + +type ConsoleLogger struct { + LogLevel LogLevel +} + +func NewConsoleLogger(logLevel LogLevel) *ConsoleLogger { + logger := ConsoleLogger{} + logger.LogLevel = logLevel + return &logger +} + +func (this ConsoleLogger) Error(format string, args ...any) { + if this.LogLevel >= LogLevelError { + prefix := "[ERROR] " + this.output(os.Stdout, prefix, format, args...) + } +} + +func (this ConsoleLogger) Warning(format string, args ...any) { + if this.LogLevel >= LogLevelWarning { + prefix := "[WARNING] " + this.output(os.Stdout, prefix, format, args...) + } +} + +func (this ConsoleLogger) Notice(format string, args ...any) { + if this.LogLevel >= LogLevelNotice { + prefix := "[NOTICE] " + this.output(os.Stdout, prefix, format, args...) + } +} + +func (this ConsoleLogger) Info(format string, args ...any) { + if this.LogLevel >= LogLevelInfo { + prefix := "[INFO] " + this.output(os.Stdout, prefix, format, args...) + } +} + +func (this ConsoleLogger) Debug(format string, args ...any) { + if this.LogLevel >= LogLevelDebug { + prefix := "[DEBUG] " + this.output(os.Stdout, prefix, format, args...) + } +} + +func (this ConsoleLogger) Trace(format string, args ...any) { + if this.LogLevel >= LogLevelTrace { + prefix := "[TRACE] " + this.output(os.Stdout, prefix, format, args...) + } +} + +var Log Logger = DummyLogger{} + +func SetLogger(logger Logger) { + Log = logger +} + +// output writes `format`, `args` log message prefixed by the source file name, line and `prefix` +func (this ConsoleLogger) output(f *os.File, prefix string, format string, args ...any) { + _, file, line, ok := runtime.Caller(3) + if !ok { + file = "???" + line = 0 + } else { + file = filepath.Base(file) + } + + src := fmt.Sprintf("%s %s:%d ", prefix, file, line) + format + "\n" + fmt.Fprintf(f, src, args...) +} diff --git a/internal/pdf/common/time.go b/internal/pdf/common/time.go new file mode 100644 index 0000000..b16cfe2 --- /dev/null +++ b/internal/pdf/common/time.go @@ -0,0 +1,11 @@ +package common + +import ( + "time" +) + +const timeFormat = "2 January 2006 at 15:04" + +func UtcTimeFormat(t time.Time) string { + return t.Format(timeFormat) + " UTC" +} diff --git a/internal/pdf/common/version.go b/internal/pdf/common/version.go new file mode 100644 index 0000000..885e51a --- /dev/null +++ b/internal/pdf/common/version.go @@ -0,0 +1,17 @@ +// Package common contains common properties used by the subpackages. +package common + +import ( + "time" +) + +const releaseYear = 2018 +const releaseMonth = 11 +const releaseDay = 17 +const releaseHour = 11 +const releaseMin = 30 + +// Holds version information, when bumping this make sure to bump the released at stamp also. +const Version = "2.2.0" + +var ReleasedAt = time.Date(releaseYear, releaseMonth, releaseDay, releaseHour, releaseMin, 0, 0, time.UTC) diff --git a/internal/pdf/contentstream/const.go b/internal/pdf/contentstream/const.go new file mode 100644 index 0000000..e3549e0 --- /dev/null +++ b/internal/pdf/contentstream/const.go @@ -0,0 +1,7 @@ +package contentstream + +import "errors" + +var ( + ErrInvalidOperand = errors.New("invalid operand") +) diff --git a/internal/pdf/contentstream/contentstream.go b/internal/pdf/contentstream/contentstream.go new file mode 100644 index 0000000..1b68ae7 --- /dev/null +++ b/internal/pdf/contentstream/contentstream.go @@ -0,0 +1,197 @@ +package contentstream + +import ( + "bytes" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +type ContentStreamOperation struct { + Params []core.PdfObject + Operand string +} + +type ContentStreamOperations []*ContentStreamOperation + +// Check if the content stream operations are fully wrapped (within q ... Q) +func (s *ContentStreamOperations) isWrapped() bool { + if len(*s) < 2 { + return false + } + + depth := 0 + for _, op := range *s { + switch op.Operand { + case "q": + depth++ + case "Q": + depth-- + default: + if depth < 1 { + return false + } + } + } + + // Should end at depth == 0 + return depth == 0 +} + +// Wrap entire contents within q ... Q. If unbalanced, then adds extra Qs at the end. +// Only does if needed. Ensures that when adding new content, one start with all states +// in the default condition. +func (s *ContentStreamOperations) WrapIfNeeded() *ContentStreamOperations { + if len(*s) == 0 { + // No need to wrap if empty. + return s + } + if s.isWrapped() { + return s + } + + *s = append([]*ContentStreamOperation{{Operand: "q"}}, *s...) + + depth := 0 + for _, op := range *s { + switch op.Operand { + case "q": + depth++ + case "Q": + depth-- + } + } + + for depth > 0 { + *s = append(*s, &ContentStreamOperation{Operand: "Q"}) + depth-- + } + + return s +} + +// Convert a set of content stream operations to a content stream byte presentation, i.e. the kind that can be +// stored as a PDF stream or string format. +func (s *ContentStreamOperations) Bytes() []byte { + var buf bytes.Buffer + + for _, op := range *s { + if op == nil { + continue + } + + if op.Operand == "BI" { + // Inline image requires special handling. + buf.WriteString(op.Operand + "\n") + buf.WriteString(op.Params[0].DefaultWriteString()) + + } else { + // Default handler. + for _, param := range op.Params { + buf.WriteString(param.DefaultWriteString()) + buf.WriteString(" ") + + } + + buf.WriteString(op.Operand + "\n") + } + } + + return buf.Bytes() +} + +// ExtractText parses and extracts all text data in content streams and returns as a string. +// Does not take into account Encoding table, the output is simply the character codes. +// +// Deprecated: More advanced text extraction is offered in package extractor with character encoding support. +func (s *ContentStreamParser) ExtractText() (string, error) { + operations, err := s.Parse() + if err != nil { + return "", err + } + inText := false + xPos, yPos := float64(-1), float64(-1) + txt := "" + for _, op := range *operations { + switch op.Operand { + case "BT": + inText = true + case "ET": + inText = false + } + + if op.Operand == "Td" || op.Operand == "TD" || op.Operand == "T*" { + // Move to next line... + txt += "\n" + } + if op.Operand == "Tm" { + if len(op.Params) != 6 { + continue + } + xfloat, ok := op.Params[4].(*core.PdfObjectFloat) + if !ok { + xint, ok := op.Params[4].(*core.PdfObjectInteger) + if !ok { + continue + } + xfloat = core.MakeFloat(float64(*xint)) + } + yfloat, ok := op.Params[5].(*core.PdfObjectFloat) + if !ok { + yint, ok := op.Params[5].(*core.PdfObjectInteger) + if !ok { + continue + } + yfloat = core.MakeFloat(float64(*yint)) + } + if yPos == -1 { + yPos = float64(*yfloat) + } else if yPos > float64(*yfloat) { + txt += "\n" + xPos = float64(*xfloat) + yPos = float64(*yfloat) + continue + } + if xPos == -1 { + xPos = float64(*xfloat) + } else if xPos < float64(*xfloat) { + txt += "\t" + xPos = float64(*xfloat) + } + } + if inText && op.Operand == "TJ" { + if len(op.Params) < 1 { + continue + } + paramList, ok := op.Params[0].(*core.PdfObjectArray) + if !ok { + return "", fmt.Errorf("invalid parameter type, no array (%T)", op.Params[0]) + } + for _, obj := range *paramList { + switch v := obj.(type) { + case *core.PdfObjectString: + txt += string(*v) + case *core.PdfObjectFloat: + if *v < -100 { + txt += " " + } + case *core.PdfObjectInteger: + if *v < -100 { + txt += " " + } + } + } + } else if inText && op.Operand == "Tj" { + if len(op.Params) < 1 { + continue + } + param, ok := op.Params[0].(*core.PdfObjectString) + if !ok { + return "", fmt.Errorf("invalid parameter type, not string (%T)", op.Params[0]) + } + txt += string(*param) + } + } + + return txt, nil +} diff --git a/internal/pdf/contentstream/creator.go b/internal/pdf/contentstream/creator.go new file mode 100644 index 0000000..9762d22 --- /dev/null +++ b/internal/pdf/contentstream/creator.go @@ -0,0 +1,613 @@ +package contentstream + +import ( + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +type ContentCreator struct { + operands ContentStreamOperations +} + +func NewContentCreator() *ContentCreator { + creator := &ContentCreator{} + creator.operands = ContentStreamOperations{} + return creator +} + +// Get the list of operations. +func (cc *ContentCreator) Operations() *ContentStreamOperations { + return &cc.operands +} + +// Convert a set of content stream operations to a content stream byte presentation, i.e. the kind that can be +// stored as a PDF stream or string format. +func (cc *ContentCreator) Bytes() []byte { + return cc.operands.Bytes() +} + +// Same as Bytes() except returns as a string for convenience. +func (cc *ContentCreator) String() string { + return string(cc.operands.Bytes()) +} + +/* Graphics state operators. */ + +// Save the current graphics state on the stack - push. +func (cc *ContentCreator) Add_q() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "q" + cc.operands = append(cc.operands, &op) + return cc +} + +// Restore the most recently stored state from the stack - pop. +func (cc *ContentCreator) Add_Q() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Q" + cc.operands = append(cc.operands, &op) + return cc +} + +// Display XObject - image or form. +func (cc *ContentCreator) Add_Do(name core.PdfObjectName) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Do" + op.Params = makeParamsFromNames([]core.PdfObjectName{name}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Modify the current transformation matrix (ctm). +func (cc *ContentCreator) Add_cm(a, b, c, d, e, f float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "cm" + op.Params = makeParamsFromFloats([]float64{a, b, c, d, e, f}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Convenience function for generating a cm operation to translate the transformation matrix. +func (cc *ContentCreator) Translate(tx, ty float64) *ContentCreator { + return cc.Add_cm(1, 0, 0, 1, tx, ty) +} + +// Convenience function for generating a cm command to scale the transformation matrix. +func (cc *ContentCreator) Scale(sx, sy float64) *ContentCreator { + return cc.Add_cm(sx, 0, 0, sy, 0, 0) +} + +// Convenience function for generating a cm command to rotate transformation matrix. +func (cc *ContentCreator) RotateDeg(angle float64) *ContentCreator { + u1 := math.Cos(angle * math.Pi / 180.0) + u2 := math.Sin(angle * math.Pi / 180.0) + u3 := -math.Sin(angle * math.Pi / 180.0) + u4 := math.Cos(angle * math.Pi / 180.0) + return cc.Add_cm(u1, u2, u3, u4, 0, 0) +} + +// Set the line width. +func (cc *ContentCreator) Add_w(lineWidth float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "w" + op.Params = makeParamsFromFloats([]float64{lineWidth}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the line cap style. +func (cc *ContentCreator) Add_J(lineCapStyle string) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "J" + op.Params = makeParamsFromNames([]core.PdfObjectName{core.PdfObjectName(lineCapStyle)}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the line join style. +func (cc *ContentCreator) Add_j(lineJoinStyle string) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "j" + op.Params = makeParamsFromNames([]core.PdfObjectName{core.PdfObjectName(lineJoinStyle)}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the miter limit. +func (cc *ContentCreator) Add_M(miterlimit float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "M" + op.Params = makeParamsFromFloats([]float64{miterlimit}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the line dash pattern. +func (cc *ContentCreator) Add_d(dashArray []int64, dashPhase int64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "d" + + op.Params = []core.PdfObject{} + op.Params = append(op.Params, core.MakeArrayFromIntegers64(dashArray)) + op.Params = append(op.Params, core.MakeInteger(dashPhase)) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the color rendering intent. +func (cc *ContentCreator) Add_ri(intent core.PdfObjectName) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "ri" + op.Params = makeParamsFromNames([]core.PdfObjectName{intent}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the flatness tolerance. +func (cc *ContentCreator) Add_i(flatness float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "i" + op.Params = makeParamsFromFloats([]float64{flatness}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Set the graphics state. +func (cc *ContentCreator) Add_gs(dictName core.PdfObjectName) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "gs" + op.Params = makeParamsFromNames([]core.PdfObjectName{dictName}) + cc.operands = append(cc.operands, &op) + return cc +} + +/* Path construction operators. */ + +// m: Move the current point to (x,y). +func (cc *ContentCreator) Add_m(x, y float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "m" + op.Params = makeParamsFromFloats([]float64{x, y}) + cc.operands = append(cc.operands, &op) + return cc +} + +// l: Append a straight line segment from the current point to (x,y). +func (cc *ContentCreator) Add_l(x, y float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "l" + op.Params = makeParamsFromFloats([]float64{x, y}) + cc.operands = append(cc.operands, &op) + return cc +} + +// c: Append a Bezier curve to the current path from the current point to (x3,y3) with (x1,x1) and (x2,y2) as control +// points. +func (cc *ContentCreator) Add_c(x1, y1, x2, y2, x3, y3 float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "c" + op.Params = makeParamsFromFloats([]float64{x1, y1, x2, y2, x3, y3}) + cc.operands = append(cc.operands, &op) + return cc +} + +// v: Append a Bezier curve to the current path from the current point to (x3,y3) with the current point and (x2,y2) as +// control points. +func (cc *ContentCreator) Add_v(x2, y2, x3, y3 float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "v" + op.Params = makeParamsFromFloats([]float64{x2, y2, x3, y3}) + cc.operands = append(cc.operands, &op) + return cc +} + +// y: Append a Bezier curve to the current path from the current point to (x3,y3) with (x1, y1) and (x3,y3) as +// control points. +func (cc *ContentCreator) Add_y(x1, y1, x3, y3 float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "y" + op.Params = makeParamsFromFloats([]float64{x1, y1, x3, y3}) + cc.operands = append(cc.operands, &op) + return cc +} + +// h: Close the current subpath by adding a line between the current position and the starting position. +func (cc *ContentCreator) Add_h() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "h" + cc.operands = append(cc.operands, &op) + return cc +} + +// re: Append a rectangle to the current path as a complete subpath, with lower left corner (x,y). +func (cc *ContentCreator) Add_re(x, y, width, height float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "re" + op.Params = makeParamsFromFloats([]float64{x, y, width, height}) + cc.operands = append(cc.operands, &op) + return cc +} + +/* Path painting operators. */ + +// S: stroke the path. +func (cc *ContentCreator) Add_S() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "S" + cc.operands = append(cc.operands, &op) + return cc +} + +// s: Close and stroke the path. +func (cc *ContentCreator) Add_s() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "s" + cc.operands = append(cc.operands, &op) + return cc +} + +// f: Fill the path using the nonzero winding number rule to determine fill region. +func (cc *ContentCreator) Add_f() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "f" + cc.operands = append(cc.operands, &op) + return cc +} + +// f*: Fill the path using the even-odd rule to determine fill region. +func (cc *ContentCreator) Add_f_starred() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "f*" + cc.operands = append(cc.operands, &op) + return cc +} + +// B: Fill and then stroke the path (nonzero winding number rule). +func (cc *ContentCreator) Add_B() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "B" + cc.operands = append(cc.operands, &op) + return cc +} + +// B*: Fill and then stroke the path (even-odd rule). +func (cc *ContentCreator) Add_B_starred() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "B*" + cc.operands = append(cc.operands, &op) + return cc +} + +// b: Close, fill and then stroke the path (nonzero winding number rule). +func (cc *ContentCreator) Add_b() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "b" + cc.operands = append(cc.operands, &op) + return cc +} + +// b*: Close, fill and then stroke the path (even-odd winding number rule). +func (cc *ContentCreator) Add_b_starred() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "b*" + cc.operands = append(cc.operands, &op) + return cc +} + +// n: End the path without filling or stroking. +func (cc *ContentCreator) Add_n() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "n" + cc.operands = append(cc.operands, &op) + return cc +} + +/* Clipping path operators. */ + +// W: Modify the current clipping path by intersecting with the current path (nonzero winding rule). +func (cc *ContentCreator) Add_W() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "W" + cc.operands = append(cc.operands, &op) + return cc +} + +// W*: Modify the current clipping path by intersecting with the current path (even odd rule). +func (cc *ContentCreator) Add_W_starred() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "W*" + cc.operands = append(cc.operands, &op) + return cc +} + +/* Color operators. */ + +// CS: Set the current colorspace for stroking operations. +func (cc *ContentCreator) Add_CS(name core.PdfObjectName) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "CS" + op.Params = makeParamsFromNames([]core.PdfObjectName{name}) + cc.operands = append(cc.operands, &op) + return cc +} + +// cs: Same as CS but for non-stroking operations. +func (cc *ContentCreator) Add_cs(name core.PdfObjectName) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "cs" + op.Params = makeParamsFromNames([]core.PdfObjectName{name}) + cc.operands = append(cc.operands, &op) + return cc +} + +// SC: Set color for stroking operations. Input: c1, ..., cn. +func (cc *ContentCreator) Add_SC(c ...float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "SC" + op.Params = makeParamsFromFloats(c) + cc.operands = append(cc.operands, &op) + return cc +} + +// SCN: Same as SC but supports more colorspaces. +func (cc *ContentCreator) Add_SCN(c ...float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "SCN" + op.Params = makeParamsFromFloats(c) + cc.operands = append(cc.operands, &op) + return cc +} + +// SCN with name attribute (for pattern). Syntax: c1 ... cn name SCN. +func (cc *ContentCreator) Add_SCN_pattern(name core.PdfObjectName, c ...float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "SCN" + op.Params = makeParamsFromFloats(c) + op.Params = append(op.Params, core.MakeName(string(name))) + cc.operands = append(cc.operands, &op) + return cc +} + +// scn: Same as SC but for nonstroking operations. +func (cc *ContentCreator) Add_scn(c ...float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "scn" + op.Params = makeParamsFromFloats(c) + cc.operands = append(cc.operands, &op) + return cc +} + +// scn with name attribute (for pattern). Syntax: c1 ... cn name scn. +func (cc *ContentCreator) Add_scn_pattern(name core.PdfObjectName, c ...float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "scn" + op.Params = makeParamsFromFloats(c) + op.Params = append(op.Params, core.MakeName(string(name))) + cc.operands = append(cc.operands, &op) + return cc +} + +// G: Set the stroking colorspace to DeviceGray and sets the gray level (0-1). +func (cc *ContentCreator) Add_G(gray float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "G" + op.Params = makeParamsFromFloats([]float64{gray}) + cc.operands = append(cc.operands, &op) + return cc +} + +// g: Same as G but used for nonstroking operations. +func (cc *ContentCreator) Add_g(gray float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "g" + op.Params = makeParamsFromFloats([]float64{gray}) + cc.operands = append(cc.operands, &op) + return cc +} + +// RG: Set the stroking colorspace to DeviceRGB and sets the r,g,b colors (0-1 each). +func (cc *ContentCreator) Add_RG(r, g, b float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "RG" + op.Params = makeParamsFromFloats([]float64{r, g, b}) + cc.operands = append(cc.operands, &op) + return cc +} + +// rg: Same as RG but used for nonstroking operations. +func (cc *ContentCreator) Add_rg(r, g, b float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "rg" + op.Params = makeParamsFromFloats([]float64{r, g, b}) + cc.operands = append(cc.operands, &op) + return cc +} + +// K: Set the stroking colorspace to DeviceCMYK and sets the c,m,y,k color (0-1 each component). +func (cc *ContentCreator) Add_K(c, m, y, k float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "K" + op.Params = makeParamsFromFloats([]float64{c, m, y, k}) + cc.operands = append(cc.operands, &op) + return cc +} + +// k: Same as K but used for nonstroking operations. +func (cc *ContentCreator) Add_k(c, m, y, k float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "k" + op.Params = makeParamsFromFloats([]float64{c, m, y, k}) + cc.operands = append(cc.operands, &op) + return cc +} + +/* Shading operators. */ + +func (cc *ContentCreator) Add_sh(name core.PdfObjectName) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "sh" + op.Params = makeParamsFromNames([]core.PdfObjectName{name}) + cc.operands = append(cc.operands, &op) + return cc +} + +/* Text related operators */ + +/* Text state operators */ + +// BT: Begin text. +func (cc *ContentCreator) Add_BT() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "BT" + cc.operands = append(cc.operands, &op) + return cc +} + +// ET: End text. +func (cc *ContentCreator) Add_ET() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "ET" + cc.operands = append(cc.operands, &op) + return cc +} + +// Tc: Set character spacing. +func (cc *ContentCreator) Add_Tc(charSpace float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tc" + op.Params = makeParamsFromFloats([]float64{charSpace}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Tw: Set word spacing. +func (cc *ContentCreator) Add_Tw(wordSpace float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tw" + op.Params = makeParamsFromFloats([]float64{wordSpace}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Tz: Set horizontal scaling. +func (cc *ContentCreator) Add_Tz(scale float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tz" + op.Params = makeParamsFromFloats([]float64{scale}) + cc.operands = append(cc.operands, &op) + return cc +} + +// TL: Set leading. +func (cc *ContentCreator) Add_TL(leading float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "TL" + op.Params = makeParamsFromFloats([]float64{leading}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Tf: Set font and font size. +func (cc *ContentCreator) Add_Tf(fontName core.PdfObjectName, fontSize float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tf" + op.Params = makeParamsFromNames([]core.PdfObjectName{fontName}) + op.Params = append(op.Params, makeParamsFromFloats([]float64{fontSize})...) + cc.operands = append(cc.operands, &op) + return cc +} + +// Tr: Set text rendering mode. +func (cc *ContentCreator) Add_Tr(render int64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tr" + op.Params = makeParamsFromInts([]int64{render}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Ts: Set text rise. +func (cc *ContentCreator) Add_Ts(rise float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Ts" + op.Params = makeParamsFromFloats([]float64{rise}) + cc.operands = append(cc.operands, &op) + return cc +} + +/* Text positioning operators. */ + +// Td: Move to start of next line with offset (tx, ty). +func (cc *ContentCreator) Add_Td(tx, ty float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Td" + op.Params = makeParamsFromFloats([]float64{tx, ty}) + cc.operands = append(cc.operands, &op) + return cc +} + +// TD: Move to start of next line with offset (tx, ty). +func (cc *ContentCreator) Add_TD(tx, ty float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "TD" + op.Params = makeParamsFromFloats([]float64{tx, ty}) + cc.operands = append(cc.operands, &op) + return cc +} + +// Tm: Set the text line matrix. +func (cc *ContentCreator) Add_Tm(a, b, c, d, e, f float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tm" + op.Params = makeParamsFromFloats([]float64{a, b, c, d, e, f}) + cc.operands = append(cc.operands, &op) + return cc +} + +// T*: Move to the start of next line. +func (cc *ContentCreator) Add_Tstar() *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "T*" + cc.operands = append(cc.operands, &op) + return cc +} + +/* Text showing operators */ + +// Tj: Show a text string. +func (cc *ContentCreator) Add_Tj(textstr core.PdfObjectString) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "Tj" + op.Params = makeParamsFromStrings([]core.PdfObjectString{textstr}) + cc.operands = append(cc.operands, &op) + return cc +} + +// ': Move to next line and show a string. +func (cc *ContentCreator) Add_quote(textstr core.PdfObjectString) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "'" + op.Params = makeParamsFromStrings([]core.PdfObjectString{textstr}) + cc.operands = append(cc.operands, &op) + return cc +} + +// ”: Move to next line and show a string, using aw and ac as word and character spacing respectively. +func (cc *ContentCreator) Add_quotes(textstr core.PdfObjectString, aw, ac float64) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "''" + op.Params = makeParamsFromFloats([]float64{aw, ac}) + op.Params = append(op.Params, makeParamsFromStrings([]core.PdfObjectString{textstr})...) + cc.operands = append(cc.operands, &op) + return cc +} + +// TJ. Show one or more text string. Array of numbers (displacement) and strings. +func (cc *ContentCreator) Add_TJ(vals ...core.PdfObject) *ContentCreator { + op := ContentStreamOperation{} + op.Operand = "TJ" + op.Params = []core.PdfObject{core.MakeArray(vals...)} + cc.operands = append(cc.operands, &op) + return cc +} diff --git a/internal/pdf/contentstream/draw/bezier_curve.go b/internal/pdf/contentstream/draw/bezier_curve.go new file mode 100644 index 0000000..65183bf --- /dev/null +++ b/internal/pdf/contentstream/draw/bezier_curve.go @@ -0,0 +1,149 @@ +package draw + +import ( + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Cubic bezier curves are defined by: +// R(t) = P0*(1-t)^3 + P1*3*t*(1-t)^2 + P2*3*t^2*(1-t) + P3*t^3 +// where P0 is the current point, P1, P2 control points and P3 the final point. +type CubicBezierCurve struct { + P0 Point // Starting point. + P1 Point // Control point 1. + P2 Point // Control point 2. + P3 Point // Final point. +} + +func NewCubicBezierCurve(x0, y0, x1, y1, x2, y2, x3, y3 float64) CubicBezierCurve { + curve := CubicBezierCurve{} + curve.P0 = NewPoint(x0, y0) + curve.P1 = NewPoint(x1, y1) + curve.P2 = NewPoint(x2, y2) + curve.P3 = NewPoint(x3, y3) + return curve +} + +// Add X,Y offset to all points on a curve. +func (curve CubicBezierCurve) AddOffsetXY(offX, offY float64) CubicBezierCurve { + curve.P0.X += offX + curve.P1.X += offX + curve.P2.X += offX + curve.P3.X += offX + + curve.P0.Y += offY + curve.P1.Y += offY + curve.P2.Y += offY + curve.P3.Y += offY + + return curve +} + +func (curve CubicBezierCurve) GetBounds() model.PdfRectangle { + minX := curve.P0.X + maxX := curve.P0.X + minY := curve.P0.Y + maxY := curve.P0.Y + + // 1000 points. + for t := 0.0; t <= 1.0; t += 0.001 { + Rx := curve.P0.X*math.Pow(1-t, 3) + + curve.P1.X*3*t*math.Pow(1-t, 2) + + curve.P2.X*3*math.Pow(t, 2)*(1-t) + + curve.P3.X*math.Pow(t, 3) + Ry := curve.P0.Y*math.Pow(1-t, 3) + + curve.P1.Y*3*t*math.Pow(1-t, 2) + + curve.P2.Y*3*math.Pow(t, 2)*(1-t) + + curve.P3.Y*math.Pow(t, 3) + + if Rx < minX { + minX = Rx + } + if Rx > maxX { + maxX = Rx + } + if Ry < minY { + minY = Ry + } + if Ry > maxY { + maxY = Ry + } + } + + bounds := model.PdfRectangle{} + bounds.Llx = minX + bounds.Lly = minY + bounds.Urx = maxX + bounds.Ury = maxY + return bounds +} + +type CubicBezierPath struct { + Curves []CubicBezierCurve +} + +func NewCubicBezierPath() CubicBezierPath { + bpath := CubicBezierPath{} + bpath.Curves = []CubicBezierCurve{} + return bpath +} + +func (this CubicBezierPath) AppendCurve(curve CubicBezierCurve) CubicBezierPath { + this.Curves = append(this.Curves, curve) + return this +} + +func (bpath CubicBezierPath) Copy() CubicBezierPath { + bpathcopy := CubicBezierPath{} + bpathcopy.Curves = []CubicBezierCurve{} + for _, c := range bpath.Curves { + bpathcopy.Curves = append(bpathcopy.Curves, c) + } + return bpathcopy +} + +func (bpath CubicBezierPath) Offset(offX, offY float64) CubicBezierPath { + for i, c := range bpath.Curves { + bpath.Curves[i] = c.AddOffsetXY(offX, offY) + } + return bpath +} + +func (bpath CubicBezierPath) GetBoundingBox() Rectangle { + bbox := Rectangle{} + + minX := 0.0 + maxX := 0.0 + minY := 0.0 + maxY := 0.0 + for idx, c := range bpath.Curves { + curveBounds := c.GetBounds() + if idx == 0 { + minX = curveBounds.Llx + maxX = curveBounds.Urx + minY = curveBounds.Lly + maxY = curveBounds.Ury + continue + } + + if curveBounds.Llx < minX { + minX = curveBounds.Llx + } + if curveBounds.Urx > maxX { + maxX = curveBounds.Urx + } + if curveBounds.Lly < minY { + minY = curveBounds.Lly + } + if curveBounds.Ury > maxY { + maxY = curveBounds.Ury + } + } + + bbox.X = minX + bbox.Y = minY + bbox.Width = maxX - minX + bbox.Height = maxY - minY + return bbox +} diff --git a/internal/pdf/contentstream/draw/path.go b/internal/pdf/contentstream/draw/path.go new file mode 100644 index 0000000..c775894 --- /dev/null +++ b/internal/pdf/contentstream/draw/path.go @@ -0,0 +1,98 @@ +package draw + +// A path consists of straight line connections between each point defined in an array of points. +type Path struct { + Points []Point +} + +func NewPath() Path { + path := Path{} + path.Points = []Point{} + return path +} + +func (this Path) AppendPoint(point Point) Path { + this.Points = append(this.Points, point) + return this +} + +func (this Path) RemovePoint(number int) Path { + if number < 1 || number > len(this.Points) { + return this + } + + idx := number - 1 + this.Points = append(this.Points[:idx], this.Points[idx+1:]...) + return this +} + +func (this Path) Length() int { + return len(this.Points) +} + +func (this Path) GetPointNumber(number int) Point { + if number < 1 || number > len(this.Points) { + return Point{} + } + return this.Points[number-1] +} + +func (path Path) Copy() Path { + pathcopy := Path{} + pathcopy.Points = []Point{} + for _, p := range path.Points { + pathcopy.Points = append(pathcopy.Points, p) + } + return pathcopy +} + +func (path Path) Offset(offX, offY float64) Path { + for i, p := range path.Points { + path.Points[i] = p.Add(offX, offY) + } + return path +} + +func (path Path) GetBoundingBox() BoundingBox { + bbox := BoundingBox{} + + minX := 0.0 + maxX := 0.0 + minY := 0.0 + maxY := 0.0 + for idx, p := range path.Points { + if idx == 0 { + minX = p.X + maxX = p.X + minY = p.Y + maxY = p.Y + continue + } + + if p.X < minX { + minX = p.X + } + if p.X > maxX { + maxX = p.X + } + if p.Y < minY { + minY = p.Y + } + if p.Y > maxY { + maxY = p.Y + } + } + + bbox.X = minX + bbox.Y = minY + bbox.Width = maxX - minX + bbox.Height = maxY - minY + return bbox +} + +type BoundingBox struct { + X float64 + Y float64 + Width float64 + Height float64 +} diff --git a/internal/pdf/contentstream/draw/point.go b/internal/pdf/contentstream/draw/point.go new file mode 100644 index 0000000..9e9b5a4 --- /dev/null +++ b/internal/pdf/contentstream/draw/point.go @@ -0,0 +1,32 @@ +package draw + +import "fmt" + +type Point struct { + X float64 + Y float64 +} + +func NewPoint(x, y float64) Point { + point := Point{} + point.X = x + point.Y = y + return point +} + +func (p Point) Add(dx, dy float64) Point { + p.X += dx + p.Y += dy + return p +} + +// Add vector to a point. +func (this Point) AddVector(v Vector) Point { + this.X += v.Dx + this.Y += v.Dy + return this +} + +func (p Point) String() string { + return fmt.Sprintf("(%.1f,%.1f)", p.X, p.Y) +} diff --git a/internal/pdf/contentstream/draw/shapes.go b/internal/pdf/contentstream/draw/shapes.go new file mode 100644 index 0000000..28858ed --- /dev/null +++ b/internal/pdf/contentstream/draw/shapes.go @@ -0,0 +1,353 @@ +package draw + +import ( + "math" + + pdfcontent "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + pdfcore "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + pdf "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +type Circle struct { + X float64 + Y float64 + Width float64 + Height float64 + FillEnabled bool // Show fill? + FillColor *pdf.PdfColorDeviceRGB + BorderEnabled bool // Show border? + BorderWidth float64 + BorderColor *pdf.PdfColorDeviceRGB + Opacity float64 // Alpha value (0-1). +} + +// Draw a circle. Can specify a graphics state (gsName) for setting opacity etc. Otherwise leave empty (""). +// Returns the content stream as a byte array, the bounding box and an error on failure. +func (c Circle) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) { + xRad := c.Width / 2 + yRad := c.Height / 2 + if c.BorderEnabled { + xRad -= c.BorderWidth / 2 + yRad -= c.BorderWidth / 2 + } + + magic := 0.551784 + xMagic := xRad * magic + yMagic := yRad * magic + + bpath := NewCubicBezierPath() + bpath = bpath.AppendCurve(NewCubicBezierCurve(-xRad, 0, -xRad, yMagic, -xMagic, yRad, 0, yRad)) + bpath = bpath.AppendCurve(NewCubicBezierCurve(0, yRad, xMagic, yRad, xRad, yMagic, xRad, 0)) + bpath = bpath.AppendCurve(NewCubicBezierCurve(xRad, 0, xRad, -yMagic, xMagic, -yRad, 0, -yRad)) + bpath = bpath.AppendCurve(NewCubicBezierCurve(0, -yRad, -xMagic, -yRad, -xRad, -yMagic, -xRad, 0)) + bpath = bpath.Offset(xRad, yRad) + if c.BorderEnabled { + bpath = bpath.Offset(c.BorderWidth/2, c.BorderWidth/2) + } + if c.X != 0 || c.Y != 0 { + bpath = bpath.Offset(c.X, c.Y) + } + + creator := pdfcontent.NewContentCreator() + + creator.Add_q() + + if c.FillEnabled { + creator.Add_rg(c.FillColor.R(), c.FillColor.G(), c.FillColor.B()) + } + if c.BorderEnabled { + creator.Add_RG(c.BorderColor.R(), c.BorderColor.G(), c.BorderColor.B()) + creator.Add_w(c.BorderWidth) + } + if len(gsName) > 1 { + // If a graphics state is provided, use it. (Used for transparency settings here). + creator.Add_gs(pdfcore.PdfObjectName(gsName)) + } + + DrawBezierPathWithCreator(bpath, creator) + creator.Add_h() // Close the path. + + if c.FillEnabled && c.BorderEnabled { + creator.Add_B() // fill and stroke. + } else if c.FillEnabled { + creator.Add_f() // Fill. + } else if c.BorderEnabled { + creator.Add_S() // Stroke. + } + creator.Add_Q() + + // Get bounding box. + pathBbox := bpath.GetBoundingBox() + if c.BorderEnabled { + // Account for stroke width. + pathBbox.Height += c.BorderWidth + pathBbox.Width += c.BorderWidth + pathBbox.X -= c.BorderWidth / 2 + pathBbox.Y -= c.BorderWidth / 2 + } + + // Bounding box - global coordinate system. + bbox := &pdf.PdfRectangle{} + bbox.Llx = pathBbox.X + bbox.Lly = pathBbox.Y + bbox.Urx = pathBbox.X + pathBbox.Width + bbox.Ury = pathBbox.Y + pathBbox.Height + + return creator.Bytes(), bbox, nil +} + +// A rectangle defined with a specified Width and Height and a lower left corner at (X,Y). The rectangle can +// optionally have a border and a filling color. +// The Width/Height includes the border (if any specified), i.e. is positioned inside. +type Rectangle struct { + X float64 + Y float64 + Width float64 + Height float64 + FillEnabled bool // Show fill? + FillColor *pdf.PdfColorDeviceRGB + BorderEnabled bool // Show border? + BorderWidth float64 + BorderColor *pdf.PdfColorDeviceRGB + Opacity float64 // Alpha value (0-1). +} + +// Draw the circle. Can specify a graphics state (gsName) for setting opacity etc. Otherwise leave empty (""). +// Returns the content stream as a byte array, bounding box and an error on failure. +func (rect Rectangle) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) { + path := NewPath() + + path = path.AppendPoint(NewPoint(0, 0)) + path = path.AppendPoint(NewPoint(0, rect.Height)) + path = path.AppendPoint(NewPoint(rect.Width, rect.Height)) + path = path.AppendPoint(NewPoint(rect.Width, 0)) + path = path.AppendPoint(NewPoint(0, 0)) + + if rect.X != 0 || rect.Y != 0 { + path = path.Offset(rect.X, rect.Y) + } + + creator := pdfcontent.NewContentCreator() + + creator.Add_q() + if rect.FillEnabled { + creator.Add_rg(rect.FillColor.R(), rect.FillColor.G(), rect.FillColor.B()) + } + if rect.BorderEnabled { + creator.Add_RG(rect.BorderColor.R(), rect.BorderColor.G(), rect.BorderColor.B()) + creator.Add_w(rect.BorderWidth) + } + if len(gsName) > 1 { + // If a graphics state is provided, use it. (Used for transparency settings here). + creator.Add_gs(pdfcore.PdfObjectName(gsName)) + } + DrawPathWithCreator(path, creator) + creator.Add_h() // Close the path. + + if rect.FillEnabled && rect.BorderEnabled { + creator.Add_B() // fill and stroke. + } else if rect.FillEnabled { + creator.Add_f() // Fill. + } else if rect.BorderEnabled { + creator.Add_S() // Stroke. + } + creator.Add_Q() + + // Get bounding box. + pathBbox := path.GetBoundingBox() + + // Bounding box - global coordinate system. + bbox := &pdf.PdfRectangle{} + bbox.Llx = pathBbox.X + bbox.Lly = pathBbox.Y + bbox.Urx = pathBbox.X + pathBbox.Width + bbox.Ury = pathBbox.Y + pathBbox.Height + + return creator.Bytes(), bbox, nil +} + +// The currently supported line ending styles are None, Arrow (ClosedArrow) and Butt. +type LineEndingStyle int + +const ( + LineEndingStyleNone LineEndingStyle = 0 + LineEndingStyleArrow LineEndingStyle = 1 + LineEndingStyleButt LineEndingStyle = 2 +) + +// Defines a line between point 1 (X1,Y1) and point 2 (X2,Y2). The line ending styles can be none (regular line), +// or arrows at either end. The line also has a specified width, color and opacity. +type Line struct { + X1 float64 + Y1 float64 + X2 float64 + Y2 float64 + LineColor *pdf.PdfColorDeviceRGB + Opacity float64 // Alpha value (0-1). + LineWidth float64 + LineEndingStyle1 LineEndingStyle // Line ending style of point 1. + LineEndingStyle2 LineEndingStyle // Line ending style of point 2. +} + +// Draw a line in PDF. Generates the content stream which can be used in page contents or appearance stream of annotation. +// Returns the stream content, XForm bounding box (local), bounding box and an error if one occurred. +func (line Line) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) { + x1, x2 := line.X1, line.X2 + y1, y2 := line.Y1, line.Y2 + + dy := y2 - y1 + dx := x2 - x1 + theta := math.Atan2(dy, dx) + + L := math.Sqrt(math.Pow(dx, 2.0) + math.Pow(dy, 2.0)) + w := line.LineWidth + + pi := math.Pi + + mul := 1.0 + if dx < 0 { + mul *= -1.0 + } + if dy < 0 { + mul *= -1.0 + } + + // Vs. + VsX := mul * (-w / 2 * math.Cos(theta+pi/2)) + VsY := mul * (-w/2*math.Sin(theta+pi/2) + w*math.Sin(theta+pi/2)) + + // V1. + V1X := VsX + w/2*math.Cos(theta+pi/2) + V1Y := VsY + w/2*math.Sin(theta+pi/2) + + // P2. + V2X := VsX + w/2*math.Cos(theta+pi/2) + L*math.Cos(theta) + V2Y := VsY + w/2*math.Sin(theta+pi/2) + L*math.Sin(theta) + + // P3. + V3X := VsX + w/2*math.Cos(theta+pi/2) + L*math.Cos(theta) + w*math.Cos(theta-pi/2) + V3Y := VsY + w/2*math.Sin(theta+pi/2) + L*math.Sin(theta) + w*math.Sin(theta-pi/2) + + // P4. + V4X := VsX + w/2*math.Cos(theta-pi/2) + V4Y := VsY + w/2*math.Sin(theta-pi/2) + + path := NewPath() + path = path.AppendPoint(NewPoint(V1X, V1Y)) + path = path.AppendPoint(NewPoint(V2X, V2Y)) + path = path.AppendPoint(NewPoint(V3X, V3Y)) + path = path.AppendPoint(NewPoint(V4X, V4Y)) + + lineEnding1 := line.LineEndingStyle1 + lineEnding2 := line.LineEndingStyle2 + + // TODO: Allow custom height/widths. + arrowHeight := 3 * w + arrowWidth := 3 * w + arrowExtruding := (arrowWidth - w) / 2 + + if lineEnding2 == LineEndingStyleArrow { + // Convert P2, P3 + p2 := path.GetPointNumber(2) + + va1 := NewVectorPolar(arrowHeight, theta+pi) + pa1 := p2.AddVector(va1) + + bVec := NewVectorPolar(arrowWidth/2, theta+pi/2) + aVec := NewVectorPolar(arrowHeight, theta) + + va2 := NewVectorPolar(arrowExtruding, theta+pi/2) + pa2 := pa1.AddVector(va2) + + va3 := aVec.Add(bVec.Flip()) + pa3 := pa2.AddVector(va3) + + va4 := bVec.Scale(2).Flip().Add(va3.Flip()) + pa4 := pa3.AddVector(va4) + + pa5 := pa1.AddVector(NewVectorPolar(w, theta-pi/2)) + + newpath := NewPath() + newpath = newpath.AppendPoint(path.GetPointNumber(1)) + newpath = newpath.AppendPoint(pa1) + newpath = newpath.AppendPoint(pa2) + newpath = newpath.AppendPoint(pa3) + newpath = newpath.AppendPoint(pa4) + newpath = newpath.AppendPoint(pa5) + newpath = newpath.AppendPoint(path.GetPointNumber(4)) + + path = newpath + } + if lineEnding1 == LineEndingStyleArrow { + // Get the first and last points. + p1 := path.GetPointNumber(1) + pn := path.GetPointNumber(path.Length()) + + // First three points on arrow. + v1 := NewVectorPolar(w/2, theta+pi+pi/2) + pa1 := p1.AddVector(v1) + + v2 := NewVectorPolar(arrowHeight, theta).Add(NewVectorPolar(arrowWidth/2, theta+pi/2)) + pa2 := pa1.AddVector(v2) + + v3 := NewVectorPolar(arrowExtruding, theta-pi/2) + pa3 := pa2.AddVector(v3) + + // Last three points + v5 := NewVectorPolar(arrowHeight, theta) + pa5 := pn.AddVector(v5) + + v6 := NewVectorPolar(arrowExtruding, theta+pi+pi/2) + pa6 := pa5.AddVector(v6) + + pa7 := pa1 + + newpath := NewPath() + newpath = newpath.AppendPoint(pa1) + newpath = newpath.AppendPoint(pa2) + newpath = newpath.AppendPoint(pa3) + for _, p := range path.Points[1 : len(path.Points)-1] { + newpath = newpath.AppendPoint(p) + } + newpath = newpath.AppendPoint(pa5) + newpath = newpath.AppendPoint(pa6) + newpath = newpath.AppendPoint(pa7) + + path = newpath + } + + creator := pdfcontent.NewContentCreator() + + // Draw line with arrow + creator. + Add_q(). + Add_rg(line.LineColor.R(), line.LineColor.G(), line.LineColor.B()) + if len(gsName) > 1 { + // If a graphics state is provided, use it. (Used for transparency settings here). + creator.Add_gs(pdfcore.PdfObjectName(gsName)) + } + + path = path.Offset(line.X1, line.Y1) + + pathBbox := path.GetBoundingBox() + + DrawPathWithCreator(path, creator) + creator.Add_f(). + //creator.Add_S(). + Add_Q() + + /* + // Offsets (needed for placement of annotations bbox). + offX := x1 - VsX + offY := y1 - VsY + */ + + // Bounding box - global coordinate system. + bbox := &pdf.PdfRectangle{} + bbox.Llx = pathBbox.X + bbox.Lly = pathBbox.Y + bbox.Urx = pathBbox.X + pathBbox.Width + bbox.Ury = pathBbox.Y + pathBbox.Height + + return creator.Bytes(), bbox, nil +} diff --git a/internal/pdf/contentstream/draw/utils.go b/internal/pdf/contentstream/draw/utils.go new file mode 100644 index 0000000..54601a8 --- /dev/null +++ b/internal/pdf/contentstream/draw/utils.go @@ -0,0 +1,28 @@ +package draw + +import ( + pdfcontent "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" +) + +// Make the path with the content creator. +// Adds the PDF commands to draw the path to the creator instance. +func DrawPathWithCreator(path Path, creator *pdfcontent.ContentCreator) { + for idx, p := range path.Points { + if idx == 0 { + creator.Add_m(p.X, p.Y) + } else { + creator.Add_l(p.X, p.Y) + } + } +} + +// Make the bezier path with the content creator. +// Adds the PDF commands to draw the path to the creator instance. +func DrawBezierPathWithCreator(bpath CubicBezierPath, creator *pdfcontent.ContentCreator) { + for idx, c := range bpath.Curves { + if idx == 0 { + creator.Add_m(c.P0.X, c.P0.Y) + } + creator.Add_c(c.P1.X, c.P1.Y, c.P2.X, c.P2.Y, c.P3.X, c.P3.Y) + } +} diff --git a/internal/pdf/contentstream/draw/vector.go b/internal/pdf/contentstream/draw/vector.go new file mode 100644 index 0000000..5d05561 --- /dev/null +++ b/internal/pdf/contentstream/draw/vector.go @@ -0,0 +1,80 @@ +package draw + +import "math" + +type Vector struct { + Dx float64 + Dy float64 +} + +func NewVector(dx, dy float64) Vector { + v := Vector{} + v.Dx = dx + v.Dy = dy + return v +} + +func NewVectorBetween(a Point, b Point) Vector { + v := Vector{} + v.Dx = b.X - a.X + v.Dy = b.Y - a.Y + return v +} + +func NewVectorPolar(length float64, theta float64) Vector { + v := Vector{} + + v.Dx = length * math.Cos(theta) + v.Dy = length * math.Sin(theta) + return v +} + +func (v Vector) Add(other Vector) Vector { + v.Dx += other.Dx + v.Dy += other.Dy + return v +} + +func (v Vector) Rotate(phi float64) Vector { + mag := v.Magnitude() + angle := v.GetPolarAngle() + + return NewVectorPolar(mag, angle+phi) +} + +// Change the sign of the vector: -vector. +func (this Vector) Flip() Vector { + mag := this.Magnitude() + theta := this.GetPolarAngle() + + this.Dx = mag * math.Cos(theta+math.Pi) + this.Dy = mag * math.Sin(theta+math.Pi) + return this +} + +func (v Vector) FlipY() Vector { + v.Dy = -v.Dy + return v +} + +func (v Vector) FlipX() Vector { + v.Dx = -v.Dx + return v +} + +func (this Vector) Scale(factor float64) Vector { + mag := this.Magnitude() + theta := this.GetPolarAngle() + + this.Dx = factor * mag * math.Cos(theta) + this.Dy = factor * mag * math.Sin(theta) + return this +} + +func (this Vector) Magnitude() float64 { + return math.Sqrt(math.Pow(this.Dx, 2.0) + math.Pow(this.Dy, 2.0)) +} + +func (this Vector) GetPolarAngle() float64 { + return math.Atan2(this.Dy, this.Dx) +} diff --git a/internal/pdf/contentstream/encoding.go b/internal/pdf/contentstream/encoding.go new file mode 100644 index 0000000..48395d7 --- /dev/null +++ b/internal/pdf/contentstream/encoding.go @@ -0,0 +1,390 @@ +package contentstream + +import ( + "bytes" + "errors" + "fmt" + gocolor "image/color" + "image/jpeg" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// Creates the encoder for the inline image's Filter and DecodeParms. +func newEncoderFromInlineImage(inlineImage *ContentStreamInlineImage) (core.StreamEncoder, error) { + if inlineImage.Filter == nil { + // No filter, return raw data back. + return core.NewRawEncoder(), nil + } + + // The filter should be a name or an array with a list of filter names. + filterName, ok := inlineImage.Filter.(*core.PdfObjectName) + if !ok { + array, ok := inlineImage.Filter.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("filter not a Name or Array object") + } + if len(*array) == 0 { + // Empty array -> indicates raw filter (no filter). + return core.NewRawEncoder(), nil + } + + if len(*array) != 1 { + menc, err := newMultiEncoderFromInlineImage(inlineImage) + if err != nil { + common.Log.Error("failed creating multi encoder: %v", err) + return nil, err + } + + common.Log.Trace("Multi enc: %s\n", menc) + return menc, nil + } + + // Single element. + filterObj := (*array)[0] + filterName, ok = filterObj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("filter array member not a Name object") + } + } + + // From Table 94 p. 224 (PDF32000_2008): + // Additional Abbreviations in an Inline Image Object: + + switch *filterName { + case "AHx", "ASCIIHexDecode": + return core.NewASCIIHexEncoder(), nil + case "A85", "ASCII85Decode": + return core.NewASCII85Encoder(), nil + case "DCT", "DCTDecode": + return newDCTEncoderFromInlineImage(inlineImage) + case "Fl", "FlateDecode": + return newFlateEncoderFromInlineImage(inlineImage, nil) + case "LZW", "LZWDecode": + return newLZWEncoderFromInlineImage(inlineImage, nil) + case "CCF", "CCITTFaxDecode": + return core.NewCCITTFaxEncoder(), nil + case "RL", "RunLengthDecode": + return core.NewRunLengthEncoder(), nil + default: + common.Log.Debug("unsupported inline image encoding filter name : %s", *filterName) + return nil, errors.New("unsupported inline encoding method") + } +} + +// Create a new flate decoder from an inline image object, getting all the encoding parameters +// from the DecodeParms stream object dictionary entry that can be provided optionally, usually +// only when a multi filter is used. +func newFlateEncoderFromInlineImage(inlineImage *ContentStreamInlineImage, decodeParams *core.PdfObjectDictionary) (*core.FlateEncoder, error) { + encoder := core.NewFlateEncoder() + + // If decodeParams not provided, see if we can get from the stream. + if decodeParams == nil { + obj := inlineImage.DecodeParms + if obj != nil { + dp, isDict := obj.(*core.PdfObjectDictionary) + if !isDict { + common.Log.Debug("error: DecodeParms not a dictionary (%T)", obj) + return nil, fmt.Errorf("invalid DecodeParms") + } + decodeParams = dp + } + } + if decodeParams == nil { + // Can safely return here if no decode params, as the following depend on the decode params. + return encoder, nil + } + + common.Log.Trace("decode params: %s", decodeParams.String()) + obj := decodeParams.Get("Predictor") + if obj == nil { + common.Log.Debug("error: Predictor missing from DecodeParms - Continue with default (1)") + } else { + predictor, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error: Predictor specified but not numeric (%T)", obj) + return nil, fmt.Errorf("invalid Predictor") + } + encoder.Predictor = int(*predictor) + } + + // Bits per component. Use default if not specified (8). + obj = decodeParams.Get("BitsPerComponent") + if obj != nil { + bpc, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error: Invalid BitsPerComponent") + return nil, fmt.Errorf("invalid BitsPerComponent") + } + encoder.BitsPerComponent = int(*bpc) + } + + if encoder.Predictor > 1 { + // Columns. + encoder.Columns = 1 + obj = decodeParams.Get("Columns") + if obj != nil { + columns, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor column invalid") + } + + encoder.Columns = int(*columns) + } + + // Colors. + // Number of interleaved color components per sample (Default 1 if not specified) + encoder.Colors = 1 + obj := decodeParams.Get("Colors") + if obj != nil { + colors, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor colors not an integer") + } + encoder.Colors = int(*colors) + } + } + + return encoder, nil +} + +// Create a new LZW encoder/decoder based on an inline image object, getting all the encoding parameters +// from the DecodeParms stream object dictionary entry. +func newLZWEncoderFromInlineImage(inlineImage *ContentStreamInlineImage, decodeParams *core.PdfObjectDictionary) (*core.LZWEncoder, error) { + // Start with default settings. + encoder := core.NewLZWEncoder() + + // If decodeParams not provided, see if we can get from the inline image directly. + if decodeParams == nil { + if inlineImage.DecodeParms != nil { + dp, isDict := inlineImage.DecodeParms.(*core.PdfObjectDictionary) + if !isDict { + common.Log.Debug("error: DecodeParms not a dictionary (%T)", inlineImage.DecodeParms) + return nil, fmt.Errorf("invalid DecodeParms") + } + decodeParams = dp + } + } + + if decodeParams == nil { + // No decode parameters. Can safely return here if not set as the following options + // are related to the decode Params. + return encoder, nil + } + + // The EarlyChange indicates when to increase code length, as different + // implementations use a different mechanisms. Essentially this chooses + // which LZW implementation to use. + // The default is 1 (one code early) + // + // The EarlyChange parameter is specified in the object stream dictionary for regular streams, + // but it is not specified explicitly where to check for it in the case of inline images. + // We will check in the decodeParms for now, we can adjust later if we come across cases of this. + obj := decodeParams.Get("EarlyChange") + if obj != nil { + earlyChange, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error: EarlyChange specified but not numeric (%T)", obj) + return nil, fmt.Errorf("invalid EarlyChange") + } + if *earlyChange != 0 && *earlyChange != 1 { + return nil, fmt.Errorf("invalid EarlyChange value (not 0 or 1)") + } + + encoder.EarlyChange = int(*earlyChange) + } else { + encoder.EarlyChange = 1 // default + } + + obj = decodeParams.Get("Predictor") + if obj != nil { + predictor, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error: Predictor specified but not numeric (%T)", obj) + return nil, fmt.Errorf("invalid Predictor") + } + encoder.Predictor = int(*predictor) + } + + // Bits per component. Use default if not specified (8). + obj = decodeParams.Get("BitsPerComponent") + if obj != nil { + bpc, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error: Invalid BitsPerComponent") + return nil, fmt.Errorf("invalid BitsPerComponent") + } + encoder.BitsPerComponent = int(*bpc) + } + + if encoder.Predictor > 1 { + // Columns. + encoder.Columns = 1 + obj = decodeParams.Get("Columns") + if obj != nil { + columns, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor column invalid") + } + + encoder.Columns = int(*columns) + } + + // Colors. + // Number of interleaved color components per sample (Default 1 if not specified) + encoder.Colors = 1 + obj = decodeParams.Get("Colors") + if obj != nil { + colors, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor colors not an integer") + } + encoder.Colors = int(*colors) + } + } + + common.Log.Trace("decode params: %s", decodeParams.String()) + return encoder, nil +} + +// Create a new DCT encoder/decoder based on an inline image, getting all the encoding parameters +// from the stream object dictionary entry and the image data itself. +func newDCTEncoderFromInlineImage(inlineImage *ContentStreamInlineImage) (*core.DCTEncoder, error) { + // Start with default settings. + encoder := core.NewDCTEncoder() + + bufReader := bytes.NewReader(inlineImage.stream) + + cfg, err := jpeg.DecodeConfig(bufReader) + //img, _, err := goimage.Decode(bufReader) + if err != nil { + common.Log.Debug("error decoding file: %s", err) + return nil, err + } + + switch cfg.ColorModel { + case gocolor.RGBAModel: + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 3 // alpha is not included in pdf. + case gocolor.RGBA64Model: + encoder.BitsPerComponent = 16 + encoder.ColorComponents = 3 + case gocolor.GrayModel: + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 1 + case gocolor.Gray16Model: + encoder.BitsPerComponent = 16 + encoder.ColorComponents = 1 + case gocolor.CMYKModel: + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 4 + case gocolor.YCbCrModel: + // YCbCr is not supported by PDF, but it could be a different colorspace + // with 3 components. Would be specified by the ColorSpace entry. + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 3 + default: + return nil, errors.New("unsupported color model") + } + encoder.Width = cfg.Width + encoder.Height = cfg.Height + common.Log.Trace("DCT Encoder: %+v", encoder) + + return encoder, nil +} + +// Create a new multi-filter encoder/decoder based on an inline image, getting all the encoding parameters +// from the filter specification and the DecodeParms (DP) dictionaries. +func newMultiEncoderFromInlineImage(inlineImage *ContentStreamInlineImage) (*core.MultiEncoder, error) { + mencoder := core.NewMultiEncoder() + + // Prepare the decode params array (one for each filter type) + // Optional, not always present. + var decodeParamsDict *core.PdfObjectDictionary + decodeParamsArray := []core.PdfObject{} + if obj := inlineImage.DecodeParms; obj != nil { + // If it is a dictionary, assume it applies to all + dict, isDict := obj.(*core.PdfObjectDictionary) + if isDict { + decodeParamsDict = dict + } + + // If it is an array, assume there is one for each + arr, isArray := obj.(*core.PdfObjectArray) + if isArray { + for _, dictObj := range *arr { + if dict, is := dictObj.(*core.PdfObjectDictionary); is { + decodeParamsArray = append(decodeParamsArray, dict) + } else { + decodeParamsArray = append(decodeParamsArray, nil) + } + } + } + } + + obj := inlineImage.Filter + if obj == nil { + return nil, fmt.Errorf("filter missing") + } + + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("multi filter can only be made from array") + } + + for idx, obj := range *array { + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("multi filter array element not a name") + } + + var dp core.PdfObject + + // If decode params dict is set, use it. Otherwise take from array.. + if decodeParamsDict != nil { + dp = decodeParamsDict + } else { + // Only get the dp if provided. Oftentimes there is no decode params dict + // provided. + if len(decodeParamsArray) > 0 { + if idx >= len(decodeParamsArray) { + return nil, fmt.Errorf("missing elements in decode params array") + } + dp = decodeParamsArray[idx] + } + } + + var dParams *core.PdfObjectDictionary + if dict, is := dp.(*core.PdfObjectDictionary); is { + dParams = dict + } + + switch *name { + case core.StreamEncodingFilterNameFlate, "Fl": + // XXX: need to separate out the DecodeParms.. + encoder, err := newFlateEncoderFromInlineImage(inlineImage, dParams) + if err != nil { + return nil, err + } + mencoder.AddEncoder(encoder) + case core.StreamEncodingFilterNameLZW: + encoder, err := newLZWEncoderFromInlineImage(inlineImage, dParams) + if err != nil { + return nil, err + } + mencoder.AddEncoder(encoder) + case core.StreamEncodingFilterNameASCIIHex: + encoder := core.NewASCIIHexEncoder() + mencoder.AddEncoder(encoder) + case core.StreamEncodingFilterNameASCII85, "A85": + encoder := core.NewASCII85Encoder() + mencoder.AddEncoder(encoder) + default: + common.Log.Error("Unsupported filter %s", *name) + return nil, fmt.Errorf("invalid filter in multi filter array") + } + } + + return mencoder, nil +} diff --git a/internal/pdf/contentstream/inline-image.go b/internal/pdf/contentstream/inline-image.go new file mode 100644 index 0000000..d208ee2 --- /dev/null +++ b/internal/pdf/contentstream/inline-image.go @@ -0,0 +1,456 @@ +package contentstream + +import ( + "bytes" + "errors" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// A representation of an inline image in a Content stream. Everything between the BI and EI operands. +// ContentStreamInlineImage implements the core.PdfObject interface although strictly it is not a PDF object. +type ContentStreamInlineImage struct { + BitsPerComponent core.PdfObject + ColorSpace core.PdfObject + Decode core.PdfObject + DecodeParms core.PdfObject + Filter core.PdfObject + Height core.PdfObject + ImageMask core.PdfObject + Intent core.PdfObject + Interpolate core.PdfObject + Width core.PdfObject + stream []byte +} + +// Make a new content stream inline image object from an image. +func NewInlineImageFromImage(img model.Image, encoder core.StreamEncoder) (*ContentStreamInlineImage, error) { + if encoder == nil { + encoder = core.NewRawEncoder() + } + + inlineImage := ContentStreamInlineImage{} + switch img.ColorComponents { + case 1: + inlineImage.ColorSpace = core.MakeName("G") // G short for DeviceGray + case 3: + inlineImage.ColorSpace = core.MakeName("RGB") // RGB short for DeviceRGB + case 4: + inlineImage.ColorSpace = core.MakeName("CMYK") // CMYK short for DeviceCMYK + default: + common.Log.Debug("invalid number of color components for inline image: %d", img.ColorComponents) + return nil, errors.New("invalid number of color components") + } + + inlineImage.BitsPerComponent = core.MakeInteger(img.BitsPerComponent) + inlineImage.Width = core.MakeInteger(img.Width) + inlineImage.Height = core.MakeInteger(img.Height) + + encoded, err := encoder.EncodeBytes(img.Data) + if err != nil { + return nil, err + } + + inlineImage.stream = encoded + + filterName := encoder.GetFilterName() + if filterName != core.StreamEncodingFilterNameRaw { + inlineImage.Filter = core.MakeName(filterName) + } + // XXX/FIXME: Add decode params? + + return &inlineImage, nil +} + +func (si *ContentStreamInlineImage) String() string { + s := fmt.Sprintf("InlineImage(len=%d)\n", len(si.stream)) + if si.BitsPerComponent != nil { + s += "- BPC " + si.BitsPerComponent.DefaultWriteString() + "\n" + } + if si.ColorSpace != nil { + s += "- CS " + si.ColorSpace.DefaultWriteString() + "\n" + } + if si.Decode != nil { + s += "- D " + si.Decode.DefaultWriteString() + "\n" + } + if si.DecodeParms != nil { + s += "- DP " + si.DecodeParms.DefaultWriteString() + "\n" + } + if si.Filter != nil { + s += "- F " + si.Filter.DefaultWriteString() + "\n" + } + if si.Height != nil { + s += "- H " + si.Height.DefaultWriteString() + "\n" + } + if si.ImageMask != nil { + s += "- IM " + si.ImageMask.DefaultWriteString() + "\n" + } + if si.Intent != nil { + s += "- Intent " + si.Intent.DefaultWriteString() + "\n" + } + if si.Interpolate != nil { + s += "- I " + si.Interpolate.DefaultWriteString() + "\n" + } + if si.Width != nil { + s += "- W " + si.Width.DefaultWriteString() + "\n" + } + return s +} + +func (si *ContentStreamInlineImage) DefaultWriteString() string { + var output bytes.Buffer + + // We do not start with "BI" as that is the operand and is written out separately. + // Write out the parameters + s := "" + + if si.BitsPerComponent != nil { + s += "/BPC " + si.BitsPerComponent.DefaultWriteString() + "\n" + } + if si.ColorSpace != nil { + s += "/CS " + si.ColorSpace.DefaultWriteString() + "\n" + } + if si.Decode != nil { + s += "/D " + si.Decode.DefaultWriteString() + "\n" + } + if si.DecodeParms != nil { + s += "/DP " + si.DecodeParms.DefaultWriteString() + "\n" + } + if si.Filter != nil { + s += "/F " + si.Filter.DefaultWriteString() + "\n" + } + if si.Height != nil { + s += "/H " + si.Height.DefaultWriteString() + "\n" + } + if si.ImageMask != nil { + s += "/IM " + si.ImageMask.DefaultWriteString() + "\n" + } + if si.Intent != nil { + s += "/Intent " + si.Intent.DefaultWriteString() + "\n" + } + if si.Interpolate != nil { + s += "/I " + si.Interpolate.DefaultWriteString() + "\n" + } + if si.Width != nil { + s += "/W " + si.Width.DefaultWriteString() + "\n" + } + output.WriteString(s) + + output.WriteString("ID ") + output.Write(si.stream) + output.WriteString("\nEI\n") + + return output.String() +} + +func (s *ContentStreamInlineImage) GetColorSpace(resources *model.PdfPageResources) (model.PdfColorspace, error) { + if s.ColorSpace == nil { + // Default. + common.Log.Debug("Inline image not having specified colorspace, assuming Gray") + return model.NewPdfColorspaceDeviceGray(), nil + } + + // If is an array, then could be an indexed colorspace. + if arr, isArr := s.ColorSpace.(*core.PdfObjectArray); isArr { + return newIndexedColorspaceFromPdfObject(arr) + } + + name, ok := s.ColorSpace.(*core.PdfObjectName) + if !ok { + common.Log.Debug("error: Invalid object type (%T;%+v)", s.ColorSpace, s.ColorSpace) + return nil, errors.New("type check error") + } + + switch *name { + case "G", "DeviceGray": + return model.NewPdfColorspaceDeviceGray(), nil + case "RGB", "DeviceRGB": + return model.NewPdfColorspaceDeviceRGB(), nil + case "CMYK", "DeviceCMYK": + return model.NewPdfColorspaceDeviceCMYK(), nil + case "I", "Indexed": + return nil, errors.New("unsupported Index colorspace") + default: + if resources.ColorSpace == nil { + // Can also refer to a name in the PDF page resources... + common.Log.Debug("error, unsupported inline image colorspace: %s", *name) + return nil, errors.New("unknown colorspace") + } + + cs, has := resources.ColorSpace.Colorspaces[string(*name)] + if !has { + // Can also refer to a name in the PDF page resources... + common.Log.Debug("error, unsupported inline image colorspace: %s", *name) + return nil, errors.New("unknown colorspace") + } + + return cs, nil + } +} + +func (s *ContentStreamInlineImage) GetEncoder() (core.StreamEncoder, error) { + return newEncoderFromInlineImage(s) +} + +// Is a mask ? +// The image mask entry in the image dictionary specifies that the image data shall be used as a stencil +// mask for painting in the current color. The mask data is 1bpc, grayscale. +func (s *ContentStreamInlineImage) IsMask() (bool, error) { + if s.ImageMask != nil { + imMask, ok := s.ImageMask.(*core.PdfObjectBool) + if !ok { + common.Log.Debug("Image mask not a boolean") + return false, errors.New("invalid object type") + } + + return bool(*imMask), nil + } else { + return false, nil + } + +} + +// Export the inline image to Image which can be transformed or exported easily. +// Page resources are needed to look up colorspace information. +func (si *ContentStreamInlineImage) ToImage(resources *model.PdfPageResources) (*model.Image, error) { + // Decode the imaging data if encoded. + encoder, err := newEncoderFromInlineImage(si) + if err != nil { + return nil, err + } + common.Log.Trace("encoder: %+v %T", encoder, encoder) + common.Log.Trace("inline image: %+v", si) + + decoded, err := encoder.DecodeBytes(si.stream) + if err != nil { + return nil, err + } + + image := &model.Image{} + + // Height. + if si.Height == nil { + return nil, errors.New("height attribute missing") + } + height, ok := si.Height.(*core.PdfObjectInteger) + if !ok { + return nil, errors.New("invalid height") + } + image.Height = int64(*height) + + // Width. + if si.Width == nil { + return nil, errors.New("width attribute missing") + } + width, ok := si.Width.(*core.PdfObjectInteger) + if !ok { + return nil, errors.New("invalid width") + } + image.Width = int64(*width) + + // Image mask? + isMask, err := si.IsMask() + if err != nil { + return nil, err + } + + if isMask { + // Masks are grayscale 1bpc. + image.BitsPerComponent = 1 + image.ColorComponents = 1 + } else { + // BPC. + if si.BitsPerComponent == nil { + common.Log.Debug("Inline Bits per component missing - assuming 8") + image.BitsPerComponent = 8 + } else { + bpc, ok := si.BitsPerComponent.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error invalid bits per component value, type %T", si.BitsPerComponent) + return nil, errors.New("BPC Type error") + } + image.BitsPerComponent = int64(*bpc) + } + + // Color components. + if si.ColorSpace != nil { + cs, err := si.GetColorSpace(resources) + if err != nil { + return nil, err + } + image.ColorComponents = cs.GetNumComponents() + } else { + // Default gray if not specified. + common.Log.Debug("Inline Image colorspace not specified - assuming 1 color component") + image.ColorComponents = 1 + } + } + + image.Data = decoded + + return image, nil +} + +// Parse an inline image from a content stream, both read its properties and binary data. +// When called, "BI" has already been read from the stream. This function +// finishes reading through "EI" and then returns the ContentStreamInlineImage. +func (s *ContentStreamParser) ParseInlineImage() (*ContentStreamInlineImage, error) { + // Reading parameters. + im := ContentStreamInlineImage{} + + for { + s.skipSpaces() + obj, err, isOperand := s.parseObject() + if err != nil { + return nil, err + } + + if !isOperand { + // Not an operand.. Read key value properties.. + param, ok := obj.(*core.PdfObjectName) + if !ok { + common.Log.Debug("invalid inline image property (expecting name) - %T", obj) + return nil, fmt.Errorf("invalid inline image property (expecting name) - %T", obj) + } + + valueObj, err, isOperand := s.parseObject() + if err != nil { + return nil, err + } + if isOperand { + return nil, fmt.Errorf("not expecting an operand") + } + + // From 8.9.7 "Inline Images" p. 223 (PDF32000_2008): + // The key-value pairs appearing between the BI and ID operators are analogous to those in the dictionary + // portion of an image XObject (though the syntax is different). + // Table 93 shows the entries that are valid for an inline image, all of which shall have the same meanings + // as in a stream dictionary (see Table 5) or an image dictionary (see Table 89). + // Entries other than those listed shall be ignored; in particular, the Type, Subtype, and Length + // entries normally found in a stream or image dictionary are unnecessary. + // For convenience, the abbreviations shown in the table may be used in place of the fully spelled-out keys. + // Table 94 shows additional abbreviations that can be used for the names of colour spaces and filters. + + switch *param { + case "BPC", "BitsPerComponent": + im.BitsPerComponent = valueObj + case "CS", "ColorSpace": + im.ColorSpace = valueObj + case "D", "Decode": + im.Decode = valueObj + case "DP", "DecodeParms": + im.DecodeParms = valueObj + case "F", "Filter": + im.Filter = valueObj + case "H", "Height": + im.Height = valueObj + case "IM", "ImageMask": + im.ImageMask = valueObj + case "Intent": + im.Intent = valueObj + case "I", "Interpolate": + im.Interpolate = valueObj + case "W", "Width": + im.Width = valueObj + default: + return nil, fmt.Errorf("unknown inline image parameter %s", *param) + } + } + + if isOperand { + operand, ok := obj.(*core.PdfObjectString) + if !ok { + return nil, fmt.Errorf("failed to read inline image - invalid operand") + } + + switch *operand { + case "EI": + // Image fully defined + common.Log.Trace("Inline image finished...") + return &im, nil + case "ID": + // Inline image data. + // Should get a single space (0x20) followed by the data and then EI. + common.Log.Trace("ID start") + + // Skip the space if its there. + b, err := s.reader.Peek(1) + if err != nil { + return nil, err + } + if core.IsWhiteSpace(b[0]) { + s.reader.Discard(1) + } + + // Unfortunately there is no good way to know how many bytes to read since it + // depends on the Filter and encoding etc. + // Therefore we will simply read until we find "EI" where is whitespace + // although of course that could be a part of the data (even if unlikely). + im.stream = []byte{} + state := 0 + var skipBytes []byte + for { + c, err := s.reader.ReadByte() + if err != nil { + common.Log.Debug("Unable to find end of image EI in inline image data") + return nil, err + } + switch state { + case 0: + if core.IsWhiteSpace(c) { + skipBytes = []byte{} + skipBytes = append(skipBytes, c) + state = 1 + } else { + im.stream = append(im.stream, c) + } + case 1: + skipBytes = append(skipBytes, c) + if c == 'E' { + state = 2 + } else { + im.stream = append(im.stream, skipBytes...) + skipBytes = []byte{} // Clear. + // Need an extra check to decide if we fall back to state 0 or 1. + if core.IsWhiteSpace(c) { + state = 1 + } else { + state = 0 + } + } + case 2: + skipBytes = append(skipBytes, c) + if c == 'I' { + state = 3 + } else { + im.stream = append(im.stream, skipBytes...) + skipBytes = []byte{} // Clear. + state = 0 + } + case 3: + skipBytes = append(skipBytes, c) + if core.IsWhiteSpace(c) { + // image data finished. + if len(im.stream) > 100 { + common.Log.Trace("Image stream (%d): % x ...", len(im.stream), im.stream[:100]) + } else { + common.Log.Trace("Image stream (%d): % x", len(im.stream), im.stream) + } + // Exit point. + return &im, nil + } else { + // Seems like "EI" was part of the data. + im.stream = append(im.stream, skipBytes...) + skipBytes = []byte{} // Clear. + state = 0 + } + } + } + // Never reached (exit point is at end of EI). + } + } + } +} diff --git a/internal/pdf/contentstream/parser.go b/internal/pdf/contentstream/parser.go new file mode 100644 index 0000000..f95bc57 --- /dev/null +++ b/internal/pdf/contentstream/parser.go @@ -0,0 +1,586 @@ +package contentstream + +import ( + "bufio" + "bytes" + "encoding/hex" + "errors" + "fmt" + "io" + "strconv" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// Content stream parser. +type ContentStreamParser struct { + reader *bufio.Reader +} + +// Create a new instance of the content stream parser from an input content +// stream string. +func NewContentStreamParser(contentStr string) *ContentStreamParser { + // Each command has parameters and an operand (command). + parser := ContentStreamParser{} + + buffer := bytes.NewBufferString(contentStr + "\n") // Add newline at end to get last operand without EOF error. + parser.reader = bufio.NewReader(buffer) + + return &parser +} + +// Parses all commands in content stream, returning a list of operation data. +func (sp *ContentStreamParser) Parse() (*ContentStreamOperations, error) { + operations := ContentStreamOperations{} + + for { + operation := ContentStreamOperation{} + + for { + obj, err, isOperand := sp.parseObject() + if err != nil { + if err == io.EOF { + // End of data. Successful exit point. + return &operations, nil + } + return &operations, err + } + if isOperand { + operation.Operand = string(*obj.(*core.PdfObjectString)) + operations = append(operations, &operation) + break + } else { + operation.Params = append(operation.Params, obj) + } + } + + if operation.Operand == "BI" { + // Parse an inline image, reads everything between the "BI" and "EI". + // The image is stored as the parameter. + im, err := sp.ParseInlineImage() + if err != nil { + return &operations, err + } + operation.Params = append(operation.Params, im) + } + } +} + +// Skip over any spaces. Returns the number of spaces skipped and +// an error if any. +func (sp *ContentStreamParser) skipSpaces() (int, error) { + cnt := 0 + for { + bb, err := sp.reader.Peek(1) + if err != nil { + return 0, err + } + if core.IsWhiteSpace(bb[0]) { + sp.reader.ReadByte() + cnt++ + } else { + break + } + } + + return cnt, nil +} + +// Skip over comments and spaces. Can handle multi-line comments. +func (sp *ContentStreamParser) skipComments() error { + if _, err := sp.skipSpaces(); err != nil { + return err + } + + isFirst := true + for { + bb, err := sp.reader.Peek(1) + if err != nil { + common.Log.Debug("error %s", err.Error()) + return err + } + if isFirst && bb[0] != '%' { + // Not a comment clearly. + return nil + } else { + isFirst = false + } + if (bb[0] != '\r') && (bb[0] != '\n') { + sp.reader.ReadByte() + } else { + break + } + } + + // Call recursively to handle multiline comments. + return sp.skipComments() +} + +// Parse a name starting with '/'. +func (sp *ContentStreamParser) parseName() (core.PdfObjectName, error) { + name := "" + nameStarted := false + for { + bb, err := sp.reader.Peek(1) + if err == io.EOF { + break // Can happen when loading from object stream. + } + if err != nil { + return core.PdfObjectName(name), err + } + + if !nameStarted { + // Should always start with '/', otherwise not valid. + if bb[0] == '/' { + nameStarted = true + sp.reader.ReadByte() + } else { + common.Log.Error("Name starting with %s (% x)", bb, bb) + return core.PdfObjectName(name), fmt.Errorf("invalid name: (%c)", bb[0]) + } + } else { + if core.IsWhiteSpace(bb[0]) { + break + } else if (bb[0] == '/') || (bb[0] == '[') || (bb[0] == '(') || (bb[0] == ']') || (bb[0] == '<') || (bb[0] == '>') { + break // Looks like start of next statement. + } else if bb[0] == '#' { + hexcode, err := sp.reader.Peek(3) + if err != nil { + return core.PdfObjectName(name), err + } + sp.reader.Discard(3) + + code, err := hex.DecodeString(string(hexcode[1:3])) + if err != nil { + return core.PdfObjectName(name), err + } + name += string(code) + } else { + b, _ := sp.reader.ReadByte() + name += string(b) + } + } + } + return core.PdfObjectName(name), nil +} + +// Numeric objects. +// Section 7.3.3. +// Integer or Float. +// +// An integer shall be written as one or more decimal digits optionally +// preceded by a sign. The value shall be interpreted as a signed +// decimal integer and shall be converted to an integer object. +// +// A real value shall be written as one or more decimal digits with an +// optional sign and a leading, trailing, or embedded PERIOD (2Eh) +// (decimal point). The value shall be interpreted as a real number +// and shall be converted to a real object. +// +// Regarding exponential numbers: 7.3.3 Numeric Objects: +// A conforming writer shall not use the PostScript syntax for numbers +// with non-decimal radices (such as 16#FFFE) or in exponential format +// (such as 6.02E23). +// Nonetheless, we sometimes get numbers with exponential format, so +// we will support it in the reader (no confusion with other types, so +// no compromise). +func (sp *ContentStreamParser) parseNumber() (core.PdfObject, error) { + isFloat := false + allowSigns := true + numStr := "" + for { + common.Log.Trace("Parsing number \"%s\"", numStr) + bb, err := sp.reader.Peek(1) + if err == io.EOF { + // GH: EOF handling. Handle EOF like end of line. Can happen with + // encoded object streams that the object is at the end. + // In other cases, we will get the EOF error elsewhere at any rate. + break // Handle like EOF + } + if err != nil { + common.Log.Error("error %s", err) + return nil, err + } + if allowSigns && (bb[0] == '-' || bb[0] == '+') { + // Only appear in the beginning, otherwise serves as a delimiter. + b, _ := sp.reader.ReadByte() + numStr += string(b) + allowSigns = false // Only allowed in beginning, and after e (exponential). + } else if core.IsDecimalDigit(bb[0]) { + b, _ := sp.reader.ReadByte() + numStr += string(b) + } else if bb[0] == '.' { + b, _ := sp.reader.ReadByte() + numStr += string(b) + isFloat = true + } else if bb[0] == 'e' { + // Exponential number format. + b, _ := sp.reader.ReadByte() + numStr += string(b) + isFloat = true + allowSigns = true + } else { + break + } + } + + if isFloat { + fVal, err := strconv.ParseFloat(numStr, 64) + if err != nil { + common.Log.Debug("error parsing number %q err=%v. Using 0.0. Output may be incorrect", numStr, err) + fVal = 0.0 + err = nil + } + o := core.PdfObjectFloat(fVal) + return &o, err + } else { + intVal, err := strconv.ParseInt(numStr, 10, 64) + if err != nil { + common.Log.Debug("error parsing integer %q err=%v. Using 0. Output may be incorrect", numStr, err) + intVal = 0 + err = nil + } + o := core.PdfObjectInteger(intVal) + return &o, err + } +} + +// A string starts with '(' and ends with ')'. +func (sp *ContentStreamParser) parseString() (core.PdfObjectString, error) { + sp.reader.ReadByte() + + bytes := []byte{} + count := 1 + for { + bb, err := sp.reader.Peek(1) + if err != nil { + return core.PdfObjectString(bytes), err + } + + if bb[0] == '\\' { // Escape sequence. + sp.reader.ReadByte() // Skip the escape \ byte. + b, err := sp.reader.ReadByte() + if err != nil { + return core.PdfObjectString(bytes), err + } + + // Octal '\ddd' number (base 8). + if core.IsOctalDigit(b) { + bb, err := sp.reader.Peek(2) + if err != nil { + return core.PdfObjectString(bytes), err + } + + numeric := []byte{} + numeric = append(numeric, b) + for _, val := range bb { + if core.IsOctalDigit(val) { + numeric = append(numeric, val) + } else { + break + } + } + sp.reader.Discard(len(numeric) - 1) + + common.Log.Trace("Numeric string \"%s\"", numeric) + code, err := strconv.ParseUint(string(numeric), 8, 32) + if err != nil { + return core.PdfObjectString(bytes), err + } + bytes = append(bytes, byte(code)) + continue + } + + switch b { + case 'n': + bytes = append(bytes, '\n') + case 'r': + bytes = append(bytes, '\r') + case 't': + bytes = append(bytes, '\t') + case 'b': + bytes = append(bytes, '\b') + case 'f': + bytes = append(bytes, '\f') + case '(': + bytes = append(bytes, '(') + case ')': + bytes = append(bytes, ')') + case '\\': + bytes = append(bytes, '\\') + } + + continue + } else if bb[0] == '(' { + count++ + } else if bb[0] == ')' { + count-- + if count == 0 { + sp.reader.ReadByte() + break + } + } + + b, _ := sp.reader.ReadByte() + bytes = append(bytes, b) + } + + return core.PdfObjectString(bytes), nil +} + +// Starts with '<' ends with '>'. +func (sp *ContentStreamParser) parseHexString() (core.PdfObjectString, error) { + sp.reader.ReadByte() + + hextable := []byte("0123456789abcdefABCDEF") + + tmp := []byte{} + for { + sp.skipSpaces() + + bb, err := sp.reader.Peek(1) + if err != nil { + return core.PdfObjectString(""), err + } + + if bb[0] == '>' { + sp.reader.ReadByte() + break + } + + b, _ := sp.reader.ReadByte() + if bytes.IndexByte(hextable, b) >= 0 { + tmp = append(tmp, b) + } + } + + if len(tmp)%2 == 1 { + tmp = append(tmp, '0') + } + + buf, _ := hex.DecodeString(string(tmp)) + return core.PdfObjectString(buf), nil +} + +// Starts with '[' ends with ']'. Can contain any kinds of direct objects. +func (sp *ContentStreamParser) parseArray() (core.PdfObjectArray, error) { + arr := make(core.PdfObjectArray, 0) + + sp.reader.ReadByte() + + for { + sp.skipSpaces() + + bb, err := sp.reader.Peek(1) + if err != nil { + return arr, err + } + + if bb[0] == ']' { + sp.reader.ReadByte() + break + } + + obj, err, _ := sp.parseObject() + if err != nil { + return arr, err + } + arr = append(arr, obj) + } + + return arr, nil +} + +// Parse bool object. +func (sp *ContentStreamParser) parseBool() (core.PdfObjectBool, error) { + bb, err := sp.reader.Peek(4) + if err != nil { + return core.PdfObjectBool(false), err + } + if (len(bb) >= 4) && (string(bb[:4]) == "true") { + sp.reader.Discard(4) + return core.PdfObjectBool(true), nil + } + + bb, err = sp.reader.Peek(5) + if err != nil { + return core.PdfObjectBool(false), err + } + if (len(bb) >= 5) && (string(bb[:5]) == "false") { + sp.reader.Discard(5) + return core.PdfObjectBool(false), nil + } + + return core.PdfObjectBool(false), errors.New("unexpected boolean string") +} + +// Parse null object. +func (sp *ContentStreamParser) parseNull() (core.PdfObjectNull, error) { + _, err := sp.reader.Discard(4) + return core.PdfObjectNull{}, err +} + +func (sp *ContentStreamParser) parseDict() (*core.PdfObjectDictionary, error) { + common.Log.Trace("Reading content stream dict!") + + dict := core.MakeDict() + + // Pass the '<<' + c, _ := sp.reader.ReadByte() + if c != '<' { + return nil, errors.New("invalid dict") + } + c, _ = sp.reader.ReadByte() + if c != '<' { + return nil, errors.New("invalid dict") + } + + for { + sp.skipSpaces() + + bb, err := sp.reader.Peek(2) + if err != nil { + return nil, err + } + + common.Log.Trace("Dict peek: %s (% x)!", string(bb), string(bb)) + if (bb[0] == '>') && (bb[1] == '>') { + common.Log.Trace("EOF dictionary") + sp.reader.ReadByte() + sp.reader.ReadByte() + break + } + common.Log.Trace("Parse the name!") + + keyName, err := sp.parseName() + common.Log.Trace("Key: %s", keyName) + if err != nil { + common.Log.Debug("error Returning name err %s", err) + return nil, err + } + + if len(keyName) > 4 && keyName[len(keyName)-4:] == "null" { + // Some writers have a bug where the null is appended without + // space. For example "\Boundsnull" + newKey := keyName[0 : len(keyName)-4] + common.Log.Trace("Taking care of null bug (%s)", keyName) + common.Log.Trace("New key \"%s\" = null", newKey) + sp.skipSpaces() + bb, _ := sp.reader.Peek(1) + if bb[0] == '/' { + dict.Set(newKey, core.MakeNull()) + continue + } + } + + sp.skipSpaces() + + val, err, _ := sp.parseObject() + if err != nil { + return nil, err + } + dict.Set(keyName, val) + + common.Log.Trace("dict[%s] = %s", keyName, val.String()) + } + + return dict, nil +} + +// An operand is a text command represented by a word. +func (sp *ContentStreamParser) parseOperand() (core.PdfObjectString, error) { + bytes := []byte{} + for { + bb, err := sp.reader.Peek(1) + if err != nil { + return core.PdfObjectString(bytes), err + } + if core.IsDelimiter(bb[0]) { + break + } + if core.IsWhiteSpace(bb[0]) { + break + } + + b, _ := sp.reader.ReadByte() + bytes = append(bytes, b) + } + + return core.PdfObjectString(bytes), nil +} + +// Parse a generic object. Returns the object, an error code, and a bool +// value indicating whether the object is an operand. An operand +// is contained in a pdf string object. +func (sp *ContentStreamParser) parseObject() (core.PdfObject, error, bool) { + // Determine the kind of object. + // parse it! + // make a list of operands, then once operand arrives put into a package. + + sp.skipSpaces() + for { + bb, err := sp.reader.Peek(2) + if err != nil { + return nil, err, false + } + + common.Log.Trace("Peek string: %s", string(bb)) + // Determine type. + if bb[0] == '%' { + sp.skipComments() + continue + } else if bb[0] == '/' { + name, err := sp.parseName() + common.Log.Trace("->Name: '%s'", name) + return &name, err, false + } else if bb[0] == '(' { + common.Log.Trace("->String!") + str, err := sp.parseString() + common.Log.Trace("(%s)\n", str.String()) + return &str, err, false + } else if bb[0] == '<' && bb[1] != '<' { + common.Log.Trace("->Hex String!") + str, err := sp.parseHexString() + return &str, err, false + } else if bb[0] == '[' { + common.Log.Trace("->Array!") + arr, err := sp.parseArray() + return &arr, err, false + } else if core.IsFloatDigit(bb[0]) || (bb[0] == '-' && core.IsFloatDigit(bb[1])) { + common.Log.Trace("->Number!") + number, err := sp.parseNumber() + return number, err, false + } else if bb[0] == '<' && bb[1] == '<' { + dict, err := sp.parseDict() + return dict, err, false + } else { + // Otherwise, can be: keyword such as "null", "false", "true" or an operand... + common.Log.Trace("->Operand or bool?") + // Let's peek farther to find out. + bb, _ = sp.reader.Peek(5) + peekStr := string(bb) + common.Log.Trace("cont Peek str: %s", peekStr) + + if (len(peekStr) > 3) && (peekStr[:4] == "null") { + null, err := sp.parseNull() + return &null, err, false + } else if (len(peekStr) > 4) && (peekStr[:5] == "false") { + b, err := sp.parseBool() + return &b, err, false + } else if (len(peekStr) > 3) && (peekStr[:4] == "true") { + b, err := sp.parseBool() + return &b, err, false + } + + operand, err := sp.parseOperand() + if err != nil { + return &operand, err, false + } + if len(operand.String()) < 1 { + return &operand, ErrInvalidOperand, false + } + return &operand, nil, true + } + } +} diff --git a/internal/pdf/contentstream/processor.go b/internal/pdf/contentstream/processor.go new file mode 100644 index 0000000..7325578 --- /dev/null +++ b/internal/pdf/contentstream/processor.go @@ -0,0 +1,541 @@ +package contentstream + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Basic graphics state implementation. +// Initially only implementing and tracking a portion of the information specified. Easy to add more. +type GraphicsState struct { + ColorspaceStroking model.PdfColorspace + ColorspaceNonStroking model.PdfColorspace + ColorStroking model.PdfColor + ColorNonStroking model.PdfColor +} + +type GraphicStateStack []GraphicsState + +func (gsStack *GraphicStateStack) Push(gs GraphicsState) { + *gsStack = append(*gsStack, gs) +} + +func (gsStack *GraphicStateStack) Pop() GraphicsState { + gs := (*gsStack)[len(*gsStack)-1] + *gsStack = (*gsStack)[:len(*gsStack)-1] + return gs +} + +// ContentStreamProcessor defines a data structure and methods for processing a content stream, keeping track of the +// current graphics state, and allowing external handlers to define their own functions as a part of the processing, +// for example rendering or extracting certain information. +type ContentStreamProcessor struct { + graphicsStack GraphicStateStack + operations []*ContentStreamOperation + graphicsState GraphicsState + + handlers []HandlerEntry + currentIndex int +} + +type HandlerFunc func(op *ContentStreamOperation, gs GraphicsState, resources *model.PdfPageResources) error + +type HandlerEntry struct { + Condition HandlerConditionEnum + Operand string + Handler HandlerFunc +} + +type HandlerConditionEnum int + +func (ce HandlerConditionEnum) All() bool { + return ce == HandlerConditionEnumAllOperands +} + +func (ce HandlerConditionEnum) Operand() bool { + return ce == HandlerConditionEnumOperand +} + +const ( + HandlerConditionEnumOperand HandlerConditionEnum = iota + HandlerConditionEnumAllOperands HandlerConditionEnum = iota +) + +func NewContentStreamProcessor(ops []*ContentStreamOperation) *ContentStreamProcessor { + csp := ContentStreamProcessor{} + csp.graphicsStack = GraphicStateStack{} + + // Set defaults.. + gs := GraphicsState{} + + csp.graphicsState = gs + + csp.handlers = []HandlerEntry{} + csp.currentIndex = 0 + csp.operations = ops + + return &csp +} + +func (csp *ContentStreamProcessor) AddHandler(condition HandlerConditionEnum, operand string, handler HandlerFunc) { + entry := HandlerEntry{} + entry.Condition = condition + entry.Operand = operand + entry.Handler = handler + csp.handlers = append(csp.handlers, entry) +} + +func (csp *ContentStreamProcessor) getColorspace(name string, resources *model.PdfPageResources) (model.PdfColorspace, error) { + switch name { + case "DeviceGray": + return model.NewPdfColorspaceDeviceGray(), nil + case "DeviceRGB": + return model.NewPdfColorspaceDeviceRGB(), nil + case "DeviceCMYK": + return model.NewPdfColorspaceDeviceCMYK(), nil + case "Pattern": + return model.NewPdfColorspaceSpecialPattern(), nil + } + + // Next check the colorspace dictionary. + cs, has := resources.ColorSpace.Colorspaces[name] + if has { + return cs, nil + } + + // Lastly check other potential colormaps. + switch name { + case "CalGray": + return model.NewPdfColorspaceCalGray(), nil + case "CalRGB": + return model.NewPdfColorspaceCalRGB(), nil + case "Lab": + return model.NewPdfColorspaceLab(), nil + } + + // Otherwise unsupported. + common.Log.Debug("Unknown colorspace requested: %s", name) + return nil, errors.New("unsupported colorspace") +} + +// Get initial color for a given colorspace. +func (csp *ContentStreamProcessor) getInitialColor(cs model.PdfColorspace) (model.PdfColor, error) { + switch cs := cs.(type) { + case *model.PdfColorspaceDeviceGray: + return model.NewPdfColorDeviceGray(0.0), nil + case *model.PdfColorspaceDeviceRGB: + return model.NewPdfColorDeviceRGB(0.0, 0.0, 0.0), nil + case *model.PdfColorspaceDeviceCMYK: + return model.NewPdfColorDeviceCMYK(0.0, 0.0, 0.0, 1.0), nil + case *model.PdfColorspaceCalGray: + return model.NewPdfColorCalGray(0.0), nil + case *model.PdfColorspaceCalRGB: + return model.NewPdfColorCalRGB(0.0, 0.0, 0.0), nil + case *model.PdfColorspaceLab: + l := 0.0 + a := 0.0 + b := 0.0 + if cs.Range[0] > 0 { + l = cs.Range[0] + } + if cs.Range[2] > 0 { + a = cs.Range[2] + } + return model.NewPdfColorLab(l, a, b), nil + case *model.PdfColorspaceICCBased: + if cs.Alternate == nil { + // Alternate not defined. + // Try to fall back to DeviceGray, DeviceRGB or DeviceCMYK. + common.Log.Trace("ICC Based not defined - attempting fall back (N = %d)", cs.N) + switch cs.N { + case 1: + common.Log.Trace("Falling back to DeviceGray") + return csp.getInitialColor(model.NewPdfColorspaceDeviceGray()) + case 3: + common.Log.Trace("Falling back to DeviceRGB") + return csp.getInitialColor(model.NewPdfColorspaceDeviceRGB()) + case 4: + common.Log.Trace("Falling back to DeviceCMYK") + return csp.getInitialColor(model.NewPdfColorspaceDeviceCMYK()) + default: + return nil, errors.New("alternate space not defined for ICC") + } + } + return csp.getInitialColor(cs.Alternate) + case *model.PdfColorspaceSpecialIndexed: + if cs.Base == nil { + return nil, errors.New("indexed base not specified") + } + return csp.getInitialColor(cs.Base) + case *model.PdfColorspaceSpecialSeparation: + if cs.AlternateSpace == nil { + return nil, errors.New("alternate space not specified") + } + return csp.getInitialColor(cs.AlternateSpace) + case *model.PdfColorspaceDeviceN: + if cs.AlternateSpace == nil { + return nil, errors.New("alternate space not specified") + } + return csp.getInitialColor(cs.AlternateSpace) + case *model.PdfColorspaceSpecialPattern: + // FIXME/check: A pattern does not have an initial color... + return nil, nil + } + + common.Log.Debug("Unable to determine initial color for unknown colorspace: %T", cs) + return nil, errors.New("unsupported colorspace") +} + +// Process the entire operations. +func (ce *ContentStreamProcessor) Process(resources *model.PdfPageResources) error { + // Initialize graphics state + ce.graphicsState.ColorspaceStroking = model.NewPdfColorspaceDeviceGray() + ce.graphicsState.ColorspaceNonStroking = model.NewPdfColorspaceDeviceGray() + ce.graphicsState.ColorStroking = model.NewPdfColorDeviceGray(0) + ce.graphicsState.ColorNonStroking = model.NewPdfColorDeviceGray(0) + + for _, op := range ce.operations { + var err error + + // Internal handling. + switch op.Operand { + case "q": + ce.graphicsStack.Push(ce.graphicsState) + case "Q": + ce.graphicsState = ce.graphicsStack.Pop() + + // Color operations (Table 74 p. 179) + case "CS": + err = ce.handleCommand_CS(op, resources) + case "cs": + err = ce.handleCommand_cs(op, resources) + case "SC": + err = ce.handleCommand_SC(op) + case "SCN": + err = ce.handleCommand_SCN(op) + case "sc": + err = ce.handleCommand_sc(op) + case "scn": + err = ce.handleCommand_scn(op) + case "G": + err = ce.handleCommand_G(op) + case "g": + err = ce.handleCommand_g(op) + case "RG": + err = ce.handleCommand_RG(op) + case "rg": + err = ce.handleCommand_rg(op) + case "K": + err = ce.handleCommand_K(op) + case "k": + err = ce.handleCommand_k(op) + } + if err != nil { + common.Log.Debug("Processor handling error (%s): %v", op.Operand, err) + common.Log.Debug("Operand: %#v", op.Operand) + return err + } + + // Check if have external handler also, and process if so. + for _, entry := range ce.handlers { + var err error + if entry.Condition.All() { + err = entry.Handler(op, ce.graphicsState, resources) + } else if entry.Condition.Operand() && op.Operand == entry.Operand { + err = entry.Handler(op, ce.graphicsState, resources) + } + if err != nil { + common.Log.Debug("Processor handler error: %v", err) + return err + } + } + } + + return nil +} + +// CS: Set the current color space for stroking operations. +func (csp *ContentStreamProcessor) handleCommand_CS(op *ContentStreamOperation, resources *model.PdfPageResources) error { + if len(op.Params) < 1 { + common.Log.Debug("invalid cs command, skipping over") + return errors.New("too few parameters") + } + if len(op.Params) > 1 { + common.Log.Debug("cs command with too many parameters - continuing") + return errors.New("too many parameters") + } + name, ok := op.Params[0].(*core.PdfObjectName) + if !ok { + common.Log.Debug("error: cs command with invalid parameter, skipping over") + return errors.New("type check error") + } + // Set the current color space to use for stroking operations. + // Either device based or referring to resource dict. + cs, err := csp.getColorspace(string(*name), resources) + if err != nil { + return err + } + csp.graphicsState.ColorspaceStroking = cs + + // Set initial color. + color, err := csp.getInitialColor(cs) + if err != nil { + return err + } + csp.graphicsState.ColorStroking = color + + return nil +} + +// cs: Set the current color space for non-stroking operations. +func (csp *ContentStreamProcessor) handleCommand_cs(op *ContentStreamOperation, resources *model.PdfPageResources) error { + if len(op.Params) < 1 { + common.Log.Debug("invalid CS command, skipping over") + return errors.New("too few parameters") + } + if len(op.Params) > 1 { + common.Log.Debug("CS command with too many parameters - continuing") + return errors.New("too many parameters") + } + name, ok := op.Params[0].(*core.PdfObjectName) + if !ok { + common.Log.Debug("error: CS command with invalid parameter, skipping over") + return errors.New("type check error") + } + // Set the current color space to use for non-stroking operations. + // Either device based or referring to resource dict. + cs, err := csp.getColorspace(string(*name), resources) + if err != nil { + return err + } + csp.graphicsState.ColorspaceNonStroking = cs + + // Set initial color. + color, err := csp.getInitialColor(cs) + if err != nil { + return err + } + csp.graphicsState.ColorNonStroking = color + + return nil +} + +// SC: Set the color to use for stroking operations in a device, CIE-based or Indexed colorspace. (not ICC based) +func (sp *ContentStreamProcessor) handleCommand_SC(op *ContentStreamOperation) error { + // For DeviceGray, CalGray, Indexed: one operand is required + // For DeviceRGB, CalRGB, Lab: 3 operands required + + cs := sp.graphicsState.ColorspaceStroking + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorStroking = color + return nil +} + +func isPatternCS(cs model.PdfColorspace) bool { + _, isPattern := cs.(*model.PdfColorspaceSpecialPattern) + return isPattern +} + +// SCN: Same as SC but also supports Pattern, Separation, DeviceN and ICCBased color spaces. +func (sp *ContentStreamProcessor) handleCommand_SCN(op *ContentStreamOperation) error { + cs := sp.graphicsState.ColorspaceStroking + + if !isPatternCS(cs) { + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorStroking = color + + return nil +} + +// sc: Same as SC except used for non-stroking operations. +func (sp *ContentStreamProcessor) handleCommand_sc(op *ContentStreamOperation) error { + cs := sp.graphicsState.ColorspaceNonStroking + + if !isPatternCS(cs) { + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorNonStroking = color + + return nil +} + +// scn: Same as SCN except used for non-stroking operations. +func (sp *ContentStreamProcessor) handleCommand_scn(op *ContentStreamOperation) error { + cs := sp.graphicsState.ColorspaceNonStroking + + if !isPatternCS(cs) { + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + common.Log.Debug("error: Fail to get color from params: %+v (CS is %+v)", op.Params, cs) + return err + } + + sp.graphicsState.ColorNonStroking = color + + return nil +} + +// G: Set the stroking colorspace to DeviceGray, and the color to the specified graylevel (range [0-1]). +// gray G +func (sp *ContentStreamProcessor) handleCommand_G(op *ContentStreamOperation) error { + cs := model.NewPdfColorspaceDeviceGray() + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorspaceStroking = cs + sp.graphicsState.ColorStroking = color + + return nil +} + +// g: Same as G, but for non-stroking colorspace and color (range [0-1]). +// gray g +func (sp *ContentStreamProcessor) handleCommand_g(op *ContentStreamOperation) error { + cs := model.NewPdfColorspaceDeviceGray() + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorspaceNonStroking = cs + sp.graphicsState.ColorNonStroking = color + + return nil +} + +// RG: Sets the stroking colorspace to DeviceRGB and the stroking color to r,g,b. [0-1] ranges. +// r g b RG +func (sp *ContentStreamProcessor) handleCommand_RG(op *ContentStreamOperation) error { + cs := model.NewPdfColorspaceDeviceRGB() + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorspaceStroking = cs + sp.graphicsState.ColorStroking = color + + return nil +} + +// rg: Same as RG but for non-stroking colorspace, color. +func (sp *ContentStreamProcessor) handleCommand_rg(op *ContentStreamOperation) error { + cs := model.NewPdfColorspaceDeviceRGB() + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorspaceNonStroking = cs + sp.graphicsState.ColorNonStroking = color + + return nil +} + +// K: Sets the stroking colorspace to DeviceCMYK and the stroking color to c,m,y,k. [0-1] ranges. +// c m y k K +func (sp *ContentStreamProcessor) handleCommand_K(op *ContentStreamOperation) error { + cs := model.NewPdfColorspaceDeviceCMYK() + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorspaceStroking = cs + sp.graphicsState.ColorStroking = color + + return nil +} + +// k: Same as K but for non-stroking colorspace, color. +func (sp *ContentStreamProcessor) handleCommand_k(op *ContentStreamOperation) error { + cs := model.NewPdfColorspaceDeviceCMYK() + if len(op.Params) != cs.GetNumComponents() { + common.Log.Debug("invalid number of parameters for SC") + common.Log.Debug("Number %d not matching colorspace %T", len(op.Params), cs) + return errors.New("invalid number of parameters") + } + + color, err := cs.ColorFromPdfObjects(op.Params) + if err != nil { + return err + } + + sp.graphicsState.ColorspaceNonStroking = cs + sp.graphicsState.ColorNonStroking = color + + return nil +} diff --git a/internal/pdf/contentstream/utils.go b/internal/pdf/contentstream/utils.go new file mode 100644 index 0000000..04c936d --- /dev/null +++ b/internal/pdf/contentstream/utils.go @@ -0,0 +1,90 @@ +package contentstream + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +func makeParamsFromFloats(vals []float64) []core.PdfObject { + params := []core.PdfObject{} + for _, val := range vals { + params = append(params, core.MakeFloat(val)) + } + return params +} + +func makeParamsFromNames(vals []core.PdfObjectName) []core.PdfObject { + params := []core.PdfObject{} + for _, val := range vals { + params = append(params, core.MakeName(string(val))) + } + return params +} + +func makeParamsFromStrings(vals []core.PdfObjectString) []core.PdfObject { + params := []core.PdfObject{} + for _, val := range vals { + params = append(params, core.MakeString(string(val))) + } + return params +} + +func makeParamsFromInts(vals []int64) []core.PdfObject { + params := []core.PdfObject{} + for _, val := range vals { + params = append(params, core.MakeInteger(val)) + } + return params +} + +func newIndexedColorspaceFromPdfObject(obj core.PdfObject) (model.PdfColorspace, error) { + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("error: Invalid indexed cs not in array (%#v)", obj) + return nil, errors.New("type check error") + } + + if len(*arr) != 4 { + common.Log.Debug("error: Invalid cs array, length != 4 (%d)", len(*arr)) + return nil, errors.New("range check error") + } + + // Format is [/I base 255 bytes], where base = /G,/RGB,/CMYK + name, ok := (*arr)[0].(*core.PdfObjectName) + if !ok { + common.Log.Debug("error: Invalid cs array first element not a name (array: %#v)", *arr) + return nil, errors.New("type check error") + } + if *name != "I" && *name != "Indexed" { + common.Log.Debug("error: Invalid cs array first element != I (got: %v)", *name) + return nil, errors.New("range check error") + } + + // Check base + name, ok = (*arr)[1].(*core.PdfObjectName) + if !ok { + common.Log.Debug("error: Invalid cs array 2nd element not a name (array: %#v)", *arr) + return nil, errors.New("type check error") + } + if *name != "G" && *name != "RGB" && *name != "CMYK" && *name != "DeviceGray" && *name != "DeviceRGB" && *name != "DeviceCMYK" { + common.Log.Debug("error: Invalid cs array 2nd element != G/RGB/CMYK (got: %v)", *name) + return nil, errors.New("range check error") + } + basename := "" + switch *name { + case "G", "DeviceGray": + basename = "DeviceGray" + case "RGB", "DeviceRGB": + basename = "DeviceRGB" + case "CMYK", "DeviceCMYK": + basename = "DeviceCMYK" + } + + // Prepare to a format that can be loaded by model's newPdfColorspaceFromPdfObject. + csArr := core.MakeArray(core.MakeName("Indexed"), core.MakeName(basename), (*arr)[2], (*arr)[3]) + + return model.NewPdfColorspaceFromPdfObject(csArr) +} diff --git a/internal/pdf/core/const.go b/internal/pdf/core/const.go new file mode 100644 index 0000000..f99fee4 --- /dev/null +++ b/internal/pdf/core/const.go @@ -0,0 +1,13 @@ +package core + +import "errors" + +var ( + // ErrUnsupportedEncodingParameters error indicates that encoding/decoding was attempted with unsupported + // encoding parameters. + // For example when trying to encode with an unsupported Predictor (flate). + ErrUnsupportedEncodingParameters = errors.New("unsupported encoding parameters") + ErrNoCCITTFaxDecode = errors.New(" CCITTFaxDecode encoding is not yet implemented") + ErrNoJBIG2Decode = errors.New(" JBIG2Decode encoding is not yet implemented") + ErrNoJPXDecode = errors.New(" JPXDecode encoding is not yet implemented") +) diff --git a/internal/pdf/core/crossrefs.go b/internal/pdf/core/crossrefs.go new file mode 100644 index 0000000..63a3ed3 --- /dev/null +++ b/internal/pdf/core/crossrefs.go @@ -0,0 +1,372 @@ +package core + +import ( + "bufio" + "bytes" + "errors" + "os" + "strings" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// TODO (v3): Create a new type xrefType which can be an integer and can be used for improved type checking. +// TODO (v3): Unexport these constants and rename with camelCase. +const ( + // XREF_TABLE_ENTRY indicates a normal xref table entry. + XREF_TABLE_ENTRY = iota + + // XREF_OBJECT_STREAM indicates an xref entry in an xref object stream. + XREF_OBJECT_STREAM = iota +) + +// XrefObject defines a cross reference entry which is a map between object number (with generation number) and the +// location of the actual object, either as a file offset (xref table entry), or as a location within an xref +// stream object (xref object stream). +// TODO (v3): Unexport. +type XrefObject struct { + xtype int + objectNumber int + generation int + // For normal xrefs (defined by OFFSET) + offset int64 + // For xrefs to object streams. + osObjNumber int + osObjIndex int +} + +// XrefTable is a map between object number and corresponding XrefObject. +// TODO (v3): Unexport. +// TODO: Consider changing to a slice, so can maintain the object order without sorting when analyzing. +type XrefTable map[int]XrefObject + +// ObjectStream represents an object stream's information which can contain multiple indirect objects. +// The information specifies the number of objects and has information about offset locations for +// each object. +// TODO (v3): Unexport. +type ObjectStream struct { + N int // TODO (v3): Unexport. + ds []byte + offsets map[int]int64 +} + +// ObjectStreams defines a map between object numbers (object streams only) and underlying ObjectStream information. +type ObjectStreams map[int]ObjectStream + +// ObjectCache defines a map between object numbers and corresponding PdfObject. Serves as a cache for PdfObjects that +// have already been parsed. +// TODO (v3): Unexport. +type ObjectCache map[int]PdfObject + +// Get an object from an object stream. +func (parser *PdfParser) lookupObjectViaOS(sobjNumber int, objNum int) (PdfObject, error) { + var bufReader *bytes.Reader + var objstm ObjectStream + var cached bool + + objstm, cached = parser.objstms[sobjNumber] + if !cached { + soi, err := parser.LookupByNumber(sobjNumber) + if err != nil { + common.Log.Debug("Missing object stream with number %d", sobjNumber) + return nil, err + } + + so, ok := soi.(*PdfObjectStream) + if !ok { + return nil, errors.New("invalid object stream") + } + + if parser.crypter != nil && !parser.crypter.isDecrypted(so) { + return nil, errors.New("need to decrypt the stream") + } + + sod := so.PdfObjectDictionary + common.Log.Trace("so d: %s\n", *sod) + name, ok := sod.Get("Type").(*PdfObjectName) + if !ok { + common.Log.Debug("error: Object stream should always have a Type") + return nil, errors.New("object stream missing Type") + } + if strings.ToLower(string(*name)) != "objstm" { + common.Log.Debug("error: Object stream type shall always be ObjStm !") + return nil, errors.New("object stream type != ObjStm") + } + + N, ok := sod.Get("N").(*PdfObjectInteger) + if !ok { + return nil, errors.New("invalid N in stream dictionary") + } + firstOffset, ok := sod.Get("First").(*PdfObjectInteger) + if !ok { + return nil, errors.New("invalid First in stream dictionary") + } + + common.Log.Trace("type: %s number of objects: %d", name, *N) + ds, err := DecodeStream(so) + if err != nil { + return nil, err + } + + common.Log.Trace("Decoded: %s", ds) + + // Temporarily change the reader object to this decoded buffer. + // Change back afterwards. + bakOffset := parser.GetFileOffset() + defer func() { parser.SetFileOffset(bakOffset) }() + + bufReader = bytes.NewReader(ds) + parser.reader = bufio.NewReader(bufReader) + + common.Log.Trace("Parsing offset map") + // Load the offset map (relative to the beginning of the stream...) + offsets := map[int]int64{} + // Object list and offsets. + for i := 0; i < int(*N); i++ { + parser.skipSpaces() + // Object number. + obj, err := parser.parseNumber() + if err != nil { + return nil, err + } + onum, ok := obj.(*PdfObjectInteger) + if !ok { + return nil, errors.New("invalid object stream offset table") + } + + parser.skipSpaces() + // Offset. + obj, err = parser.parseNumber() + if err != nil { + return nil, err + } + offset, ok := obj.(*PdfObjectInteger) + if !ok { + return nil, errors.New("invalid object stream offset table") + } + + common.Log.Trace("obj %d offset %d", *onum, *offset) + offsets[int(*onum)] = int64(*firstOffset + *offset) + } + + objstm = ObjectStream{N: int(*N), ds: ds, offsets: offsets} + parser.objstms[sobjNumber] = objstm + } else { + // Temporarily change the reader object to this decoded buffer. + // Point back afterwards. + bakOffset := parser.GetFileOffset() + defer func() { parser.SetFileOffset(bakOffset) }() + + bufReader = bytes.NewReader(objstm.ds) + // Temporarily change the reader object to this decoded buffer. + parser.reader = bufio.NewReader(bufReader) + } + + offset := objstm.offsets[objNum] + common.Log.Trace("ACTUAL offset[%d] = %d", objNum, offset) + + bufReader.Seek(offset, os.SEEK_SET) + parser.reader = bufio.NewReader(bufReader) + + bb, _ := parser.reader.Peek(100) + common.Log.Trace("OBJ peek \"%s\"", string(bb)) + + val, err := parser.parseObject() + if err != nil { + common.Log.Debug("error Fail to read object (%s)", err) + return nil, err + } + if val == nil { + return nil, errors.New("object cannot be null") + } + + // Make an indirect object around it. + io := PdfIndirectObject{} + io.ObjectNumber = int64(objNum) + io.PdfObject = val + + return &io, nil +} + +// LookupByNumber looks up a PdfObject by object number. Returns an error on failure. +// TODO (v3): Unexport. +func (parser *PdfParser) LookupByNumber(objNumber int) (PdfObject, error) { + // Outside interface for lookupByNumberWrapper. Default attempts repairs of bad xref tables. + obj, _, err := parser.lookupByNumberWrapper(objNumber, true) + return obj, err +} + +// Wrapper for lookupByNumber, checks if object encrypted etc. +func (parser *PdfParser) lookupByNumberWrapper(objNumber int, attemptRepairs bool) (PdfObject, bool, error) { + obj, inObjStream, err := parser.lookupByNumber(objNumber, attemptRepairs) + if err != nil { + return nil, inObjStream, err + } + + // If encrypted, decrypt it prior to returning. + // Do not attempt to decrypt objects within object streams. + if !inObjStream && parser.crypter != nil && !parser.crypter.isDecrypted(obj) { + err := parser.crypter.Decrypt(obj, 0, 0) + if err != nil { + return nil, inObjStream, err + } + } + + return obj, inObjStream, nil +} + +func getObjectNumber(obj PdfObject) (int64, int64, error) { + if io, isIndirect := obj.(*PdfIndirectObject); isIndirect { + return io.ObjectNumber, io.GenerationNumber, nil + } + if so, isStream := obj.(*PdfObjectStream); isStream { + return so.ObjectNumber, so.GenerationNumber, nil + } + return 0, 0, errors.New("not an indirect/stream object") +} + +// LookupByNumber +// Repair signals whether to repair if broken. +func (parser *PdfParser) lookupByNumber(objNumber int, attemptRepairs bool) (PdfObject, bool, error) { + obj, ok := parser.ObjCache[objNumber] + if ok { + common.Log.Trace("Returning cached object %d", objNumber) + return obj, false, nil + } + + xref, ok := parser.xrefs[objNumber] + if !ok { + // An indirect reference to an undefined object shall not be + // considered an error by a conforming reader; it shall be + // treated as a reference to the null object. + common.Log.Trace("Unable to locate object in xrefs! - Returning null object") + var nullObj PdfObjectNull + return &nullObj, false, nil + } + + common.Log.Trace("Lookup obj number %d", objNumber) + switch xref.xtype { + case XREF_TABLE_ENTRY: + common.Log.Trace("xrefobj obj num %d", xref.objectNumber) + common.Log.Trace("xrefobj gen %d", xref.generation) + common.Log.Trace("xrefobj offset %d", xref.offset) + + parser.rs.Seek(xref.offset, os.SEEK_SET) + parser.reader = bufio.NewReader(parser.rs) + + obj, err := parser.ParseIndirectObject() + if err != nil { + common.Log.Debug("error Failed reading xref (%s)", err) + // Offset pointing to a non-object. Try to repair the file. + if attemptRepairs { + common.Log.Debug("Attempting to repair xrefs (top down)") + xrefTable, err := parser.repairRebuildXrefsTopDown() + if err != nil { + common.Log.Debug("error Failed repair (%s)", err) + return nil, false, err + } + parser.xrefs = *xrefTable + return parser.lookupByNumber(objNumber, false) + } + return nil, false, err + } + + if attemptRepairs { + // Check the object number.. + // If it does not match, then try to rebuild, i.e. loop through + // all the items in the xref and look each one up and correct. + realObjNum, _, _ := getObjectNumber(obj) + if int(realObjNum) != objNumber { + common.Log.Debug("invalid xrefs: Rebuilding") + err := parser.rebuildXrefTable() + if err != nil { + return nil, false, err + } + // Empty the cache. + parser.ObjCache = ObjectCache{} + // Try looking up again and return. + return parser.lookupByNumberWrapper(objNumber, false) + } + } + + common.Log.Trace("Returning obj") + parser.ObjCache[objNumber] = obj + return obj, false, nil + case XREF_OBJECT_STREAM: + common.Log.Trace("xref from object stream!") + common.Log.Trace(">Load via OS!") + common.Log.Trace("Object stream available in object %d/%d", xref.osObjNumber, xref.osObjIndex) + + if xref.osObjNumber == objNumber { + common.Log.Debug("error Circular reference!?!") + return nil, true, errors.New(" Xref circular reference") + } + _, exists := parser.xrefs[xref.osObjNumber] + if exists { + optr, err := parser.lookupObjectViaOS(xref.osObjNumber, objNumber) //xref.osObjIndex) + if err != nil { + common.Log.Debug("error Returning ERR (%s)", err) + return nil, true, err + } + common.Log.Trace(" %d", i+1, xref.objectNumber, xref.generation, xref.offset) + i++ + } +} diff --git a/internal/pdf/core/crypt.go b/internal/pdf/core/crypt.go new file mode 100644 index 0000000..84b694d --- /dev/null +++ b/internal/pdf/core/crypt.go @@ -0,0 +1,1732 @@ +package core + +import ( + "bytes" + "crypto/aes" + "crypto/cipher" + "crypto/md5" + "crypto/rand" + "crypto/rc4" + "crypto/sha256" + "crypto/sha512" + "encoding/binary" + "errors" + "fmt" + "hash" + "io" + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// PdfCrypt provides PDF encryption/decryption support. +// The PDF standard supports encryption of strings and streams (Section 7.6). +// TODO (v3): Consider unexporting. +type PdfCrypt struct { + Filter string + Subfilter string + V int + Length int + R int + O []byte + U []byte + OE []byte // R=6 + UE []byte // R=6 + P int // TODO (v3): uint32 + Perms []byte // R=6 + EncryptMetadata bool + Id0 string + EncryptionKey []byte + DecryptedObjects map[PdfObject]bool + EncryptedObjects map[PdfObject]bool + Authenticated bool + // Crypt filters (V4). + CryptFilters CryptFilters + StreamFilter string + StringFilter string + + parser *PdfParser + + ivAESZero []byte // a zero buffer used as an initialization vector for AES +} + +// AccessPermissions is a list of access permissions for a PDF file. +type AccessPermissions struct { + Printing bool + Modify bool + ExtractGraphics bool + Annotate bool + + // Allow form filling, if annotation is disabled? If annotation enabled, is not looked at. + FillForms bool + DisabilityExtract bool // not clear what this means! + + // Allow rotating, editing page order. + RotateInsert bool + + // Limit print quality (lowres), assuming Printing is true. + FullPrintQuality bool +} + +const padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF" + + "\xFA\x01\x08\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C" + + "\xA9\xFE\x64\x53\x69\x7A" + +// StandardCryptFilter is a default name for a standard crypt filter. +const StandardCryptFilter = "StdCF" + +// CryptFilter represents information from a CryptFilter dictionary. +// TODO (v3): Replace with cryptFilterMethod interface. +type CryptFilter struct { + Cfm string + Length int + cfm cryptFilterMethod +} + +func (cf CryptFilter) getCFM() (cryptFilterMethod, error) { + // TODO (v3): remove this method and access cf.cfm directly + if cf.cfm != nil { + return cf.cfm, nil + } + // There is a non-zero chance that someone relies on the ability to + // add crypt filters manually using the library. + // So if we hit such case - be nice and find a filter by name. + return getCryptFilterMethod(cf.Cfm) +} + +// Encryption filters names. +// Table 25, CFM (page 92) +const ( + CryptFilterNone = "None" // do not decrypt data + CryptFilterV2 = "V2" // RC4-based filter + CryptFilterAESV2 = "AESV2" // AES-based filter (128 bit key, PDF 1.6) + CryptFilterAESV3 = "AESV3" // AES-based filter (256 bit key, PDF 2.0) +) + +func newCryptFiltersV2(length int) CryptFilters { + return CryptFilters{ + StandardCryptFilter: NewCryptFilterV2(length), + } +} + +// NewCryptFilterV2 creates a RC4-based filter with a specified key length (in bytes). +func NewCryptFilterV2(length int) CryptFilter { + // TODO (v3): Unexport. + return CryptFilter{ + Cfm: CryptFilterV2, + Length: length, + cfm: cryptFilterV2{}, + } +} + +// NewCryptFilterAESV2 creates an AES-based filter with a 128 bit key (AESV2). +func NewCryptFilterAESV2() CryptFilter { + // TODO (v3): Unexport. + return CryptFilter{ + Cfm: CryptFilterAESV2, + Length: 16, + cfm: cryptFilterAESV2{}, + } +} + +// NewCryptFilterAESV3 creates an AES-based filter with a 256 bit key (AESV3). +func NewCryptFilterAESV3() CryptFilter { + // TODO (v3): Unexport. + return CryptFilter{ + Cfm: CryptFilterAESV3, + Length: 32, + cfm: cryptFilterAESV3{}, + } +} + +// CryptFilters is a map of crypt filter name and underlying CryptFilter info. +// TODO (v3): Unexport. +type CryptFilters map[string]CryptFilter + +func (m CryptFilters) byName(cfm string) (cryptFilterMethod, error) { + cf, ok := m[cfm] + if !ok { + err := fmt.Errorf("unsupported crypt filter (%s)", cfm) + common.Log.Debug("%s", err) + return nil, err + } + f, err := cf.getCFM() + if err != nil { + common.Log.Debug("%s", err) + return nil, err + } + return f, nil +} + +// LoadCryptFilters loads crypt filter information from the encryption dictionary (V>=4). +// TODO (v3): Unexport. +func (crypt *PdfCrypt) LoadCryptFilters(ed *PdfObjectDictionary) error { + crypt.CryptFilters = CryptFilters{} + + obj := ed.Get("CF") + obj = TraceToDirectObject(obj) // XXX may need to resolve reference... + if ref, isRef := obj.(*PdfObjectReference); isRef { + o, err := crypt.parser.LookupByReference(*ref) + if err != nil { + common.Log.Debug("error looking up CF reference") + return err + } + obj = TraceToDirectObject(o) + } + + cf, ok := obj.(*PdfObjectDictionary) + if !ok { + common.Log.Debug("invalid CF, type: %T", obj) + return errors.New("invalid CF") + } + + for _, name := range cf.Keys() { + v := cf.Get(name) + + if ref, isRef := v.(*PdfObjectReference); isRef { + o, err := crypt.parser.LookupByReference(*ref) + if err != nil { + common.Log.Debug("error lookup up dictionary reference") + return err + } + v = TraceToDirectObject(o) + } + + dict, ok := v.(*PdfObjectDictionary) + if !ok { + return fmt.Errorf("invalid dict in CF (name %s) - not a dictionary but %T", name, v) + } + + if name == "Identity" { + common.Log.Debug("error - Cannot overwrite the identity filter - Trying next") + continue + } + + // If Type present, should be CryptFilter. + if typename, ok := dict.Get("Type").(*PdfObjectName); ok { + if string(*typename) != "CryptFilter" { + return fmt.Errorf("CF dict type != CryptFilter (%s)", typename) + } + } + + cf := CryptFilter{} + + // Method. + cfmName, ok := dict.Get("CFM").(*PdfObjectName) + if !ok { + return fmt.Errorf("unsupported crypt filter (None)") + } + cf.Cfm = string(*cfmName) + + cfm, err := getCryptFilterMethod(cf.Cfm) + if err != nil { + return err + } + cf.cfm = cfm + + // Length. + cf.Length = 0 + length, ok := dict.Get("Length").(*PdfObjectInteger) + if ok { + // TODO(dennwc): pass length to getCryptFilterMethod and allow filter to validate it + if *length%8 != 0 { + return fmt.Errorf("crypt filter length not multiple of 8 (%d)", *length) + } + + // Standard security handler expresses the length in multiples of 8 (16 means 128) + // We only deal with standard so far. (Public key not supported yet). + if *length < 5 || *length > 16 { + if *length == 64 || *length == 128 { + common.Log.Debug("STANDARD VIOLATION: Crypt Length appears to be in bits rather than bytes - assuming bits (%d)", *length) + *length /= 8 + } else if !(*length == 32 && cf.Cfm == CryptFilterAESV3) { + return fmt.Errorf("crypt filter length not in range 40 - 128 bit (%d)", *length) + } + } + cf.Length = int(*length) + } + + crypt.CryptFilters[string(name)] = cf + } + // Cannot be overwritten. + crypt.CryptFilters["Identity"] = CryptFilter{} + + // StrF strings filter. + crypt.StringFilter = "Identity" + if strf, ok := ed.Get("StrF").(*PdfObjectName); ok { + if _, exists := crypt.CryptFilters[string(*strf)]; !exists { + return fmt.Errorf("crypt filter for StrF not specified in CF dictionary (%s)", *strf) + } + crypt.StringFilter = string(*strf) + } + + // StmF streams filter. + crypt.StreamFilter = "Identity" + if stmf, ok := ed.Get("StmF").(*PdfObjectName); ok { + if _, exists := crypt.CryptFilters[string(*stmf)]; !exists { + return fmt.Errorf("crypt filter for StmF not specified in CF dictionary (%s)", *stmf) + } + crypt.StreamFilter = string(*stmf) + } + + return nil +} + +// SaveCryptFilters saves crypt filter information to the encryption dictionary (V>=4). +// TODO (v3): Unexport. +func (crypt *PdfCrypt) SaveCryptFilters(ed *PdfObjectDictionary) error { + if crypt.V < 4 { + return errors.New("can only be used with V>=4") + } + cf := MakeDict() + ed.Set("CF", cf) + + for name, filter := range crypt.CryptFilters { + if name == "Identity" { + continue + } + v := MakeDict() + cf.Set(PdfObjectName(name), v) + + v.Set("Type", MakeName("CryptFilter")) + v.Set("AuthEvent", MakeName("DocOpen")) + v.Set("CFM", MakeName(string(filter.Cfm))) + v.Set("Length", MakeInteger(int64(filter.Length))) + } + ed.Set("StrF", MakeName(crypt.StringFilter)) + ed.Set("StmF", MakeName(crypt.StreamFilter)) + return nil +} + +// PdfCryptMakeNew makes the document crypt handler based on the encryption dictionary +// and trailer dictionary. Returns an error on failure to process. +func PdfCryptMakeNew(parser *PdfParser, ed, trailer *PdfObjectDictionary) (PdfCrypt, error) { + crypter := PdfCrypt{} + crypter.DecryptedObjects = map[PdfObject]bool{} + crypter.EncryptedObjects = map[PdfObject]bool{} + crypter.Authenticated = false + crypter.parser = parser + + filter, ok := ed.Get("Filter").(*PdfObjectName) + if !ok { + common.Log.Debug("error Crypt dictionary missing required Filter field!") + return crypter, errors.New("required crypt field Filter missing") + } + if *filter != "Standard" { + common.Log.Debug("error Unsupported filter (%s)", *filter) + return crypter, errors.New("unsupported Filter") + } + crypter.Filter = string(*filter) + + subfilter, ok := ed.Get("SubFilter").(*PdfObjectString) + if ok { + crypter.Subfilter = string(*subfilter) + common.Log.Debug("Using subfilter %s", subfilter) + } + + if L, ok := ed.Get("Length").(*PdfObjectInteger); ok { + if (*L % 8) != 0 { + common.Log.Debug("error Invalid encryption length") + return crypter, errors.New("invalid encryption length") + } + crypter.Length = int(*L) + } else { + crypter.Length = 40 + } + + crypter.V = 0 + if v, ok := ed.Get("V").(*PdfObjectInteger); ok { + V := int(*v) + crypter.V = V + if V >= 1 && V <= 2 { + // Default algorithm is V2. + crypter.CryptFilters = newCryptFiltersV2(crypter.Length) + } else if V >= 4 && V <= 5 { + if err := crypter.LoadCryptFilters(ed); err != nil { + return crypter, err + } + } else { + common.Log.Debug("error Unsupported encryption algo V = %d", V) + return crypter, errors.New("unsupported algorithm") + } + } + + R, ok := ed.Get("R").(*PdfObjectInteger) + if !ok { + return crypter, errors.New("Encrypt dictionary missing R") + } + // TODO(dennwc): according to spec, R should be validated according to V value + if *R < 2 || *R > 6 { + return crypter, fmt.Errorf("invalid R (%d)", *R) + } + crypter.R = int(*R) + + O, ok := ed.Get("O").(*PdfObjectString) + if !ok { + return crypter, errors.New("Encrypt dictionary missing O") + } + if crypter.R == 5 || crypter.R == 6 { + // the spec says =48 bytes, but Acrobat pads them out longer + if len(*O) < 48 { + return crypter, fmt.Errorf("Length(O) < 48 (%d)", len(*O)) + } + } else if len(*O) != 32 { + return crypter, fmt.Errorf("Length(O) != 32 (%d)", len(*O)) + } + crypter.O = []byte(*O) + + U, ok := ed.Get("U").(*PdfObjectString) + if !ok { + return crypter, errors.New("Encrypt dictionary missing U") + } + if crypter.R == 5 || crypter.R == 6 { + // the spec says =48 bytes, but Acrobat pads them out longer + if len(*U) < 48 { + return crypter, fmt.Errorf("Length(U) < 48 (%d)", len(*U)) + } + } else if len(*U) != 32 { + // Strictly this does not cause an error. + // If O is OK and others then can still read the file. + common.Log.Debug("warning: Length(U) != 32 (%d)", len(*U)) + //return crypter, errors.New("Length(U) != 32") + } + crypter.U = []byte(*U) + + if crypter.R >= 5 { + OE, ok := ed.Get("OE").(*PdfObjectString) + if !ok { + return crypter, errors.New("Encrypt dictionary missing OE") + } + if len(*OE) != 32 { + return crypter, fmt.Errorf("Length(OE) != 32 (%d)", len(*OE)) + } + crypter.OE = []byte(*OE) + + UE, ok := ed.Get("UE").(*PdfObjectString) + if !ok { + return crypter, errors.New("Encrypt dictionary missing UE") + } + if len(*UE) != 32 { + return crypter, fmt.Errorf("Length(UE) != 32 (%d)", len(*UE)) + } + crypter.UE = []byte(*UE) + } + + P, ok := ed.Get("P").(*PdfObjectInteger) + if !ok { + return crypter, errors.New("Encrypt dictionary missing permissions attr") + } + crypter.P = int(*P) + + if crypter.R == 6 { + Perms, ok := ed.Get("Perms").(*PdfObjectString) + if !ok { + return crypter, errors.New("Encrypt dictionary missing Perms") + } + if len(*Perms) != 16 { + return crypter, fmt.Errorf("Length(Perms) != 16 (%d)", len(*Perms)) + } + crypter.Perms = []byte(*Perms) + } + + em, ok := ed.Get("EncryptMetadata").(*PdfObjectBool) + if ok { + crypter.EncryptMetadata = bool(*em) + } else { + crypter.EncryptMetadata = true // True by default. + } + + // Default: empty ID. + // Strictly, if file is encrypted, the ID should always be specified + // but clearly not everyone is following the specification. + id0 := PdfObjectString("") + if idArray, ok := trailer.Get("ID").(*PdfObjectArray); ok && len(*idArray) >= 1 { + id0obj, ok := (*idArray)[0].(*PdfObjectString) + if !ok { + return crypter, errors.New("invalid trailer ID") + } + id0 = *id0obj + } else { + common.Log.Debug("Trailer ID array missing or invalid!") + } + crypter.Id0 = string(id0) + + return crypter, nil +} + +// GetAccessPermissions returns the PDF access permissions as an AccessPermissions object. +func (crypt *PdfCrypt) GetAccessPermissions() AccessPermissions { + perms := AccessPermissions{} + + P := crypt.P + if P&(1<<2) > 0 { + perms.Printing = true + } + if P&(1<<3) > 0 { + perms.Modify = true + } + if P&(1<<4) > 0 { + perms.ExtractGraphics = true + } + if P&(1<<5) > 0 { + perms.Annotate = true + } + if P&(1<<8) > 0 { + perms.FillForms = true + } + if P&(1<<9) > 0 { + perms.DisabilityExtract = true + } + if P&(1<<10) > 0 { + perms.RotateInsert = true + } + if P&(1<<11) > 0 { + perms.FullPrintQuality = true + } + return perms +} + +// GetP returns the P entry to be used in Encrypt dictionary based on AccessPermissions settings. +func (perms AccessPermissions) GetP() int32 { + var P int32 = 0 + + if perms.Printing { // bit 3 + P |= (1 << 2) + } + if perms.Modify { // bit 4 + P |= (1 << 3) + } + if perms.ExtractGraphics { // bit 5 + P |= (1 << 4) + } + if perms.Annotate { // bit 6 + P |= (1 << 5) + } + if perms.FillForms { + P |= (1 << 8) // bit 9 + } + if perms.DisabilityExtract { + P |= (1 << 9) // bit 10 + } + if perms.RotateInsert { + P |= (1 << 10) // bit 11 + } + if perms.FullPrintQuality { + P |= (1 << 11) // bit 12 + } + return P +} + +// Check whether the specified password can be used to decrypt the document. +func (crypt *PdfCrypt) authenticate(password []byte) (bool, error) { + // Also build the encryption/decryption key. + + crypt.Authenticated = false + if crypt.R >= 5 { + authenticated, err := crypt.alg2a(password) + if err != nil { + return false, err + } + crypt.Authenticated = authenticated + return authenticated, err + } + + // Try user password. + common.Log.Trace("Debugging authentication - user pass") + authenticated, err := crypt.Alg6(password) + if err != nil { + return false, err + } + if authenticated { + common.Log.Trace("this.Authenticated = True") + crypt.Authenticated = true + return true, nil + } + + // Try owner password also. + // May not be necessary if only want to get all contents. + // (user pass needs to be known or empty). + common.Log.Trace("Debugging authentication - owner pass") + authenticated, err = crypt.Alg7(password) + if err != nil { + return false, err + } + if authenticated { + common.Log.Trace("this.Authenticated = True") + crypt.Authenticated = true + return true, nil + } + + return false, nil +} + +// Check access rights and permissions for a specified password. If either user/owner password is specified, +// full rights are granted, otherwise the access rights are specified by the Permissions flag. +// +// The bool flag indicates that the user can access and can view the file. +// The AccessPermissions shows what access the user has for editing etc. +// An error is returned if there was a problem performing the authentication. +func (crypt *PdfCrypt) checkAccessRights(password []byte) (bool, AccessPermissions, error) { + perms := AccessPermissions{} + + // Try owner password -> full rights. + var ( + isOwner bool + err error + ) + if crypt.R >= 5 { + var h []byte + h, err = crypt.alg12(password) + if err != nil { + return false, perms, err + } + isOwner = len(h) != 0 + } else { + isOwner, err = crypt.Alg7(password) + } + if err != nil { + return false, perms, err + } + if isOwner { + // owner -> full rights. + perms.Annotate = true + perms.DisabilityExtract = true + perms.ExtractGraphics = true + perms.FillForms = true + perms.FullPrintQuality = true + perms.Modify = true + perms.Printing = true + perms.RotateInsert = true + return true, perms, nil + } + + // Try user password. + var isUser bool + if crypt.R >= 5 { + var h []byte + h, err = crypt.alg11(password) + if err != nil { + return false, perms, err + } + isUser = len(h) != 0 + } else { + isUser, err = crypt.Alg6(password) + } + if err != nil { + return false, perms, err + } + if isUser { + // User password specified correctly -> access granted with specified permissions. + return true, crypt.GetAccessPermissions(), nil + } + + // Cannot even view the file. + return false, perms, nil +} + +func (crypt *PdfCrypt) paddedPass(pass []byte) []byte { + key := make([]byte, 32) + if len(pass) >= 32 { + for i := 0; i < 32; i++ { + key[i] = pass[i] + } + } else { + copy(key, pass) + for i := len(pass); i < 32; i++ { + key[i] = padding[i-len(pass)] + } + } + return key +} + +// Generates a key for encrypting a specific object based on the +// object and generation number, as well as the document encryption key. +func (crypt *PdfCrypt) makeKey(filter string, objNum, genNum uint32, ekey []byte) ([]byte, error) { + f, err := crypt.CryptFilters.byName(filter) + if err != nil { + return nil, err + } + return f.MakeKey(objNum, genNum, ekey) +} + +// Check if object has already been processed. +func (crypt *PdfCrypt) isDecrypted(obj PdfObject) bool { + _, ok := crypt.DecryptedObjects[obj] + if ok { + common.Log.Trace("Already decrypted") + return true + } + + common.Log.Trace("Not decrypted yet") + return false +} + +// Decrypt a buffer with a selected crypt filter. +func (crypt *PdfCrypt) decryptBytes(buf []byte, filter string, okey []byte) ([]byte, error) { + common.Log.Trace("Decrypt bytes") + f, err := crypt.CryptFilters.byName(filter) + if err != nil { + return nil, err + } + return f.DecryptBytes(buf, okey) +} + +// Decrypt an object with specified key. For numbered objects, +// the key argument is not used and a new one is generated based +// on the object and generation number. +// Traverses through all the subobjects (recursive). +// +// Does not look up references.. That should be done prior to calling. +func (crypt *PdfCrypt) Decrypt(obj PdfObject, parentObjNum, parentGenNum int64) error { + if crypt.isDecrypted(obj) { + return nil + } + + switch obj := obj.(type) { + case *PdfIndirectObject: + crypt.DecryptedObjects[obj] = true + + common.Log.Trace("Decrypting indirect %d %d obj!", obj.ObjectNumber, obj.GenerationNumber) + + objNum := obj.ObjectNumber + genNum := obj.GenerationNumber + + err := crypt.Decrypt(obj.PdfObject, objNum, genNum) + if err != nil { + return err + } + return nil + case *PdfObjectStream: + // Mark as decrypted first to avoid recursive issues. + crypt.DecryptedObjects[obj] = true + dict := obj.PdfObjectDictionary + + if s, ok := dict.Get("Type").(*PdfObjectName); ok && *s == "XRef" { + return nil // Cross-reference streams should not be encrypted + } + + objNum := obj.ObjectNumber + genNum := obj.GenerationNumber + common.Log.Trace("Decrypting stream %d %d !", objNum, genNum) + + // TODO: Check for crypt filter (V4). + // The Crypt filter shall be the first filter in the Filter array entry. + + streamFilter := StandardCryptFilter // Default RC4. + if crypt.V >= 4 { + streamFilter = crypt.StreamFilter + common.Log.Trace("this.StreamFilter = %s", crypt.StreamFilter) + + if filters, ok := dict.Get("Filter").(*PdfObjectArray); ok { + // Crypt filter can only be the first entry. + if firstFilter, ok := (*filters)[0].(*PdfObjectName); ok { + if *firstFilter == "Crypt" { + // Crypt filter overriding the default. + // Default option is Identity. + streamFilter = "Identity" + + // Check if valid crypt filter specified in the decode params. + if decodeParams, ok := dict.Get("DecodeParms").(*PdfObjectDictionary); ok { + if filterName, ok := decodeParams.Get("Name").(*PdfObjectName); ok { + if _, ok := crypt.CryptFilters[string(*filterName)]; ok { + common.Log.Trace("Using stream filter %s", *filterName) + streamFilter = string(*filterName) + } + } + } + } + } + } + + common.Log.Trace("with %s filter", streamFilter) + if streamFilter == "Identity" { + // Identity: pass unchanged. + return nil + } + } + + err := crypt.Decrypt(dict, objNum, genNum) + if err != nil { + return err + } + + okey, err := crypt.makeKey(streamFilter, uint32(objNum), uint32(genNum), crypt.EncryptionKey) + if err != nil { + return err + } + + obj.Stream, err = crypt.decryptBytes(obj.Stream, streamFilter, okey) + if err != nil { + return err + } + // Update the length based on the decrypted stream. + dict.Set("Length", MakeInteger(int64(len(obj.Stream)))) + + return nil + case *PdfObjectString: + common.Log.Trace("Decrypting string!") + + stringFilter := StandardCryptFilter + if crypt.V >= 4 { + // Currently only support Identity / RC4. + common.Log.Trace("with %s filter", crypt.StringFilter) + if crypt.StringFilter == "Identity" { + // Identity: pass unchanged: No action. + return nil + } + stringFilter = crypt.StringFilter + } + + key, err := crypt.makeKey(stringFilter, uint32(parentObjNum), uint32(parentGenNum), crypt.EncryptionKey) + if err != nil { + return err + } + + // Overwrite the encrypted with decrypted string. + decrypted := make([]byte, len(*obj)) + for i := 0; i < len(*obj); i++ { + decrypted[i] = (*obj)[i] + } + common.Log.Trace("Decrypt string: %s : % x", decrypted, decrypted) + decrypted, err = crypt.decryptBytes(decrypted, stringFilter, key) + if err != nil { + return err + } + *obj = PdfObjectString(decrypted) + + return nil + case *PdfObjectArray: + for _, o := range *obj { + err := crypt.Decrypt(o, parentObjNum, parentGenNum) + if err != nil { + return err + } + } + return nil + case *PdfObjectDictionary: + isSig := false + if t := obj.Get("Type"); t != nil { + typeStr, ok := t.(*PdfObjectName) + if ok && *typeStr == "Sig" { + isSig = true + } + } + for _, keyidx := range obj.Keys() { + o := obj.Get(keyidx) + // How can we avoid this check, i.e. implement a more smart + // traversal system? + if isSig && string(keyidx) == "Contents" { + // Leave the Contents of a Signature dictionary. + continue + } + + if string(keyidx) != "Parent" && string(keyidx) != "Prev" && string(keyidx) != "Last" { // Check not needed? + err := crypt.Decrypt(o, parentObjNum, parentGenNum) + if err != nil { + return err + } + } + } + return nil + } + + return nil +} + +// Check if object has already been processed. +func (crypt *PdfCrypt) isEncrypted(obj PdfObject) bool { + _, ok := crypt.EncryptedObjects[obj] + if ok { + common.Log.Trace("Already encrypted") + return true + } + + common.Log.Trace("Not encrypted yet") + return false +} + +// Encrypt a buffer with the specified crypt filter and key. +func (crypt *PdfCrypt) encryptBytes(buf []byte, filter string, okey []byte) ([]byte, error) { + common.Log.Trace("Encrypt bytes") + f, err := crypt.CryptFilters.byName(filter) + if err != nil { + return nil, err + } + return f.EncryptBytes(buf, okey) +} + +// Encrypt an object with specified key. For numbered objects, +// the key argument is not used and a new one is generated based +// on the object and generation number. +// Traverses through all the subobjects (recursive). +// +// Does not look up references.. That should be done prior to calling. +func (crypt *PdfCrypt) Encrypt(obj PdfObject, parentObjNum, parentGenNum int64) error { + if crypt.isEncrypted(obj) { + return nil + } + switch obj := obj.(type) { + case *PdfIndirectObject: + crypt.EncryptedObjects[obj] = true + + common.Log.Trace("Encrypting indirect %d %d obj!", obj.ObjectNumber, obj.GenerationNumber) + + objNum := obj.ObjectNumber + genNum := obj.GenerationNumber + + err := crypt.Encrypt(obj.PdfObject, objNum, genNum) + if err != nil { + return err + } + return nil + case *PdfObjectStream: + crypt.EncryptedObjects[obj] = true + dict := obj.PdfObjectDictionary + + if s, ok := dict.Get("Type").(*PdfObjectName); ok && *s == "XRef" { + return nil // Cross-reference streams should not be encrypted + } + + objNum := obj.ObjectNumber + genNum := obj.GenerationNumber + common.Log.Trace("Encrypting stream %d %d !", objNum, genNum) + + // TODO: Check for crypt filter (V4). + // The Crypt filter shall be the first filter in the Filter array entry. + + streamFilter := StandardCryptFilter // Default RC4. + if crypt.V >= 4 { + // For now. Need to change when we add support for more than + // Identity / RC4. + streamFilter = crypt.StreamFilter + common.Log.Trace("this.StreamFilter = %s", crypt.StreamFilter) + + if filters, ok := dict.Get("Filter").(*PdfObjectArray); ok { + // Crypt filter can only be the first entry. + if firstFilter, ok := (*filters)[0].(*PdfObjectName); ok { + if *firstFilter == "Crypt" { + // Crypt filter overriding the default. + // Default option is Identity. + streamFilter = "Identity" + + // Check if valid crypt filter specified in the decode params. + if decodeParams, ok := dict.Get("DecodeParms").(*PdfObjectDictionary); ok { + if filterName, ok := decodeParams.Get("Name").(*PdfObjectName); ok { + if _, ok := crypt.CryptFilters[string(*filterName)]; ok { + common.Log.Trace("Using stream filter %s", *filterName) + streamFilter = string(*filterName) + } + } + } + } + } + } + + common.Log.Trace("with %s filter", streamFilter) + if streamFilter == "Identity" { + // Identity: pass unchanged. + return nil + } + } + + err := crypt.Encrypt(obj.PdfObjectDictionary, objNum, genNum) + if err != nil { + return err + } + + okey, err := crypt.makeKey(streamFilter, uint32(objNum), uint32(genNum), crypt.EncryptionKey) + if err != nil { + return err + } + + obj.Stream, err = crypt.encryptBytes(obj.Stream, streamFilter, okey) + if err != nil { + return err + } + // Update the length based on the encrypted stream. + dict.Set("Length", MakeInteger(int64(len(obj.Stream)))) + + return nil + case *PdfObjectString: + common.Log.Trace("Encrypting string!") + + stringFilter := StandardCryptFilter + if crypt.V >= 4 { + common.Log.Trace("with %s filter", crypt.StringFilter) + if crypt.StringFilter == "Identity" { + // Identity: pass unchanged: No action. + return nil + } + stringFilter = crypt.StringFilter + } + + key, err := crypt.makeKey(stringFilter, uint32(parentObjNum), uint32(parentGenNum), crypt.EncryptionKey) + if err != nil { + return err + } + + encrypted := make([]byte, len(*obj)) + for i := 0; i < len(*obj); i++ { + encrypted[i] = (*obj)[i] + } + common.Log.Trace("Encrypt string: %s : % x", encrypted, encrypted) + encrypted, err = crypt.encryptBytes(encrypted, stringFilter, key) + if err != nil { + return err + } + *obj = PdfObjectString(encrypted) + + return nil + case *PdfObjectArray: + for _, o := range *obj { + err := crypt.Encrypt(o, parentObjNum, parentGenNum) + if err != nil { + return err + } + } + return nil + case *PdfObjectDictionary: + isSig := false + if t := obj.Get("Type"); t != nil { + typeStr, ok := t.(*PdfObjectName) + if ok && *typeStr == "Sig" { + isSig = true + } + } + + for _, keyidx := range obj.Keys() { + o := obj.Get(keyidx) + // How can we avoid this check, i.e. implement a more smart + // traversal system? + if isSig && string(keyidx) == "Contents" { + // Leave the Contents of a Signature dictionary. + continue + } + if string(keyidx) != "Parent" && string(keyidx) != "Prev" && string(keyidx) != "Last" { // Check not needed? + err := crypt.Encrypt(o, parentObjNum, parentGenNum) + if err != nil { + return err + } + } + } + return nil + } + + return nil +} + +// aesZeroIV allocates a zero-filled buffer that serves as an initialization vector for AESv3. +func (crypt *PdfCrypt) aesZeroIV() []byte { + if crypt.ivAESZero == nil { + crypt.ivAESZero = make([]byte, aes.BlockSize) + } + return crypt.ivAESZero +} + +// alg2a retrieves the encryption key from an encrypted document (R >= 5). +// It returns false if the password was wrong. +// 7.6.4.3.2 Algorithm 2.A (page 83) +func (crypt *PdfCrypt) alg2a(pass []byte) (bool, error) { + // O & U: 32 byte hash + 8 byte Validation Salt + 8 byte Key Salt + + // step a: Unicode normalization + // TODO(dennwc): make sure that UTF-8 strings are normalized + + // step b: truncate to 127 bytes + if len(pass) > 127 { + pass = pass[:127] + } + + // step c: test pass against the owner key + h, err := crypt.alg12(pass) + if err != nil { + return false, err + } + var ( + data []byte // data to hash + ekey []byte // encrypted file key + ukey []byte // user key; set only when using owner's password + ) + if len(h) != 0 { + // owner password valid + + // step d: compute an intermediate owner key + str := make([]byte, len(pass)+8+48) + i := copy(str, pass) + i += copy(str[i:], crypt.O[40:48]) // owner Key Salt + i += copy(str[i:], crypt.U[0:48]) + + data = str + ekey = crypt.OE + ukey = crypt.U[0:48] + } else { + // check user password + h, err = crypt.alg11(pass) + if err == nil && len(h) == 0 { + // try default password + h, err = crypt.alg11([]byte("")) + } + if err != nil { + return false, err + } else if len(h) == 0 { + // wrong password + return false, nil + } + // step e: compute an intermediate user key + str := make([]byte, len(pass)+8) + i := copy(str, pass) + i += copy(str[i:], crypt.U[40:48]) // user Key Salt + + data = str + ekey = crypt.UE + ukey = nil + } + ekey = ekey[:32] + + // intermediate key + ikey := crypt.alg2b(data, pass, ukey) + + ac, err := aes.NewCipher(ikey[:32]) + if err != nil { + panic(err) + } + + iv := crypt.aesZeroIV() + cbc := cipher.NewCBCDecrypter(ac, iv) + fkey := make([]byte, 32) + cbc.CryptBlocks(fkey, ekey) + + crypt.EncryptionKey = fkey + + if crypt.R == 5 { + return true, nil + } + + return crypt.alg13(fkey) +} + +// alg2b computes a hash for R=5 and R=6. +func (crypt *PdfCrypt) alg2b(data, pwd, userKey []byte) []byte { + if crypt.R == 5 { + return alg2b_R5(data) + } + return alg2b(data, pwd, userKey) +} + +// alg2b_R5 computes a hash for R=5, used in a deprecated extension. +// It's used the same way as a hash described in Algorithm 2.B, but it doesn't use the original password +// and the user key to calculate the hash. +func alg2b_R5(data []byte) []byte { + h := sha256.New() + h.Write(data) + return h.Sum(nil) +} + +// repeat repeats first n bytes of buf until the end of the buffer. +// It assumes that the length of buf is a multiple of n. +func repeat(buf []byte, n int) { + bp := n + for bp < len(buf) { + copy(buf[bp:], buf[:bp]) + bp *= 2 + } +} + +// alg2b computes a hash for R=6. +// 7.6.4.3.3 Algorithm 2.B (page 83) +func alg2b(data, pwd, userKey []byte) []byte { + var ( + s256, s384, s512 hash.Hash + ) + s256 = sha256.New() + hbuf := make([]byte, 64) + + h := s256 + h.Write(data) + K := h.Sum(hbuf[:0]) + + buf := make([]byte, 64*(127+64+48)) + + round := func() (E []byte) { + // step a: repeat pass+K 64 times + n := len(pwd) + len(K) + len(userKey) + part := buf[:n] + i := copy(part, pwd) + i += copy(part[i:], K[:]) + i += copy(part[i:], userKey) + if i != n { + panic("wrong size") + } + K1 := buf[:n*64] + repeat(K1, n) + + // step b: encrypt K1 with AES-128 CBC + ac, err := aes.NewCipher(K[0:16]) + if err != nil { + panic(err) + } + cbc := cipher.NewCBCEncrypter(ac, K[16:32]) + cbc.CryptBlocks(K1, K1) + E = K1 + + // step c: use 16 bytes of E as big-endian int, select the next hash + b := 0 + for i := 0; i < 16; i++ { + b += int(E[i] % 3) + } + var h hash.Hash + switch b % 3 { + case 0: + h = s256 + case 1: + if s384 == nil { + s384 = sha512.New384() + } + h = s384 + case 2: + if s512 == nil { + s512 = sha512.New() + } + h = s512 + } + + // step d: take the hash of E, use as a new K + h.Reset() + h.Write(E) + K = h.Sum(hbuf[:0]) + + return E + } + + for i := 0; ; { + E := round() + b := uint8(E[len(E)-1]) + // from the spec, it appears that i should be incremented after + // the test, but that doesn't match what Adobe does + i++ + if i >= 64 && b <= uint8(i-32) { + break + } + } + return K[:32] +} + +// Alg2 computes an encryption key. +// TODO (v3): Unexport. +func (crypt *PdfCrypt) Alg2(pass []byte) []byte { + common.Log.Trace("Alg2") + key := crypt.paddedPass(pass) + + h := md5.New() + h.Write(key) + + // Pass O. + h.Write(crypt.O) + + // Pass P (Lower order byte first). + var p uint32 = uint32(crypt.P) + var pb = []byte{} + for i := 0; i < 4; i++ { + pb = append(pb, byte(((p >> uint(8*i)) & 0xff))) + } + h.Write(pb) + common.Log.Trace("go P: % x", pb) + + // Pass ID[0] from the trailer + h.Write([]byte(crypt.Id0)) + + common.Log.Trace("this.R = %d encryptMetadata %v", crypt.R, crypt.EncryptMetadata) + if (crypt.R >= 4) && !crypt.EncryptMetadata { + h.Write([]byte{0xff, 0xff, 0xff, 0xff}) + } + hashb := h.Sum(nil) + + if crypt.R >= 3 { + for i := 0; i < 50; i++ { + h = md5.New() + h.Write(hashb[0 : crypt.Length/8]) + hashb = h.Sum(nil) + } + } + + if crypt.R >= 3 { + return hashb[0 : crypt.Length/8] + } + + return hashb[0:5] +} + +// Create the RC4 encryption key. +func (crypt *PdfCrypt) alg3Key(pass []byte) []byte { + h := md5.New() + okey := crypt.paddedPass(pass) + h.Write(okey) + + if crypt.R >= 3 { + for i := 0; i < 50; i++ { + hashb := h.Sum(nil) + h = md5.New() + h.Write(hashb) + } + } + + encKey := h.Sum(nil) + if crypt.R == 2 { + encKey = encKey[0:5] + } else { + encKey = encKey[0 : crypt.Length/8] + } + return encKey +} + +// Alg3 computes the encryption dictionary’s O (owner password) value. +// TODO (v3): Unexport. +func (crypt *PdfCrypt) Alg3(upass, opass []byte) (PdfObjectString, error) { + // Return O string val. + O := PdfObjectString("") + + var encKey []byte + if len(opass) > 0 { + encKey = crypt.alg3Key(opass) + } else { + encKey = crypt.alg3Key(upass) + } + + ociph, err := rc4.NewCipher(encKey) + if err != nil { + return O, errors.New("failed rc4 ciph") + } + + ukey := crypt.paddedPass(upass) + encrypted := make([]byte, len(ukey)) + ociph.XORKeyStream(encrypted, ukey) + + if crypt.R >= 3 { + encKey2 := make([]byte, len(encKey)) + for i := 0; i < 19; i++ { + for j := 0; j < len(encKey); j++ { + encKey2[j] = encKey[j] ^ byte(i+1) + } + ciph, err := rc4.NewCipher(encKey2) + if err != nil { + return O, errors.New("failed rc4 ciph") + } + ciph.XORKeyStream(encrypted, encrypted) + } + } + + O = PdfObjectString(encrypted) + return O, nil +} + +// Alg4 computes the encryption dictionary’s U (user password) value (Security handlers of revision 2). +// TODO (v3): Unexport. +func (crypt *PdfCrypt) Alg4(upass []byte) (PdfObjectString, []byte, error) { + U := PdfObjectString("") + + ekey := crypt.Alg2(upass) + ciph, err := rc4.NewCipher(ekey) + if err != nil { + return U, ekey, errors.New("failed rc4 ciph") + } + + s := []byte(padding) + encrypted := make([]byte, len(s)) + ciph.XORKeyStream(encrypted, s) + + U = PdfObjectString(encrypted) + return U, ekey, nil +} + +// Alg5 computes the encryption dictionary’s U (user password) value (Security handlers of revision 3 or greater). +// TODO (v3): Unexport. +func (crypt *PdfCrypt) Alg5(upass []byte) (PdfObjectString, []byte, error) { + U := PdfObjectString("") + + ekey := crypt.Alg2(upass) + + h := md5.New() + h.Write([]byte(padding)) + h.Write([]byte(crypt.Id0)) + hash := h.Sum(nil) + + common.Log.Trace("Alg5") + common.Log.Trace("ekey: % x", ekey) + common.Log.Trace("ID: % x", crypt.Id0) + + if len(hash) != 16 { + return U, ekey, errors.New("hash length not 16 bytes") + } + + ciph, err := rc4.NewCipher(ekey) + if err != nil { + return U, ekey, errors.New("failed rc4 ciph") + } + encrypted := make([]byte, 16) + ciph.XORKeyStream(encrypted, hash) + + // Do the following 19 times: Take the output from the previous + // invocation of the RC4 function and pass it as input to a new + // invocation of the function; use an encryption key generated by + // taking each byte of the original encryption key obtained in step + // (a) and performing an XOR (exclusive or) operation between that + // byte and the single-byte value of the iteration counter (from 1 to 19). + ekey2 := make([]byte, len(ekey)) + for i := 0; i < 19; i++ { + for j := 0; j < len(ekey); j++ { + ekey2[j] = ekey[j] ^ byte(i+1) + } + ciph, err = rc4.NewCipher(ekey2) + if err != nil { + return U, ekey, errors.New("failed rc4 ciph") + } + ciph.XORKeyStream(encrypted, encrypted) + common.Log.Trace("i = %d, ekey: % x", i, ekey2) + common.Log.Trace("i = %d -> % x", i, encrypted) + } + + bb := make([]byte, 32) + for i := 0; i < 16; i++ { + bb[i] = encrypted[i] + } + + // Append 16 bytes of arbitrary padding to the output from the final + // invocation of the RC4 function and store the 32-byte result as + // the value of the U entry in the encryption dictionary. + _, err = rand.Read(bb[16:32]) + if err != nil { + return U, ekey, errors.New("failed to gen rand number") + } + + U = PdfObjectString(bb) + return U, ekey, nil +} + +// Alg6 authenticates the user password. +// TODO (v3): Unexport. +func (crypt *PdfCrypt) Alg6(upass []byte) (bool, error) { + var uo PdfObjectString + var err error + var key []byte + if crypt.R == 2 { + uo, key, err = crypt.Alg4(upass) + } else if crypt.R >= 3 { + uo, key, err = crypt.Alg5(upass) + } else { + return false, errors.New("invalid R") + } + + if err != nil { + return false, err + } + + common.Log.Trace("check: % x == % x ?", string(uo), string(crypt.U)) + + uGen := string(uo) // Generated U from specified pass. + uDoc := string(crypt.U) // U from the document. + if crypt.R >= 3 { + // comparing on the first 16 bytes in the case of security + // handlers of revision 3 or greater), + if len(uGen) > 16 { + uGen = uGen[0:16] + } + if len(uDoc) > 16 { + uDoc = uDoc[0:16] + } + } + + if uGen == uDoc { + crypt.EncryptionKey = key + return true, nil + } + + return false, nil +} + +// Alg7 authenticates the owner password. +// TODO (v3): Unexport. +func (crypt *PdfCrypt) Alg7(opass []byte) (bool, error) { + encKey := crypt.alg3Key(opass) + + decrypted := make([]byte, len(crypt.O)) + if crypt.R == 2 { + ciph, err := rc4.NewCipher(encKey) + if err != nil { + return false, errors.New("failed cipher") + } + ciph.XORKeyStream(decrypted, crypt.O) + } else if crypt.R >= 3 { + s := append([]byte{}, crypt.O...) + for i := 0; i < 20; i++ { + //newKey := encKey + newKey := append([]byte{}, encKey...) + for j := 0; j < len(encKey); j++ { + newKey[j] ^= byte(19 - i) + } + ciph, err := rc4.NewCipher(newKey) + if err != nil { + return false, errors.New("failed cipher") + } + ciph.XORKeyStream(decrypted, s) + s = append([]byte{}, decrypted...) + } + } else { + return false, errors.New("invalid R") + } + + auth, err := crypt.Alg6(decrypted) + if err != nil { + return false, nil + } + + return auth, nil +} + +// GenerateParams generates encryption parameters for specified passwords. +// Can be called only for R>=5. +func (crypt *PdfCrypt) GenerateParams(upass, opass []byte) error { + if crypt.R < 5 { + // TODO(dennwc): move code for R<5 from PdfWriter.Encrypt + return errors.New("can be used only for R>=5") + } + crypt.EncryptionKey = make([]byte, 32) + if _, err := io.ReadFull(rand.Reader, crypt.EncryptionKey); err != nil { + return err + } + return crypt.generateR6(upass, opass) +} + +// generateR6 is the algorithm opposite to alg2a (R>=5). +// It generates U,O,UE,OE,Perms fields using AESv3 encryption. +// There is no algorithm number assigned to this function in the spec. +func (crypt *PdfCrypt) generateR6(upass, opass []byte) error { + // all these field will be populated by functions below + crypt.U = nil + crypt.O = nil + crypt.UE = nil + crypt.OE = nil + crypt.Perms = nil // populated only for R=6 + + if len(upass) > 127 { + upass = upass[:127] + } + if len(opass) > 127 { + opass = opass[:127] + } + // generate U and UE + if err := crypt.alg8(upass); err != nil { + return err + } + // generate O and OE + if err := crypt.alg9(opass); err != nil { + return err + } + if crypt.R == 5 { + return nil + } + // generate Perms + return crypt.alg10() +} + +// alg8 computes the encryption dictionary's U (user password) and UE (user encryption) values (R>=5). +// 7.6.4.4.6 Algorithm 8 (page 86) +func (crypt *PdfCrypt) alg8(upass []byte) error { + // step a: compute U (user password) + var rbuf [16]byte + if _, err := io.ReadFull(rand.Reader, rbuf[:]); err != nil { + return err + } + valSalt := rbuf[0:8] + keySalt := rbuf[8:16] + + str := make([]byte, len(upass)+len(valSalt)) + i := copy(str, upass) + i += copy(str[i:], valSalt) + + h := crypt.alg2b(str, upass, nil) + + U := make([]byte, len(h)+len(valSalt)+len(keySalt)) + i = copy(U, h[:32]) + i += copy(U[i:], valSalt) + i += copy(U[i:], keySalt) + + crypt.U = U + + // step b: compute UE (user encryption) + + // str still contains a password, reuse it + i = len(upass) + i += copy(str[i:], keySalt) + + h = crypt.alg2b(str, upass, nil) + + ac, err := aes.NewCipher(h[:32]) + if err != nil { + panic(err) + } + + iv := crypt.aesZeroIV() + cbc := cipher.NewCBCEncrypter(ac, iv) + UE := make([]byte, 32) + cbc.CryptBlocks(UE, crypt.EncryptionKey[:32]) + crypt.UE = UE + + return nil +} + +// alg9 computes the encryption dictionary's O (owner password) and OE (owner encryption) values (R>=5). +// 7.6.4.4.7 Algorithm 9 (page 86) +func (crypt *PdfCrypt) alg9(opass []byte) error { + // step a: compute O (owner password) + var rbuf [16]byte + if _, err := io.ReadFull(rand.Reader, rbuf[:]); err != nil { + return err + } + valSalt := rbuf[0:8] + keySalt := rbuf[8:16] + userKey := crypt.U[:48] + + str := make([]byte, len(opass)+len(valSalt)+len(userKey)) + i := copy(str, opass) + i += copy(str[i:], valSalt) + i += copy(str[i:], userKey) + + h := crypt.alg2b(str, opass, userKey) + + O := make([]byte, len(h)+len(valSalt)+len(keySalt)) + i = copy(O, h[:32]) + i += copy(O[i:], valSalt) + i += copy(O[i:], keySalt) + + crypt.O = O + + // step b: compute OE (owner encryption) + + // str still contains a password and a user key - reuse both, but overwrite the salt + i = len(opass) + i += copy(str[i:], keySalt) + // i += len(userKey) + + h = crypt.alg2b(str, opass, userKey) + + ac, err := aes.NewCipher(h[:32]) + if err != nil { + panic(err) + } + + iv := crypt.aesZeroIV() + cbc := cipher.NewCBCEncrypter(ac, iv) + OE := make([]byte, 32) + cbc.CryptBlocks(OE, crypt.EncryptionKey[:32]) + crypt.OE = OE + + return nil +} + +// alg10 computes the encryption dictionary's Perms (permissions) value (R=6). +// 7.6.4.4.8 Algorithm 10 (page 87) +func (crypt *PdfCrypt) alg10() error { + // step a: extend permissions to 64 bits + perms := uint64(uint32(crypt.P)) | (math.MaxUint32 << 32) + + // step b: record permissions + Perms := make([]byte, 16) + binary.LittleEndian.PutUint64(Perms[:8], perms) + + // step c: record EncryptMetadata + if crypt.EncryptMetadata { + Perms[8] = 'T' + } else { + Perms[8] = 'F' + } + + // step d: write "adb" magic + copy(Perms[9:12], "adb") + + // step e: write 4 bytes of random data + + // spec doesn't specify them as generated "from a strong random source", + // but we will use the cryptographic random generator anyway + if _, err := io.ReadFull(rand.Reader, Perms[12:16]); err != nil { + return err + } + + // step f: encrypt permissions + ac, err := aes.NewCipher(crypt.EncryptionKey[:32]) + if err != nil { + panic(err) + } + + ecb := newECBEncrypter(ac) + ecb.CryptBlocks(Perms, Perms) + + crypt.Perms = Perms[:16] + return nil +} + +// alg11 authenticates the user password (R >= 5) and returns the hash. +func (crypt *PdfCrypt) alg11(upass []byte) ([]byte, error) { + str := make([]byte, len(upass)+8) + i := copy(str, upass) + i += copy(str[i:], crypt.U[32:40]) // user Validation Salt + + h := crypt.alg2b(str, upass, nil) + h = h[:32] + if !bytes.Equal(h, crypt.U[:32]) { + return nil, nil + } + return h, nil +} + +// alg12 authenticates the owner password (R >= 5) and returns the hash. +// 7.6.4.4.10 Algorithm 12 (page 87) +func (crypt *PdfCrypt) alg12(opass []byte) ([]byte, error) { + str := make([]byte, len(opass)+8+48) + i := copy(str, opass) + i += copy(str[i:], crypt.O[32:40]) // owner Validation Salt + i += copy(str[i:], crypt.U[0:48]) + + h := crypt.alg2b(str, opass, crypt.U[0:48]) + h = h[:32] + if !bytes.Equal(h, crypt.O[:32]) { + return nil, nil + } + return h, nil +} + +// alg13 validates user permissions (P+EncryptMetadata vs Perms) for R=6. +// 7.6.4.4.11 Algorithm 13 (page 87) +func (crypt *PdfCrypt) alg13(fkey []byte) (bool, error) { + perms := make([]byte, 16) + copy(perms, crypt.Perms[:16]) + + ac, err := aes.NewCipher(fkey[:32]) + if err != nil { + panic(err) + } + + ecb := newECBDecrypter(ac) + ecb.CryptBlocks(perms, perms) + + if !bytes.Equal(perms[9:12], []byte("adb")) { + return false, errors.New("decoded permissions are invalid") + } + p := int(int32(binary.LittleEndian.Uint32(perms[0:4]))) + if p != crypt.P { + return false, errors.New("permissions validation failed") + } + encMeta := true + switch perms[8] { + case 'T': + encMeta = true + case 'F': + encMeta = false + default: + return false, errors.New("decoded metadata encryption flag is invalid") + } + + if encMeta != crypt.EncryptMetadata { + return false, errors.New("metadata encryption validation failed") + } + return true, nil +} diff --git a/internal/pdf/core/crypt_filters.go b/internal/pdf/core/crypt_filters.go new file mode 100644 index 0000000..67fdd4a --- /dev/null +++ b/internal/pdf/core/crypt_filters.go @@ -0,0 +1,265 @@ +package core + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/md5" + "crypto/rand" + "crypto/rc4" + "fmt" + "io" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +var ( + cryptMethods = make(map[string]cryptFilterMethod) +) + +// registerCryptFilterMethod registers a CFM. +func registerCryptFilterMethod(m cryptFilterMethod) { + cryptMethods[m.CFM()] = m +} + +// getCryptFilterMethod check if a CFM with a specified name is supported an returns its implementation. +func getCryptFilterMethod(name string) (cryptFilterMethod, error) { + f := cryptMethods[name] + if f == nil { + return nil, fmt.Errorf("unsupported crypt filter: %q", name) + } + return f, nil +} + +func init() { + // register supported crypt filter methods + registerCryptFilterMethod(cryptFilterV2{}) + registerCryptFilterMethod(cryptFilterAESV2{}) + registerCryptFilterMethod(cryptFilterAESV3{}) +} + +// cryptFilterMethod is a common interface for crypt filter methods. +type cryptFilterMethod interface { + // CFM returns a name of the filter that should be used in CFM field of Encrypt dictionary. + CFM() string + // MakeKey generates a object encryption key based on file encryption key and object numbers. + // Used only for legacy filters - AESV3 doesn't change the key for each object. + MakeKey(objNum, genNum uint32, fkey []byte) ([]byte, error) + // EncryptBytes encrypts a buffer using object encryption key, as returned by MakeKey. + // Implementation may reuse a buffer and encrypt data in-place. + EncryptBytes(p []byte, okey []byte) ([]byte, error) + // DecryptBytes decrypts a buffer using object encryption key, as returned by MakeKey. + // Implementation may reuse a buffer and decrypt data in-place. + DecryptBytes(p []byte, okey []byte) ([]byte, error) +} + +// makeKeyV2 is a common object key generation shared by V2 and AESV2 crypt filters. +func makeKeyV2(objNum, genNum uint32, ekey []byte, isAES bool) ([]byte, error) { + key := make([]byte, len(ekey)+5) + copy(key, ekey) + + for i := 0; i < 3; i++ { + b := byte((objNum >> uint32(8*i)) & 0xff) + key[i+len(ekey)] = b + } + for i := 0; i < 2; i++ { + b := byte((genNum >> uint32(8*i)) & 0xff) + key[i+len(ekey)+3] = b + } + if isAES { + // If using the AES algorithm, extend the encryption key an + // additional 4 bytes by adding the value “sAlT”, which + // corresponds to the hexadecimal values 0x73, 0x41, 0x6C, 0x54. + key = append(key, 0x73) + key = append(key, 0x41) + key = append(key, 0x6C) + key = append(key, 0x54) + } + + // Take the MD5. + h := md5.New() + h.Write(key) + hashb := h.Sum(nil) + + if len(ekey)+5 < 16 { + return hashb[0 : len(ekey)+5], nil + } + + return hashb, nil +} + +// cryptFilterV2 is a RC4-based filter +type cryptFilterV2 struct{} + +func (cryptFilterV2) CFM() string { + return CryptFilterV2 +} + +func (f cryptFilterV2) MakeKey(objNum, genNum uint32, ekey []byte) ([]byte, error) { + return makeKeyV2(objNum, genNum, ekey, false) +} + +func (cryptFilterV2) EncryptBytes(buf []byte, okey []byte) ([]byte, error) { + // Standard RC4 algorithm. + ciph, err := rc4.NewCipher(okey) + if err != nil { + return nil, err + } + common.Log.Trace("RC4 Encrypt: % x", buf) + ciph.XORKeyStream(buf, buf) + common.Log.Trace("to: % x", buf) + return buf, nil +} + +func (cryptFilterV2) DecryptBytes(buf []byte, okey []byte) ([]byte, error) { + // Standard RC4 algorithm. + ciph, err := rc4.NewCipher(okey) + if err != nil { + return nil, err + } + common.Log.Trace("RC4 Decrypt: % x", buf) + ciph.XORKeyStream(buf, buf) + common.Log.Trace("to: % x", buf) + return buf, nil +} + +// cryptFilterAES implements a generic AES encryption and decryption algorithm used by AESV2 and AESV3 filter methods. +type cryptFilterAES struct{} + +func (cryptFilterAES) EncryptBytes(buf []byte, okey []byte) ([]byte, error) { + // Strings and streams encrypted with AES shall use a padding + // scheme that is described in Internet RFC 2898, PKCS #5: + // Password-Based Cryptography Specification Version 2.0; see + // the Bibliography. For an original message length of M, + // the pad shall consist of 16 - (M mod 16) bytes whose value + // shall also be 16 - (M mod 16). + // + // A 9-byte message has a pad of 7 bytes, each with the value + // 0x07. The pad can be unambiguously removed to determine the + // original message length when decrypting. Note that the pad is + // present when M is evenly divisible by 16; it contains 16 bytes + // of 0x10. + + ciph, err := aes.NewCipher(okey) + if err != nil { + return nil, err + } + + common.Log.Trace("AES Encrypt (%d): % x", len(buf), buf) + + // If using the AES algorithm, the Cipher Block Chaining (CBC) + // mode, which requires an initialization vector, is used. The + // block size parameter is set to 16 bytes, and the initialization + // vector is a 16-byte random number that is stored as the first + // 16 bytes of the encrypted stream or string. + + const block = aes.BlockSize // 16 + + pad := block - len(buf)%block + for i := 0; i < pad; i++ { + buf = append(buf, byte(pad)) + } + common.Log.Trace("Padded to %d bytes", len(buf)) + + // Generate random 16 bytes, place in beginning of buffer. + ciphertext := make([]byte, block+len(buf)) + iv := ciphertext[:block] + if _, err := io.ReadFull(rand.Reader, iv); err != nil { + return nil, err + } + + mode := cipher.NewCBCEncrypter(ciph, iv) + mode.CryptBlocks(ciphertext[block:], buf) + + buf = ciphertext + common.Log.Trace("to (%d): % x", len(buf), buf) + + return buf, nil +} + +func (cryptFilterAES) DecryptBytes(buf []byte, okey []byte) ([]byte, error) { + // Strings and streams encrypted with AES shall use a padding + // scheme that is described in Internet RFC 2898, PKCS #5: + // Password-Based Cryptography Specification Version 2.0; see + // the Bibliography. For an original message length of M, + // the pad shall consist of 16 - (M mod 16) bytes whose value + // shall also be 16 - (M mod 16). + // + // A 9-byte message has a pad of 7 bytes, each with the value + // 0x07. The pad can be unambiguously removed to determine the + // original message length when decrypting. Note that the pad is + // present when M is evenly divisible by 16; it contains 16 bytes + // of 0x10. + + ciph, err := aes.NewCipher(okey) + if err != nil { + return nil, err + } + + // If using the AES algorithm, the Cipher Block Chaining (CBC) + // mode, which requires an initialization vector, is used. The + // block size parameter is set to 16 bytes, and the initialization + // vector is a 16-byte random number that is stored as the first + // 16 bytes of the encrypted stream or string. + if len(buf) < 16 { + common.Log.Debug("error AES invalid buf %s", buf) + return buf, fmt.Errorf("AES: Buf len < 16 (%d)", len(buf)) + } + + iv := buf[:16] + buf = buf[16:] + + if len(buf)%16 != 0 { + common.Log.Debug(" iv (%d): % x", len(iv), iv) + common.Log.Debug("buf (%d): % x", len(buf), buf) + return buf, fmt.Errorf("AES buf length not multiple of 16 (%d)", len(buf)) + } + + mode := cipher.NewCBCDecrypter(ciph, iv) + + common.Log.Trace("AES Decrypt (%d): % x", len(buf), buf) + common.Log.Trace("chop AES Decrypt (%d): % x", len(buf), buf) + mode.CryptBlocks(buf, buf) + common.Log.Trace("to (%d): % x", len(buf), buf) + + if len(buf) == 0 { + common.Log.Trace("Empty buf, returning empty string") + return buf, nil + } + + // The padded length is indicated by the last values. Remove those. + + padLen := int(buf[len(buf)-1]) + if padLen >= len(buf) { + common.Log.Debug("Illegal pad length") + return buf, fmt.Errorf("invalid pad length") + } + buf = buf[:len(buf)-padLen] + + return buf, nil +} + +// cryptFilterAESV2 is an AES-based filter (128 bit key, PDF 1.6) +type cryptFilterAESV2 struct { + cryptFilterAES +} + +func (cryptFilterAESV2) CFM() string { + return CryptFilterAESV2 +} + +func (cryptFilterAESV2) MakeKey(objNum, genNum uint32, ekey []byte) ([]byte, error) { + return makeKeyV2(objNum, genNum, ekey, true) +} + +// cryptFilterAESV3 is an AES-based filter (256 bit key, PDF 2.0) +type cryptFilterAESV3 struct { + cryptFilterAES +} + +func (cryptFilterAESV3) CFM() string { + return CryptFilterAESV3 +} + +func (cryptFilterAESV3) MakeKey(_, _ uint32, ekey []byte) ([]byte, error) { + return ekey, nil +} diff --git a/internal/pdf/core/ecb.go b/internal/pdf/core/ecb.go new file mode 100644 index 0000000..061544f --- /dev/null +++ b/internal/pdf/core/ecb.go @@ -0,0 +1,61 @@ +package core + +import "crypto/cipher" + +// ecb implements an Electronic Codebook encryption mode. +// This mode is used to compute or validate document permissions for R=6. +type ecb struct { + b cipher.Block + blockSize int +} + +func newECB(b cipher.Block) *ecb { + return &ecb{ + b: b, + blockSize: b.BlockSize(), + } +} + +type ecbEncrypter ecb + +func newECBEncrypter(b cipher.Block) cipher.BlockMode { + return (*ecbEncrypter)(newECB(b)) +} + +func (x *ecbEncrypter) BlockSize() int { return x.blockSize } + +func (x *ecbEncrypter) CryptBlocks(dst, src []byte) { + if len(src)%x.blockSize != 0 { + panic("crypto/cipher: input not full blocks") + } + if len(dst) < len(src) { + panic("crypto/cipher: output smaller than input") + } + for len(src) > 0 { + x.b.Encrypt(dst, src[:x.blockSize]) + src = src[x.blockSize:] + dst = dst[x.blockSize:] + } +} + +type ecbDecrypter ecb + +func newECBDecrypter(b cipher.Block) cipher.BlockMode { + return (*ecbDecrypter)(newECB(b)) +} + +func (x *ecbDecrypter) BlockSize() int { return x.blockSize } + +func (x *ecbDecrypter) CryptBlocks(dst, src []byte) { + if len(src)%x.blockSize != 0 { + panic("crypto/cipher: input not full blocks") + } + if len(dst) < len(src) { + panic("crypto/cipher: output smaller than input") + } + for len(src) > 0 { + x.b.Decrypt(dst, src[:x.blockSize]) + src = src[x.blockSize:] + dst = dst[x.blockSize:] + } +} diff --git a/internal/pdf/core/encoding.go b/internal/pdf/core/encoding.go new file mode 100644 index 0000000..c67c5a0 --- /dev/null +++ b/internal/pdf/core/encoding.go @@ -0,0 +1,1846 @@ +package core + +// Implement encoders for PDF. Currently supported: +// - Raw (Identity) +// - FlateDecode +// - LZW +// - DCT Decode (JPEG) +// - RunLength +// - ASCII Hex +// - ASCII85 +// - CCITT Fax (dummy) +// - JBIG2 (dummy) +// - JPX (dummy) + +import ( + "bytes" + "compress/zlib" + "encoding/hex" + "errors" + "fmt" + goimage "image" + gocolor "image/color" + "image/jpeg" + "io" + + // Need two slightly different implementations of LZW (EarlyChange parameter). + lzw0 "compress/lzw" + + lzw1 "golang.org/x/image/tiff/lzw" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +const ( + StreamEncodingFilterNameFlate = "FlateDecode" + StreamEncodingFilterNameLZW = "LZWDecode" + StreamEncodingFilterNameDCT = "DCTDecode" + StreamEncodingFilterNameRunLength = "RunLengthDecode" + StreamEncodingFilterNameASCIIHex = "ASCIIHexDecode" + StreamEncodingFilterNameASCII85 = "ASCII85Decode" + StreamEncodingFilterNameCCITTFax = "CCITTFaxDecode" + StreamEncodingFilterNameJBIG2 = "JBIG2Decode" + StreamEncodingFilterNameJPX = "JPXDecode" + StreamEncodingFilterNameRaw = "Raw" +) + +const ( + DefaultJPEGQuality = 75 +) + +type StreamEncoder interface { + GetFilterName() string + MakeDecodeParams() PdfObject + MakeStreamDict() *PdfObjectDictionary + + EncodeBytes(data []byte) ([]byte, error) + DecodeBytes(encoded []byte) ([]byte, error) + DecodeStream(streamObj *PdfObjectStream) ([]byte, error) +} + +// Flate encoding. +type FlateEncoder struct { + Predictor int + BitsPerComponent int + // For predictors + Columns int + Colors int +} + +// Make a new flate encoder with default parameters, predictor 1 and bits per component 8. +func NewFlateEncoder() *FlateEncoder { + encoder := &FlateEncoder{} + + // Default (No prediction) + encoder.Predictor = 1 + + // Currently only supporting 8. + encoder.BitsPerComponent = 8 + + encoder.Colors = 1 + encoder.Columns = 1 + + return encoder +} + +// Set the predictor function. Specify the number of columns per row. +// The columns indicates the number of samples per row. +// Used for grouping data together for compression. +func (en *FlateEncoder) SetPredictor(columns int) { + // Only supporting PNG sub predictor for encoding. + en.Predictor = 11 + en.Columns = columns +} + +func (*FlateEncoder) GetFilterName() string { + return StreamEncodingFilterNameFlate +} + +func (en *FlateEncoder) MakeDecodeParams() PdfObject { + if en.Predictor > 1 { + decodeParams := MakeDict() + decodeParams.Set("Predictor", MakeInteger(int64(en.Predictor))) + + // Only add if not default option. + if en.BitsPerComponent != 8 { + decodeParams.Set("BitsPerComponent", MakeInteger(int64(en.BitsPerComponent))) + } + if en.Columns != 1 { + decodeParams.Set("Columns", MakeInteger(int64(en.Columns))) + } + if en.Colors != 1 { + decodeParams.Set("Colors", MakeInteger(int64(en.Colors))) + } + return decodeParams + } + + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +// Has the Filter set and the DecodeParms. +func (en *FlateEncoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + dict.Set("Filter", MakeName(en.GetFilterName())) + + decodeParams := en.MakeDecodeParams() + if decodeParams != nil { + dict.Set("DecodeParms", decodeParams) + } + + return dict +} + +// Create a new flate decoder from a stream object, getting all the encoding parameters +// from the DecodeParms stream object dictionary entry. +func newFlateEncoderFromStream(streamObj *PdfObjectStream, decodeParams *PdfObjectDictionary) (*FlateEncoder, error) { + encoder := NewFlateEncoder() + + encDict := streamObj.PdfObjectDictionary + if encDict == nil { + // No encoding dictionary. + return encoder, nil + } + + // If decodeParams not provided, see if we can get from the stream. + if decodeParams == nil { + obj := TraceToDirectObject(encDict.Get("DecodeParms")) + if obj != nil { + if arr, isArr := obj.(*PdfObjectArray); isArr { + if len(*arr) != 1 { + common.Log.Debug("error: DecodeParms array length != 1 (%d)", len(*arr)) + return nil, errors.New("range check error") + } + obj = TraceToDirectObject((*arr)[0]) + } + + dp, isDict := obj.(*PdfObjectDictionary) + if !isDict { + common.Log.Debug("error: DecodeParms not a dictionary (%T)", obj) + return nil, fmt.Errorf("invalid DecodeParms") + } + decodeParams = dp + } + } + if decodeParams == nil { + // Can safely return here if no decode params, as the following depend on the decode params. + return encoder, nil + } + + common.Log.Trace("decode params: %s", decodeParams.String()) + obj := decodeParams.Get("Predictor") + if obj == nil { + common.Log.Debug("error: Predictor missing from DecodeParms - Continue with default (1)") + } else { + predictor, ok := obj.(*PdfObjectInteger) + if !ok { + common.Log.Debug("error: Predictor specified but not numeric (%T)", obj) + return nil, fmt.Errorf("invalid Predictor") + } + encoder.Predictor = int(*predictor) + } + + // Bits per component. Use default if not specified (8). + obj = decodeParams.Get("BitsPerComponent") + if obj != nil { + bpc, ok := obj.(*PdfObjectInteger) + if !ok { + common.Log.Debug("error: Invalid BitsPerComponent") + return nil, fmt.Errorf("invalid BitsPerComponent") + } + encoder.BitsPerComponent = int(*bpc) + } + + if encoder.Predictor > 1 { + // Columns. + encoder.Columns = 1 + obj = decodeParams.Get("Columns") + if obj != nil { + columns, ok := obj.(*PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor column invalid") + } + + encoder.Columns = int(*columns) + } + + // Colors. + // Number of interleaved color components per sample (Default 1 if not specified) + encoder.Colors = 1 + obj = decodeParams.Get("Colors") + if obj != nil { + colors, ok := obj.(*PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor colors not an integer") + } + encoder.Colors = int(*colors) + } + } + + return encoder, nil +} + +func (*FlateEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + common.Log.Trace("FlateDecode bytes") + + bufReader := bytes.NewReader(encoded) + r, err := zlib.NewReader(bufReader) + if err != nil { + common.Log.Debug("Decoding error %v\n", err) + common.Log.Debug("Stream (%d) % x", len(encoded), encoded) + return nil, err + } + defer r.Close() + + var outBuf bytes.Buffer + outBuf.ReadFrom(r) + + common.Log.Trace("En: % x\n", encoded) + common.Log.Trace("De: % x\n", outBuf.Bytes()) + + return outBuf.Bytes(), nil +} + +// Decode a FlateEncoded stream object and give back decoded bytes. +func (en *FlateEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + // TODO: Handle more filter bytes and support more values of BitsPerComponent. + + common.Log.Trace("FlateDecode stream") + common.Log.Trace("Predictor: %d", en.Predictor) + if en.BitsPerComponent != 8 { + return nil, fmt.Errorf("invalid BitsPerComponent=%d (only 8 supported)", en.BitsPerComponent) + } + + outData, err := en.DecodeBytes(streamObj.Stream) + if err != nil { + return nil, err + } + common.Log.Trace("En: % x\n", streamObj.Stream) + common.Log.Trace("De: % x\n", outData) + + if en.Predictor > 1 { + if en.Predictor == 2 { // TIFF encoding: Needs some tests. + common.Log.Trace("Tiff encoding") + common.Log.Trace("Colors: %d", en.Colors) + + rowLength := int(en.Columns) * en.Colors + if rowLength < 1 { + // No data. Return empty set. + return []byte{}, nil + } + rows := len(outData) / rowLength + if len(outData)%rowLength != 0 { + common.Log.Debug("error: TIFF encoding: Invalid row length...") + return nil, fmt.Errorf("invalid row length (%d/%d)", len(outData), rowLength) + } + if rowLength%en.Colors != 0 { + return nil, fmt.Errorf("invalid row length (%d) for colors %d", rowLength, en.Colors) + } + if rowLength > len(outData) { + common.Log.Debug("Row length cannot be longer than data length (%d/%d)", rowLength, len(outData)) + return nil, errors.New("range check error") + } + common.Log.Trace("inp outData (%d): % x", len(outData), outData) + + pOutBuffer := bytes.NewBuffer(nil) + + // 0-255 -255 255 ; 0-255=-255; + for i := 0; i < rows; i++ { + rowData := outData[rowLength*i : rowLength*(i+1)] + // Predicts the same as the sample to the left. + // Interleaved by colors. + for j := en.Colors; j < rowLength; j++ { + rowData[j] = byte(int(rowData[j]+rowData[j-en.Colors]) % 256) + } + pOutBuffer.Write(rowData) + } + pOutData := pOutBuffer.Bytes() + common.Log.Trace("POutData (%d): % x", len(pOutData), pOutData) + return pOutData, nil + } else if en.Predictor >= 10 && en.Predictor <= 15 { + common.Log.Trace("PNG Encoding") + // Columns represents the number of samples per row; Each sample can contain multiple color + // components. + rowLength := int(en.Columns*en.Colors + 1) // 1 byte to specify predictor algorithms per row. + rows := len(outData) / rowLength + if len(outData)%rowLength != 0 { + return nil, fmt.Errorf("invalid row length (%d/%d)", len(outData), rowLength) + } + if rowLength > len(outData) { + common.Log.Debug("Row length cannot be longer than data length (%d/%d)", rowLength, len(outData)) + return nil, errors.New("range check error") + } + + pOutBuffer := bytes.NewBuffer(nil) + + common.Log.Trace("Predictor columns: %d", en.Columns) + common.Log.Trace("Length: %d / %d = %d rows", len(outData), rowLength, rows) + prevRowData := make([]byte, rowLength) + for i := 0; i < rowLength; i++ { + prevRowData[i] = 0 + } + + for i := 0; i < rows; i++ { + rowData := outData[rowLength*i : rowLength*(i+1)] + + fb := rowData[0] + switch fb { + case 0: + // No prediction. (No operation). + case 1: + // Sub: Predicts the same as the sample to the left. + for j := 2; j < rowLength; j++ { + rowData[j] = byte(int(rowData[j]+rowData[j-1]) % 256) + } + case 2: + // Up: Predicts the same as the sample above + for j := 1; j < rowLength; j++ { + rowData[j] = byte(int(rowData[j]+prevRowData[j]) % 256) + } + case 3: + // Avg: Predicts the same as the average of the sample to the left and above. + for j := 1; j < rowLength; j++ { + if j == 1 { + rowData[j] = byte(int(rowData[j]+prevRowData[j]) % 256) + } else { + avg := (rowData[j-1] + prevRowData[j]) / 2 + rowData[j] = byte(int(rowData[j]+avg) % 256) + } + } + case 4: + // Paeth: a nonlinear function of the sample above, the sample to the left and the sample + // to the upper left. + for j := 2; j < rowLength; j++ { + a := rowData[j-1] // left + b := prevRowData[j] // above + c := prevRowData[j-1] // upper left + + p := int(a + b - c) + pa := absInt(p - int(a)) + pb := absInt(p - int(b)) + pc := absInt(p - int(c)) + + if pa <= pb && pa <= pc { + // Use a (left). + rowData[j] = byte(int(rowData[j]+a) % 256) + } else if pb <= pc { + // Use b (upper). + rowData[j] = byte(int(rowData[j]+b) % 256) + } else { + // Use c (upper left). + rowData[j] = byte(int(rowData[j]+c) % 256) + } + } + + default: + common.Log.Debug("error: Invalid filter byte (%d) @row %d", fb, i) + return nil, fmt.Errorf("invalid filter byte (%d)", fb) + } + + for i := 0; i < rowLength; i++ { + prevRowData[i] = rowData[i] + } + pOutBuffer.Write(rowData[1:]) + } + pOutData := pOutBuffer.Bytes() + return pOutData, nil + } else { + common.Log.Debug("error: Unsupported predictor (%d)", en.Predictor) + return nil, fmt.Errorf("unsupported predictor (%d)", en.Predictor) + } + } + + return outData, nil +} + +// Encode a bytes array and return the encoded value based on the encoder parameters. +func (en *FlateEncoder) EncodeBytes(data []byte) ([]byte, error) { + if en.Predictor != 1 && en.Predictor != 11 { + common.Log.Debug("Encoding error: FlateEncoder Predictor = 1, 11 only supported") + return nil, ErrUnsupportedEncodingParameters + } + + if en.Predictor == 11 { + // The length of each output row in number of samples. + // N.B. Each output row has one extra sample as compared to the input to indicate the + // predictor type. + rowLength := int(en.Columns) + rows := len(data) / rowLength + if len(data)%rowLength != 0 { + common.Log.Error("invalid column length") + return nil, errors.New("invalid row length") + } + + pOutBuffer := bytes.NewBuffer(nil) + + tmpData := make([]byte, rowLength) + + for i := 0; i < rows; i++ { + rowData := data[rowLength*i : rowLength*(i+1)] + + // PNG SUB method. + // Sub: Predicts the same as the sample to the left. + tmpData[0] = rowData[0] + for j := 1; j < rowLength; j++ { + tmpData[j] = byte(int(rowData[j]-rowData[j-1]) % 256) + } + + pOutBuffer.WriteByte(1) // sub method + pOutBuffer.Write(tmpData) + } + + data = pOutBuffer.Bytes() + } + + var b bytes.Buffer + w := zlib.NewWriter(&b) + w.Write(data) + w.Close() + + return b.Bytes(), nil +} + +// LZW encoding/decoding functionality. +type LZWEncoder struct { + Predictor int + BitsPerComponent int + // For predictors + Columns int + Colors int + // LZW algorithm setting. + EarlyChange int +} + +// Make a new LZW encoder with default parameters. +func NewLZWEncoder() *LZWEncoder { + encoder := &LZWEncoder{} + + // Default (No prediction) + encoder.Predictor = 1 + + // Currently only supporting 8. + encoder.BitsPerComponent = 8 + + encoder.Colors = 1 + encoder.Columns = 1 + encoder.EarlyChange = 1 + + return encoder +} + +func (*LZWEncoder) GetFilterName() string { + return StreamEncodingFilterNameLZW +} + +func (en *LZWEncoder) MakeDecodeParams() PdfObject { + if en.Predictor > 1 { + decodeParams := MakeDict() + decodeParams.Set("Predictor", MakeInteger(int64(en.Predictor))) + + // Only add if not default option. + if en.BitsPerComponent != 8 { + decodeParams.Set("BitsPerComponent", MakeInteger(int64(en.BitsPerComponent))) + } + if en.Columns != 1 { + decodeParams.Set("Columns", MakeInteger(int64(en.Columns))) + } + if en.Colors != 1 { + decodeParams.Set("Colors", MakeInteger(int64(en.Colors))) + } + return decodeParams + } + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +// Has the Filter set and the DecodeParms. +func (en *LZWEncoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + + dict.Set("Filter", MakeName(en.GetFilterName())) + + decodeParams := en.MakeDecodeParams() + if decodeParams != nil { + dict.Set("DecodeParms", decodeParams) + } + + dict.Set("EarlyChange", MakeInteger(int64(en.EarlyChange))) + + return dict +} + +// Create a new LZW encoder/decoder from a stream object, getting all the encoding parameters +// from the DecodeParms stream object dictionary entry. +func newLZWEncoderFromStream(streamObj *PdfObjectStream, decodeParams *PdfObjectDictionary) (*LZWEncoder, error) { + // Start with default settings. + encoder := NewLZWEncoder() + + encDict := streamObj.PdfObjectDictionary + if encDict == nil { + // No encoding dictionary. + return encoder, nil + } + + // If decodeParams not provided, see if we can get from the stream. + if decodeParams == nil { + obj := encDict.Get("DecodeParms") + if obj != nil { + if dp, isDict := obj.(*PdfObjectDictionary); isDict { + decodeParams = dp + } else if a, isArr := obj.(*PdfObjectArray); isArr { + if len(*a) == 1 { + if dp, isDict := (*a)[0].(*PdfObjectDictionary); isDict { + decodeParams = dp + } + } + } + if decodeParams == nil { + common.Log.Error("DecodeParms not a dictionary %#v", obj) + return nil, fmt.Errorf("invalid DecodeParms") + } + } + } + + // The EarlyChange indicates when to increase code length, as different + // implementations use a different mechanisms. Essentially this chooses + // which LZW implementation to use. + // The default is 1 (one code early) + obj := encDict.Get("EarlyChange") + if obj != nil { + earlyChange, ok := obj.(*PdfObjectInteger) + if !ok { + common.Log.Debug("error: EarlyChange specified but not numeric (%T)", obj) + return nil, fmt.Errorf("invalid EarlyChange") + } + if *earlyChange != 0 && *earlyChange != 1 { + return nil, fmt.Errorf("invalid EarlyChange value (not 0 or 1)") + } + + encoder.EarlyChange = int(*earlyChange) + } else { + encoder.EarlyChange = 1 // default + } + + if decodeParams == nil { + // No decode parameters. Can safely return here if not set as the following options + // are related to the decode Params. + return encoder, nil + } + + obj = decodeParams.Get("Predictor") + if obj != nil { + predictor, ok := obj.(*PdfObjectInteger) + if !ok { + common.Log.Debug("error: Predictor specified but not numeric (%T)", obj) + return nil, fmt.Errorf("invalid Predictor") + } + encoder.Predictor = int(*predictor) + } + + // Bits per component. Use default if not specified (8). + obj = decodeParams.Get("BitsPerComponent") + if obj != nil { + bpc, ok := obj.(*PdfObjectInteger) + if !ok { + common.Log.Debug("error: Invalid BitsPerComponent") + return nil, fmt.Errorf("invalid BitsPerComponent") + } + encoder.BitsPerComponent = int(*bpc) + } + + if encoder.Predictor > 1 { + // Columns. + encoder.Columns = 1 + obj = decodeParams.Get("Columns") + if obj != nil { + columns, ok := obj.(*PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor column invalid") + } + + encoder.Columns = int(*columns) + } + + // Colors. + // Number of interleaved color components per sample (Default 1 if not specified) + encoder.Colors = 1 + obj = decodeParams.Get("Colors") + if obj != nil { + colors, ok := obj.(*PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("predictor colors not an integer") + } + encoder.Colors = int(*colors) + } + } + + common.Log.Trace("decode params: %s", decodeParams.String()) + return encoder, nil +} + +func (en *LZWEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + var outBuf bytes.Buffer + bufReader := bytes.NewReader(encoded) + + var r io.ReadCloser + if en.EarlyChange == 1 { + // LZW implementation with code length increases one code early (1). + r = lzw1.NewReader(bufReader, lzw1.MSB, 8) + } else { + // 0: LZW implementation with postponed code length increases (0). + r = lzw0.NewReader(bufReader, lzw0.MSB, 8) + } + defer r.Close() + + _, err := outBuf.ReadFrom(r) + if err != nil { + return nil, err + } + + return outBuf.Bytes(), nil +} + +func (en *LZWEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + // Revamp this support to handle TIFF predictor (2). + // Also handle more filter bytes and check + // BitsPerComponent. Default value is 8, currently we are only + // supporting that one. + + common.Log.Trace("LZW Decoding") + common.Log.Trace("Predictor: %d", en.Predictor) + + outData, err := en.DecodeBytes(streamObj.Stream) + if err != nil { + return nil, err + } + + common.Log.Trace(" IN: (%d) % x", len(streamObj.Stream), streamObj.Stream) + common.Log.Trace("OUT: (%d) % x", len(outData), outData) + + if en.Predictor > 1 { + if en.Predictor == 2 { // TIFF encoding: Needs some tests. + common.Log.Trace("Tiff encoding") + + rowLength := int(en.Columns) * en.Colors + if rowLength < 1 { + // No data. Return empty set. + return []byte{}, nil + } + + rows := len(outData) / rowLength + if len(outData)%rowLength != 0 { + common.Log.Debug("error: TIFF encoding: Invalid row length...") + return nil, fmt.Errorf("invalid row length (%d/%d)", len(outData), rowLength) + } + + if rowLength%en.Colors != 0 { + return nil, fmt.Errorf("invalid row length (%d) for colors %d", rowLength, en.Colors) + } + + if rowLength > len(outData) { + common.Log.Debug("Row length cannot be longer than data length (%d/%d)", rowLength, len(outData)) + return nil, errors.New("range check error") + } + common.Log.Trace("inp outData (%d): % x", len(outData), outData) + + pOutBuffer := bytes.NewBuffer(nil) + + // 0-255 -255 255 ; 0-255=-255; + for i := 0; i < rows; i++ { + rowData := outData[rowLength*i : rowLength*(i+1)] + // Predicts the same as the sample to the left. + // Interleaved by colors. + for j := en.Colors; j < rowLength; j++ { + rowData[j] = byte(int(rowData[j]+rowData[j-en.Colors]) % 256) + } + // GH: Appears that this is not working as expected... + + pOutBuffer.Write(rowData) + } + pOutData := pOutBuffer.Bytes() + common.Log.Trace("POutData (%d): % x", len(pOutData), pOutData) + return pOutData, nil + } else if en.Predictor >= 10 && en.Predictor <= 15 { + common.Log.Trace("PNG Encoding") + // Columns represents the number of samples per row; Each sample can contain multiple color + // components. + rowLength := int(en.Columns*en.Colors + 1) // 1 byte to specify predictor algorithms per row. + if rowLength < 1 { + // No data. Return empty set. + return []byte{}, nil + } + rows := len(outData) / rowLength + if len(outData)%rowLength != 0 { + return nil, fmt.Errorf("invalid row length (%d/%d)", len(outData), rowLength) + } + if rowLength > len(outData) { + common.Log.Debug("Row length cannot be longer than data length (%d/%d)", rowLength, len(outData)) + return nil, errors.New("range check error") + } + + pOutBuffer := bytes.NewBuffer(nil) + + common.Log.Trace("Predictor columns: %d", en.Columns) + common.Log.Trace("Length: %d / %d = %d rows", len(outData), rowLength, rows) + prevRowData := make([]byte, rowLength) + for i := 0; i < rowLength; i++ { + prevRowData[i] = 0 + } + + for i := 0; i < rows; i++ { + rowData := outData[rowLength*i : rowLength*(i+1)] + + fb := rowData[0] + switch fb { + case 0: + // No prediction. (No operation). + case 1: + // Sub: Predicts the same as the sample to the left. + for j := 2; j < rowLength; j++ { + rowData[j] = byte(int(rowData[j]+rowData[j-1]) % 256) + } + case 2: + // Up: Predicts the same as the sample above + for j := 1; j < rowLength; j++ { + rowData[j] = byte(int(rowData[j]+prevRowData[j]) % 256) + } + default: + common.Log.Debug("error: Invalid filter byte (%d)", fb) + return nil, fmt.Errorf("invalid filter byte (%d)", fb) + } + + for i := 0; i < rowLength; i++ { + prevRowData[i] = rowData[i] + } + pOutBuffer.Write(rowData[1:]) + } + pOutData := pOutBuffer.Bytes() + return pOutData, nil + } else { + common.Log.Debug("error: Unsupported predictor (%d)", en.Predictor) + return nil, fmt.Errorf("unsupported predictor (%d)", en.Predictor) + } + } + + return outData, nil +} + +// Support for encoding LZW. Currently not supporting predictors (raw compressed data only). +// Only supports the Early change = 1 algorithm (compress/lzw) as the other implementation +// does not have a write method. +// TODO: Consider refactoring compress/lzw to allow both. +func (en *LZWEncoder) EncodeBytes(data []byte) ([]byte, error) { + if en.Predictor != 1 { + return nil, fmt.Errorf("LZW Predictor = 1 only supported yet") + } + + if en.EarlyChange == 1 { + return nil, fmt.Errorf("LZW Early Change = 0 only supported yet") + } + + var b bytes.Buffer + w := lzw0.NewWriter(&b, lzw0.MSB, 8) + w.Write(data) + w.Close() + + return b.Bytes(), nil +} + +// DCT (JPG) encoding/decoding functionality for images. +type DCTEncoder struct { + ColorComponents int // 1 (gray), 3 (rgb), 4 (cmyk) + BitsPerComponent int // 8 or 16 bit + Width int + Height int + Quality int +} + +// Make a new DCT encoder with default parameters. +func NewDCTEncoder() *DCTEncoder { + encoder := &DCTEncoder{} + + encoder.ColorComponents = 3 + encoder.BitsPerComponent = 8 + + encoder.Quality = DefaultJPEGQuality + + return encoder +} + +func (*DCTEncoder) GetFilterName() string { + return StreamEncodingFilterNameDCT +} + +func (*DCTEncoder) MakeDecodeParams() PdfObject { + // Does not have decode params. + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +// Has the Filter set. Some other parameters are generated elsewhere. +func (en *DCTEncoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + + dict.Set("Filter", MakeName(en.GetFilterName())) + + return dict +} + +// Create a new DCT encoder/decoder from a stream object, getting all the encoding parameters +// from the stream object dictionary entry and the image data itself. +// TODO: Support if used with other filters [ASCII85Decode FlateDecode DCTDecode]... +// need to apply the other filters prior to this one... +func newDCTEncoderFromStream(streamObj *PdfObjectStream, multiEnc *MultiEncoder) (*DCTEncoder, error) { + // Start with default settings. + encoder := NewDCTEncoder() + + encDict := streamObj.PdfObjectDictionary + if encDict == nil { + // No encoding dictionary. + return encoder, nil + } + + // If using DCTDecode in combination with other filters, make sure to decode that first... + encoded := streamObj.Stream + if multiEnc != nil { + e, err := multiEnc.DecodeBytes(encoded) + if err != nil { + return nil, err + } + encoded = e + + } + + bufReader := bytes.NewReader(encoded) + + cfg, err := jpeg.DecodeConfig(bufReader) + //img, _, err := goimage.Decode(bufReader) + if err != nil { + common.Log.Debug("error decoding file: %s", err) + return nil, err + } + + switch cfg.ColorModel { + case gocolor.RGBAModel: + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 3 // alpha is not included in pdf. + case gocolor.RGBA64Model: + encoder.BitsPerComponent = 16 + encoder.ColorComponents = 3 + case gocolor.GrayModel: + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 1 + case gocolor.Gray16Model: + encoder.BitsPerComponent = 16 + encoder.ColorComponents = 1 + case gocolor.CMYKModel: + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 4 + case gocolor.YCbCrModel: + // YCbCr is not supported by PDF, but it could be a different colorspace + // with 3 components. Would be specified by the ColorSpace entry. + encoder.BitsPerComponent = 8 + encoder.ColorComponents = 3 + default: + return nil, errors.New("unsupported color model") + } + encoder.Width = cfg.Width + encoder.Height = cfg.Height + common.Log.Trace("DCT Encoder: %+v", encoder) + encoder.Quality = DefaultJPEGQuality + + return encoder, nil +} + +func (en *DCTEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + bufReader := bytes.NewReader(encoded) + //img, _, err := goimage.Decode(bufReader) + img, err := jpeg.Decode(bufReader) + if err != nil { + common.Log.Debug("error decoding image: %s", err) + return nil, err + } + bounds := img.Bounds() + + var decoded = make([]byte, bounds.Dx()*bounds.Dy()*en.ColorComponents*en.BitsPerComponent/8) + index := 0 + + for j := bounds.Min.Y; j < bounds.Max.Y; j++ { + for i := bounds.Min.X; i < bounds.Max.X; i++ { + color := img.At(i, j) + + // Gray scale. + switch en.ColorComponents { + case 1: + if en.BitsPerComponent == 16 { + // Gray - 16 bit. + val, ok := color.(gocolor.Gray16) + if !ok { + return nil, errors.New("color type error") + } + decoded[index] = byte((val.Y >> 8) & 0xff) + index++ + decoded[index] = byte(val.Y & 0xff) + index++ + } else { + // Gray - 8 bit. + val, ok := color.(gocolor.Gray) + if !ok { + return nil, errors.New("color type error") + } + decoded[index] = byte(val.Y & 0xff) + index++ + } + case 3: + if en.BitsPerComponent == 16 { + val, ok := color.(gocolor.RGBA64) + if !ok { + return nil, errors.New("color type error") + } + decoded[index] = byte((val.R >> 8) & 0xff) + index++ + decoded[index] = byte(val.R & 0xff) + index++ + decoded[index] = byte((val.G >> 8) & 0xff) + index++ + decoded[index] = byte(val.G & 0xff) + index++ + decoded[index] = byte((val.B >> 8) & 0xff) + index++ + decoded[index] = byte(val.B & 0xff) + index++ + } else { + // RGB - 8 bit. + val, isRGB := color.(gocolor.RGBA) + if isRGB { + decoded[index] = val.R & 0xff + index++ + decoded[index] = val.G & 0xff + index++ + decoded[index] = val.B & 0xff + index++ + } else { + // Hack around YCbCr from go jpeg package. + val, ok := color.(gocolor.YCbCr) + if !ok { + return nil, errors.New("color type error") + } + r, g, b, _ := val.RGBA() + // The fact that we cannot use the Y, Cb, Cr values directly, + // indicates that either the jpeg package is converting the raw + // data into YCbCr with some kind of mapping, or that the original + // data is not in R,G,B... + // XXX: This is not good as it means we end up with R, G, B... even + // if the original colormap was different. Unless calling the RGBA() + // call exactly reverses the previous conversion to YCbCr (even if + // real data is not rgb)... ? + // TODO: Test more. Consider whether we need to implement our own jpeg filter. + decoded[index] = byte(r >> 8) //byte(val.Y & 0xff) + index++ + decoded[index] = byte(g >> 8) //val.Cb & 0xff) + index++ + decoded[index] = byte(b >> 8) //val.Cr & 0xff) + index++ + } + } + case 4: + // CMYK - 8 bit. + val, ok := color.(gocolor.CMYK) + if !ok { + return nil, errors.New("color type error") + } + // TODO: Is the inversion not handled right in the JPEG package for APP14? + // Should not need to invert here... + decoded[index] = 255 - val.C&0xff + index++ + decoded[index] = 255 - val.M&0xff + index++ + decoded[index] = 255 - val.Y&0xff + index++ + decoded[index] = 255 - val.K&0xff + index++ + } + } + } + + return decoded, nil +} + +func (en *DCTEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + return en.DecodeBytes(streamObj.Stream) +} + +type DrawableImage interface { + ColorModel() gocolor.Model + Bounds() goimage.Rectangle + At(x, y int) gocolor.Color + Set(x, y int, c gocolor.Color) +} + +func (en *DCTEncoder) EncodeBytes(data []byte) ([]byte, error) { + bounds := goimage.Rect(0, 0, en.Width, en.Height) + var img DrawableImage + switch en.ColorComponents { + case 1: + if en.BitsPerComponent == 16 { + img = goimage.NewGray16(bounds) + } else { + img = goimage.NewGray(bounds) + } + case 3: + if en.BitsPerComponent == 16 { + img = goimage.NewRGBA64(bounds) + } else { + img = goimage.NewRGBA(bounds) + } + case 4: + img = goimage.NewCMYK(bounds) + default: + return nil, errors.New("unsupported") + + } + + // Draw the data on the image.. + x := 0 + y := 0 + bytesPerColor := en.ColorComponents * en.BitsPerComponent / 8 + for i := 0; i+bytesPerColor-1 < len(data); i += bytesPerColor { + var c gocolor.Color + switch en.ColorComponents { + case 1: + if en.BitsPerComponent == 16 { + val := uint16(data[i])<<8 | uint16(data[i+1]) + c = gocolor.Gray16{val} + } else { + val := uint8(data[i] & 0xff) + c = gocolor.Gray{val} + } + case 3: + if en.BitsPerComponent == 16 { + r := uint16(data[i])<<8 | uint16(data[i+1]) + g := uint16(data[i+2])<<8 | uint16(data[i+3]) + b := uint16(data[i+4])<<8 | uint16(data[i+5]) + c = gocolor.RGBA64{R: r, G: g, B: b, A: 0} + } else { + r := uint8(data[i] & 0xff) + g := uint8(data[i+1] & 0xff) + b := uint8(data[i+2] & 0xff) + c = gocolor.RGBA{R: r, G: g, B: b, A: 0} + } + case 4: + c1 := uint8(data[i] & 0xff) + m1 := uint8(data[i+1] & 0xff) + y1 := uint8(data[i+2] & 0xff) + k1 := uint8(data[i+3] & 0xff) + c = gocolor.CMYK{C: c1, M: m1, Y: y1, K: k1} + } + + img.Set(x, y, c) + x++ + if x == en.Width { + x = 0 + y++ + } + } + + // The quality is specified from 0-100 (with 100 being the best quality) in the DCT structure. + // N.B. even 100 is lossy, as still is transformed, but as good as it gets for DCT. + // This is not related to the DPI, but rather inherent transformation losses. + + opt := jpeg.Options{} + opt.Quality = en.Quality + + var buf bytes.Buffer + err := jpeg.Encode(&buf, img, &opt) + if err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +// Run length encoding. +type RunLengthEncoder struct { +} + +// Make a new run length encoder +func NewRunLengthEncoder() *RunLengthEncoder { + return &RunLengthEncoder{} +} + +func (*RunLengthEncoder) GetFilterName() string { + return StreamEncodingFilterNameRunLength +} + +// Create a new run length decoder from a stream object. +func newRunLengthEncoderFromStream() (*RunLengthEncoder, error) { + return NewRunLengthEncoder(), nil +} + +/* +7.4.5 RunLengthDecode Filter +The RunLengthDecode filter decodes data that has been encoded in a simple byte-oriented format based on run length. +The encoded data shall be a sequence of runs, where each run shall consist of a length byte followed by 1 to 128 +bytes of data. If the length byte is in the range 0 to 127, the following length + 1 (1 to 128) bytes shall be +copied literally during decompression. If length is in the range 129 to 255, the following single byte shall be +copied 257 - length (2 to 128) times during decompression. A length value of 128 shall denote EOD. +*/ +func (*RunLengthEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + bufReader := bytes.NewReader(encoded) + inb := []byte{} + for { + b, err := bufReader.ReadByte() + if err != nil { + return nil, err + } + if b > 128 { + v, err := bufReader.ReadByte() + if err != nil { + return nil, err + } + for i := 0; i < 257-int(b); i++ { + inb = append(inb, v) + } + } else if b < 128 { + for i := 0; i < int(b)+1; i++ { + v, err := bufReader.ReadByte() + if err != nil { + return nil, err + } + inb = append(inb, v) + } + } else { + break + } + } + + return inb, nil +} + +// Decode RunLengthEncoded stream object and give back decoded bytes. +func (en *RunLengthEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + return en.DecodeBytes(streamObj.Stream) +} + +// Encode a bytes array and return the encoded value based on the encoder parameters. +func (*RunLengthEncoder) EncodeBytes(data []byte) ([]byte, error) { + bufReader := bytes.NewReader(data) + inb := []byte{} + literal := []byte{} + + b0, err := bufReader.ReadByte() + if err == io.EOF { + return []byte{}, nil + } else if err != nil { + return nil, err + } + runLen := 1 + + for { + b, err := bufReader.ReadByte() + if err == io.EOF { + break + } else if err != nil { + return nil, err + } + + if b == b0 { + if len(literal) > 0 { + literal = literal[:len(literal)-1] + if len(literal) > 0 { + inb = append(inb, byte(len(literal)-1)) + inb = append(inb, literal...) + } + runLen = 1 + literal = []byte{} + } + runLen++ + if runLen >= 127 { + inb = append(inb, byte(257-runLen), b0) + runLen = 0 + } + + } else { + if runLen > 0 { + if runLen == 1 { + literal = []byte{b0} + } else { + inb = append(inb, byte(257-runLen), b0) + } + + runLen = 0 + } + literal = append(literal, b) + if len(literal) >= 127 { + inb = append(inb, byte(len(literal)-1)) + inb = append(inb, literal...) + literal = []byte{} + } + } + b0 = b + } + + if len(literal) > 0 { + inb = append(inb, byte(len(literal)-1)) + inb = append(inb, literal...) + } else if runLen > 0 { + inb = append(inb, byte(257-runLen), b0) + } + inb = append(inb, 128) + return inb, nil +} + +func (*RunLengthEncoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (en *RunLengthEncoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + dict.Set("Filter", MakeName(en.GetFilterName())) + return dict +} + +// /// +// ASCII hex encoder/decoder. +type ASCIIHexEncoder struct { +} + +// Make a new ASCII hex encoder. +func NewASCIIHexEncoder() *ASCIIHexEncoder { + encoder := &ASCIIHexEncoder{} + return encoder +} + +func (*ASCIIHexEncoder) GetFilterName() string { + return StreamEncodingFilterNameASCIIHex +} + +func (*ASCIIHexEncoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (en *ASCIIHexEncoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + dict.Set("Filter", MakeName(en.GetFilterName())) + return dict +} + +func (*ASCIIHexEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + bufReader := bytes.NewReader(encoded) + inb := []byte{} + for { + b, err := bufReader.ReadByte() + if err != nil { + return nil, err + } + if b == '>' { + break + } + if IsWhiteSpace(b) { + continue + } + if (b >= 'a' && b <= 'f') || (b >= 'A' && b <= 'F') || (b >= '0' && b <= '9') { + inb = append(inb, b) + } else { + common.Log.Debug("error: Invalid ascii hex character (%c)", b) + return nil, fmt.Errorf("invalid ascii hex character (%c)", b) + } + } + if len(inb)%2 == 1 { + inb = append(inb, '0') + } + common.Log.Trace("Inbound %s", inb) + outb := make([]byte, hex.DecodedLen(len(inb))) + _, err := hex.Decode(outb, inb) + if err != nil { + return nil, err + } + return outb, nil +} + +// ASCII hex decoding. +func (en *ASCIIHexEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + return en.DecodeBytes(streamObj.Stream) +} + +func (*ASCIIHexEncoder) EncodeBytes(data []byte) ([]byte, error) { + var encoded bytes.Buffer + + for _, b := range data { + encoded.WriteString(fmt.Sprintf("%.2X ", b)) + } + encoded.WriteByte('>') + + return encoded.Bytes(), nil +} + +// ASCII85 encoder/decoder. +type ASCII85Encoder struct { +} + +// Make a new ASCII85 encoder. +func NewASCII85Encoder() *ASCII85Encoder { + encoder := &ASCII85Encoder{} + return encoder +} + +func (*ASCII85Encoder) GetFilterName() string { + return StreamEncodingFilterNameASCII85 +} + +func (*ASCII85Encoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (en *ASCII85Encoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + dict.Set("Filter", MakeName(en.GetFilterName())) + return dict +} + +// 5 ASCII characters -> 4 raw binary bytes +func (*ASCII85Encoder) DecodeBytes(encoded []byte) ([]byte, error) { + decoded := []byte{} + + common.Log.Trace("ASCII85 Decode") + + i := 0 + eod := false + + for i < len(encoded) && !eod { + codes := [5]byte{0, 0, 0, 0, 0} + spaces := 0 // offset due to whitespace. + j := 0 + toWrite := 4 + for j < 5+spaces { + if i+j == len(encoded) { + break + } + code := encoded[i+j] + if IsWhiteSpace(code) { + // Skip whitespace. + spaces++ + j++ + continue + } else if code == '~' && i+j+1 < len(encoded) && encoded[i+j+1] == '>' { + toWrite = (j - spaces) - 1 + if toWrite < 0 { + toWrite = 0 + } + // EOD marker. Marks end of data. + eod = true + break + } else if code >= '!' && code <= 'u' { + // Valid code. + code -= '!' + } else if code == 'z' && j-spaces == 0 { + // 'z' in beginning of the byte sequence means that all 5 codes are 0. + // Already all 0 initialized, so can break here. + toWrite = 4 + j++ + break + } else { + common.Log.Error("Failed decoding, invalid code") + return nil, errors.New("invalid code encountered") + } + + codes[j-spaces] = code + j++ + } + i += j + + // Pad with 'u' 84 (unused ones) + // Takes care of issues at ends for input data that is not a multiple of 4-bytes. + for m := toWrite + 1; m < 5; m++ { + codes[m] = 84 + } + + // Convert to a uint32 value. + value := uint32(codes[0])*85*85*85*85 + uint32(codes[1])*85*85*85 + uint32(codes[2])*85*85 + uint32(codes[3])*85 + uint32(codes[4]) + + // Convert to 4 bytes. + decodedBytes := []byte{ + byte((value >> 24) & 0xff), + byte((value >> 16) & 0xff), + byte((value >> 8) & 0xff), + byte(value & 0xff)} + + // This accounts for the end of data, where the original data length is not a multiple of 4. + // In that case, 0 bytes are assumed but only + decoded = append(decoded, decodedBytes[:toWrite]...) + } + + common.Log.Trace("ASCII85, encoded: % X", encoded) + common.Log.Trace("ASCII85, decoded: % X", decoded) + + return decoded, nil +} + +// ASCII85 stream decoding. +func (en *ASCII85Encoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + return en.DecodeBytes(streamObj.Stream) +} + +// Convert a base 256 number to a series of base 85 values (5 codes). +// +// 85^5 = 4437053125 > 256^4 = 4294967296 +// +// So 5 base-85 numbers will always be enough to cover 4 base-256 numbers. +// The base 256 value is already converted to an uint32 value. +func (*ASCII85Encoder) base256Tobase85(base256val uint32) [5]byte { + base85 := [5]byte{0, 0, 0, 0, 0} + remainder := base256val + for i := 0; i < 5; i++ { + divider := uint32(1) + for j := 0; j < 4-i; j++ { + divider *= 85 + } + val := remainder / divider + remainder = remainder % divider + base85[i] = byte(val) + } + return base85 +} + +// Encode data into ASCII85 encoded format. +func (en *ASCII85Encoder) EncodeBytes(data []byte) ([]byte, error) { + var encoded bytes.Buffer + + for i := 0; i < len(data); i += 4 { + b1 := data[i] + n := 1 + + b2 := byte(0) + if i+1 < len(data) { + b2 = data[i+1] + n++ + } + + b3 := byte(0) + if i+2 < len(data) { + b3 = data[i+2] + n++ + } + + b4 := byte(0) + if i+3 < len(data) { + b4 = data[i+3] + n++ + } + + // Convert to a uint32 number. + base256 := (uint32(b1) << 24) | (uint32(b2) << 16) | (uint32(b3) << 8) | uint32(b4) + if base256 == 0 { + encoded.WriteByte('z') + } else { + base85vals := en.base256Tobase85(base256) + for _, val := range base85vals[:n+1] { + encoded.WriteByte(val + '!') + } + } + } + + // EOD. + encoded.WriteString("~>") + return encoded.Bytes(), nil +} + +// Raw encoder/decoder (no encoding, pass through) +type RawEncoder struct{} + +func NewRawEncoder() *RawEncoder { + return &RawEncoder{} +} + +func (*RawEncoder) GetFilterName() string { + return StreamEncodingFilterNameRaw +} + +func (*RawEncoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (*RawEncoder) MakeStreamDict() *PdfObjectDictionary { + return MakeDict() +} + +func (*RawEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + return encoded, nil +} + +func (*RawEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + return streamObj.Stream, nil +} + +func (*RawEncoder) EncodeBytes(data []byte) ([]byte, error) { + return data, nil +} + +// CCITTFax encoder/decoder (dummy, for now) +type CCITTFaxEncoder struct{} + +func NewCCITTFaxEncoder() *CCITTFaxEncoder { + return &CCITTFaxEncoder{} +} + +func (*CCITTFaxEncoder) GetFilterName() string { + return StreamEncodingFilterNameCCITTFax +} + +func (*CCITTFaxEncoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (*CCITTFaxEncoder) MakeStreamDict() *PdfObjectDictionary { + return MakeDict() +} + +func (en *CCITTFaxEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return encoded, ErrNoCCITTFaxDecode +} + +func (en *CCITTFaxEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return streamObj.Stream, ErrNoCCITTFaxDecode +} + +func (en *CCITTFaxEncoder) EncodeBytes(data []byte) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return data, ErrNoCCITTFaxDecode +} + +// JBIG2 encoder/decoder (dummy, for now) +type JBIG2Encoder struct{} + +func NewJBIG2Encoder() *JBIG2Encoder { + return &JBIG2Encoder{} +} + +func (*JBIG2Encoder) GetFilterName() string { + return StreamEncodingFilterNameJBIG2 +} + +func (*JBIG2Encoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (*JBIG2Encoder) MakeStreamDict() *PdfObjectDictionary { + return MakeDict() +} + +func (en *JBIG2Encoder) DecodeBytes(encoded []byte) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return encoded, ErrNoJBIG2Decode +} + +func (en *JBIG2Encoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return streamObj.Stream, ErrNoJBIG2Decode +} + +func (en *JBIG2Encoder) EncodeBytes(data []byte) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return data, ErrNoJBIG2Decode +} + +// JPX encoder/decoder (dummy, for now) +type JPXEncoder struct{} + +func NewJPXEncoder() *JPXEncoder { + return &JPXEncoder{} +} + +func (*JPXEncoder) GetFilterName() string { + return StreamEncodingFilterNameJPX +} + +func (*JPXEncoder) MakeDecodeParams() PdfObject { + return nil +} + +// Make a new instance of an encoding dictionary for a stream object. +func (*JPXEncoder) MakeStreamDict() *PdfObjectDictionary { + return MakeDict() +} + +func (en *JPXEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return encoded, ErrNoJPXDecode +} + +func (en *JPXEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return streamObj.Stream, ErrNoJPXDecode +} + +func (en *JPXEncoder) EncodeBytes(data []byte) ([]byte, error) { + common.Log.Debug("error: Attempting to use unsupported encoding %s", en.GetFilterName()) + return data, ErrNoJPXDecode +} + +// Multi encoder: support serial encoding. +type MultiEncoder struct { + // Encoders in the order that they are to be applied. + encoders []StreamEncoder +} + +func NewMultiEncoder() *MultiEncoder { + encoder := MultiEncoder{} + encoder.encoders = []StreamEncoder{} + + return &encoder +} + +func newMultiEncoderFromStream(streamObj *PdfObjectStream) (*MultiEncoder, error) { + mencoder := NewMultiEncoder() + + encDict := streamObj.PdfObjectDictionary + if encDict == nil { + // No encoding dictionary. + return mencoder, nil + } + + // Prepare the decode params array (one for each filter type) + // Optional, not always present. + var decodeParamsDict *PdfObjectDictionary + decodeParamsArray := []PdfObject{} + obj := encDict.Get("DecodeParms") + if obj != nil { + // If it is a dictionary, assume it applies to all + dict, isDict := obj.(*PdfObjectDictionary) + if isDict { + decodeParamsDict = dict + } + + // If it is an array, assume there is one for each + arr, isArray := obj.(*PdfObjectArray) + if isArray { + for _, dictObj := range *arr { + dictObj = TraceToDirectObject(dictObj) + if dict, is := dictObj.(*PdfObjectDictionary); is { + decodeParamsArray = append(decodeParamsArray, dict) + } else { + decodeParamsArray = append(decodeParamsArray, MakeDict()) + } + } + } + } + + obj = encDict.Get("Filter") + if obj == nil { + return nil, fmt.Errorf("filter missing") + } + + array, ok := obj.(*PdfObjectArray) + if !ok { + return nil, fmt.Errorf("multi filter can only be made from array") + } + + for idx, obj := range *array { + name, ok := obj.(*PdfObjectName) + if !ok { + return nil, fmt.Errorf("multi filter array element not a name") + } + + var dp PdfObject + + // If decode params dict is set, use it. Otherwise take from array.. + if decodeParamsDict != nil { + dp = decodeParamsDict + } else { + // Only get the dp if provided. Oftentimes there is no decode params dict + // provided. + if len(decodeParamsArray) > 0 { + if idx >= len(decodeParamsArray) { + return nil, fmt.Errorf("missing elements in decode params array") + } + dp = decodeParamsArray[idx] + } + } + + var dParams *PdfObjectDictionary + if dict, is := dp.(*PdfObjectDictionary); is { + dParams = dict + } + + common.Log.Trace("Next name: %s, dp: %v, dParams: %v", *name, dp, dParams) + switch *name { + case StreamEncodingFilterNameFlate: + // XXX: need to separate out the DecodeParms.. + encoder, err := newFlateEncoderFromStream(streamObj, dParams) + if err != nil { + return nil, err + } + mencoder.AddEncoder(encoder) + case StreamEncodingFilterNameLZW: + encoder, err := newLZWEncoderFromStream(streamObj, dParams) + if err != nil { + return nil, err + } + mencoder.AddEncoder(encoder) + case StreamEncodingFilterNameASCIIHex: + encoder := NewASCIIHexEncoder() + mencoder.AddEncoder(encoder) + case StreamEncodingFilterNameASCII85: + encoder := NewASCII85Encoder() + mencoder.AddEncoder(encoder) + case StreamEncodingFilterNameDCT: + encoder, err := newDCTEncoderFromStream(streamObj, mencoder) + if err != nil { + return nil, err + } + mencoder.AddEncoder(encoder) + common.Log.Trace("Added DCT encoder...") + common.Log.Trace("Multi encoder: %#v", mencoder) + default: + common.Log.Error("Unsupported filter %s", *name) + return nil, fmt.Errorf("invalid filter in multi filter array") + } + } + + return mencoder, nil +} + +func (en *MultiEncoder) GetFilterName() string { + name := "" + for idx, encoder := range en.encoders { + name += encoder.GetFilterName() + if idx < len(en.encoders)-1 { + name += " " + } + } + return name +} + +func (en *MultiEncoder) MakeDecodeParams() PdfObject { + if len(en.encoders) == 0 { + return nil + } + + if len(en.encoders) == 1 { + return en.encoders[0].MakeDecodeParams() + } + + array := PdfObjectArray{} + for _, encoder := range en.encoders { + decodeParams := encoder.MakeDecodeParams() + if decodeParams == nil { + array = append(array, MakeNull()) + } else { + array = append(array, decodeParams) + } + } + + return &array +} + +func (en *MultiEncoder) AddEncoder(encoder StreamEncoder) { + en.encoders = append(en.encoders, encoder) +} + +func (en *MultiEncoder) MakeStreamDict() *PdfObjectDictionary { + dict := MakeDict() + dict.Set("Filter", MakeName(en.GetFilterName())) + + // Pass all values from children, except Filter and DecodeParms. + for _, encoder := range en.encoders { + encDict := encoder.MakeStreamDict() + for _, key := range encDict.Keys() { + val := encDict.Get(key) + if key != "Filter" && key != "DecodeParms" { + dict.Set(key, val) + } + } + } + + // Make the decode params array or dict. + decodeParams := en.MakeDecodeParams() + if decodeParams != nil { + dict.Set("DecodeParms", decodeParams) + } + + return dict +} + +func (en *MultiEncoder) DecodeBytes(encoded []byte) ([]byte, error) { + decoded := encoded + var err error + // Apply in forward order. + for _, encoder := range en.encoders { + common.Log.Trace("Multi Encoder Decode: Applying Filter: %v %T", encoder, encoder) + + decoded, err = encoder.DecodeBytes(decoded) + if err != nil { + return nil, err + } + } + + return decoded, nil +} + +func (en *MultiEncoder) DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + return en.DecodeBytes(streamObj.Stream) +} + +func (en *MultiEncoder) EncodeBytes(data []byte) ([]byte, error) { + encoded := data + var err error + + // Apply in inverse order. + for i := len(en.encoders) - 1; i >= 0; i-- { + encoder := en.encoders[i] + encoded, err = encoder.EncodeBytes(encoded) + if err != nil { + return nil, err + } + } + + return encoded, nil +} diff --git a/internal/pdf/core/io.go b/internal/pdf/core/io.go new file mode 100644 index 0000000..6637ba9 --- /dev/null +++ b/internal/pdf/core/io.go @@ -0,0 +1,44 @@ +package core + +import ( + "bufio" + "errors" + "os" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// ReadAtLeast reads at least n bytes into slice p. +// Returns the number of bytes read (should always be == n), and an error on failure. +// TODO (v3): Unexport. +func (parser *PdfParser) ReadAtLeast(p []byte, n int) (int, error) { + remaining := n + start := 0 + numRounds := 0 + for remaining > 0 { + nRead, err := parser.reader.Read(p[start:]) + if err != nil { + common.Log.Debug("error Failed reading (%d;%d) %s", nRead, numRounds, err.Error()) + return start, errors.New("failed reading") + } + numRounds++ + start += nRead + remaining -= nRead + } + return start, nil +} + +// Get the current file offset, accounting for buffered position. +// TODO (v3): Unexport. +func (parser *PdfParser) GetFileOffset() int64 { + offset, _ := parser.rs.Seek(0, os.SEEK_CUR) + offset -= int64(parser.reader.Buffered()) + return offset +} + +// Seek the file to an offset position. +// TODO (v3): Unexport. +func (parser *PdfParser) SetFileOffset(offset int64) { + parser.rs.Seek(offset, os.SEEK_SET) + parser.reader = bufio.NewReader(parser.rs) +} diff --git a/internal/pdf/core/parser.go b/internal/pdf/core/parser.go new file mode 100644 index 0000000..548276b --- /dev/null +++ b/internal/pdf/core/parser.go @@ -0,0 +1,1644 @@ +package core + +import ( + "bufio" + "bytes" + "encoding/hex" + "errors" + "fmt" + "io" + "os" + "regexp" + "strconv" + "strings" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// Regular Expressions for parsing and identifying object signatures. +var rePdfVersion = regexp.MustCompile(`%PDF-(\d)\.(\d)`) +var reEOF = regexp.MustCompile("%%EOF") +var reXrefTable = regexp.MustCompile(`\s*xref\s*`) +var reStartXref = regexp.MustCompile(`startx?ref\s*(\d+)`) +var reNumeric = regexp.MustCompile(`^[\+-.]*([0-9.]+)`) +var reExponential = regexp.MustCompile(`^[\+-.]*([0-9.]+)e[\+-.]*([0-9.]+)`) +var reReference = regexp.MustCompile(`^\s*(\d+)\s+(\d+)\s+R`) +var reIndirectObject = regexp.MustCompile(`(\d+)\s+(\d+)\s+obj`) +var reXrefSubsection = regexp.MustCompile(`(\d+)\s+(\d+)\s*$`) +var reXrefEntry = regexp.MustCompile(`(\d+)\s+(\d+)\s+([nf])\s*$`) + +// PdfParser parses a PDF file and provides access to the object structure of the PDF. +type PdfParser struct { + majorVersion int + minorVersion int + + rs io.ReadSeeker + reader *bufio.Reader + fileSize int64 + xrefs XrefTable + objstms ObjectStreams + trailer *PdfObjectDictionary + ObjCache ObjectCache // TODO: Unexport (v3). + crypter *PdfCrypt + repairsAttempted bool // Avoid multiple attempts for repair. + + // Tracker for reference lookups when looking up Length entry of stream objects. + // The Length entries of stream objects are a special case, as they can require recursive parsing, i.e. look up + // the length reference (if not object) prior to reading the actual stream. This has risks of endless looping. + // Tracking is necessary to avoid recursive loops. + streamLengthReferenceLookupInProgress map[int64]bool +} + +// GetCrypter returns the PdfCrypt instance which has information about the PDFs encryption. +func (parser *PdfParser) GetCrypter() *PdfCrypt { + return parser.crypter +} + +// IsAuthenticated returns true if the PDF has already been authenticated for accessing. +func (parser *PdfParser) IsAuthenticated() bool { + return parser.crypter.Authenticated +} + +// GetTrailer returns the PDFs trailer dictionary. The trailer dictionary is typically the starting point for a PDF, +// referencing other key objects that are important in the document structure. +func (parser *PdfParser) GetTrailer() *PdfObjectDictionary { + return parser.trailer +} + +// Skip over any spaces. +func (parser *PdfParser) skipSpaces() (int, error) { + cnt := 0 + for { + b, err := parser.reader.ReadByte() + if err != nil { + return 0, err + } + if IsWhiteSpace(b) { + cnt++ + } else { + parser.reader.UnreadByte() + break + } + } + + return cnt, nil +} + +// Skip over comments and spaces. Can handle multi-line comments. +func (parser *PdfParser) skipComments() error { + if _, err := parser.skipSpaces(); err != nil { + return err + } + + isFirst := true + for { + bb, err := parser.reader.Peek(1) + if err != nil { + common.Log.Debug("error %s", err.Error()) + return err + } + if isFirst && bb[0] != '%' { + // Not a comment clearly. + return nil + } else { + isFirst = false + } + if (bb[0] != '\r') && (bb[0] != '\n') { + parser.reader.ReadByte() + } else { + break + } + } + + // Call recursively to handle multiline comments. + return parser.skipComments() +} + +// Read a comment starting with '%'. +func (parser *PdfParser) readComment() (string, error) { + var r bytes.Buffer + + _, err := parser.skipSpaces() + if err != nil { + return r.String(), err + } + + isFirst := true + for { + bb, err := parser.reader.Peek(1) + if err != nil { + common.Log.Debug("error %s", err.Error()) + return r.String(), err + } + if isFirst && bb[0] != '%' { + return r.String(), errors.New("comment should start with %") + } else { + isFirst = false + } + if (bb[0] != '\r') && (bb[0] != '\n') { + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + } else { + break + } + } + return r.String(), nil +} + +// Read a single line of text from current position. +func (parser *PdfParser) readTextLine() (string, error) { + var r bytes.Buffer + for { + bb, err := parser.reader.Peek(1) + if err != nil { + common.Log.Debug("error %s", err.Error()) + return r.String(), err + } + if (bb[0] != '\r') && (bb[0] != '\n') { + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + } else { + break + } + } + return r.String(), nil +} + +// Parse a name starting with '/'. +func (parser *PdfParser) parseName() (PdfObjectName, error) { + var r bytes.Buffer + nameStarted := false + for { + bb, err := parser.reader.Peek(1) + if err == io.EOF { + break // Can happen when loading from object stream. + } + if err != nil { + return PdfObjectName(r.String()), err + } + + if !nameStarted { + // Should always start with '/', otherwise not valid. + switch bb[0] { + case '/': + nameStarted = true + parser.reader.ReadByte() + case '%': + parser.readComment() + parser.skipSpaces() + default: + common.Log.Debug("error Name starting with %s (% x)", bb, bb) + return PdfObjectName(r.String()), fmt.Errorf("invalid name: (%c)", bb[0]) + } + } else { + if IsWhiteSpace(bb[0]) { + break + } else if (bb[0] == '/') || (bb[0] == '[') || (bb[0] == '(') || (bb[0] == ']') || (bb[0] == '<') || (bb[0] == '>') { + break // Looks like start of next statement. + } else if bb[0] == '#' { + hexcode, err := parser.reader.Peek(3) + if err != nil { + return PdfObjectName(r.String()), err + } + parser.reader.Discard(3) + + code, err := hex.DecodeString(string(hexcode[1:3])) + if err != nil { + return PdfObjectName(r.String()), err + } + r.Write(code) + } else { + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + } + } + } + return PdfObjectName(r.String()), nil +} + +// Numeric objects. +// Section 7.3.3. +// Integer or Float. +// +// An integer shall be written as one or more decimal digits optionally +// preceded by a sign. The value shall be interpreted as a signed +// decimal integer and shall be converted to an integer object. +// +// A real value shall be written as one or more decimal digits with an +// optional sign and a leading, trailing, or embedded PERIOD (2Eh) +// (decimal point). The value shall be interpreted as a real number +// and shall be converted to a real object. +// +// Regarding exponential numbers: 7.3.3 Numeric Objects: +// A conforming writer shall not use the PostScript syntax for numbers +// with non-decimal radices (such as 16#FFFE) or in exponential format +// (such as 6.02E23). +// Nonetheless, we sometimes get numbers with exponential format, so +// we will support it in the reader (no confusion with other types, so +// no compromise). +func (parser *PdfParser) parseNumber() (PdfObject, error) { + isFloat := false + allowSigns := true + var r bytes.Buffer + for { + common.Log.Trace("Parsing number \"%s\"", r.String()) + bb, err := parser.reader.Peek(1) + if err == io.EOF { + // GH: EOF handling. Handle EOF like end of line. Can happen with + // encoded object streams that the object is at the end. + // In other cases, we will get the EOF error elsewhere at any rate. + break // Handle like EOF + } + if err != nil { + common.Log.Debug("error %s", err) + return nil, err + } + if allowSigns && (bb[0] == '-' || bb[0] == '+') { + // Only appear in the beginning, otherwise serves as a delimiter. + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + allowSigns = false // Only allowed in beginning, and after e (exponential). + } else if IsDecimalDigit(bb[0]) { + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + } else if bb[0] == '.' { + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + isFloat = true + } else if bb[0] == 'e' { + // Exponential number format. + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + isFloat = true + allowSigns = true + } else { + break + } + } + + if isFloat { + fVal, err := strconv.ParseFloat(r.String(), 64) + if err != nil { + common.Log.Debug("error parsing number %v err=%v. Using 0.0. Output may be incorrect", r.String(), err) + fVal = 0.0 + err = nil + } + o := PdfObjectFloat(fVal) + return &o, err + } else { + intVal, err := strconv.ParseInt(r.String(), 10, 64) + o := PdfObjectInteger(intVal) + return &o, err + } +} + +// A string starts with '(' and ends with ')'. +func (parser *PdfParser) parseString() (PdfObjectString, error) { + parser.reader.ReadByte() + + var r bytes.Buffer + count := 1 + for { + bb, err := parser.reader.Peek(1) + if err != nil { + return PdfObjectString(r.String()), err + } + + if bb[0] == '\\' { // Escape sequence. + parser.reader.ReadByte() // Skip the escape \ byte. + b, err := parser.reader.ReadByte() + if err != nil { + return PdfObjectString(r.String()), err + } + + // Octal '\ddd' number (base 8). + if IsOctalDigit(b) { + bb, err := parser.reader.Peek(2) + if err != nil { + return PdfObjectString(r.String()), err + } + + numeric := []byte{} + numeric = append(numeric, b) + for _, val := range bb { + if IsOctalDigit(val) { + numeric = append(numeric, val) + } else { + break + } + } + parser.reader.Discard(len(numeric) - 1) + + common.Log.Trace("Numeric string \"%s\"", numeric) + code, err := strconv.ParseUint(string(numeric), 8, 32) + if err != nil { + return PdfObjectString(r.String()), err + } + r.WriteByte(byte(code)) + continue + } + + switch b { + case 'n': + r.WriteRune('\n') + case 'r': + r.WriteRune('\r') + case 't': + r.WriteRune('\t') + case 'b': + r.WriteRune('\b') + case 'f': + r.WriteRune('\f') + case '(': + r.WriteRune('(') + case ')': + r.WriteRune(')') + case '\\': + r.WriteRune('\\') + } + + continue + } else if bb[0] == '(' { + count++ + } else if bb[0] == ')' { + count-- + if count == 0 { + parser.reader.ReadByte() + break + } + } + + b, _ := parser.reader.ReadByte() + r.WriteByte(b) + } + + return PdfObjectString(r.String()), nil +} + +// Starts with '<' ends with '>'. +// Currently not converting the hex codes to characters. +func (parser *PdfParser) parseHexString() (PdfObjectString, error) { + parser.reader.ReadByte() + + var r bytes.Buffer + for { + bb, err := parser.reader.Peek(1) + if err != nil { + return PdfObjectString(""), err + } + + if bb[0] == '>' { + parser.reader.ReadByte() + break + } + + b, _ := parser.reader.ReadByte() + if !IsWhiteSpace(b) { + r.WriteByte(b) + } + } + + if r.Len()%2 == 1 { + r.WriteRune('0') + } + + buf, _ := hex.DecodeString(r.String()) + return PdfObjectString(buf), nil +} + +// Starts with '[' ends with ']'. Can contain any kinds of direct objects. +func (parser *PdfParser) parseArray() (PdfObjectArray, error) { + arr := make(PdfObjectArray, 0) + + parser.reader.ReadByte() + + for { + parser.skipSpaces() + + bb, err := parser.reader.Peek(1) + if err != nil { + return arr, err + } + + if bb[0] == ']' { + parser.reader.ReadByte() + break + } + + obj, err := parser.parseObject() + if err != nil { + return arr, err + } + arr = append(arr, obj) + } + + return arr, nil +} + +// Parse bool object. +func (parser *PdfParser) parseBool() (PdfObjectBool, error) { + bb, err := parser.reader.Peek(4) + if err != nil { + return PdfObjectBool(false), err + } + if (len(bb) >= 4) && (string(bb[:4]) == "true") { + parser.reader.Discard(4) + return PdfObjectBool(true), nil + } + + bb, err = parser.reader.Peek(5) + if err != nil { + return PdfObjectBool(false), err + } + if (len(bb) >= 5) && (string(bb[:5]) == "false") { + parser.reader.Discard(5) + return PdfObjectBool(false), nil + } + + return PdfObjectBool(false), errors.New("unexpected boolean string") +} + +// Parse reference to an indirect object. +func parseReference(refStr string) (PdfObjectReference, error) { + objref := PdfObjectReference{} + + result := reReference.FindStringSubmatch(string(refStr)) + if len(result) < 3 { + common.Log.Debug("error parsing reference") + return objref, errors.New("unable to parse reference") + } + + objNum, _ := strconv.Atoi(result[1]) + genNum, _ := strconv.Atoi(result[2]) + objref.ObjectNumber = int64(objNum) + objref.GenerationNumber = int64(genNum) + + return objref, nil +} + +// Parse null object. +func (parser *PdfParser) parseNull() (PdfObjectNull, error) { + _, err := parser.reader.Discard(4) + return PdfObjectNull{}, err +} + +// Detect the signature at the current file position and parse +// the corresponding object. +func (parser *PdfParser) parseObject() (PdfObject, error) { + common.Log.Trace("Read direct object") + parser.skipSpaces() + for { + bb, err := parser.reader.Peek(2) + if err != nil { + return nil, err + } + + common.Log.Trace("Peek string: %s", string(bb)) + // Determine type. + if bb[0] == '/' { + name, err := parser.parseName() + common.Log.Trace("->Name: '%s'", name) + return &name, err + } else if bb[0] == '(' { + common.Log.Trace("->String!") + str, err := parser.parseString() + return &str, err + } else if bb[0] == '[' { + common.Log.Trace("->Array!") + arr, err := parser.parseArray() + return &arr, err + } else if (bb[0] == '<') && (bb[1] == '<') { + common.Log.Trace("->Dict!") + dict, err := parser.ParseDict() + return dict, err + } else if bb[0] == '<' { + common.Log.Trace("->Hex string!") + str, err := parser.parseHexString() + return &str, err + } else if bb[0] == '%' { + parser.readComment() + parser.skipSpaces() + } else { + common.Log.Trace("->Number or ref?") + // Reference or number? + // Let's peek farther to find out. + bb, _ = parser.reader.Peek(15) + peekStr := string(bb) + common.Log.Trace("Peek str: %s", peekStr) + + if (len(peekStr) > 3) && (peekStr[:4] == "null") { + null, err := parser.parseNull() + return &null, err + } else if (len(peekStr) > 4) && (peekStr[:5] == "false") { + b, err := parser.parseBool() + return &b, err + } else if (len(peekStr) > 3) && (peekStr[:4] == "true") { + b, err := parser.parseBool() + return &b, err + } + + // Match reference. + result1 := reReference.FindStringSubmatch(string(peekStr)) + if len(result1) > 1 { + bb, _ = parser.reader.ReadBytes('R') + common.Log.Trace("-> !Ref: '%s'", string(bb[:])) + ref, err := parseReference(string(bb)) + return &ref, err + } + + result2 := reNumeric.FindStringSubmatch(string(peekStr)) + if len(result2) > 1 { + // Number object. + common.Log.Trace("-> Number!") + num, err := parser.parseNumber() + return num, err + } + + result2 = reExponential.FindStringSubmatch(string(peekStr)) + if len(result2) > 1 { + // Number object (exponential) + common.Log.Trace("-> Exponential Number!") + common.Log.Trace("% s", result2) + num, err := parser.parseNumber() + return num, err + } + + common.Log.Debug("error Unknown (peek \"%s\")", peekStr) + return nil, errors.New("object parsing error - unexpected pattern") + } + } +} + +// Reads and parses a PDF dictionary object enclosed with '<<' and '>>' +// TODO: Unexport (v3). +func (parser *PdfParser) ParseDict() (*PdfObjectDictionary, error) { + common.Log.Trace("Reading PDF Dict!") + + dict := MakeDict() + + // Pass the '<<' + c, _ := parser.reader.ReadByte() + if c != '<' { + return nil, errors.New("invalid dict") + } + c, _ = parser.reader.ReadByte() + if c != '<' { + return nil, errors.New("invalid dict") + } + + for { + parser.skipSpaces() + parser.skipComments() + + bb, err := parser.reader.Peek(2) + if err != nil { + return nil, err + } + + common.Log.Trace("Dict peek: %s (% x)!", string(bb), string(bb)) + if (bb[0] == '>') && (bb[1] == '>') { + common.Log.Trace("EOF dictionary") + parser.reader.ReadByte() + parser.reader.ReadByte() + break + } + common.Log.Trace("Parse the name!") + + keyName, err := parser.parseName() + common.Log.Trace("Key: %s", keyName) + if err != nil { + common.Log.Debug("error Returning name err %s", err) + return nil, err + } + + if len(keyName) > 4 && keyName[len(keyName)-4:] == "null" { + // Some writers have a bug where the null is appended without + // space. For example "\Boundsnull" + newKey := keyName[0 : len(keyName)-4] + common.Log.Debug("Taking care of null bug (%s)", keyName) + common.Log.Debug("New key \"%s\" = null", newKey) + parser.skipSpaces() + bb, _ := parser.reader.Peek(1) + if bb[0] == '/' { + dict.Set(newKey, MakeNull()) + continue + } + } + + parser.skipSpaces() + + val, err := parser.parseObject() + if err != nil { + return nil, err + } + dict.Set(keyName, val) + + common.Log.Trace("dict[%s] = %s", keyName, val.String()) + } + common.Log.Trace("returning PDF Dict!") + + return dict, nil +} + +// Parse the pdf version from the beginning of the file. +// Returns the major and minor parts of the version. +// E.g. for "PDF-1.7" would return 1 and 7. +func (parser *PdfParser) parsePdfVersion() (int, int, error) { + parser.rs.Seek(0, os.SEEK_SET) + var offset int64 = 20 + b := make([]byte, offset) + parser.rs.Read(b) + + result1 := rePdfVersion.FindStringSubmatch(string(b)) + if len(result1) < 3 { + major, minor, err := parser.seekPdfVersionTopDown() + if err != nil { + common.Log.Debug("Failed recovery - unable to find version") + return 0, 0, err + } + + return major, minor, nil + } + + majorVersion, err := strconv.ParseInt(result1[1], 10, 64) + if err != nil { + return 0, 0, err + } + + minorVersion, err := strconv.ParseInt(result1[2], 10, 64) + if err != nil { + return 0, 0, err + } + + //version, _ := strconv.Atoi(result1[1]) + common.Log.Debug("Pdf version %d.%d", majorVersion, minorVersion) + + return int(majorVersion), int(minorVersion), nil +} + +// Conventional xref table starting with 'xref'. +func (parser *PdfParser) parseXrefTable() (*PdfObjectDictionary, error) { + var trailer *PdfObjectDictionary + + txt, err := parser.readTextLine() + if err != nil { + return nil, err + } + + common.Log.Trace("xref first line: %s", txt) + curObjNum := -1 + secObjects := 0 + insideSubsection := false + for { + parser.skipSpaces() + _, err := parser.reader.Peek(1) + if err != nil { + return nil, err + } + + txt, err = parser.readTextLine() + if err != nil { + return nil, err + } + + result1 := reXrefSubsection.FindStringSubmatch(txt) + if len(result1) == 3 { + // Match + first, _ := strconv.Atoi(result1[1]) + second, _ := strconv.Atoi(result1[2]) + curObjNum = first + secObjects = second + insideSubsection = true + common.Log.Trace("xref subsection: first object: %d objects: %d", curObjNum, secObjects) + continue + } + result2 := reXrefEntry.FindStringSubmatch(txt) + if len(result2) == 4 { + if !insideSubsection { + common.Log.Debug("error Xref invalid format!\n") + return nil, errors.New(" Xref invalid format") + } + + first, _ := strconv.ParseInt(result2[1], 10, 64) + gen, _ := strconv.Atoi(result2[2]) + third := result2[3] + + if strings.ToLower(third) == "n" && first > 1 { + // Object in use in the file! Load it. + // Ignore free objects ('f'). + // + // Some malformed writers mark the offset as 0 to + // indicate that the object is free, and still mark as 'n' + // Fairly safe to assume is free if offset is 0. + // + // Some malformed writers even seem to have values such as + // 1.. Assume null object for those also. That is referring + // to within the PDF version in the header clearly. + // + // Load if not existing or higher generation number than previous. + // Usually should not happen, lower generation numbers + // would be marked as free. But can still happen! + x, ok := parser.xrefs[curObjNum] + if !ok || gen > x.generation { + obj := XrefObject{objectNumber: curObjNum, + xtype: XREF_TABLE_ENTRY, + offset: first, generation: gen} + parser.xrefs[curObjNum] = obj + } + } + + curObjNum++ + continue + } + if (len(txt) > 6) && (txt[:7] == "trailer") { + common.Log.Trace("Found trailer - %s", txt) + // Sometimes get "trailer << ...." + // Need to rewind to end of trailer text. + if len(txt) > 9 { + offset := parser.GetFileOffset() + parser.SetFileOffset(offset - int64(len(txt)) + 7) + } + + parser.skipSpaces() + parser.skipComments() + common.Log.Trace("Reading trailer dict!") + common.Log.Trace("peek: \"%s\"", txt) + trailer, err = parser.ParseDict() + common.Log.Trace("EOF reading trailer dict!") + if err != nil { + common.Log.Debug("error parsing trailer dict (%s)", err) + return nil, err + } + break + } + + if txt == "%%EOF" { + common.Log.Debug("error: end of file - trailer not found - error!") + return nil, errors.New("end of file - trailer not found") + } + + common.Log.Trace("xref more : %s", txt) + } + common.Log.Trace("EOF parsing xref table!") + + return trailer, nil +} + +// Load the cross references from an xref stream object (XRefStm). +// Also load the dictionary information (trailer dictionary). +func (parser *PdfParser) parseXrefStream(xstm *PdfObjectInteger) (*PdfObjectDictionary, error) { + if xstm != nil { + common.Log.Trace("XRefStm xref table object at %d", xstm) + parser.rs.Seek(int64(*xstm), os.SEEK_SET) + parser.reader = bufio.NewReader(parser.rs) + } + + xrefObj, err := parser.ParseIndirectObject() + if err != nil { + common.Log.Debug("error: Failed to read xref object") + return nil, errors.New("failed to read xref object") + } + + common.Log.Trace("XRefStm object: %s", xrefObj) + xs, ok := xrefObj.(*PdfObjectStream) + if !ok { + common.Log.Debug("error: XRefStm pointing to non-stream object!") + return nil, errors.New("XRefStm pointing to a non-stream object") + } + + trailerDict := xs.PdfObjectDictionary + + sizeObj, ok := xs.PdfObjectDictionary.Get("Size").(*PdfObjectInteger) + if !ok { + common.Log.Debug("error: Missing size from xref stm") + return nil, errors.New("missing Size from xref stm") + } + // Sanity check to avoid DoS attacks. Maximum number of indirect objects on 32 bit system. + if int64(*sizeObj) > 8388607 { + common.Log.Debug("error: xref Size exceeded limit, over 8388607 (%d)", *sizeObj) + return nil, errors.New("range check error") + } + + wObj := xs.PdfObjectDictionary.Get("W") + wArr, ok := wObj.(*PdfObjectArray) + if !ok { + return nil, errors.New("invalid W in xref stream") + } + + wLen := len(*wArr) + if wLen != 3 { + common.Log.Debug("error: Unsupported xref stm (len(W) != 3 - %d)", wLen) + return nil, errors.New("unsupported xref stm len(W) != 3") + } + + var b []int64 + for i := 0; i < 3; i++ { + w := (*wArr)[i] + wVal, ok := w.(*PdfObjectInteger) + if !ok { + return nil, errors.New("invalid w object type") + } + + b = append(b, int64(*wVal)) + } + + ds, err := DecodeStream(xs) + if err != nil { + common.Log.Debug("error: Unable to decode stream: %v", err) + return nil, err + } + + s0 := int(b[0]) + s1 := int(b[0] + b[1]) + s2 := int(b[0] + b[1] + b[2]) + deltab := int(b[0] + b[1] + b[2]) + + if s0 < 0 || s1 < 0 || s2 < 0 { + common.Log.Debug("error s value < 0 (%d,%d,%d)", s0, s1, s2) + return nil, errors.New("range check error") + } + if deltab == 0 { + common.Log.Debug("No xref objects in stream (deltab == 0)") + return trailerDict, nil + } + + // Calculate expected entries. + entries := len(ds) / deltab + + // Get the object indices. + + objCount := 0 + indexObj := xs.PdfObjectDictionary.Get("Index") + // Table 17 (7.5.8.2 Cross-Reference Stream Dictionary) + // (Optional) An array containing a pair of integers for each + // subsection in this section. The first integer shall be the first + // object number in the subsection; the second integer shall be the + // number of entries in the subsection. + // The array shall be sorted in ascending order by object number. + // Subsections cannot overlap; an object number may have at most + // one entry in a section. + // Default value: [0 Size]. + indexList := []int{} + if indexObj != nil { + common.Log.Trace("Index: %b", indexObj) + indicesArray, ok := indexObj.(*PdfObjectArray) + if !ok { + common.Log.Debug("invalid Index object (should be an array)") + return nil, errors.New("invalid Index object") + } + + // Expect indLen to be a multiple of 2. + if len(*indicesArray)%2 != 0 { + common.Log.Debug("warning Failure loading xref stm index not multiple of 2.") + return nil, errors.New("range check error") + } + + objCount = 0 + + indices, err := indicesArray.ToIntegerArray() + if err != nil { + common.Log.Debug("error getting index array as integers: %v", err) + return nil, err + } + + for i := 0; i < len(indices); i += 2 { + // add the indices to the list.. + + startIdx := indices[i] + numObjs := indices[i+1] + for j := 0; j < numObjs; j++ { + indexList = append(indexList, startIdx+j) + } + objCount += numObjs + } + } else { + // If no Index, then assume [0 Size] + for i := 0; i < int(*sizeObj); i++ { + indexList = append(indexList, i) + } + objCount = int(*sizeObj) + } + + if entries == objCount+1 { + // For compatibility, expand the object count. + common.Log.Debug("BAD file: allowing compatibility (append one object to xref stm)") + indexList = append(indexList, objCount) + objCount++ + } + + if entries != len(indexList) { + // If mismatch -> error (already allowing mismatch of 1 if Index not specified). + common.Log.Debug("error: xref stm: num entries != len(indices) (%d != %d)", entries, len(indexList)) + return nil, errors.New(" Xref stm num entries != len(indices)") + } + + common.Log.Trace("Objects count %d", objCount) + common.Log.Trace("Indices: % d", indexList) + + // Convert byte array to a larger integer, little-endian. + convertBytes := func(v []byte) int64 { + var tmp int64 = 0 + for i := 0; i < len(v); i++ { + tmp += int64(v[i]) * (1 << uint(8*(len(v)-i-1))) + } + return tmp + } + + common.Log.Trace("Decoded stream length: %d", len(ds)) + objIndex := 0 + for i := 0; i < len(ds); i += deltab { + err := checkBounds(len(ds), i, i+s0) + if err != nil { + common.Log.Debug("invalid slice range: %v", err) + return nil, err + } + p1 := ds[i : i+s0] + + err = checkBounds(len(ds), i+s0, i+s1) + if err != nil { + common.Log.Debug("invalid slice range: %v", err) + return nil, err + } + p2 := ds[i+s0 : i+s1] + + err = checkBounds(len(ds), i+s1, i+s2) + if err != nil { + common.Log.Debug("invalid slice range: %v", err) + return nil, err + } + p3 := ds[i+s1 : i+s2] + + ftype := convertBytes(p1) + n2 := convertBytes(p2) + n3 := convertBytes(p3) + + if b[0] == 0 { + // If first entry in W is 0, then default to to type 1. + // (uncompressed object via offset). + ftype = 1 + } + + if objIndex >= len(indexList) { + common.Log.Debug("XRef stream - Trying to access index out of bounds - breaking") + break + } + objNum := indexList[objIndex] + objIndex++ + + common.Log.Trace("%d. p1: % x", objNum, p1) + common.Log.Trace("%d. p2: % x", objNum, p2) + common.Log.Trace("%d. p3: % x", objNum, p3) + + common.Log.Trace("%d. xref: %d %d %d", objNum, ftype, n2, n3) + switch ftype { + case 0: + common.Log.Trace("- Free object - can probably ignore") + case 1: + common.Log.Trace("- In use - uncompressed via offset %b", p2) + // Object type 1: Objects that are in use but are not + // compressed, i.e. defined by an offset (normal entry) + if xr, ok := parser.xrefs[objNum]; !ok || int(n3) > xr.generation { + // Only overload if not already loaded! + // or has a newer generation number. (should not happen) + obj := XrefObject{objectNumber: objNum, + xtype: XREF_TABLE_ENTRY, offset: n2, generation: int(n3)} + parser.xrefs[objNum] = obj + } + case 2: + // Object type 2: Compressed object. + common.Log.Trace("- In use - compressed object") + if _, ok := parser.xrefs[objNum]; !ok { + obj := XrefObject{objectNumber: objNum, + xtype: XREF_OBJECT_STREAM, osObjNumber: int(n2), osObjIndex: int(n3)} + parser.xrefs[objNum] = obj + common.Log.Trace("entry: %s", parser.xrefs[objNum]) + } + default: + common.Log.Debug("error: --------INVALID TYPE XrefStm invalid?-------") + // Continue, we do not define anything -> null object. + // 7.5.8.3: + // + // In PDF 1.5 through PDF 1.7, only types 0, 1, and 2 are + // allowed. Any other value shall be interpreted as a + // reference to the null object, thus permitting new entry + // types to be defined in the future. + continue + } + } + + return trailerDict, nil +} + +// Parse xref table at the current file position. Can either be a +// standard xref table, or an xref stream. +func (parser *PdfParser) parseXref() (*PdfObjectDictionary, error) { + var err error + var trailerDict *PdfObjectDictionary + + // Points to xref table or xref stream object? + bb, _ := parser.reader.Peek(20) + if reIndirectObject.MatchString(string(bb)) { + common.Log.Trace("xref points to an object. Probably xref object") + common.Log.Trace("starting with \"%s\"", string(bb)) + trailerDict, err = parser.parseXrefStream(nil) + if err != nil { + return nil, err + } + } else if reXrefTable.MatchString(string(bb)) { + common.Log.Trace("Standard xref section table!") + var err error + trailerDict, err = parser.parseXrefTable() + if err != nil { + return nil, err + } + } else { + common.Log.Debug("warning: Unable to find xref table or stream. Repair attempted: Looking for earliest xref from bottom.") + err := parser.repairSeekXrefMarker() + if err != nil { + common.Log.Debug("Repair failed - %v", err) + return nil, err + } + + trailerDict, err = parser.parseXrefTable() + if err != nil { + return nil, err + } + } + + return trailerDict, err +} + +// Look for EOF marker and seek to its beginning. +// Define an offset position from the end of the file. +func (parser *PdfParser) seekToEOFMarker(fSize int64) error { + // Define the starting point (from the end of the file) to search from. + var offset int64 = 0 + + // Define an buffer length in terms of how many bytes to read from the end of the file. + var buflen int64 = 1000 + + for offset < fSize { + if fSize <= (buflen + offset) { + buflen = fSize - offset + } + + // Move back enough (as we need to read forward). + _, err := parser.rs.Seek(-offset-buflen, io.SeekEnd) + if err != nil { + return err + } + + // Read the data. + b1 := make([]byte, buflen) + parser.rs.Read(b1) + common.Log.Trace("Looking for EOF marker: \"%s\"", string(b1)) + ind := reEOF.FindAllStringIndex(string(b1), -1) + if ind != nil { + // Found it. + lastInd := ind[len(ind)-1] + common.Log.Trace("Ind: % d", ind) + parser.rs.Seek(-offset-buflen+int64(lastInd[0]), io.SeekEnd) + return nil + } else { + common.Log.Debug("warning: EOF marker not found! - continue seeking") + } + + offset += buflen + } + + common.Log.Debug("error: EOF marker was not found.") + return errors.New("EOF not found") +} + +// Load the xrefs from the bottom of file prior to parsing the file. +// 1. Look for %%EOF marker, then +// 2. Move up to find startxref +// 3. Then move to that position (slight offset) +// 4. Move until find "startxref" +// 5. Load the xref position +// 6. Move to the xref position and parse it. +// 7. Load each xref into a table. +// +// Multiple xref table handling: +// 1. Check main xref table (primary) +// 2. Check the Xref stream object (PDF >=1.5) +// 3. Check the Prev xref +// 4. Continue looking for Prev until not found. +// +// The earlier xrefs have higher precedence. If objects already +// loaded will ignore older versions. +func (parser *PdfParser) loadXrefs() (*PdfObjectDictionary, error) { + parser.xrefs = make(XrefTable) + parser.objstms = make(ObjectStreams) + + // Get the file size. + fSize, err := parser.rs.Seek(0, io.SeekEnd) + if err != nil { + return nil, err + } + common.Log.Trace("fsize: %d", fSize) + parser.fileSize = fSize + + // Seek the EOF marker. + err = parser.seekToEOFMarker(fSize) + if err != nil { + common.Log.Debug("Failed seek to eof marker: %v", err) + return nil, err + } + + // Look for startxref and get the xref offset. + curOffset, err := parser.rs.Seek(0, io.SeekCurrent) + if err != nil { + return nil, err + } + + // Seek 64 bytes (numBytes) back from EOF marker start. + var numBytes int64 = 64 + offset := curOffset - numBytes + if offset < 0 { + offset = 0 + } + _, err = parser.rs.Seek(offset, io.SeekStart) + if err != nil { + return nil, err + } + + b2 := make([]byte, numBytes) + _, err = parser.rs.Read(b2) + if err != nil { + common.Log.Debug("Failed reading while looking for startxref: %v", err) + return nil, err + } + + result := reStartXref.FindStringSubmatch(string(b2)) + if len(result) < 2 { + common.Log.Debug("error: startxref not found!") + return nil, errors.New(" Startxref not found") + } + if len(result) > 2 { + common.Log.Debug("error: Multiple startxref (%s)!", b2) + return nil, errors.New("multiple startxref entries?") + } + offsetXref, _ := strconv.ParseInt(result[1], 10, 64) + common.Log.Trace("startxref at %d", offsetXref) + + if offsetXref > fSize { + common.Log.Debug("error: Xref offset outside of file") + common.Log.Debug("Attempting repair") + offsetXref, err = parser.repairLocateXref() + if err != nil { + common.Log.Debug("error: Repair attempt failed (%s)") + return nil, err + } + } + // Read the xref. + parser.rs.Seek(int64(offsetXref), io.SeekStart) + parser.reader = bufio.NewReader(parser.rs) + + trailerDict, err := parser.parseXref() + if err != nil { + return nil, err + } + + // Check the XrefStm object also from the trailer. + xx := trailerDict.Get("XRefStm") + if xx != nil { + xo, ok := xx.(*PdfObjectInteger) + if !ok { + return nil, errors.New("XRefStm != int") + } + _, err = parser.parseXrefStream(xo) + if err != nil { + return nil, err + } + } + + // Load old objects also. Only if not already specified. + prevList := []int64{} + intInSlice := func(val int64, list []int64) bool { + for _, b := range list { + if b == val { + return true + } + } + return false + } + + // Load any Previous xref tables (old versions), which can + // refer to objects also. + xx = trailerDict.Get("Prev") + for xx != nil { + prevInt, ok := xx.(*PdfObjectInteger) + if !ok { + // For compatibility: If Prev is invalid, just go with whatever xrefs are loaded already. + // i.e. not returning an error. A debug message is logged. + common.Log.Debug("invalid Prev reference: Not a *PdfObjectInteger (%T)", xx) + return trailerDict, nil + } + + off := *prevInt + common.Log.Trace("Another Prev xref table object at %d", off) + + // Can be either regular table, or an xref object... + parser.rs.Seek(int64(off), os.SEEK_SET) + parser.reader = bufio.NewReader(parser.rs) + + ptrailerDict, err := parser.parseXref() + if err != nil { + common.Log.Debug("warning: Error - Failed loading another (Prev) trailer") + common.Log.Debug("Attempting to continue by ignoring it") + break + } + + xx = ptrailerDict.Get("Prev") + if xx != nil { + prevoff := *(xx.(*PdfObjectInteger)) + if intInSlice(int64(prevoff), prevList) { + // Prevent circular reference! + common.Log.Debug("Preventing circular xref referencing") + break + } + prevList = append(prevList, int64(prevoff)) + } + } + + return trailerDict, nil +} + +// Return the closest object following offset from the xrefs table. +func (parser *PdfParser) xrefNextObjectOffset(offset int64) int64 { + nextOffset := int64(0) + for _, xref := range parser.xrefs { + if xref.offset > offset && (xref.offset < nextOffset || nextOffset == 0) { + nextOffset = xref.offset + } + } + return nextOffset +} + +// Get stream length, avoiding recursive loops. +// The input is the PdfObject that is to be traced to a direct object. +func (parser *PdfParser) traceStreamLength(lengthObj PdfObject) (PdfObject, error) { + lengthRef, isRef := lengthObj.(*PdfObjectReference) + if isRef { + lookupInProgress, has := parser.streamLengthReferenceLookupInProgress[lengthRef.ObjectNumber] + if has && lookupInProgress { + common.Log.Debug("Stream Length reference unresolved (illegal)") + return nil, errors.New("illegal recursive loop") + } + // Mark lookup as in progress. + parser.streamLengthReferenceLookupInProgress[lengthRef.ObjectNumber] = true + } + + slo, err := parser.Trace(lengthObj) + if err != nil { + return nil, err + } + common.Log.Trace("Stream length? %s", slo) + + if isRef { + // Mark as completed lookup + parser.streamLengthReferenceLookupInProgress[lengthRef.ObjectNumber] = false + } + + return slo, nil +} + +// Parse an indirect object from the input stream. Can also be an object stream. +// Returns the indirect object (*PdfIndirectObject) or the stream object (*PdfObjectStream). +// TODO: Unexport (v3). +func (parser *PdfParser) ParseIndirectObject() (PdfObject, error) { + indirect := PdfIndirectObject{} + + common.Log.Trace("-Read indirect obj") + bb, err := parser.reader.Peek(20) + if err != nil { + common.Log.Debug("error: Fail to read indirect obj") + return &indirect, err + } + common.Log.Trace("(indirect obj peek \"%s\"", string(bb)) + + indices := reIndirectObject.FindStringSubmatchIndex(string(bb)) + if len(indices) < 6 { + common.Log.Debug("error: Unable to find object signature (%s)", string(bb)) + return &indirect, errors.New("unable to detect indirect object signature") + } + parser.reader.Discard(indices[0]) // Take care of any small offset. + common.Log.Trace("Offsets % d", indices) + + // Read the object header. + hlen := indices[1] - indices[0] + hb := make([]byte, hlen) + _, err = parser.ReadAtLeast(hb, hlen) + if err != nil { + common.Log.Debug("error: unable to read - %s", err) + return nil, err + } + common.Log.Trace("textline: %s", hb) + + result := reIndirectObject.FindStringSubmatch(string(hb)) + if len(result) < 3 { + common.Log.Debug("error: Unable to find object signature (%s)", string(hb)) + return &indirect, errors.New("unable to detect indirect object signature") + } + + on, _ := strconv.Atoi(result[1]) + gn, _ := strconv.Atoi(result[2]) + indirect.ObjectNumber = int64(on) + indirect.GenerationNumber = int64(gn) + + for { + bb, err := parser.reader.Peek(2) + if err != nil { + return &indirect, err + } + common.Log.Trace("Ind. peek: %s (% x)!", string(bb), string(bb)) + + if IsWhiteSpace(bb[0]) { + parser.skipSpaces() + } else if bb[0] == '%' { + parser.skipComments() + } else if (bb[0] == '<') && (bb[1] == '<') { + common.Log.Trace("Call ParseDict") + indirect.PdfObject, err = parser.ParseDict() + common.Log.Trace("EOF Call ParseDict: %v", err) + if err != nil { + return &indirect, err + } + common.Log.Trace("Parsed dictionary... finished.") + } else if (bb[0] == '/') || (bb[0] == '(') || (bb[0] == '[') || (bb[0] == '<') { + indirect.PdfObject, err = parser.parseObject() + if err != nil { + return &indirect, err + } + common.Log.Trace("Parsed object ... finished.") + } else { + if bb[0] == 'e' { + lineStr, err := parser.readTextLine() + if err != nil { + return nil, err + } + if len(lineStr) >= 6 && lineStr[0:6] == "endobj" { + break + } + } else if bb[0] == 's' { + bb, _ = parser.reader.Peek(10) + if string(bb[:6]) == "stream" { + discardBytes := 6 + if len(bb) > 6 { + if IsWhiteSpace(bb[discardBytes]) && bb[discardBytes] != '\r' && bb[discardBytes] != '\n' { + // If any other white space character... should not happen! + // Skip it.. + common.Log.Debug("Non-conformant PDF not ending stream line properly with EOL marker") + discardBytes++ + } + switch bb[discardBytes] { + case '\r': + discardBytes++ + if bb[discardBytes] == '\n' { + discardBytes++ + } + case '\n': + discardBytes++ + } + } + + parser.reader.Discard(discardBytes) + + dict, isDict := indirect.PdfObject.(*PdfObjectDictionary) + if !isDict { + return nil, errors.New("stream object missing dictionary") + } + common.Log.Trace("Stream dict %s", dict) + + // Special stream length tracing function used to avoid endless recursive looping. + slo, err := parser.traceStreamLength(dict.Get("Length")) + if err != nil { + common.Log.Debug("Fail to trace stream length: %v", err) + return nil, err + } + common.Log.Trace("Stream length? %s", slo) + + pstreamLength, ok := slo.(*PdfObjectInteger) + if !ok { + return nil, errors.New("stream length needs to be an integer") + } + streamLength := *pstreamLength + if streamLength < 0 { + return nil, errors.New("stream needs to be longer than 0") + } + + // Validate the stream length based on the cross references. + // Find next object with closest offset to current object and calculate + // the expected stream length based on that. + streamStartOffset := parser.GetFileOffset() + nextObjectOffset := parser.xrefNextObjectOffset(streamStartOffset) + if streamStartOffset+int64(streamLength) > nextObjectOffset && nextObjectOffset > streamStartOffset { + common.Log.Debug("Expected ending at %d", streamStartOffset+int64(streamLength)) + common.Log.Debug("Next object starting at %d", nextObjectOffset) + // endstream + "\n" endobj + "\n" (17) + newLength := nextObjectOffset - streamStartOffset - 17 + if newLength < 0 { + return nil, errors.New("invalid stream length, going past boundaries") + } + + common.Log.Debug("Attempting a length correction to %d...", newLength) + streamLength = PdfObjectInteger(newLength) + dict.Set("Length", MakeInteger(newLength)) + } + + // Make sure is less than actual file size. + if int64(streamLength) > parser.fileSize { + common.Log.Debug("error: Stream length cannot be larger than file size") + return nil, errors.New("invalid stream length, larger than file size") + } + + stream := make([]byte, streamLength) + _, err = parser.ReadAtLeast(stream, int(streamLength)) + if err != nil { + common.Log.Debug("error stream (%d): %X", len(stream), stream) + common.Log.Debug("error: %v", err) + return nil, err + } + + streamobj := PdfObjectStream{} + streamobj.Stream = stream + streamobj.PdfObjectDictionary = indirect.PdfObject.(*PdfObjectDictionary) + streamobj.ObjectNumber = indirect.ObjectNumber + streamobj.GenerationNumber = indirect.GenerationNumber + + parser.skipSpaces() + parser.reader.Discard(9) // endstream + parser.skipSpaces() + return &streamobj, nil + } + } + + indirect.PdfObject, err = parser.parseObject() + return &indirect, err + } + } + common.Log.Trace("Returning indirect!") + return &indirect, nil +} + +// For testing purposes. +// TODO: Unexport (v3) or move to test files, if needed by external test cases. +func NewParserFromString(txt string) *PdfParser { + parser := PdfParser{} + buf := []byte(txt) + + bufReader := bytes.NewReader(buf) + parser.rs = bufReader + + bufferedReader := bufio.NewReader(bufReader) + parser.reader = bufferedReader + + parser.fileSize = int64(len(txt)) + + return &parser +} + +// NewParser creates a new parser for a PDF file via ReadSeeker. Loads the cross reference stream and trailer. +// An error is returned on failure. +func NewParser(rs io.ReadSeeker) (*PdfParser, error) { + parser := &PdfParser{} + + parser.rs = rs + parser.ObjCache = make(ObjectCache) + parser.streamLengthReferenceLookupInProgress = map[int64]bool{} + + // Start by reading the xrefs (from bottom). + trailer, err := parser.loadXrefs() + if err != nil { + common.Log.Debug("error: Failed to load xref table! %s", err) + return nil, err + } + + common.Log.Trace("Trailer: %s", trailer) + + if len(parser.xrefs) == 0 { + return nil, fmt.Errorf("empty XREF table - Invalid") + } + + majorVersion, minorVersion, err := parser.parsePdfVersion() + if err != nil { + common.Log.Error("Unable to parse version: %v", err) + return nil, err + } + parser.majorVersion = majorVersion + parser.minorVersion = minorVersion + + parser.trailer = trailer + + return parser, nil +} + +// IsEncrypted checks if the document is encrypted. A bool flag is returned indicating the result. +// First time when called, will check if the Encrypt dictionary is accessible through the trailer dictionary. +// If encrypted, prepares a crypt datastructure which can be used to authenticate and decrypt the document. +// On failure, an error is returned. +func (parser *PdfParser) IsEncrypted() (bool, error) { + if parser.crypter != nil { + return true, nil + } else if parser.trailer == nil { + return false, nil + } + + common.Log.Trace("Checking encryption dictionary!") + e := parser.trailer.Get("Encrypt") + if e == nil { + return false, nil + } + common.Log.Trace("Is encrypted!") + var ( + dict *PdfObjectDictionary + dictIndirect *PdfIndirectObject + ) + switch e := e.(type) { + case *PdfObjectDictionary: + dict = e + case *PdfObjectReference: + common.Log.Trace("0: Look up ref %q", e) + encObj, err := parser.LookupByReference(*e) + common.Log.Trace("1: %q", encObj) + if err != nil { + return false, err + } + + encIndObj, ok := encObj.(*PdfIndirectObject) + if !ok { + common.Log.Debug("Encryption object not an indirect object") + return false, errors.New("type check error") + } + dictIndirect = encIndObj + encDict, ok := encIndObj.PdfObject.(*PdfObjectDictionary) + + common.Log.Trace("2: %q", encDict) + if !ok { + return false, errors.New("trailer Encrypt object non dictionary") + } + dict = encDict + default: + return false, fmt.Errorf("unsupported type: %T", e) + } + + crypter, err := PdfCryptMakeNew(parser, dict, parser.trailer) + if err != nil { + return false, err + } + if dictIndirect != nil { + // "Encrypt" dictionary should never be encrypted + crypter.DecryptedObjects[dictIndirect] = true + } + + parser.crypter = &crypter + common.Log.Trace("Crypter object %b", crypter) + return true, nil +} + +// Decrypt attempts to decrypt the PDF file with a specified password. Also tries to +// decrypt with an empty password. Returns true if successful, false otherwise. +// An error is returned when there is a problem with decrypting. +func (parser *PdfParser) Decrypt(password []byte) (bool, error) { + // Also build the encryption/decryption key. + if parser.crypter == nil { + return false, errors.New("check encryption first") + } + + authenticated, err := parser.crypter.authenticate(password) + if err != nil { + return false, err + } + + if !authenticated { + authenticated, err = parser.crypter.authenticate([]byte("")) + } + + return authenticated, err +} + +// CheckAccessRights checks access rights and permissions for a specified password. If either user/owner password is +// specified, full rights are granted, otherwise the access rights are specified by the Permissions flag. +// +// The bool flag indicates that the user can access and view the file. +// The AccessPermissions shows what access the user has for editing etc. +// An error is returned if there was a problem performing the authentication. +func (parser *PdfParser) CheckAccessRights(password []byte) (bool, AccessPermissions, error) { + // Also build the encryption/decryption key. + if parser.crypter == nil { + // If the crypter is not set, the file is not encrypted and we can assume full access permissions. + perms := AccessPermissions{} + perms.Printing = true + perms.Modify = true + perms.FillForms = true + perms.RotateInsert = true + perms.ExtractGraphics = true + perms.DisabilityExtract = true + perms.Annotate = true + perms.FullPrintQuality = true + return true, perms, nil + } + + return parser.crypter.checkAccessRights(password) +} diff --git a/internal/pdf/core/primitives.go b/internal/pdf/core/primitives.go new file mode 100644 index 0000000..12cb839 --- /dev/null +++ b/internal/pdf/core/primitives.go @@ -0,0 +1,570 @@ +package core + +import ( + "bytes" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// PdfObject is an interface which all primitive PDF objects must implement. +type PdfObject interface { + // Output a string representation of the primitive (for debugging). + String() string + + // Output the PDF primitive as written to file as expected by the standard. + DefaultWriteString() string +} + +// PdfObjectBool represents the primitive PDF boolean object. +type PdfObjectBool bool + +// PdfObjectInteger represents the primitive PDF integer numerical object. +type PdfObjectInteger int64 + +// PdfObjectFloat represents the primitive PDF floating point numerical object. +type PdfObjectFloat float64 + +// PdfObjectString represents the primitive PDF string object. +// TODO (v3): Change to a struct and add a flag for hex/plaintext. +type PdfObjectString string + +// PdfObjectName represents the primitive PDF name object. +type PdfObjectName string + +// PdfObjectArray represents the primitive PDF array object. +type PdfObjectArray []PdfObject + +// PdfObjectDictionary represents the primitive PDF dictionary/map object. +type PdfObjectDictionary struct { + dict map[PdfObjectName]PdfObject + keys []PdfObjectName +} + +// PdfObjectNull represents the primitive PDF null object. +type PdfObjectNull struct{} + +// PdfObjectReference represents the primitive PDF reference object. +type PdfObjectReference struct { + ObjectNumber int64 + GenerationNumber int64 +} + +// PdfIndirectObject represents the primitive PDF indirect object. +type PdfIndirectObject struct { + PdfObjectReference + PdfObject +} + +// PdfObjectStream represents the primitive PDF Object stream. +type PdfObjectStream struct { + PdfObjectReference + *PdfObjectDictionary + Stream []byte +} + +// MakeDict creates and returns an empty PdfObjectDictionary. +func MakeDict() *PdfObjectDictionary { + d := &PdfObjectDictionary{} + d.dict = map[PdfObjectName]PdfObject{} + d.keys = []PdfObjectName{} + return d +} + +// MakeName creates a PdfObjectName from a string. +func MakeName(s string) *PdfObjectName { + name := PdfObjectName(s) + return &name +} + +// MakeInteger creates a PdfObjectInteger from an int64. +func MakeInteger(val int64) *PdfObjectInteger { + num := PdfObjectInteger(val) + return &num +} + +// MakeArray creates an PdfObjectArray from a list of PdfObjects. +func MakeArray(objects ...PdfObject) *PdfObjectArray { + array := PdfObjectArray{} + for _, obj := range objects { + array = append(array, obj) + } + return &array +} + +// MakeArrayFromIntegers creates an PdfObjectArray from a slice of ints, where each array element is +// an PdfObjectInteger. +func MakeArrayFromIntegers(vals []int) *PdfObjectArray { + array := PdfObjectArray{} + for _, val := range vals { + array = append(array, MakeInteger(int64(val))) + } + return &array +} + +// MakeArrayFromIntegers64 creates an PdfObjectArray from a slice of int64s, where each array element +// is an PdfObjectInteger. +func MakeArrayFromIntegers64(vals []int64) *PdfObjectArray { + array := PdfObjectArray{} + for _, val := range vals { + array = append(array, MakeInteger(val)) + } + return &array +} + +// MakeArrayFromFloats creates an PdfObjectArray from a slice of float64s, where each array element is an +// PdfObjectFloat. +func MakeArrayFromFloats(vals []float64) *PdfObjectArray { + array := PdfObjectArray{} + for _, val := range vals { + array = append(array, MakeFloat(val)) + } + return &array +} + +// MakeBool creates an PdfObjectBool from a bool. +func MakeBool(val bool) *PdfObjectBool { + v := PdfObjectBool(val) + return &v +} + +// MakeFloat creates an PdfObjectFloat from a float64. +func MakeFloat(val float64) *PdfObjectFloat { + num := PdfObjectFloat(val) + return &num +} + +// MakeString creates an PdfObjectString from a string. +func MakeString(s string) *PdfObjectString { + str := PdfObjectString(s) + return &str +} + +// MakeNull creates an PdfObjectNull. +func MakeNull() *PdfObjectNull { + null := PdfObjectNull{} + return &null +} + +// MakeIndirectObject creates an PdfIndirectObject with a specified direct object PdfObject. +func MakeIndirectObject(obj PdfObject) *PdfIndirectObject { + ind := &PdfIndirectObject{} + ind.PdfObject = obj + return ind +} + +// MakeStream creates an PdfObjectStream with specified contents and encoding. If encoding is nil, then raw encoding +// will be used (i.e. no encoding applied). +func MakeStream(contents []byte, encoder StreamEncoder) (*PdfObjectStream, error) { + stream := &PdfObjectStream{} + + if encoder == nil { + encoder = NewRawEncoder() + } + + stream.PdfObjectDictionary = encoder.MakeStreamDict() + + encoded, err := encoder.EncodeBytes(contents) + if err != nil { + return nil, err + } + stream.PdfObjectDictionary.Set("Length", MakeInteger(int64(len(encoded)))) + + stream.Stream = encoded + return stream, nil +} + +func (bool *PdfObjectBool) String() string { + if *bool { + return "true" + } else { + return "false" + } +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (bool *PdfObjectBool) DefaultWriteString() string { + if *bool { + return "true" + } else { + return "false" + } +} + +func (int *PdfObjectInteger) String() string { + return fmt.Sprintf("%d", *int) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (int *PdfObjectInteger) DefaultWriteString() string { + return fmt.Sprintf("%d", *int) +} + +func (float *PdfObjectFloat) String() string { + return fmt.Sprintf("%f", *float) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (float *PdfObjectFloat) DefaultWriteString() string { + return fmt.Sprintf("%f", *float) +} + +func (str *PdfObjectString) String() string { + return string(*str) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (str *PdfObjectString) DefaultWriteString() string { + var output bytes.Buffer + + escapeSequences := map[byte]string{ + '\n': "\\n", + '\r': "\\r", + '\t': "\\t", + '\b': "\\b", + '\f': "\\f", + '(': "\\(", + ')': "\\)", + '\\': "\\\\", + } + + output.WriteString("(") + for i := 0; i < len(*str); i++ { + char := (*str)[i] + if escStr, useEsc := escapeSequences[char]; useEsc { + output.WriteString(escStr) + } else { + output.WriteByte(char) + } + } + output.WriteString(")") + + return output.String() +} + +func (name *PdfObjectName) String() string { + return string(*name) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (name *PdfObjectName) DefaultWriteString() string { + var output bytes.Buffer + + if len(*name) > 127 { + common.Log.Debug("error: Name too long (%s)", *name) + } + + output.WriteString("/") + for i := 0; i < len(*name); i++ { + char := (*name)[i] + if !IsPrintable(char) || char == '#' || IsDelimiter(char) { + output.WriteString(fmt.Sprintf("#%.2x", char)) + } else { + output.WriteByte(char) + } + } + + return output.String() +} + +// ToFloat64Array returns a slice of all elements in the array as a float64 slice. An error is returned if the array +// contains non-numeric objects (each element can be either PdfObjectInteger or PdfObjectFloat). +func (array *PdfObjectArray) ToFloat64Array() ([]float64, error) { + vals := []float64{} + + for _, obj := range *array { + if number, is := obj.(*PdfObjectInteger); is { + vals = append(vals, float64(*number)) + } else if number, is := obj.(*PdfObjectFloat); is { + vals = append(vals, float64(*number)) + } else { + return nil, fmt.Errorf("type error") + } + } + + return vals, nil +} + +// ToIntegerArray returns a slice of all array elements as an int slice. An error is returned if the array contains +// non-integer objects. Each element can only be PdfObjectInteger. +func (array *PdfObjectArray) ToIntegerArray() ([]int, error) { + vals := []int{} + + for _, obj := range *array { + if number, is := obj.(*PdfObjectInteger); is { + vals = append(vals, int(*number)) + } else { + return nil, fmt.Errorf("type error") + } + } + + return vals, nil +} + +func (array *PdfObjectArray) String() string { + outStr := "[" + for ind, o := range *array { + outStr += o.String() + if ind < (len(*array) - 1) { + outStr += ", " + } + } + outStr += "]" + return outStr +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (array *PdfObjectArray) DefaultWriteString() string { + outStr := "[" + for ind, o := range *array { + outStr += o.DefaultWriteString() + if ind < (len(*array) - 1) { + outStr += " " + } + } + outStr += "]" + return outStr +} + +// Append adds an PdfObject to the array. +func (array *PdfObjectArray) Append(obj PdfObject) { + *array = append(*array, obj) +} + +func getNumberAsFloat(obj PdfObject) (float64, error) { + if fObj, ok := obj.(*PdfObjectFloat); ok { + return float64(*fObj), nil + } + + if iObj, ok := obj.(*PdfObjectInteger); ok { + return float64(*iObj), nil + } + + return 0, fmt.Errorf("not a number") +} + +// GetAsFloat64Slice returns the array as []float64 slice. +// Returns an error if not entirely numeric (only PdfObjectIntegers, PdfObjectFloats). +func (array *PdfObjectArray) GetAsFloat64Slice() ([]float64, error) { + slice := []float64{} + + for _, obj := range *array { + obj := TraceToDirectObject(obj) + number, err := getNumberAsFloat(obj) + if err != nil { + return nil, fmt.Errorf("array element not a number") + } + slice = append(slice, number) + } + + return slice, nil +} + +// Merge merges in key/values from another dictionary. Overwriting if has same keys. +func (d *PdfObjectDictionary) Merge(another *PdfObjectDictionary) { + if another != nil { + for _, key := range another.Keys() { + val := another.Get(key) + d.Set(key, val) + } + } +} + +func (d *PdfObjectDictionary) String() string { + outStr := "Dict(" + for _, k := range d.keys { + v := d.dict[k] + outStr += fmt.Sprintf("\"%s\": %s, ", k, v.String()) + } + outStr += ")" + return outStr +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (d *PdfObjectDictionary) DefaultWriteString() string { + outStr := "<<" + for _, k := range d.keys { + v := d.dict[k] + common.Log.Trace("Writing k: %s %T %v %v", k, v, k, v) + outStr += k.DefaultWriteString() + outStr += " " + outStr += v.DefaultWriteString() + } + outStr += ">>" + return outStr +} + +// Set sets the dictionary's key -> val mapping entry. Overwrites if key already set. +func (d *PdfObjectDictionary) Set(key PdfObjectName, val PdfObject) { + found := false + for _, k := range d.keys { + if k == key { + found = true + break + } + } + + if !found { + d.keys = append(d.keys, key) + } + + d.dict[key] = val +} + +// Get returns the PdfObject corresponding to the specified key. +// Returns a nil value if the key is not set. +// +// The design is such that we only return 1 value. +// The reason is that, it will be easy to do type casts such as +// name, ok := dict.Get("mykey").(*PdfObjectName) +// if !ok .... +func (d *PdfObjectDictionary) Get(key PdfObjectName) PdfObject { + val, has := d.dict[key] + if !has { + return nil + } + return val +} + +// Keys returns the list of keys in the dictionary. +func (d *PdfObjectDictionary) Keys() []PdfObjectName { + return d.keys +} + +// Remove removes an element specified by key. +func (d *PdfObjectDictionary) Remove(key PdfObjectName) { + idx := -1 + for i, k := range d.keys { + if k == key { + idx = i + break + } + } + + if idx >= 0 { + // Found. Remove from key list and map. + d.keys = append(d.keys[:idx], d.keys[idx+1:]...) + delete(d.dict, key) + } +} + +// SetIfNotNil sets the dictionary's key -> val mapping entry -IF- val is not nil. +// Note that we take care to perform a type switch. Otherwise if we would supply a nil value +// of another type, e.g. (PdfObjectArray*)(nil), then it would not be a PdfObject(nil) and thus +// would get set. +func (d *PdfObjectDictionary) SetIfNotNil(key PdfObjectName, val PdfObject) { + if val != nil { + switch t := val.(type) { + case *PdfObjectName: + if t != nil { + d.Set(key, val) + } + case *PdfObjectDictionary: + if t != nil { + d.Set(key, val) + } + case *PdfObjectStream: + if t != nil { + d.Set(key, val) + } + case *PdfObjectString: + if t != nil { + d.Set(key, val) + } + case *PdfObjectNull: + if t != nil { + d.Set(key, val) + } + case *PdfObjectInteger: + if t != nil { + d.Set(key, val) + } + case *PdfObjectArray: + if t != nil { + d.Set(key, val) + } + case *PdfObjectBool: + if t != nil { + d.Set(key, val) + } + case *PdfObjectFloat: + if t != nil { + d.Set(key, val) + } + case *PdfObjectReference: + if t != nil { + d.Set(key, val) + } + case *PdfIndirectObject: + if t != nil { + d.Set(key, val) + } + default: + common.Log.Error("error: Unknown type: %T - should never happen!", val) + } + } +} + +func (ref *PdfObjectReference) String() string { + return fmt.Sprintf("Ref(%d %d)", ref.ObjectNumber, ref.GenerationNumber) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (ref *PdfObjectReference) DefaultWriteString() string { + return fmt.Sprintf("%d %d R", ref.ObjectNumber, ref.GenerationNumber) +} + +func (ind *PdfIndirectObject) String() string { + // Avoid printing out the object, can cause problems with circular + // references. + return fmt.Sprintf("IObject:%d", (*ind).ObjectNumber) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (ind *PdfIndirectObject) DefaultWriteString() string { + outStr := fmt.Sprintf("%d 0 R", (*ind).ObjectNumber) + return outStr +} + +func (stream *PdfObjectStream) String() string { + return fmt.Sprintf("Object stream %d: %s", stream.ObjectNumber, stream.PdfObjectDictionary) +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (stream *PdfObjectStream) DefaultWriteString() string { + outStr := fmt.Sprintf("%d 0 R", (*stream).ObjectNumber) + return outStr +} + +func (null *PdfObjectNull) String() string { + return "null" +} + +// DefaultWriteString outputs the object as it is to be written to file. +func (null *PdfObjectNull) DefaultWriteString() string { + return "null" +} + +// Handy functions to work with primitive objects. + +// TraceMaxDepth specifies the maximum recursion depth allowed. +const TraceMaxDepth = 20 + +// TraceToDirectObject traces a PdfObject to a direct object. For example direct objects contained +// in indirect objects (can be double referenced even). +// +// Note: This function does not trace/resolve references. That needs to be done beforehand. +func TraceToDirectObject(obj PdfObject) PdfObject { + iobj, isIndirectObj := obj.(*PdfIndirectObject) + depth := 0 + for isIndirectObj { + obj = iobj.PdfObject + iobj, isIndirectObj = obj.(*PdfIndirectObject) + depth++ + if depth > TraceMaxDepth { + common.Log.Error("error: Trace depth level beyond %d - not going deeper!", TraceMaxDepth) + return nil + } + } + return obj +} diff --git a/internal/pdf/core/repairs.go b/internal/pdf/core/repairs.go new file mode 100644 index 0000000..ffc704b --- /dev/null +++ b/internal/pdf/core/repairs.go @@ -0,0 +1,281 @@ +// Routines related to repairing malformed pdf files. + +package core + +import ( + "errors" + "fmt" + "os" + "regexp" + + "bufio" + "io" + "strconv" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +var repairReXrefTable = regexp.MustCompile(`[\r\n]\s*(xref)\s*[\r\n]`) + +// Locates a standard Xref table by looking for the "xref" entry. +// Xref object stream not supported. +func (parser *PdfParser) repairLocateXref() (int64, error) { + readBuf := int64(1000) + parser.rs.Seek(-readBuf, os.SEEK_CUR) + + curOffset, err := parser.rs.Seek(0, os.SEEK_CUR) + if err != nil { + return 0, err + } + b2 := make([]byte, readBuf) + parser.rs.Read(b2) + + results := repairReXrefTable.FindAllStringIndex(string(b2), -1) + if len(results) < 1 { + common.Log.Debug("error: Repair: xref not found!") + return 0, errors.New("repair: xref not found") + } + + localOffset := int64(results[len(results)-1][0]) + xrefOffset := curOffset + localOffset + return xrefOffset, nil +} + +// Renumbers the xref table. +// Useful when the cross reference is pointing to an object with the wrong number. +// Update the table. +func (parser *PdfParser) rebuildXrefTable() error { + newXrefs := XrefTable{} + for objNum, xref := range parser.xrefs { + obj, _, err := parser.lookupByNumberWrapper(objNum, false) + if err != nil { + common.Log.Debug("error: Unable to look up object (%s)", err) + common.Log.Debug("error: Xref table completely broken - attempting to repair ") + xrefTable, err := parser.repairRebuildXrefsTopDown() + if err != nil { + common.Log.Debug("error: Failed xref rebuild repair (%s)", err) + return err + } + parser.xrefs = *xrefTable + common.Log.Debug("Repaired xref table built") + return nil + } + actObjNum, actGenNum, err := getObjectNumber(obj) + if err != nil { + return err + } + + xref.objectNumber = int(actObjNum) + xref.generation = int(actGenNum) + newXrefs[int(actObjNum)] = xref + } + + parser.xrefs = newXrefs + common.Log.Debug("New xref table built") + printXrefTable(parser.xrefs) + return nil +} + +// Parses and returns the object and generation number from a string such as "12 0 obj" -> (12,0,nil). +func parseObjectNumberFromString(str string) (int, int, error) { + result := reIndirectObject.FindStringSubmatch(str) + if len(result) < 3 { + return 0, 0, errors.New("unable to detect indirect object signature") + } + + on, _ := strconv.Atoi(result[1]) + gn, _ := strconv.Atoi(result[2]) + + return on, gn, nil +} + +// Parse the entire file from top down. +// Goes through the file byte-by-byte looking for " obj" patterns. +// N.B. This collects the XREF_TABLE_ENTRY data only. +func (parser *PdfParser) repairRebuildXrefsTopDown() (*XrefTable, error) { + if parser.repairsAttempted { + // Avoid multiple repairs (only try once). + return nil, fmt.Errorf("repair failed") + } + parser.repairsAttempted = true + + // Go to beginning, reset reader. + parser.rs.Seek(0, os.SEEK_SET) + parser.reader = bufio.NewReader(parser.rs) + + // Keep a running buffer of last bytes. + bufLen := 20 + last := make([]byte, bufLen) + + xrefTable := XrefTable{} + for { + b, err := parser.reader.ReadByte() + if err != nil { + if err == io.EOF { + break + } else { + return nil, err + } + } + + // Format: + // object number - whitespace - generation number - obj + // e.g. "12 0 obj" + if b == 'j' && last[bufLen-1] == 'b' && last[bufLen-2] == 'o' && IsWhiteSpace(last[bufLen-3]) { + i := bufLen - 4 + // Go past whitespace + for IsWhiteSpace(last[i]) && i > 0 { + i-- + } + if i == 0 || !IsDecimalDigit(last[i]) { + continue + } + // Go past generation number + for IsDecimalDigit(last[i]) && i > 0 { + i-- + } + if i == 0 || !IsWhiteSpace(last[i]) { + continue + } + // Go past whitespace + for IsWhiteSpace(last[i]) && i > 0 { + i-- + } + if i == 0 || !IsDecimalDigit(last[i]) { + continue + } + // Go past object number. + for IsDecimalDigit(last[i]) && i > 0 { + i-- + } + if i == 0 { + continue // Probably too long to be a valid object... + } + + objOffset := parser.GetFileOffset() - int64(bufLen-i) + + objstr := append(last[i+1:], b) + objNum, genNum, err := parseObjectNumberFromString(string(objstr)) + if err != nil { + common.Log.Debug("Unable to parse object number: %v", err) + return nil, err + } + + // Create and insert the XREF entry if not existing, or the generation number is higher. + if curXref, has := xrefTable[objNum]; !has || curXref.generation < genNum { + // Make the entry for the cross ref table. + xrefEntry := XrefObject{} + xrefEntry.xtype = XREF_TABLE_ENTRY + xrefEntry.objectNumber = int(objNum) + xrefEntry.generation = int(genNum) + xrefEntry.offset = objOffset + xrefTable[objNum] = xrefEntry + } + } + + last = append(last[1:bufLen], b) + } + + return &xrefTable, nil +} + +// Look for first sign of xref table from end of file. +func (parser *PdfParser) repairSeekXrefMarker() error { + // Get the file size. + fSize, err := parser.rs.Seek(0, os.SEEK_END) + if err != nil { + return err + } + + reXrefTableStart := regexp.MustCompile(`\sxref\s*`) + + // Define the starting point (from the end of the file) to search from. + var offset int64 = 0 + + // Define an buffer length in terms of how many bytes to read from the end of the file. + var buflen int64 = 1000 + + for offset < fSize { + if fSize <= (buflen + offset) { + buflen = fSize - offset + } + + // Move back enough (as we need to read forward). + _, err := parser.rs.Seek(-offset-buflen, os.SEEK_END) + if err != nil { + return err + } + + // Read the data. + b1 := make([]byte, buflen) + parser.rs.Read(b1) + + common.Log.Trace("Looking for xref : \"%s\"", string(b1)) + ind := reXrefTableStart.FindAllStringIndex(string(b1), -1) + if ind != nil { + // Found it. + lastInd := ind[len(ind)-1] + common.Log.Trace("Ind: % d", ind) + parser.rs.Seek(-offset-buflen+int64(lastInd[0]), os.SEEK_END) + parser.reader = bufio.NewReader(parser.rs) + // Go past whitespace, finish at 'x'. + for { + bb, err := parser.reader.Peek(1) + if err != nil { + return err + } + common.Log.Trace("B: %d %c", bb[0], bb[0]) + if !IsWhiteSpace(bb[0]) { + break + } + parser.reader.Discard(1) + } + + return nil + } else { + common.Log.Debug("warning: EOF marker not found! - continue seeking") + } + + offset += buflen + } + + common.Log.Debug("error: Xref table marker was not found.") + return errors.New("xref not found ") +} + +// Called when Pdf version not found normally. Looks for the PDF version by scanning top-down. +// %PDF-1.7 +func (parser *PdfParser) seekPdfVersionTopDown() (int, int, error) { + // Go to beginning, reset reader. + parser.rs.Seek(0, os.SEEK_SET) + parser.reader = bufio.NewReader(parser.rs) + + // Keep a running buffer of last bytes. + bufLen := 20 + last := make([]byte, bufLen) + + for { + b, err := parser.reader.ReadByte() + if err != nil { + if err == io.EOF { + break + } else { + return 0, 0, err + } + } + + // Format: + // object number - whitespace - generation number - obj + // e.g. "12 0 obj" + if IsDecimalDigit(b) && last[bufLen-1] == '.' && IsDecimalDigit(last[bufLen-2]) && last[bufLen-3] == '-' && + last[bufLen-4] == 'F' && last[bufLen-5] == 'D' && last[bufLen-6] == 'P' { + major := int(last[bufLen-2] - '0') + minor := int(b - '0') + return major, minor, nil + } + + last = append(last[1:bufLen], b) + } + + return 0, 0, errors.New("version not found") +} diff --git a/internal/pdf/core/stream.go b/internal/pdf/core/stream.go new file mode 100644 index 0000000..bb82a28 --- /dev/null +++ b/internal/pdf/core/stream.go @@ -0,0 +1,129 @@ +package core + +import ( + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// NewEncoderFromStream creates a StreamEncoder based on the stream's dictionary. +func NewEncoderFromStream(streamObj *PdfObjectStream) (StreamEncoder, error) { + filterObj := TraceToDirectObject(streamObj.PdfObjectDictionary.Get("Filter")) + if filterObj == nil { + // No filter, return raw data back. + return NewRawEncoder(), nil + } + + if _, isNull := filterObj.(*PdfObjectNull); isNull { + // Filter is null -> raw data. + return NewRawEncoder(), nil + } + + // The filter should be a name or an array with a list of filter names. + method, ok := filterObj.(*PdfObjectName) + if !ok { + array, ok := filterObj.(*PdfObjectArray) + if !ok { + return nil, fmt.Errorf("filter not a Name or Array object") + } + if len(*array) == 0 { + // Empty array -> indicates raw filter (no filter). + return NewRawEncoder(), nil + } + + if len(*array) != 1 { + menc, err := newMultiEncoderFromStream(streamObj) + if err != nil { + common.Log.Error("Failed creating multi encoder: %v", err) + return nil, err + } + + common.Log.Trace("Multi enc: %s\n", menc) + return menc, nil + } + + // Single element. + filterObj = (*array)[0] + method, ok = filterObj.(*PdfObjectName) + if !ok { + return nil, fmt.Errorf("filter array member not a Name object") + } + } + + switch *method { + case StreamEncodingFilterNameFlate: + return newFlateEncoderFromStream(streamObj, nil) + case StreamEncodingFilterNameLZW: + return newLZWEncoderFromStream(streamObj, nil) + case StreamEncodingFilterNameDCT: + return newDCTEncoderFromStream(streamObj, nil) + case StreamEncodingFilterNameRunLength: + return newRunLengthEncoderFromStream() + case StreamEncodingFilterNameASCIIHex: + return NewASCIIHexEncoder(), nil + case StreamEncodingFilterNameASCII85, "A85": + return NewASCII85Encoder(), nil + case StreamEncodingFilterNameCCITTFax: + return NewCCITTFaxEncoder(), nil + case StreamEncodingFilterNameJBIG2: + return NewJBIG2Encoder(), nil + case StreamEncodingFilterNameJPX: + return NewJPXEncoder(), nil + default: + common.Log.Debug("error: Unsupported encoding method!") + return nil, fmt.Errorf("unsupported encoding method (%s)", *method) + } +} + +// DecodeStream decodes the stream data and returns the decoded data. +// An error is returned upon failure. +func DecodeStream(streamObj *PdfObjectStream) ([]byte, error) { + common.Log.Trace("Decode stream") + + encoder, err := NewEncoderFromStream(streamObj) + if err != nil { + common.Log.Debug("Stream decoding failed: %v", err) + return nil, err + } + common.Log.Trace("Encoder: %#v\n", encoder) + + decoded, err := encoder.DecodeStream(streamObj) + if err != nil { + common.Log.Debug("Stream decoding failed: %v", err) + return nil, err + } + + return decoded, nil +} + +// EncodeStream encodes the stream data using the encoded specified by the stream's dictionary. +func EncodeStream(streamObj *PdfObjectStream) error { + common.Log.Trace("Encode stream") + + encoder, err := NewEncoderFromStream(streamObj) + if err != nil { + common.Log.Debug("Stream decoding failed: %v", err) + return err + } + + if lzwenc, is := encoder.(*LZWEncoder); is { + // If LZW: + // Make sure to use EarlyChange 0.. We do not have write support for 1 yet. + lzwenc.EarlyChange = 0 + streamObj.PdfObjectDictionary.Set("EarlyChange", MakeInteger(0)) + } + + common.Log.Trace("Encoder: %+v\n", encoder) + encoded, err := encoder.EncodeBytes(streamObj.Stream) + if err != nil { + common.Log.Debug("Stream encoding failed: %v", err) + return err + } + + streamObj.Stream = encoded + + // Update length + streamObj.PdfObjectDictionary.Set("Length", MakeInteger(int64(len(encoded)))) + + return nil +} diff --git a/internal/pdf/core/symbols.go b/internal/pdf/core/symbols.go new file mode 100644 index 0000000..5684b42 --- /dev/null +++ b/internal/pdf/core/symbols.go @@ -0,0 +1,74 @@ +package core + +// IsWhiteSpace checks if byte represents a white space character. +// TODO (v3): Unexport. +func IsWhiteSpace(ch byte) bool { + // Table 1 white-space characters (7.2.2 Character Set) + // spaceCharacters := string([]byte{0x00, 0x09, 0x0A, 0x0C, 0x0D, 0x20}) + if (ch == 0x00) || (ch == 0x09) || (ch == 0x0A) || (ch == 0x0C) || (ch == 0x0D) || (ch == 0x20) { + return true + } + return false +} + +// IsFloatDigit checks if a character can be a part of a float number string. +// TODO (v3): Unexport. +func IsFloatDigit(c byte) bool { + return ('0' <= c && c <= '9') || c == '.' +} + +// IsDecimalDigit checks if the character is a part of a decimal number string. +// TODO (v3): Unexport. +func IsDecimalDigit(c byte) bool { + if c >= '0' && c <= '9' { + return true + } else { + return false + } +} + +// IsOctalDigit checks if a character can be part of an octal digit string. +// TODO (v3): Unexport. +func IsOctalDigit(c byte) bool { + if c >= '0' && c <= '7' { + return true + } else { + return false + } +} + +// IsPrintable checks if a character is printable. +// Regular characters that are outside the range EXCLAMATION MARK(21h) +// (!) to TILDE (7Eh) (~) should be written using the hexadecimal notation. +// TODO (v3): Unexport. +func IsPrintable(char byte) bool { + if char < 0x21 || char > 0x7E { + return false + } + return true +} + +// IsDelimiter checks if a character represents a delimiter. +// TODO (v3): Unexport. +func IsDelimiter(char byte) bool { + if char == '(' || char == ')' { + return true + } + if char == '<' || char == '>' { + return true + } + if char == '[' || char == ']' { + return true + } + if char == '{' || char == '}' { + return true + } + if char == '/' { + return true + } + if char == '%' { + return true + } + + return false +} diff --git a/internal/pdf/core/utils.go b/internal/pdf/core/utils.go new file mode 100644 index 0000000..fd5b1b2 --- /dev/null +++ b/internal/pdf/core/utils.go @@ -0,0 +1,172 @@ +package core + +import ( + "errors" + "fmt" + "sort" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// Check slice range to make sure within bounds for accessing: +// +// slice[a:b] where sliceLen=len(slice). +func checkBounds(sliceLen, a, b int) error { + if a < 0 || a > sliceLen { + return errors.New("slice index a out of bounds") + } + if b < a { + return errors.New("invalid slice index b < a") + } + if b > sliceLen { + return errors.New("slice index b out of bounds") + } + + return nil +} + +// Inspect analyzes the document object structure. +func (parser *PdfParser) Inspect() (map[string]int, error) { + return parser.inspect() +} + +// GetObjectNums returns a sorted list of object numbers of the PDF objects in the file. +func (parser *PdfParser) GetObjectNums() []int { + objNums := []int{} + for _, x := range parser.xrefs { + objNums = append(objNums, x.objectNumber) + } + + // Sort the object numbers to give consistent ordering of PDF objects in output. + // Needed since parser.xrefs is a map. + sort.Ints(objNums) + + return objNums +} + +/* + * Inspect object types. + * Go through all objects in the cross ref table and detect the types. + * Mostly for debugging purposes and inspecting odd PDF files. + */ +func (parser *PdfParser) inspect() (map[string]int, error) { + common.Log.Trace("--------INSPECT ----------") + common.Log.Trace("Xref table:") + + objTypes := map[string]int{} + objCount := 0 + failedCount := 0 + + keys := []int{} + for k := range parser.xrefs { + keys = append(keys, k) + } + sort.Ints(keys) + + i := 0 + for _, k := range keys { + xref := parser.xrefs[k] + if xref.objectNumber == 0 { + continue + } + objCount++ + common.Log.Trace("==========") + common.Log.Trace("Looking up object number: %d", xref.objectNumber) + o, err := parser.LookupByNumber(xref.objectNumber) + if err != nil { + common.Log.Trace("error: Fail to lookup obj %d (%s)", xref.objectNumber, err) + failedCount++ + continue + } + + common.Log.Trace("obj: %s", o) + + iobj, isIndirect := o.(*PdfIndirectObject) + if isIndirect { + common.Log.Trace("IND OOBJ %d: %s", xref.objectNumber, iobj) + dict, isDict := iobj.PdfObject.(*PdfObjectDictionary) + if isDict { + // Check if has Type parameter. + if ot, has := dict.Get("Type").(*PdfObjectName); has { + otype := string(*ot) + common.Log.Trace("---> Obj type: %s", otype) + _, isDefined := objTypes[otype] + if isDefined { + objTypes[otype]++ + } else { + objTypes[otype] = 1 + } + } else if ot, has := dict.Get("Subtype").(*PdfObjectName); has { + // Check if subtype + otype := string(*ot) + common.Log.Trace("---> Obj subtype: %s", otype) + _, isDefined := objTypes[otype] + if isDefined { + objTypes[otype]++ + } else { + objTypes[otype] = 1 + } + } + if val, has := dict.Get("S").(*PdfObjectName); has && *val == "JavaScript" { + // Check if Javascript. + _, isDefined := objTypes["JavaScript"] + if isDefined { + objTypes["JavaScript"]++ + } else { + objTypes["JavaScript"] = 1 + } + } + + } + } else if sobj, isStream := o.(*PdfObjectStream); isStream { + if otype, ok := sobj.PdfObjectDictionary.Get("Type").(*PdfObjectName); ok { + common.Log.Trace("--> Stream object type: %s", *otype) + k := string(*otype) + objTypes[k]++ + } + } else { // Direct. + dict, isDict := o.(*PdfObjectDictionary) + if isDict { + ot, isName := dict.Get("Type").(*PdfObjectName) + if isName { + otype := string(*ot) + common.Log.Trace("--- obj type %s", otype) + objTypes[otype]++ + } + } + common.Log.Trace("DIRECT OBJ %d: %s", xref.objectNumber, o) + } + + i++ + } + common.Log.Trace("--------EOF INSPECT ----------") + common.Log.Trace("=======") + common.Log.Trace("Object count: %d", objCount) + common.Log.Trace("Failed lookup: %d", failedCount) + for t, c := range objTypes { + common.Log.Trace("%s: %d", t, c) + } + common.Log.Trace("=======") + + if len(parser.xrefs) < 1 { + common.Log.Debug("error: This document is invalid (xref table missing!)") + return nil, fmt.Errorf("invalid document (xref table missing)") + } + + fontObjs, ok := objTypes["Font"] + if !ok || fontObjs < 2 { + common.Log.Trace("This document is probably scanned!") + } else { + common.Log.Trace("This document is valid for extraction!") + } + + return objTypes, nil +} + +func absInt(x int) int { + if x < 0 { + return -x + } else { + return x + } +} diff --git a/internal/pdf/creator/block.go b/internal/pdf/creator/block.go new file mode 100644 index 0000000..cf8877b --- /dev/null +++ b/internal/pdf/creator/block.go @@ -0,0 +1,543 @@ +package creator + +import ( + "errors" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Block contains a portion of PDF Page contents. It has a width and a position and can +// be placed anywhere on a Page. It can even contain a whole Page, and is used in the creator +// where each Drawable object can output one or more blocks, each representing content for separate pages +// (typically needed when Page breaks occur). +type Block struct { + // Block contents and resources. + contents *contentstream.ContentStreamOperations + resources *model.PdfPageResources + + // Positioning: relative / absolute. + positioning positioning + + // Absolute coordinates (when in absolute mode). + xPos, yPos float64 + + // The bounding box for the block. + width float64 + height float64 + + // Rotation angle. + angle float64 + + // Margins to be applied around the block when drawing on Page. + margins margins +} + +// NewBlock creates a new Block with specified width and height. +func NewBlock(width float64, height float64) *Block { + b := &Block{} + b.contents = &contentstream.ContentStreamOperations{} + b.resources = model.NewPdfPageResources() + b.width = width + b.height = height + return b +} + +// NewBlockFromPage creates a Block from a PDF Page. Useful for loading template pages as blocks from a PDF document +// and additional content with the creator. +func NewBlockFromPage(page *model.PdfPage) (*Block, error) { + b := &Block{} + + content, err := page.GetAllContentStreams() + if err != nil { + return nil, err + } + + contentParser := contentstream.NewContentStreamParser(content) + operations, err := contentParser.Parse() + if err != nil { + return nil, err + } + operations.WrapIfNeeded() + + b.contents = operations + + if page.Resources != nil { + b.resources = page.Resources + } else { + b.resources = model.NewPdfPageResources() + } + + mbox, err := page.GetMediaBox() + if err != nil { + return nil, err + } + + if mbox.Llx != 0 || mbox.Lly != 0 { + // Account for media box offset if any. + b.translate(-mbox.Llx, mbox.Lly) + } + b.width = mbox.Urx - mbox.Llx + b.height = mbox.Ury - mbox.Lly + + return b, nil +} + +// SetAngle sets the rotation angle in degrees. +func (blk *Block) SetAngle(angleDeg float64) { + blk.angle = angleDeg +} + +// duplicate duplicates the block with a new copy of the operations list. +func (blk *Block) duplicate() *Block { + dup := &Block{} + + // Copy over. + *dup = *blk + + dupContents := contentstream.ContentStreamOperations{} + dupContents = append(dupContents, *blk.contents...) + dup.contents = &dupContents + + return dup +} + +// GeneratePageBlocks draws the block contents on a template Page block. +// Implements the Drawable interface. +func (blk *Block) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + blocks := []*Block{} + + if blk.positioning.isRelative() { + // Draw at current ctx.X, ctx.Y position + dup := blk.duplicate() + cc := contentstream.NewContentCreator() + cc.Translate(ctx.X, ctx.PageHeight-ctx.Y-blk.height) + if blk.angle != 0 { + // Make the rotation about the upper left corner. + // XXX/TODO: Account for rotation origin. (Consider). + cc.Translate(0, blk.Height()) + cc.RotateDeg(blk.angle) + cc.Translate(0, -blk.Height()) + } + contents := append(*cc.Operations(), *dup.contents...) + contents.WrapIfNeeded() + dup.contents = &contents + + blocks = append(blocks, dup) + + ctx.Y += blk.height + } else { + // Absolute. Draw at blk.xPos, blk.yPos position + dup := blk.duplicate() + cc := contentstream.NewContentCreator() + cc.Translate(blk.xPos, ctx.PageHeight-blk.yPos-blk.height) + if blk.angle != 0 { + // Make the rotation about the upper left corner. + // XXX/TODO: Consider supporting specification of rotation origin. + cc.Translate(0, blk.Height()) + cc.RotateDeg(blk.angle) + cc.Translate(0, -blk.Height()) + } + contents := append(*cc.Operations(), *dup.contents...) + contents.WrapIfNeeded() + dup.contents = &contents + + blocks = append(blocks, dup) + } + + return blocks, ctx, nil +} + +// Height returns the Block's height. +func (blk *Block) Height() float64 { + return blk.height +} + +// Width returns the Block's width. +func (blk *Block) Width() float64 { + return blk.width +} + +// addContents adds contents to a block. Wrap both existing and new contents to ensure +// independence of content operations. +func (blk *Block) addContents(operations *contentstream.ContentStreamOperations) { + blk.contents.WrapIfNeeded() + operations.WrapIfNeeded() + *blk.contents = append(*blk.contents, *operations...) +} + +// addContentsByString adds contents to a block by contents string. +func (blk *Block) addContentsByString(contents string) error { + cc := contentstream.NewContentStreamParser(contents) + operations, err := cc.Parse() + if err != nil { + return err + } + + blk.contents.WrapIfNeeded() + operations.WrapIfNeeded() + *blk.contents = append(*blk.contents, *operations...) + + return nil +} + +// SetMargins sets the Block's left, right, top, bottom, margins. +func (blk *Block) SetMargins(left, right, top, bottom float64) { + blk.margins.left = left + blk.margins.right = right + blk.margins.top = top + blk.margins.bottom = bottom +} + +// GetMargins returns the Block's margins: left, right, top, bottom. +func (blk *Block) GetMargins() (float64, float64, float64, float64) { + return blk.margins.left, blk.margins.right, blk.margins.top, blk.margins.bottom +} + +// SetPos sets the Block's positioning to absolute mode with the specified coordinates. +func (blk *Block) SetPos(x, y float64) { + blk.positioning = positionAbsolute + blk.xPos = x + blk.yPos = y +} + +// Scale block by specified factors in the x and y directions. +func (blk *Block) Scale(sx, sy float64) { + ops := contentstream.NewContentCreator(). + Scale(sx, sy). + Operations() + + *blk.contents = append(*ops, *blk.contents...) + blk.contents.WrapIfNeeded() + + blk.width *= sx + blk.height *= sy +} + +// ScaleToWidth scales the Block to a specified width, maintaining the same aspect ratio. +func (blk *Block) ScaleToWidth(w float64) { + ratio := w / blk.width + blk.Scale(ratio, ratio) +} + +// ScaleToHeight scales the Block to a specified height, maintaining the same aspect ratio. +func (blk *Block) ScaleToHeight(h float64) { + ratio := h / blk.height + blk.Scale(ratio, ratio) +} + +// translate translates the block, moving block contents on the PDF. For internal use. +func (blk *Block) translate(tx, ty float64) { + ops := contentstream.NewContentCreator(). + Translate(tx, -ty). + Operations() + + *blk.contents = append(*ops, *blk.contents...) + blk.contents.WrapIfNeeded() +} + +// drawToPage draws the block on a PdfPage. Generates the content streams and appends to the PdfPage's content +// stream and links needed resources. +func (blk *Block) drawToPage(page *model.PdfPage) error { + // Check if Page contents are wrapped - if not wrap it. + content, err := page.GetAllContentStreams() + if err != nil { + return err + } + + contentParser := contentstream.NewContentStreamParser(content) + ops, err := contentParser.Parse() + if err != nil { + return err + } + ops.WrapIfNeeded() + + // Ensure resource dictionaries are available. + if page.Resources == nil { + page.Resources = model.NewPdfPageResources() + } + + // Merge the contents into ops. + err = mergeContents(ops, page.Resources, blk.contents, blk.resources) + if err != nil { + return err + } + + err = page.SetContentStreams([]string{string(ops.Bytes())}, core.NewFlateEncoder()) + if err != nil { + return err + } + + return nil +} + +// Draw draws the drawable d on the block. +// Note that the drawable must not wrap, i.e. only return one block. Otherwise an error is returned. +func (blk *Block) Draw(d Drawable) error { + ctx := DrawContext{} + ctx.Width = blk.width + ctx.Height = blk.height + ctx.PageWidth = blk.width + ctx.PageHeight = blk.height + ctx.X = 0 // Upper left corner of block + ctx.Y = 0 + + blocks, _, err := d.GeneratePageBlocks(ctx) + if err != nil { + return err + } + + if len(blocks) != 1 { + return errors.New("too many output blocks") + } + + for _, newBlock := range blocks { + err := mergeContents(blk.contents, blk.resources, newBlock.contents, newBlock.resources) + if err != nil { + return err + } + } + + return nil +} + +// DrawWithContext draws the Block using the specified drawing context. +func (blk *Block) DrawWithContext(d Drawable, ctx DrawContext) error { + blocks, _, err := d.GeneratePageBlocks(ctx) + if err != nil { + return err + } + + if len(blocks) != 1 { + return errors.New("too many output blocks") + } + + for _, newBlock := range blocks { + err := mergeContents(blk.contents, blk.resources, newBlock.contents, newBlock.resources) + if err != nil { + return err + } + } + + return nil +} + +// mergeBlocks appends another block onto the block. +func (blk *Block) mergeBlocks(toAdd *Block) error { + err := mergeContents(blk.contents, blk.resources, toAdd.contents, toAdd.resources) + return err +} + +// mergeContents merges contents and content streams. +// Active in the sense that it modified the input contents and resources. +func mergeContents(contents *contentstream.ContentStreamOperations, resources *model.PdfPageResources, + contentsToAdd *contentstream.ContentStreamOperations, resourcesToAdd *model.PdfPageResources) error { + + // To properly add contents from a block, we need to handle the resources that the block is + // using and make sure it is accessible in the modified Page. + // + // Currently supporting: Font, XObject, Colormap, Pattern, Shading, GState resources + // from the block. + // + + xobjectMap := map[core.PdfObjectName]core.PdfObjectName{} + fontMap := map[core.PdfObjectName]core.PdfObjectName{} + csMap := map[core.PdfObjectName]core.PdfObjectName{} + patternMap := map[core.PdfObjectName]core.PdfObjectName{} + shadingMap := map[core.PdfObjectName]core.PdfObjectName{} + gstateMap := map[core.PdfObjectName]core.PdfObjectName{} + + for _, op := range *contentsToAdd { + switch op.Operand { + case "Do": + // XObject. + if len(op.Params) == 1 { + if name, ok := op.Params[0].(*core.PdfObjectName); ok { + if _, processed := xobjectMap[*name]; !processed { + var useName core.PdfObjectName + // Process if not already processed.. + obj, _ := resourcesToAdd.GetXObjectByName(*name) + if obj != nil { + useName = *name + for { + obj2, _ := resources.GetXObjectByName(useName) + if obj2 == nil || obj2 == obj { + break + } + // If there is a conflict... then append "0" to the name.. + useName = useName + "0" + } + } + + resources.SetXObjectByName(useName, obj) + xobjectMap[*name] = useName + } + useName := xobjectMap[*name] + op.Params[0] = &useName + } + } + case "Tf": + // Font. + if len(op.Params) == 2 { + if name, ok := op.Params[0].(*core.PdfObjectName); ok { + if _, processed := fontMap[*name]; !processed { + var useName core.PdfObjectName + // Process if not already processed. + obj, found := resourcesToAdd.GetFontByName(*name) + if found { + useName = *name + for { + obj2, found := resources.GetFontByName(useName) + if !found || obj2 == obj { + break + } + useName = useName + "0" + } + } + + resources.SetFontByName(useName, obj) + fontMap[*name] = useName + } + + useName := fontMap[*name] + op.Params[0] = &useName + } + } + case "CS", "cs": + // Colorspace. + if len(op.Params) == 1 { + if name, ok := op.Params[0].(*core.PdfObjectName); ok { + if _, processed := csMap[*name]; !processed { + var useName core.PdfObjectName + // Process if not already processed. + cs, found := resourcesToAdd.GetColorspaceByName(*name) + if found { + useName = *name + for { + cs2, found := resources.GetColorspaceByName(useName) + if !found || cs == cs2 { + break + } + useName = useName + "0" + } + + resources.SetColorspaceByName(useName, cs) + csMap[*name] = useName + } else { + common.Log.Debug("Colorspace not found") + } + } + + if useName, has := csMap[*name]; has { + op.Params[0] = &useName + } else { + common.Log.Debug("error: Colorspace %s not found", *name) + } + } + } + case "SCN", "scn": + if len(op.Params) == 1 { + if name, ok := op.Params[0].(*core.PdfObjectName); ok { + if _, processed := patternMap[*name]; !processed { + var useName core.PdfObjectName + p, found := resourcesToAdd.GetPatternByName(*name) + if found { + useName = *name + for { + p2, found := resources.GetPatternByName(useName) + if !found || p2 == p { + break + } + useName = useName + "0" + } + + err := resources.SetPatternByName(useName, p.ToPdfObject()) + if err != nil { + return err + } + + patternMap[*name] = useName + } + } + + if useName, has := patternMap[*name]; has { + op.Params[0] = &useName + } + } + } + case "sh": + // Shading. + if len(op.Params) == 1 { + if name, ok := op.Params[0].(*core.PdfObjectName); ok { + if _, processed := shadingMap[*name]; !processed { + var useName core.PdfObjectName + // Process if not already processed. + sh, found := resourcesToAdd.GetShadingByName(*name) + if found { + useName = *name + for { + sh2, found := resources.GetShadingByName(useName) + if !found || sh == sh2 { + break + } + useName = useName + "0" + } + + err := resources.SetShadingByName(useName, sh.ToPdfObject()) + if err != nil { + common.Log.Debug("error Set shading: %v", err) + return err + } + + shadingMap[*name] = useName + } else { + common.Log.Debug("Shading not found") + } + } + + if useName, has := shadingMap[*name]; has { + op.Params[0] = &useName + } else { + common.Log.Debug("error: Shading %s not found", *name) + } + } + } + case "gs": + // ExtGState. + if len(op.Params) == 1 { + if name, ok := op.Params[0].(*core.PdfObjectName); ok { + if _, processed := gstateMap[*name]; !processed { + var useName core.PdfObjectName + // Process if not already processed. + gs, found := resourcesToAdd.GetExtGState(*name) + if found { + useName = *name + i := 1 + for { + gs2, found := resources.GetExtGState(useName) + if !found || gs == gs2 { + break + } + useName = core.PdfObjectName(fmt.Sprintf("GS%d", i)) + i++ + } + } + + resources.AddExtGState(useName, gs) + gstateMap[*name] = useName + } + + useName := gstateMap[*name] + op.Params[0] = &useName + } + } + } + + *contents = append(*contents, op) + } + + return nil +} diff --git a/internal/pdf/creator/chapters.go b/internal/pdf/creator/chapters.go new file mode 100644 index 0000000..2bb1d8d --- /dev/null +++ b/internal/pdf/creator/chapters.go @@ -0,0 +1,174 @@ +package creator + +import ( + "errors" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/fonts" +) + +// Chapter is used to arrange multiple drawables (paragraphs, images, etc) into a single section. The concept is +// the same as a book or a report chapter. +type Chapter struct { + number int + title string + heading *Paragraph + + subchapters int + + contents []Drawable + + // Show chapter numbering + showNumbering bool + + // Include in TOC. + includeInTOC bool + + // Positioning: relative / absolute. + positioning positioning + + // Margins to be applied around the block when drawing on Page. + margins margins + + // Reference to the creator's TOC. + toc *TableOfContents +} + +// NewChapter creates a new chapter with the specified title as the heading. +func (c *Creator) NewChapter(title string) *Chapter { + chap := &Chapter{} + + c.chapters++ + chap.number = c.chapters + chap.title = title + + chap.showNumbering = true + chap.includeInTOC = true + + heading := fmt.Sprintf("%d. %s", c.chapters, title) + p := NewParagraph(heading) + p.SetFontSize(16) + p.SetFont(fonts.NewFontHelvetica()) // bold? + + chap.heading = p + chap.contents = []Drawable{} + + // Keep a reference for toc. + chap.toc = c.toc + + return chap +} + +// SetShowNumbering sets a flag to indicate whether or not to show chapter numbers as part of title. +func (chap *Chapter) SetShowNumbering(show bool) { + if show { + heading := fmt.Sprintf("%d. %s", chap.number, chap.title) + chap.heading.SetText(heading) + } else { + heading := chap.title + chap.heading.SetText(heading) + } + chap.showNumbering = show +} + +// SetIncludeInTOC sets a flag to indicate whether or not to include in tOC. +func (chap *Chapter) SetIncludeInTOC(includeInTOC bool) { + chap.includeInTOC = includeInTOC +} + +// GetHeading returns the chapter heading paragraph. Used to give access to address style: font, sizing etc. +func (chap *Chapter) GetHeading() *Paragraph { + return chap.heading +} + +// SetMargins sets the Chapter margins: left, right, top, bottom. +// Typically not needed as the creator's page margins are used. +func (chap *Chapter) SetMargins(left, right, top, bottom float64) { + chap.margins.left = left + chap.margins.right = right + chap.margins.top = top + chap.margins.bottom = bottom +} + +// GetMargins returns the Chapter's margin: left, right, top, bottom. +func (chap *Chapter) GetMargins() (float64, float64, float64, float64) { + return chap.margins.left, chap.margins.right, chap.margins.top, chap.margins.bottom +} + +// Add adds a new Drawable to the chapter. +func (chap *Chapter) Add(d Drawable) error { + if Drawable(chap) == d { + common.Log.Debug("error: Cannot add itself") + return errors.New("range check error") + } + + switch d.(type) { + case *Chapter: + common.Log.Debug("error: Cannot add chapter to a chapter") + return errors.New("type check error") + case *Paragraph, *Image, *Block, *Subchapter, *Table, *PageBreak: + chap.contents = append(chap.contents, d) + default: + common.Log.Debug("Unsupported: %T", d) + return errors.New("type check error") + } + + return nil +} + +// GeneratePageBlocks generate the Page blocks. Multiple blocks are generated if the contents wrap over +// multiple pages. +func (chap *Chapter) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + origCtx := ctx + + if chap.positioning.isRelative() { + // Update context. + ctx.X += chap.margins.left + ctx.Y += chap.margins.top + ctx.Width -= chap.margins.left + chap.margins.right + ctx.Height -= chap.margins.top + } + + blocks, ctx, err := chap.heading.GeneratePageBlocks(ctx) + if err != nil { + return blocks, ctx, err + } + if len(blocks) > 1 { + ctx.Page++ // Did not fit, moved to new Page block. + } + + if chap.includeInTOC { + // Add to TOC. + chap.toc.add(chap.title, chap.number, 0, ctx.Page) + } + + for _, d := range chap.contents { + newBlocks, c, err := d.GeneratePageBlocks(ctx) + if err != nil { + return blocks, ctx, err + } + if len(newBlocks) < 1 { + continue + } + + // The first block is always appended to the last.. + blocks[len(blocks)-1].mergeBlocks(newBlocks[0]) + blocks = append(blocks, newBlocks[1:]...) + + ctx = c + } + + if chap.positioning.isRelative() { + // Move back X to same start of line. + ctx.X = origCtx.X + } + + if chap.positioning.isAbsolute() { + // If absolute: return original context. + return blocks, origCtx, nil + + } + + return blocks, ctx, nil +} diff --git a/internal/pdf/creator/color.go b/internal/pdf/creator/color.go new file mode 100644 index 0000000..dd4d7d4 --- /dev/null +++ b/internal/pdf/creator/color.go @@ -0,0 +1,115 @@ +package creator + +import ( + "fmt" + + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// Color interface represents colors in the PDF creator. +type Color interface { + ToRGB() (float64, float64, float64) +} + +// Represents RGB color values. +type rgbColor struct { + // Arithmetic representation of r,g,b (range 0-1). + r, g, b float64 +} + +func (col rgbColor) ToRGB() (float64, float64, float64) { + return col.r, col.g, col.b +} + +// Commonly used colors. +var ( + ColorBlack = ColorRGBFromArithmetic(0, 0, 0) + ColorWhite = ColorRGBFromArithmetic(1, 1, 1) + ColorRed = ColorRGBFromArithmetic(1, 0, 0) + ColorGreen = ColorRGBFromArithmetic(0, 1, 0) + ColorBlue = ColorRGBFromArithmetic(0, 0, 1) + ColorYellow = ColorRGBFromArithmetic(1, 1, 0) +) + +// ColorRGBFromHex converts color hex code to rgb color for using with creator. +// NOTE: If there is a problem interpreting the string, then will use black color and log a debug message. +// Example hex code: #ffffff -> (1,1,1) white. +func ColorRGBFromHex(hexStr string) Color { + color := rgbColor{} + if (len(hexStr) != 4 && len(hexStr) != 7) || hexStr[0] != '#' { + common.Log.Debug("invalid hex code: %s", hexStr) + return color + } + + var r, g, b int + if len(hexStr) == 4 { + // Special case: 4 digits: #abc ; where r = a*16+a, e.g. #ffffff -> #fff + var tmp1, tmp2, tmp3 int + n, err := fmt.Sscanf(hexStr, "#%1x%1x%1x", &tmp1, &tmp2, &tmp3) + + if err != nil { + common.Log.Debug("invalid hex code: %s, error: %v", hexStr, err) + return color + } + if n != 3 { + common.Log.Debug("invalid hex code: %s", hexStr) + return color + } + + r = tmp1*16 + tmp1 + g = tmp2*16 + tmp2 + b = tmp3*16 + tmp3 + } else { + // Default case: 7 digits: #rrggbb + n, err := fmt.Sscanf(hexStr, "#%2x%2x%2x", &r, &g, &b) + if err != nil { + common.Log.Debug("invalid hex code: %s", hexStr) + return color + } + if n != 3 { + common.Log.Debug("invalid hex code: %s, n != 3 (%d)", hexStr, n) + return color + } + } + + rNorm := float64(r) / 255.0 + gNorm := float64(g) / 255.0 + bNorm := float64(b) / 255.0 + + color.r = rNorm + color.g = gNorm + color.b = bNorm + + return color +} + +// ColorRGBFrom8bit creates a Color from 8bit (0-255) r,g,b values. +// Example: +// +// red := ColorRGBFrom8Bit(255, 0, 0) +func ColorRGBFrom8bit(r, g, b byte) Color { + color := rgbColor{} + color.r = float64(r) / 255.0 + color.g = float64(g) / 255.0 + color.b = float64(b) / 255.0 + return color +} + +// ColorRGBFromArithmetic creates a Color from arithmetic (0-1.0) color values. +// Example: +// +// green := ColorRGBFromArithmetic(0, 1.0, 0) +func ColorRGBFromArithmetic(r, g, b float64) Color { + // Ensure is in the range 0-1: + r = math.Max(math.Min(r, 1.0), 0.0) + g = math.Max(math.Min(g, 1.0), 0.0) + b = math.Max(math.Min(b, 1.0), 0.0) + + color := rgbColor{} + color.r = r + color.g = g + color.b = b + return color +} diff --git a/internal/pdf/creator/const.go b/internal/pdf/creator/const.go new file mode 100644 index 0000000..693470d --- /dev/null +++ b/internal/pdf/creator/const.go @@ -0,0 +1,49 @@ +package creator + +// PageSize represents the page size as a 2 element array representing the width and height in PDF document units (points). +type PageSize [2]float64 + +// PPI specifies the default PDF resolution in points/inch. +var PPI float64 = 72 // Points per inch. (Default resolution). + +// PPMM specifies the default PDF resolution in points/mm. +var PPMM float64 = 72 * 1.0 / 25.4 // Points per mm. (Default resolution). + +// Commonly used page sizes +var ( + PageSizeA3 = PageSize{297 * PPMM, 420 * PPMM} + PageSizeA4 = PageSize{210 * PPMM, 297 * PPMM} + PageSizeA5 = PageSize{148 * PPMM, 210 * PPMM} + PageSizeLetter = PageSize{8.5 * PPI, 11 * PPI} + PageSizeLegal = PageSize{8.5 * PPI, 14 * PPI} +) + +// TextAlignment options for paragraph. +type TextAlignment int + +// The options supported for text alignment are: +// left - TextAlignmentLeft +// right - TextAlignmentRight +// center - TextAlignmentCenter +// justify - TextAlignmentJustify +const ( + TextAlignmentLeft TextAlignment = iota + TextAlignmentRight + TextAlignmentCenter + TextAlignmentJustify +) + +// Relative and absolute positioning types. +type positioning int + +const ( + positionRelative positioning = iota + positionAbsolute +) + +func (p positioning) isRelative() bool { + return p == positionRelative +} +func (p positioning) isAbsolute() bool { + return p == positionAbsolute +} diff --git a/internal/pdf/creator/creator.go b/internal/pdf/creator/creator.go new file mode 100644 index 0000000..99efff2 --- /dev/null +++ b/internal/pdf/creator/creator.go @@ -0,0 +1,524 @@ +package creator + +import ( + "errors" + "io" + "os" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Creator is a wrapper around functionality for creating PDF reports and/or adding new +// content onto imported PDF pages, etc. +type Creator struct { + pages []*model.PdfPage + activePage *model.PdfPage + + pagesize PageSize + + context DrawContext + + pageMargins margins + + pageWidth, pageHeight float64 + + // Keep track of number of chapters for indexing. + chapters int + + // Hooks. + genFrontPageFunc func(args FrontpageFunctionArgs) + genTableOfContentFunc func(toc *TableOfContents) (*Chapter, error) + drawHeaderFunc func(header *Block, args HeaderFunctionArgs) + drawFooterFunc func(footer *Block, args FooterFunctionArgs) + pdfWriterAccessFunc func(writer *model.PdfWriter) error + + finalized bool + + toc *TableOfContents + + // Forms. + acroForm *model.PdfAcroForm +} + +// SetForms Add Acroforms to a PDF file. Sets the specified form for writing. +func (c *Creator) SetForms(form *model.PdfAcroForm) error { + c.acroForm = form + return nil +} + +// FrontpageFunctionArgs holds the input arguments to a front page drawing function. +// It is designed as a struct, so additional parameters can be added in the future with backwards compatibility. +type FrontpageFunctionArgs struct { + PageNum int + TotalPages int +} + +// HeaderFunctionArgs holds the input arguments to a header drawing function. +// It is designed as a struct, so additional parameters can be added in the future with backwards compatibility. +type HeaderFunctionArgs struct { + PageNum int + TotalPages int +} + +// FooterFunctionArgs holds the input arguments to a footer drawing function. +// It is designed as a struct, so additional parameters can be added in the future with backwards compatibility. +type FooterFunctionArgs struct { + PageNum int + TotalPages int +} + +// Margins. Can be page margins, or margins around an element. +type margins struct { + left float64 + right float64 + top float64 + bottom float64 +} + +// New creates a new instance of the PDF Creator. +func New() *Creator { + c := &Creator{} + c.pages = []*model.PdfPage{} + c.SetPageSize(PageSizeLetter) + + m := 0.1 * c.pageWidth + c.pageMargins.left = m + c.pageMargins.right = m + c.pageMargins.top = m + c.pageMargins.bottom = m + + c.toc = newTableOfContents() + + return c +} + +// SetPageMargins sets the page margins: left, right, top, bottom. +// The default page margins are 10% of document width. +func (c *Creator) SetPageMargins(left, right, top, bottom float64) { + c.pageMargins.left = left + c.pageMargins.right = right + c.pageMargins.top = top + c.pageMargins.bottom = bottom +} + +// Width returns the current page width. +func (c *Creator) Width() float64 { + return c.pageWidth +} + +// Height returns the current page height. +func (c *Creator) Height() float64 { + return c.pageHeight +} + +func (c *Creator) setActivePage(p *model.PdfPage) { + c.activePage = p +} + +func (c *Creator) getActivePage() *model.PdfPage { + if c.activePage == nil { + if len(c.pages) == 0 { + return nil + } + return c.pages[len(c.pages)-1] + } + return c.activePage +} + +// SetPageSize sets the Creator's page size. Pages that are added after this will be created with this Page size. +// Does not affect pages already created. +// +// Common page sizes are defined as constants. +// Examples: +// 1. c.SetPageSize(creator.PageSizeA4) +// 2. c.SetPageSize(creator.PageSizeA3) +// 3. c.SetPageSize(creator.PageSizeLegal) +// 4. c.SetPageSize(creator.PageSizeLetter) +// +// For custom sizes: Use the PPMM (points per mm) and PPI (points per inch) when defining those based on +// physical page sizes: +// +// Examples: +// 1. 10x15 sq. mm: SetPageSize(PageSize{10*creator.PPMM, 15*creator.PPMM}) where PPMM is points per mm. +// 2. 3x2 sq. inches: SetPageSize(PageSize{3*creator.PPI, 2*creator.PPI}) where PPI is points per inch. +func (c *Creator) SetPageSize(size PageSize) { + c.pagesize = size + + c.pageWidth = size[0] + c.pageHeight = size[1] + + // Update default margins to 10% of width. + m := 0.1 * c.pageWidth + c.pageMargins.left = m + c.pageMargins.right = m + c.pageMargins.top = m + c.pageMargins.bottom = m +} + +// DrawHeader sets a function to draw a header on created output pages. +func (c *Creator) DrawHeader(drawHeaderFunc func(header *Block, args HeaderFunctionArgs)) { + c.drawHeaderFunc = drawHeaderFunc +} + +// DrawFooter sets a function to draw a footer on created output pages. +func (c *Creator) DrawFooter(drawFooterFunc func(footer *Block, args FooterFunctionArgs)) { + c.drawFooterFunc = drawFooterFunc +} + +// CreateFrontPage sets a function to generate a front Page. +func (c *Creator) CreateFrontPage(genFrontPageFunc func(args FrontpageFunctionArgs)) { + c.genFrontPageFunc = genFrontPageFunc +} + +// CreateTableOfContents sets a function to generate table of contents. +func (c *Creator) CreateTableOfContents(genTOCFunc func(toc *TableOfContents) (*Chapter, error)) { + c.genTableOfContentFunc = genTOCFunc +} + +// Create a new Page with current parameters. +func (c *Creator) newPage() *model.PdfPage { + page := model.NewPdfPage() + + width := c.pagesize[0] + height := c.pagesize[1] + + bbox := model.PdfRectangle{Llx: 0, Lly: 0, Urx: width, Ury: height} + page.MediaBox = &bbox + + c.pageWidth = width + c.pageHeight = height + + c.initContext() + + return page +} + +// Initialize the drawing context, moving to upper left corner. +func (c *Creator) initContext() { + // Update context, move to upper left corner. + c.context.X = c.pageMargins.left + c.context.Y = c.pageMargins.top + c.context.Width = c.pageWidth - c.pageMargins.right - c.pageMargins.left + c.context.Height = c.pageHeight - c.pageMargins.bottom - c.pageMargins.top + c.context.PageHeight = c.pageHeight + c.context.PageWidth = c.pageWidth + c.context.Margins = c.pageMargins +} + +// NewPage adds a new Page to the Creator and sets as the active Page. +func (c *Creator) NewPage() { + page := c.newPage() + c.pages = append(c.pages, page) + c.context.Page++ +} + +// AddPage adds the specified page to the creator. +func (c *Creator) AddPage(page *model.PdfPage) error { + mbox, err := page.GetMediaBox() + if err != nil { + common.Log.Debug("Failed to get page mediabox: %v", err) + return err + } + + c.context.X = mbox.Llx + c.pageMargins.left + c.context.Y = c.pageMargins.top + c.context.PageHeight = mbox.Ury - mbox.Lly + c.context.PageWidth = mbox.Urx - mbox.Llx + + c.pages = append(c.pages, page) + c.context.Page++ + + return nil +} + +// RotateDeg rotates the current active page by angle degrees. An error is returned on failure, which can be +// if there is no currently active page, or the angleDeg is not a multiple of 90 degrees. +func (c *Creator) RotateDeg(angleDeg int64) error { + page := c.getActivePage() + if page == nil { + common.Log.Debug("Fail to rotate: no page currently active") + return errors.New("no page active") + } + if angleDeg%90 != 0 { + common.Log.Debug("error: Page rotation angle not a multiple of 90") + return errors.New("range check error") + } + + // Do the rotation. + var rotation int64 = 0 + if page.Rotate != nil { + rotation = *(page.Rotate) + } + rotation += angleDeg // Rotate by angleDeg degrees. + page.Rotate = &rotation + + return nil +} + +// Context returns the current drawing context. +func (c *Creator) Context() DrawContext { + return c.context +} + +// Call before writing out. Takes care of adding headers and footers, as well as generating front Page and +// table of contents. +func (c *Creator) finalize() error { + totPages := len(c.pages) + + // Estimate number of additional generated pages and update TOC. + genpages := 0 + if c.genFrontPageFunc != nil { + genpages++ + } + if c.genTableOfContentFunc != nil { + c.initContext() + c.context.Page = genpages + 1 + ch, err := c.genTableOfContentFunc(c.toc) + if err != nil { + return err + } + + // Make an estimate of the number of pages. + blocks, _, err := ch.GeneratePageBlocks(c.context) + if err != nil { + common.Log.Debug("Failed to generate blocks: %v", err) + return err + } + genpages += len(blocks) + + // Update the table of content Page numbers, accounting for front Page and TOC. + for idx := range c.toc.entries { + c.toc.entries[idx].PageNumber += genpages + } + + // Remove the TOC chapter entry. + c.toc.entries = c.toc.entries[:len(c.toc.entries)-1] + } + + hasFrontPage := false + // Generate the front Page. + if c.genFrontPageFunc != nil { + totPages++ + p := c.newPage() + // Place at front. + c.pages = append([]*model.PdfPage{p}, c.pages...) + c.setActivePage(p) + + args := FrontpageFunctionArgs{ + PageNum: 1, + TotalPages: totPages, + } + c.genFrontPageFunc(args) + hasFrontPage = true + } + + if c.genTableOfContentFunc != nil { + c.initContext() + ch, err := c.genTableOfContentFunc(c.toc) + if err != nil { + common.Log.Debug("error generating TOC: %v", err) + return err + } + ch.SetShowNumbering(false) + ch.SetIncludeInTOC(false) + + blocks, _, _ := ch.GeneratePageBlocks(c.context) + tocpages := []*model.PdfPage{} + for _, block := range blocks { + block.SetPos(0, 0) + totPages++ + p := c.newPage() + // Place at front. + tocpages = append(tocpages, p) + c.setActivePage(p) + c.Draw(block) + } + + if hasFrontPage { + front := c.pages[0] + rest := c.pages[1:] + c.pages = append([]*model.PdfPage{front}, tocpages...) + c.pages = append(c.pages, rest...) + } else { + c.pages = append(tocpages, c.pages...) + } + + } + + for idx, page := range c.pages { + c.setActivePage(page) + if c.drawHeaderFunc != nil { + // Prepare a block to draw on. + // Header is drawn on the top of the page. Has width of the page, but height limited to the page + // margin top height. + headerBlock := NewBlock(c.pageWidth, c.pageMargins.top) + args := HeaderFunctionArgs{ + PageNum: idx + 1, + TotalPages: totPages, + } + c.drawHeaderFunc(headerBlock, args) + headerBlock.SetPos(0, 0) + err := c.Draw(headerBlock) + if err != nil { + common.Log.Debug("error drawing header: %v", err) + return err + } + + } + if c.drawFooterFunc != nil { + // Prepare a block to draw on. + // Footer is drawn on the bottom of the page. Has width of the page, but height limited to the page + // margin bottom height. + footerBlock := NewBlock(c.pageWidth, c.pageMargins.bottom) + args := FooterFunctionArgs{ + PageNum: idx + 1, + TotalPages: totPages, + } + c.drawFooterFunc(footerBlock, args) + footerBlock.SetPos(0, c.pageHeight-footerBlock.height) + err := c.Draw(footerBlock) + if err != nil { + common.Log.Debug("error drawing footer: %v", err) + return err + } + } + } + + c.finalized = true + + return nil +} + +// MoveTo moves the drawing context to absolute coordinates (x, y). +func (c *Creator) MoveTo(x, y float64) { + c.context.X = x + c.context.Y = y +} + +// MoveX moves the drawing context to absolute position x. +func (c *Creator) MoveX(x float64) { + c.context.X = x +} + +// MoveY moves the drawing context to absolute position y. +func (c *Creator) MoveY(y float64) { + c.context.Y = y +} + +// MoveRight moves the drawing context right by relative displacement dx (negative goes left). +func (c *Creator) MoveRight(dx float64) { + c.context.X += dx +} + +// MoveDown moves the drawing context down by relative displacement dy (negative goes up). +func (c *Creator) MoveDown(dy float64) { + c.context.Y += dy +} + +// Draw draws the Drawable widget to the document. This can span over 1 or more pages. Additional pages are added if +// the contents go over the current Page. +func (c *Creator) Draw(d Drawable) error { + if c.getActivePage() == nil { + // Add a new Page if none added already. + c.NewPage() + } + + blocks, ctx, err := d.GeneratePageBlocks(c.context) + if err != nil { + return err + } + + for idx, blk := range blocks { + if idx > 0 { + c.NewPage() + } + + p := c.getActivePage() + err := blk.drawToPage(p) + if err != nil { + return err + } + } + + // Inner elements can affect X, Y position and available height. + c.context.X = ctx.X + c.context.Y = ctx.Y + c.context.Height = ctx.PageHeight - ctx.Y - ctx.Margins.bottom + + return nil +} + +// Write output of creator to io.WriteSeeker interface. +func (c *Creator) Write(ws io.WriteSeeker) error { + if !c.finalized { + c.finalize() + } + + pdfWriter := model.NewPdfWriter() + // Form fields. + if c.acroForm != nil { + errF := pdfWriter.SetForms(c.acroForm) + if errF != nil { + common.Log.Debug("Failure: %v", errF) + return errF + } + } + + // Pdf Writer access hook. Can be used to encrypt, etc. via the PdfWriter instance. + if c.pdfWriterAccessFunc != nil { + err := c.pdfWriterAccessFunc(&pdfWriter) + if err != nil { + common.Log.Debug("Failure: %v", err) + return err + } + } + + for _, page := range c.pages { + err := pdfWriter.AddPage(page) + if err != nil { + common.Log.Error("Failed to add Page: %s", err) + return err + } + } + + err := pdfWriter.Write(ws) + if err != nil { + return err + } + + return nil +} + +// SetPdfWriterAccessFunc sets a PdfWriter access function/hook. +// Exposes the PdfWriter just prior to writing the PDF. Can be used to encrypt the output PDF, etc. +// +// Example of encrypting with a user/owner password "password" +// Prior to calling c.WriteFile(): +// +// c.SetPdfWriterAccessFunc(func(w *model.PdfWriter) error { +// userPass := []byte("password") +// ownerPass := []byte("password") +// err := w.Encrypt(userPass, ownerPass, nil) +// return err +// }) +func (c *Creator) SetPdfWriterAccessFunc(pdfWriterAccessFunc func(writer *model.PdfWriter) error) { + c.pdfWriterAccessFunc = pdfWriterAccessFunc +} + +// WriteToFile writes the Creator output to file specified by path. +func (c *Creator) WriteToFile(outputPath string) error { + fWrite, err := os.Create(outputPath) + if err != nil { + return err + } + + defer fWrite.Close() + + err = c.Write(fWrite) + if err != nil { + return err + } + + return nil +} diff --git a/internal/pdf/creator/curve.go b/internal/pdf/creator/curve.go new file mode 100644 index 0000000..b923407 --- /dev/null +++ b/internal/pdf/creator/curve.go @@ -0,0 +1,66 @@ +package creator + +import ( + "fmt" + "strings" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// NewCurve returns new instance of Curve between points (x1,y1) and (x2, y2) with control point (cx,cy). +func NewCurve(x1, y1, cx, cy, x2, y2 float64) *Curve { + c := &Curve{} + + c.x1 = x1 + c.y1 = y1 + + c.cx = cx + c.cy = cy + + c.x2 = x2 + c.y2 = y2 + + c.lineColor = model.NewPdfColorDeviceRGB(0, 0, 0) + c.lineWidth = 1.0 + return c +} + +// Curve represents a cubic Bezier curve with a control point. +type Curve struct { + x1 float64 + y1 float64 + cx float64 // control point + cy float64 + x2 float64 + y2 float64 + + lineColor *model.PdfColorDeviceRGB + lineWidth float64 +} + +// SetWidth sets line width. +func (c *Curve) SetWidth(width float64) { + c.lineWidth = width +} + +// SetColor sets the line color. +func (c *Curve) SetColor(col Color) { + c.lineColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// GeneratePageBlocks draws the curve onto page blocks. +func (c *Curve) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + block := NewBlock(ctx.PageWidth, ctx.PageHeight) + + var ops []string + ops = append(ops, fmt.Sprintf("%.2f w", c.lineWidth)) // line widtdh + ops = append(ops, fmt.Sprintf("%.3f %.3f %.3f RG", c.lineColor[0], c.lineColor[1], c.lineColor[2])) // line color + ops = append(ops, fmt.Sprintf("%.2f %.2f m", c.x1, ctx.PageHeight-c.y1)) // move to + ops = append(ops, fmt.Sprintf("%.5f %.5f %.5f %.5f v S", c.cx, ctx.PageHeight-c.cy, c.x2, ctx.PageHeight-c.y2)) + + err := block.addContentsByString(strings.Join(ops, "\n")) + if err != nil { + return nil, ctx, err + } + return []*Block{block}, ctx, nil +} diff --git a/internal/pdf/creator/division.go b/internal/pdf/creator/division.go new file mode 100644 index 0000000..a763952 --- /dev/null +++ b/internal/pdf/creator/division.go @@ -0,0 +1,189 @@ +package creator + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// Division is a container component which can wrap across multiple pages (unlike Block). +// It can contain multiple Drawable components (currently supporting Paragraph and Image). +// +// The component stacking behavior is vertical, where the Drawables are drawn on top of each other. +// Also supports horizontal stacking by activating the inline mode. +type Division struct { + components []VectorDrawable + + // Positioning: relative / absolute. + positioning positioning + + // Margins to be applied around the block when drawing on Page. + margins margins + + // Controls whether the components are stacked horizontally + inline bool +} + +// NewDivision returns a new Division container component. +func NewDivision() *Division { + return &Division{ + components: []VectorDrawable{}, + } +} + +// Inline returns whether the inline mode of the division is active. +func (div *Division) Inline() bool { + return div.inline +} + +// SetInline sets the inline mode of the division. +func (div *Division) SetInline(inline bool) { + div.inline = inline +} + +// Add adds a VectorDrawable to the Division container. +// Currently supported VectorDrawables: *Paragraph, *StyledParagraph, *Image. +func (div *Division) Add(d VectorDrawable) error { + supported := false + + switch d.(type) { + case *Paragraph: + supported = true + case *StyledParagraph: + supported = true + case *Image: + supported = true + } + + if !supported { + return errors.New("unsupported type in Division") + } + + div.components = append(div.components, d) + + return nil +} + +// Height returns the height for the Division component assuming all stacked on top of each other. +func (div *Division) Height() float64 { + y := 0.0 + yMax := 0.0 + for _, component := range div.components { + compWidth, compHeight := component.Width(), component.Height() + switch t := component.(type) { + case *Paragraph: + p := t + compWidth += p.margins.left + p.margins.right + compHeight += p.margins.top + p.margins.bottom + } + + // Vertical stacking. + y += compHeight + yMax = y + } + + return yMax +} + +// Width is not used. Not used as a Division element is designed to fill into available width depending on +// context. Returns 0. +func (div *Division) Width() float64 { + return 0 +} + +// GeneratePageBlocks generates the page blocks for the Division component. +// Multiple blocks are generated if the contents wrap over multiple pages. +func (div *Division) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + pageblocks := []*Block{} + + origCtx := ctx + + if div.positioning.isRelative() { + // Update context. + ctx.X += div.margins.left + ctx.Y += div.margins.top + ctx.Width -= div.margins.left + div.margins.right + ctx.Height -= div.margins.top + } + + // Set the inline mode of the division to the context. + ctx.Inline = div.inline + + // Draw. + divCtx := ctx + tmpCtx := ctx + var lineHeight float64 + + for _, component := range div.components { + if ctx.Inline { + // Check whether the component fits on the current line. + if (ctx.X-divCtx.X)+component.Width() <= ctx.Width { + ctx.Y = tmpCtx.Y + ctx.Height = tmpCtx.Height + } else { + ctx.X = divCtx.X + ctx.Width = divCtx.Width + + tmpCtx.Y += lineHeight + tmpCtx.Height -= lineHeight + lineHeight = 0 + } + } + + newblocks, updCtx, err := component.GeneratePageBlocks(ctx) + if err != nil { + common.Log.Debug("error generating page blocks: %v", err) + return nil, ctx, err + } + + if len(newblocks) < 1 { + continue + } + + if len(pageblocks) > 0 { + // If there are pageblocks already in place. + // merge the first block in with current Block and append the rest. + pageblocks[len(pageblocks)-1].mergeBlocks(newblocks[0]) + pageblocks = append(pageblocks, newblocks[1:]...) + } else { + pageblocks = append(pageblocks, newblocks[0:]...) + } + + // Apply padding/margins. + if ctx.Inline { + // Recalculate positions on page change. + if ctx.Page != updCtx.Page { + divCtx.Y = ctx.Margins.top + divCtx.Height = ctx.PageHeight - ctx.Margins.top + + tmpCtx.Y = divCtx.Y + tmpCtx.Height = divCtx.Height + lineHeight = updCtx.Height - divCtx.Height + } else { + // Calculate current line max height. + if dl := ctx.Height - updCtx.Height; dl > lineHeight { + lineHeight = dl + } + } + } else { + updCtx.X = ctx.X + } + + ctx = updCtx + } + + // Restore the original inline mode of the context. + ctx.Inline = origCtx.Inline + + if div.positioning.isRelative() { + // Move back X to same start of line. + ctx.X = origCtx.X + } + + if div.positioning.isAbsolute() { + // If absolute: return original context. + return pageblocks, origCtx, nil + } + + return pageblocks, ctx, nil +} diff --git a/internal/pdf/creator/drawable.go b/internal/pdf/creator/drawable.go new file mode 100644 index 0000000..5b9d855 --- /dev/null +++ b/internal/pdf/creator/drawable.go @@ -0,0 +1,44 @@ +package creator + +// Drawable is a widget that can be used to draw with the Creator. +type Drawable interface { + // Draw onto blocks representing Page contents. As the content can wrap over many pages, multiple + // templates are returned, one per Page. The function also takes a draw context containing information + // where to draw (if relative positioning) and the available height to draw on accounting for Margins etc. + GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) +} + +// VectorDrawable is a Drawable with a specified width and height. +type VectorDrawable interface { + Drawable + + // Width returns the width of the Drawable. + Width() float64 + + // Height returns the height of the Drawable. + Height() float64 +} + +// DrawContext defines the drawing context. The DrawContext is continuously used and updated when drawing the page +// contents in relative mode. Keeps track of current X, Y position, available height as well as other page parameters +// such as margins and dimensions. +type DrawContext struct { + // Current page number. + Page int + + // Current position. In a relative positioning mode, a drawable will be placed at these coordinates. + X, Y float64 + + // Context dimensions. Available width and height (on current page). + Width, Height float64 + + // Page Margins. + Margins margins + + // Absolute Page size, widths and height. + PageWidth float64 + PageHeight float64 + + // Controls whether the components are stacked horizontally + Inline bool +} diff --git a/internal/pdf/creator/ellipse.go b/internal/pdf/creator/ellipse.go new file mode 100644 index 0000000..d7478d7 --- /dev/null +++ b/internal/pdf/creator/ellipse.go @@ -0,0 +1,89 @@ +package creator + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Ellipse defines an ellipse with a center at (xc,yc) and a specified width and height. The ellipse can have a colored +// fill and/or border with a specified width. +// Implements the Drawable interface and can be drawn on PDF using the Creator. +type Ellipse struct { + xc float64 + yc float64 + width float64 + height float64 + fillColor *model.PdfColorDeviceRGB + borderColor *model.PdfColorDeviceRGB + borderWidth float64 +} + +// NewEllipse creates a new ellipse centered at (xc,yc) with a width and height specified. +func NewEllipse(xc, yc, width, height float64) *Ellipse { + ell := &Ellipse{} + + ell.xc = xc + ell.yc = yc + ell.width = width + ell.height = height + + ell.borderColor = model.NewPdfColorDeviceRGB(0, 0, 0) + ell.borderWidth = 1.0 + + return ell +} + +// GetCoords returns the coordinates of the Ellipse's center (xc,yc). +func (ell *Ellipse) GetCoords() (float64, float64) { + return ell.xc, ell.yc +} + +// SetBorderWidth sets the border width. +func (ell *Ellipse) SetBorderWidth(bw float64) { + ell.borderWidth = bw +} + +// SetBorderColor sets the border color. +func (ell *Ellipse) SetBorderColor(col Color) { + ell.borderColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// SetFillColor sets the fill color. +func (ell *Ellipse) SetFillColor(col Color) { + ell.fillColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// GeneratePageBlocks draws the rectangle on a new block representing the page. +func (ell *Ellipse) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + block := NewBlock(ctx.PageWidth, ctx.PageHeight) + + drawell := draw.Circle{ + X: ell.xc - ell.width/2, + Y: ctx.PageHeight - ell.yc - ell.height/2, + Width: ell.width, + Height: ell.height, + Opacity: 1.0, + BorderWidth: ell.borderWidth, + } + if ell.fillColor != nil { + drawell.FillEnabled = true + drawell.FillColor = ell.fillColor + } + if ell.borderColor != nil { + drawell.BorderEnabled = true + drawell.BorderColor = ell.borderColor + drawell.BorderWidth = ell.borderWidth + } + + contents, _, err := drawell.Draw("") + if err != nil { + return nil, ctx, err + } + + err = block.addContentsByString(string(contents)) + if err != nil { + return nil, ctx, err + } + + return []*Block{block}, ctx, nil +} diff --git a/internal/pdf/creator/filled_curve.go b/internal/pdf/creator/filled_curve.go new file mode 100644 index 0000000..9f0f1ae --- /dev/null +++ b/internal/pdf/creator/filled_curve.go @@ -0,0 +1,107 @@ +package creator + +import ( + pdfcontent "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + pdfcore "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + pdf "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// FilledCurve represents a closed path of Bezier curves with a border and fill. +type FilledCurve struct { + curves []draw.CubicBezierCurve + FillEnabled bool // Show fill? + fillColor *pdf.PdfColorDeviceRGB + BorderEnabled bool // Show border? + BorderWidth float64 + borderColor *pdf.PdfColorDeviceRGB +} + +// NewFilledCurve returns a instance of filled curve. +func NewFilledCurve() *FilledCurve { + curve := FilledCurve{} + curve.curves = []draw.CubicBezierCurve{} + return &curve +} + +// AppendCurve appends a Bezier curve to the filled curve. +func (fc *FilledCurve) AppendCurve(curve draw.CubicBezierCurve) *FilledCurve { + fc.curves = append(fc.curves, curve) + return fc +} + +// SetFillColor sets the fill color for the path. +func (fc *FilledCurve) SetFillColor(color Color) { + fc.fillColor = pdf.NewPdfColorDeviceRGB(color.ToRGB()) +} + +// SetBorderColor sets the border color for the path. +func (fc *FilledCurve) SetBorderColor(color Color) { + fc.borderColor = pdf.NewPdfColorDeviceRGB(color.ToRGB()) +} + +// draw draws the filled curve. Can specify a graphics state (gsName) for setting opacity etc. Otherwise leave empty (""). +// Returns the content stream as a byte array, the bounding box and an error on failure. +func (fc *FilledCurve) draw(gsName string) ([]byte, *pdf.PdfRectangle, error) { + bpath := draw.NewCubicBezierPath() + for _, c := range fc.curves { + bpath = bpath.AppendCurve(c) + } + + creator := pdfcontent.NewContentCreator() + creator.Add_q() + + if fc.FillEnabled { + creator.Add_rg(fc.fillColor.R(), fc.fillColor.G(), fc.fillColor.B()) + } + if fc.BorderEnabled { + creator.Add_RG(fc.borderColor.R(), fc.borderColor.G(), fc.borderColor.B()) + creator.Add_w(fc.BorderWidth) + } + if len(gsName) > 1 { + // If a graphics state is provided, use it. (can support transparency). + creator.Add_gs(pdfcore.PdfObjectName(gsName)) + } + + draw.DrawBezierPathWithCreator(bpath, creator) + creator.Add_h() // Close the path. + + if fc.FillEnabled && fc.BorderEnabled { + creator.Add_B() // fill and stroke. + } else if fc.FillEnabled { + creator.Add_f() // Fill. + } else if fc.BorderEnabled { + creator.Add_S() // Stroke. + } + creator.Add_Q() + + // Get bounding box. + pathBbox := bpath.GetBoundingBox() + if fc.BorderEnabled { + // Account for stroke width. + pathBbox.Height += fc.BorderWidth + pathBbox.Width += fc.BorderWidth + pathBbox.X -= fc.BorderWidth / 2 + pathBbox.Y -= fc.BorderWidth / 2 + } + + // Bounding box - global coordinate system. + bbox := &pdf.PdfRectangle{} + bbox.Llx = pathBbox.X + bbox.Lly = pathBbox.Y + bbox.Urx = pathBbox.X + pathBbox.Width + bbox.Ury = pathBbox.Y + pathBbox.Height + return creator.Bytes(), bbox, nil +} + +// GeneratePageBlocks draws the filled curve on page blocks. +func (fc *FilledCurve) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + block := NewBlock(ctx.PageWidth, ctx.PageHeight) + + contents, _, _ := fc.draw("") + err := block.addContentsByString(string(contents)) + if err != nil { + return nil, ctx, err + } + return []*Block{block}, ctx, nil +} diff --git a/internal/pdf/creator/image.go b/internal/pdf/creator/image.go new file mode 100644 index 0000000..43d6146 --- /dev/null +++ b/internal/pdf/creator/image.go @@ -0,0 +1,329 @@ +package creator + +import ( + "bytes" + "fmt" + goimage "image" + "os" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// The Image type is used to draw an image onto PDF. +type Image struct { + xobj *model.XObjectImage + img *model.Image + + // Rotation angle. + angle float64 + + // The dimensions of the image. As to be placed on the PDF. + width, height float64 + + // The original dimensions of the image (pixel based). + origWidth, origHeight float64 + + // Positioning: relative / absolute. + positioning positioning + + // Absolute coordinates (when in absolute mode). + xPos float64 + yPos float64 + + // Opacity (alpha value). + opacity float64 + + // Margins to be applied around the block when drawing on Page. + margins margins + + // Encoder + encoder core.StreamEncoder +} + +// NewImage create a new image from a image (model.Image). +func NewImage(img *model.Image) (*Image, error) { + image := &Image{} + image.img = img + + // Image original size in points = pixel size. + image.origWidth = float64(img.Width) + image.origHeight = float64(img.Height) + image.width = image.origWidth + image.height = image.origHeight + image.angle = 0 + image.opacity = 1.0 + + image.positioning = positionRelative + + return image, nil +} + +// NewImageFromData creates an Image from image data. +func NewImageFromData(data []byte) (*Image, error) { + imgReader := bytes.NewReader(data) + + // Load the image with default handler. + img, err := model.ImageHandling.Read(imgReader) + if err != nil { + common.Log.Error("error loading image: %s", err) + return nil, err + } + + return NewImage(img) +} + +// NewImageFromFile creates an Image from a file. +func NewImageFromFile(path string) (*Image, error) { + imgData, err := os.ReadFile(path) + if err != nil { + return nil, err + } + + img, err := NewImageFromData(imgData) + if err != nil { + return nil, err + } + + return img, nil +} + +// NewImageFromGoImage creates an Image from a go image.Image datastructure. +func NewImageFromGoImage(goimg goimage.Image) (*Image, error) { + img, err := model.ImageHandling.NewImageFromGoImage(goimg) + if err != nil { + return nil, err + } + + return NewImage(img) +} + +// SetEncoder sets the encoding/compression mechanism for the image. +func (img *Image) SetEncoder(encoder core.StreamEncoder) { + img.encoder = encoder +} + +// Height returns Image's document height. +func (img *Image) Height() float64 { + return img.height +} + +// Width returns Image's document width. +func (img *Image) Width() float64 { + return img.width +} + +// SetOpacity sets opacity for Image. +func (img *Image) SetOpacity(opacity float64) { + img.opacity = opacity +} + +// SetMargins sets the margins for the Image (in relative mode): left, right, top, bottom. +func (img *Image) SetMargins(left, right, top, bottom float64) { + img.margins.left = left + img.margins.right = right + img.margins.top = top + img.margins.bottom = bottom +} + +// GetMargins returns the Image's margins: left, right, top, bottom. +func (img *Image) GetMargins() (float64, float64, float64, float64) { + return img.margins.left, img.margins.right, img.margins.top, img.margins.bottom +} + +// makeXObject makes the encoded XObject Image that will be used in the PDF. +func (img *Image) makeXObject() error { + encoder := img.encoder + if encoder == nil { + // Default: Use flate encoder. + encoder = core.NewFlateEncoder() + } + + // Create the XObject image. + ximg, err := model.NewXObjectImageFromImage(img.img, nil, encoder) + if err != nil { + common.Log.Error("Failed to create xobject image: %s", err) + return err + } + + img.xobj = ximg + return nil +} + +// GeneratePageBlocks generate the Page blocks. Draws the Image on a block, implementing the Drawable interface. +func (img *Image) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + if img.xobj == nil { + // Build the XObject Image if not already prepared. + img.makeXObject() + } + + blocks := []*Block{} + origCtx := ctx + + blk := NewBlock(ctx.PageWidth, ctx.PageHeight) + if img.positioning.isRelative() { + if img.height > ctx.Height { + // Goes out of the bounds. Write on a new template instead and create a new context at upper + // left corner. + + blocks = append(blocks, blk) + blk = NewBlock(ctx.PageWidth, ctx.PageHeight) + + // New Page. + ctx.Page++ + newContext := ctx + newContext.Y = ctx.Margins.top // + p.Margins.top + newContext.X = ctx.Margins.left + img.margins.left + newContext.Height = ctx.PageHeight - ctx.Margins.top - ctx.Margins.bottom - img.margins.bottom + newContext.Width = ctx.PageWidth - ctx.Margins.left - ctx.Margins.right - img.margins.left - img.margins.right + ctx = newContext + } else { + ctx.Y += img.margins.top + ctx.Height -= img.margins.top + img.margins.bottom + ctx.X += img.margins.left + ctx.Width -= img.margins.left + img.margins.right + } + } else { + // Absolute. + ctx.X = img.xPos + ctx.Y = img.yPos + } + + // Place the Image on the template at position (x,y) based on the ctx. + ctx, err := drawImageOnBlock(blk, img, ctx) + if err != nil { + return nil, ctx, err + } + + blocks = append(blocks, blk) + + if img.positioning.isAbsolute() { + // Absolute drawing should not affect context. + ctx = origCtx + } else { + // XXX/TODO: Use projected height. + ctx.Y += img.margins.bottom + ctx.Height -= img.margins.bottom + } + + return blocks, ctx, nil +} + +// SetPos sets the absolute position. Changes object positioning to absolute. +func (img *Image) SetPos(x, y float64) { + img.positioning = positionAbsolute + img.xPos = x + img.yPos = y +} + +// Scale scales Image by a constant factor, both width and height. +func (img *Image) Scale(xFactor, yFactor float64) { + img.width = xFactor * img.width + img.height = yFactor * img.height +} + +// ScaleToWidth scale Image to a specified width w, maintaining the aspect ratio. +func (img *Image) ScaleToWidth(w float64) { + ratio := img.height / img.width + img.width = w + img.height = w * ratio +} + +// ScaleToHeight scale Image to a specified height h, maintaining the aspect ratio. +func (img *Image) ScaleToHeight(h float64) { + ratio := img.width / img.height + img.height = h + img.width = h * ratio +} + +// SetWidth set the Image's document width to specified w. This does not change the raw image data, i.e. +// no actual scaling of data is performed. That is handled by the PDF viewer. +func (img *Image) SetWidth(w float64) { + img.width = w +} + +// SetHeight sets the Image's document height to specified h. +func (img *Image) SetHeight(h float64) { + img.height = h +} + +// SetAngle sets Image rotation angle in degrees. +func (img *Image) SetAngle(angle float64) { + img.angle = angle +} + +// Draw the image onto the specified blk. +func drawImageOnBlock(blk *Block, img *Image, ctx DrawContext) (DrawContext, error) { + origCtx := ctx + + // Find a free name for the image. + num := 1 + imgName := core.PdfObjectName(fmt.Sprintf("Img%d", num)) + for blk.resources.HasXObjectByName(imgName) { + num++ + imgName = core.PdfObjectName(fmt.Sprintf("Img%d", num)) + } + + // Add to the Page resources. + err := blk.resources.SetXObjectImageByName(imgName, img.xobj) + if err != nil { + return ctx, err + } + + // Find an available GS name. + i := 0 + gsName := core.PdfObjectName(fmt.Sprintf("GS%d", i)) + for blk.resources.HasExtGState(gsName) { + i++ + gsName = core.PdfObjectName(fmt.Sprintf("GS%d", i)) + } + + // Graphics state with normal blend mode. + gs0 := core.MakeDict() + gs0.Set("BM", core.MakeName("Normal")) + if img.opacity < 1.0 { + gs0.Set("CA", core.MakeFloat(img.opacity)) + gs0.Set("ca", core.MakeFloat(img.opacity)) + } + + err = blk.resources.AddExtGState(gsName, core.MakeIndirectObject(gs0)) + if err != nil { + return ctx, err + } + + xPos := ctx.X + yPos := ctx.PageHeight - ctx.Y - img.Height() + angle := img.angle + + // Create content stream to add to the Page contents. + contentCreator := contentstream.NewContentCreator() + + contentCreator.Add_gs(gsName) // Set graphics state. + + contentCreator.Translate(xPos, yPos) + if angle != 0 { + // Make the rotation about the upper left corner. + contentCreator.Translate(0, img.Height()) + contentCreator.RotateDeg(angle) + contentCreator.Translate(0, -img.Height()) + } + + contentCreator. + Scale(img.Width(), img.Height()). + Add_Do(imgName) // Draw the image. + + ops := contentCreator.Operations() + ops.WrapIfNeeded() + + blk.addContents(ops) + + if img.positioning.isRelative() { + ctx.Y += img.Height() + ctx.Height -= img.Height() + return ctx, nil + } + // Absolute positioning - return original context. + return origCtx, nil +} diff --git a/internal/pdf/creator/line.go b/internal/pdf/creator/line.go new file mode 100644 index 0000000..aab511a --- /dev/null +++ b/internal/pdf/creator/line.go @@ -0,0 +1,85 @@ +package creator + +import ( + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Line defines a line between point 1 (X1,Y1) and point 2 (X2,Y2). The line ending styles can be none (regular line), +// or arrows at either end. The line also has a specified width, color and opacity. +// Implements the Drawable interface and can be drawn on PDF using the Creator. +type Line struct { + x1 float64 + y1 float64 + x2 float64 + y2 float64 + lineColor *model.PdfColorDeviceRGB + lineWidth float64 +} + +// NewLine creates a new Line with default parameters between (x1,y1) to (x2,y2). +func NewLine(x1, y1, x2, y2 float64) *Line { + l := &Line{} + + l.x1 = x1 + l.y1 = y1 + l.x2 = x2 + l.y2 = y2 + + l.lineColor = model.NewPdfColorDeviceRGB(0, 0, 0) + l.lineWidth = 1.0 + + return l +} + +// GetCoords returns the (x1, y1), (x2, y2) points defining the Line. +func (l *Line) GetCoords() (float64, float64, float64, float64) { + return l.x1, l.y1, l.x2, l.y2 +} + +// SetLineWidth sets the line width. +func (l *Line) SetLineWidth(lw float64) { + l.lineWidth = lw +} + +// SetColor sets the line color. +// Use ColorRGBFromHex, ColorRGBFrom8bit or ColorRGBFromArithmetic to make the color object. +func (l *Line) SetColor(col Color) { + l.lineColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// Length calculates and returns the line length. +func (l *Line) Length() float64 { + return math.Sqrt(math.Pow(l.x2-l.x1, 2.0) + math.Pow(l.y2-l.y1, 2.0)) +} + +// GeneratePageBlocks draws the line on a new block representing the page. Implements the Drawable interface. +func (l *Line) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + block := NewBlock(ctx.PageWidth, ctx.PageHeight) + + drawline := draw.Line{ + LineWidth: l.lineWidth, + Opacity: 1.0, + LineColor: l.lineColor, + LineEndingStyle1: draw.LineEndingStyleNone, + LineEndingStyle2: draw.LineEndingStyleNone, + X1: l.x1, + Y1: ctx.PageHeight - l.y1, + X2: l.x2, + Y2: ctx.PageHeight - l.y2, + } + + contents, _, err := drawline.Draw("") + if err != nil { + return nil, ctx, err + } + + err = block.addContentsByString(string(contents)) + if err != nil { + return nil, ctx, err + } + + return []*Block{block}, ctx, nil +} diff --git a/internal/pdf/creator/pagebreak.go b/internal/pdf/creator/pagebreak.go new file mode 100644 index 0000000..40abfe3 --- /dev/null +++ b/internal/pdf/creator/pagebreak.go @@ -0,0 +1,31 @@ +package creator + +// PageBreak represents a page break for a chapter. +type PageBreak struct { +} + +// NewPageBreak create a new page break. +func NewPageBreak() *PageBreak { + return &PageBreak{} +} + +// GeneratePageBlocks generates a page break block. +func (p *PageBreak) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + // Return two empty blocks. First one simply means that there is nothing more to add at the current page. + // The second one starts a new page. + blocks := []*Block{ + NewBlock(ctx.PageWidth, ctx.PageHeight-ctx.Y), + NewBlock(ctx.PageWidth, ctx.PageHeight), + } + + // New Page. Place context in upper left corner (with margins). + ctx.Page++ + newContext := ctx + newContext.Y = ctx.Margins.top + newContext.X = ctx.Margins.left + newContext.Height = ctx.PageHeight - ctx.Margins.top - ctx.Margins.bottom + newContext.Width = ctx.PageWidth - ctx.Margins.left - ctx.Margins.right + ctx = newContext + + return blocks, ctx, nil +} diff --git a/internal/pdf/creator/paragraph.go b/internal/pdf/creator/paragraph.go new file mode 100644 index 0000000..abdf54f --- /dev/null +++ b/internal/pdf/creator/paragraph.go @@ -0,0 +1,525 @@ +package creator + +import ( + "errors" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/fonts" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Paragraph represents text drawn with a specified font and can wrap across lines and pages. +// By default occupies the available width in the drawing context. +type Paragraph struct { + // The input utf-8 text as a string (series of runes). + text string + + // The text encoder which can convert the text (as runes) into a series of glyphs and get character metrics. + encoder textencoding.TextEncoder + + // The font to be used to draw the text. + textFont fonts.Font + + // The font size (points). + fontSize float64 + + // The line relative height (default 1). + lineHeight float64 + + // The text color. + color model.PdfColorDeviceRGB + + // Text alignment: Align left/right/center/justify. + alignment TextAlignment + + // Wrapping properties. + enableWrap bool + wrapWidth float64 + + // defaultWrap defines whether wrapping has been defined explictly or whether default behavior should + // be observed. Default behavior depends on context: normally wrap is expected, except for example in + // table cells wrapping is off by default. + defaultWrap bool + + // Rotation angle (degrees). + angle float64 + + // Margins to be applied around the block when drawing on Page. + margins margins + + // Positioning: relative / absolute. + positioning positioning + + // Absolute coordinates (when in absolute mode). + xPos float64 + yPos float64 + + // Scaling factors (1 default). + scaleX, scaleY float64 + + // Text lines after wrapping to available width. + textLines []string +} + +// NewParagraph create a new text paragraph. Uses default parameters: Helvetica, WinAnsiEncoding and wrap enabled +// with a wrap width of 100 points. +func NewParagraph(text string) *Paragraph { + p := &Paragraph{} + p.text = text + p.textFont = fonts.NewFontHelvetica() + p.SetEncoder(textencoding.NewWinAnsiTextEncoder()) + p.fontSize = 10 + p.lineHeight = 1.0 + + // TODO: Can we wrap intellectually, only if given width is known? + p.enableWrap = true + p.defaultWrap = true + p.SetColor(ColorRGBFrom8bit(0, 0, 0)) + p.alignment = TextAlignmentLeft + p.angle = 0 + + p.scaleX = 1 + p.scaleY = 1 + + p.positioning = positionRelative + + return p +} + +// SetFont sets the Paragraph's font. +func (p *Paragraph) SetFont(font fonts.Font) { + p.textFont = font +} + +// SetFontSize sets the font size in document units (points). +func (p *Paragraph) SetFontSize(fontSize float64) { + p.fontSize = fontSize +} + +// SetTextAlignment sets the horizontal alignment of the text within the space provided. +func (p *Paragraph) SetTextAlignment(align TextAlignment) { + p.alignment = align +} + +// SetEncoder sets the text encoding. +func (p *Paragraph) SetEncoder(encoder textencoding.TextEncoder) { + p.encoder = encoder + // Sync with the text font too. + // XXX/FIXME: Keep in 1 place only. + p.textFont.SetEncoder(encoder) +} + +// SetLineHeight sets the line height (1.0 default). +func (p *Paragraph) SetLineHeight(lineheight float64) { + p.lineHeight = lineheight +} + +// SetText sets the text content of the Paragraph. +func (p *Paragraph) SetText(text string) { + p.text = text +} + +// Text sets the text content of the Paragraph. +func (p *Paragraph) Text() string { + return p.text +} + +// SetEnableWrap sets the line wrapping enabled flag. +func (p *Paragraph) SetEnableWrap(enableWrap bool) { + p.enableWrap = enableWrap + p.defaultWrap = false +} + +// SetColor set the color of the Paragraph text. +// +// Example: +// +// 1. p := NewParagraph("Red paragraph") +// // Set to red color with a hex code: +// p.SetColor(creator.ColorRGBFromHex("#ff0000")) +// +// 2. Make Paragraph green with 8-bit rgb values (0-255 each component) +// p.SetColor(creator.ColorRGBFrom8bit(0, 255, 0) +// +// 3. Make Paragraph blue with arithmetic (0-1) rgb components. +// p.SetColor(creator.ColorRGBFromArithmetic(0, 0, 1.0) +func (p *Paragraph) SetColor(col Color) { + pdfColor := model.NewPdfColorDeviceRGB(col.ToRGB()) + p.color = *pdfColor +} + +// SetPos sets absolute positioning with specified coordinates. +func (p *Paragraph) SetPos(x, y float64) { + p.positioning = positionAbsolute + p.xPos = x + p.yPos = y +} + +// SetAngle sets the rotation angle of the text. +func (p *Paragraph) SetAngle(angle float64) { + p.angle = angle +} + +// SetMargins sets the Paragraph's margins. +func (p *Paragraph) SetMargins(left, right, top, bottom float64) { + p.margins.left = left + p.margins.right = right + p.margins.top = top + p.margins.bottom = bottom +} + +// GetMargins returns the Paragraph's margins: left, right, top, bottom. +func (p *Paragraph) GetMargins() (float64, float64, float64, float64) { + return p.margins.left, p.margins.right, p.margins.top, p.margins.bottom +} + +// SetWidth sets the the Paragraph width. This is essentially the wrapping width, i.e. the width the text can extend to +// prior to wrapping over to next line. +func (p *Paragraph) SetWidth(width float64) { + p.wrapWidth = width + p.wrapText() +} + +// Width returns the width of the Paragraph. +func (p *Paragraph) Width() float64 { + if p.enableWrap { + return p.wrapWidth + } + return p.getTextWidth() / 1000.0 +} + +// Height returns the height of the Paragraph. The height is calculated based on the input text and how it is wrapped +// within the container. Does not include Margins. +func (p *Paragraph) Height() float64 { + if len(p.textLines) == 0 { + p.wrapText() + } + + h := float64(len(p.textLines)) * p.lineHeight * p.fontSize + return h +} + +// getTextWidth calculates the text width as if all in one line (not taking wrapping into account). +func (p *Paragraph) getTextWidth() float64 { + w := float64(0.0) + + for _, rune := range p.text { + glyph, found := p.encoder.RuneToGlyph(rune) + if !found { + common.Log.Debug("error! Glyph not found for rune: %s\n", rune) + return -1 // XXX/FIXME: return error. + } + + // Ignore newline for this.. Handles as if all in one line. + if glyph == "controlLF" { + continue + } + + metrics, found := p.textFont.GetGlyphCharMetrics(glyph) + if !found { + common.Log.Debug("Glyph char metrics not found! %s\n", glyph) + return -1 // XXX/FIXME: return error. + } + w += p.fontSize * metrics.Wx + } + + return w +} + +// Simple algorithm to wrap the text into lines (greedy algorithm - fill the lines). +// XXX/TODO: Consider the Knuth/Plass algorithm or an alternative. +func (p *Paragraph) wrapText() error { + if !p.enableWrap { + p.textLines = []string{p.text} + return nil + } + + line := []rune{} + lineWidth := float64(0.0) + p.textLines = []string{} + + runes := []rune(p.text) + glyphs := []string{} + widths := []float64{} + + for _, val := range runes { + glyph, found := p.encoder.RuneToGlyph(val) + if !found { + common.Log.Debug("error! Glyph not found for rune: %v\n", val) + return errors.New("glyph not found for rune") // XXX/FIXME: return error. + } + + // Newline wrapping. + if glyph == "controlLF" { + // Moves to next line. + p.textLines = append(p.textLines, string(line)) + line = []rune{} + lineWidth = 0 + widths = []float64{} + glyphs = []string{} + continue + } + + metrics, found := p.textFont.GetGlyphCharMetrics(glyph) + if !found { + common.Log.Debug("Glyph char metrics not found! %s\n", glyph) + return errors.New("glyph char metrics missing") // XXX/FIXME: return error. + } + + w := p.fontSize * metrics.Wx + if lineWidth+w > p.wrapWidth*1000.0 { + // Goes out of bounds: Wrap. + // Breaks on the character. + // XXX/TODO: when goes outside: back up to next space, otherwise break on the character. + idx := -1 + for i := len(glyphs) - 1; i >= 0; i-- { + if glyphs[i] == "space" { + idx = i + break + } + } + if idx > 0 { + p.textLines = append(p.textLines, string(line[0:idx+1])) + + line = line[idx+1:] + line = append(line, val) + + glyphs = glyphs[idx+1:] + glyphs = append(glyphs, glyph) + widths = widths[idx+1:] + widths = append(widths, w) + + lineWidth = 0 + for _, width := range widths { + lineWidth += width + } + + } else { + p.textLines = append(p.textLines, string(line)) + line = []rune{val} + lineWidth = w + widths = []float64{w} + glyphs = []string{glyph} + } + } else { + line = append(line, val) + lineWidth += w + glyphs = append(glyphs, glyph) + widths = append(widths, w) + } + } + if len(line) > 0 { + p.textLines = append(p.textLines, string(line)) + } + + return nil +} + +// GeneratePageBlocks generates the page blocks. Multiple blocks are generated if the contents wrap over +// multiple pages. Implements the Drawable interface. +func (p *Paragraph) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + origContext := ctx + blocks := []*Block{} + + blk := NewBlock(ctx.PageWidth, ctx.PageHeight) + if p.positioning.isRelative() { + // Account for Paragraph Margins. + ctx.X += p.margins.left + ctx.Y += p.margins.top + ctx.Width -= p.margins.left + p.margins.right + ctx.Height -= p.margins.top + p.margins.bottom + + // Use available space. + p.SetWidth(ctx.Width) + + if p.Height() > ctx.Height { + // Goes out of the bounds. Write on a new template instead and create a new context at upper + // left corner. + // XXX/TODO: Handle case when Paragraph is larger than the Page... + // Should be fine if we just break on the paragraph, i.e. splitting it up over 2+ pages + + blocks = append(blocks, blk) + blk = NewBlock(ctx.PageWidth, ctx.PageHeight) + + // New Page. + ctx.Page++ + newContext := ctx + newContext.Y = ctx.Margins.top // + p.Margins.top + newContext.X = ctx.Margins.left + p.margins.left + newContext.Height = ctx.PageHeight - ctx.Margins.top - ctx.Margins.bottom - p.margins.bottom + newContext.Width = ctx.PageWidth - ctx.Margins.left - ctx.Margins.right - p.margins.left - p.margins.right + ctx = newContext + } + } else { + // Absolute. + if p.wrapWidth == 0 { + // Use necessary space. + p.SetWidth(p.getTextWidth()) + } + ctx.X = p.xPos + ctx.Y = p.yPos + } + + // Place the Paragraph on the template at position (x,y) based on the ctx. + ctx, err := drawParagraphOnBlock(blk, p, ctx) + if err != nil { + common.Log.Debug("error: %v", err) + return nil, ctx, err + } + + blocks = append(blocks, blk) + if p.positioning.isRelative() { + ctx.X -= p.margins.left // Move back. + ctx.Width = origContext.Width + return blocks, ctx, nil + } + // Absolute: not changing the context. + return blocks, origContext, nil +} + +// Draw block on specified location on Page, adding to the content stream. +func drawParagraphOnBlock(blk *Block, p *Paragraph, ctx DrawContext) (DrawContext, error) { + // Find a free name for the font. + num := 1 + fontName := core.PdfObjectName(fmt.Sprintf("Font%d", num)) + for blk.resources.HasFontByName(fontName) { + num++ + fontName = core.PdfObjectName(fmt.Sprintf("Font%d", num)) + } + + // Add to the Page resources. + err := blk.resources.SetFontByName(fontName, p.textFont.ToPdfObject()) + if err != nil { + return ctx, err + } + + // Wrap the text into lines. + p.wrapText() + + // Create the content stream. + cc := contentstream.NewContentCreator() + cc.Add_q() + + yPos := ctx.PageHeight - ctx.Y - p.fontSize*p.lineHeight + + cc.Translate(ctx.X, yPos) + if p.angle != 0 { + cc.RotateDeg(p.angle) + } + + cc.Add_BT(). + Add_rg(p.color.R(), p.color.G(), p.color.B()). + Add_Tf(fontName, p.fontSize). + Add_TL(p.fontSize * p.lineHeight) + + for idx, line := range p.textLines { + if idx != 0 { + // Move to next line if not first. + cc.Add_Tstar() + } + + runes := []rune(line) + + // Get width of the line (excluding spaces). + w := float64(0) + spaces := 0 + for _, runeVal := range runes { + glyph, found := p.encoder.RuneToGlyph(runeVal) + if !found { + common.Log.Debug("Rune 0x%x not supported by text encoder", runeVal) + return ctx, errors.New("unsupported rune in text encoding") + } + if glyph == "space" { + spaces++ + continue + } + if glyph == "controlLF" { + continue + } + metrics, found := p.textFont.GetGlyphCharMetrics(glyph) + if !found { + common.Log.Debug("Unsupported glyph %s in font\n", glyph) + return ctx, errors.New("unsupported text glyph") + } + + w += p.fontSize * metrics.Wx + } + + objs := []core.PdfObject{} + + spaceMetrics, found := p.textFont.GetGlyphCharMetrics("space") + if !found { + return ctx, errors.New("the font does not have a space glyph") + } + spaceWidth := spaceMetrics.Wx + switch p.alignment { + case TextAlignmentJustify: + if spaces > 0 && idx < len(p.textLines)-1 { // Not to justify last line. + spaceWidth = (p.wrapWidth*1000.0 - w) / float64(spaces) / p.fontSize + } + case TextAlignmentCenter: + // Start with a shift. + textWidth := w + float64(spaces)*spaceWidth*p.fontSize + shift := (p.wrapWidth*1000.0 - textWidth) / 2 / p.fontSize + objs = append(objs, core.MakeFloat(-shift)) + case TextAlignmentRight: + textWidth := w + float64(spaces)*spaceWidth*p.fontSize + shift := (p.wrapWidth*1000.0 - textWidth) / p.fontSize + objs = append(objs, core.MakeFloat(-shift)) + } + + encStr := "" + for _, runeVal := range runes { + //creator.Add_Tj(core.PdfObjectString(tb.Encoder.Encode(line))) + glyph, found := p.encoder.RuneToGlyph(runeVal) + if !found { + common.Log.Debug("Rune 0x%x not supported by text encoder", runeVal) + return ctx, errors.New("unsupported rune in text encoding") + } + + if glyph == "space" { + if !found { + common.Log.Debug("Unsupported glyph %s in font\n", glyph) + return ctx, errors.New("unsupported text glyph") + } + + if len(encStr) > 0 { + objs = append(objs, core.MakeString(encStr)) + encStr = "" + } + objs = append(objs, core.MakeFloat(-spaceWidth)) + } else { + encStr += string(p.encoder.Encode(string(runeVal))) + } + } + if len(encStr) > 0 { + objs = append(objs, core.MakeString(encStr)) + } + + cc.Add_TJ(objs...) + } + cc.Add_ET() + cc.Add_Q() + + ops := cc.Operations() + ops.WrapIfNeeded() + + blk.addContents(ops) + + if p.positioning.isRelative() { + pHeight := p.Height() + p.margins.bottom + ctx.Y += pHeight + ctx.Height -= pHeight + + // If the division is inline, calculate context new X coordinate. + if ctx.Inline { + ctx.X += p.Width() + p.margins.right + } + } + + return ctx, nil +} diff --git a/internal/pdf/creator/rectangle.go b/internal/pdf/creator/rectangle.go new file mode 100644 index 0000000..84eb07b --- /dev/null +++ b/internal/pdf/creator/rectangle.go @@ -0,0 +1,88 @@ +package creator + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream/draw" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Rectangle defines a rectangle with upper left corner at (x,y) and a specified width and height. The rectangle +// can have a colored fill and/or border with a specified width. +// Implements the Drawable interface and can be drawn on PDF using the Creator. +type Rectangle struct { + x float64 // Upper left corner + y float64 + width float64 + height float64 + fillColor *model.PdfColorDeviceRGB + borderColor *model.PdfColorDeviceRGB + borderWidth float64 +} + +// NewRectangle creates a new Rectangle with default parameters with left corner at (x,y) and width, height as specified. +func NewRectangle(x, y, width, height float64) *Rectangle { + rect := &Rectangle{} + + rect.x = x + rect.y = y + rect.width = width + rect.height = height + + rect.borderColor = model.NewPdfColorDeviceRGB(0, 0, 0) + rect.borderWidth = 1.0 + + return rect +} + +// GetCoords returns coordinates of the Rectangle's upper left corner (x,y). +func (rect *Rectangle) GetCoords() (float64, float64) { + return rect.x, rect.y +} + +// SetBorderWidth sets the border width. +func (rect *Rectangle) SetBorderWidth(bw float64) { + rect.borderWidth = bw +} + +// SetBorderColor sets border color. +func (rect *Rectangle) SetBorderColor(col Color) { + rect.borderColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// SetFillColor sets the fill color. +func (rect *Rectangle) SetFillColor(col Color) { + rect.fillColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// GeneratePageBlocks draws the rectangle on a new block representing the page. Implements the Drawable interface. +func (rect *Rectangle) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + block := NewBlock(ctx.PageWidth, ctx.PageHeight) + + drawrect := draw.Rectangle{ + Opacity: 1.0, + X: rect.x, + Y: ctx.PageHeight - rect.y - rect.height, + Height: rect.height, + Width: rect.width, + } + if rect.fillColor != nil { + drawrect.FillEnabled = true + drawrect.FillColor = rect.fillColor + } + if rect.borderColor != nil && rect.borderWidth > 0 { + drawrect.BorderEnabled = true + drawrect.BorderColor = rect.borderColor + drawrect.BorderWidth = rect.borderWidth + } + + contents, _, err := drawrect.Draw("") + if err != nil { + return nil, ctx, err + } + + err = block.addContentsByString(string(contents)) + if err != nil { + return nil, ctx, err + } + + return []*Block{block}, ctx, nil +} diff --git a/internal/pdf/creator/styled_paragraph.go b/internal/pdf/creator/styled_paragraph.go new file mode 100644 index 0000000..e14d35b --- /dev/null +++ b/internal/pdf/creator/styled_paragraph.go @@ -0,0 +1,638 @@ +package creator + +import ( + "errors" + "fmt" + "strings" + "unicode" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// StyledParagraph represents text drawn with a specified font and can wrap across lines and pages. +// By default occupies the available width in the drawing context. +type StyledParagraph struct { + // Text chunks with styles that compose the paragraph + chunks []TextChunk + + // Style used for the paragraph for spacing and offsets + defaultStyle TextStyle + + // The text encoder which can convert the text (as runes) into a series of glyphs and get character metrics. + encoder textencoding.TextEncoder + + // Text alignment: Align left/right/center/justify. + alignment TextAlignment + + // The line relative height (default 1). + lineHeight float64 + + // Wrapping properties. + enableWrap bool + wrapWidth float64 + + // defaultWrap defines whether wrapping has been defined explictly or whether default behavior should + // be observed. Default behavior depends on context: normally wrap is expected, except for example in + // table cells wrapping is off by default. + defaultWrap bool + + // Rotation angle (degrees). + angle float64 + + // Margins to be applied around the block when drawing on Page. + margins margins + + // Positioning: relative / absolute. + positioning positioning + + // Absolute coordinates (when in absolute mode). + xPos float64 + yPos float64 + + // Scaling factors (1 default). + scaleX float64 + scaleY float64 + + // Text chunk lines after wrapping to available width. + lines [][]TextChunk +} + +// NewStyledParagraph creates a new styled paragraph. +// Uses default parameters: Helvetica, WinAnsiEncoding and wrap enabled +// with a wrap width of 100 points. +func NewStyledParagraph(text string, style TextStyle) *StyledParagraph { + // TODO: Can we wrap intellectually, only if given width is known? + p := &StyledParagraph{ + chunks: []TextChunk{ + { + Text: text, + Style: style, + }, + }, + defaultStyle: NewTextStyle(), + lineHeight: 1.0, + alignment: TextAlignmentLeft, + enableWrap: true, + defaultWrap: true, + angle: 0, + scaleX: 1, + scaleY: 1, + positioning: positionRelative, + } + + p.SetEncoder(textencoding.NewWinAnsiTextEncoder()) + return p +} + +// Append adds a new text chunk with a specified style to the paragraph. +func (p *StyledParagraph) Append(text string, style TextStyle) { + chunk := TextChunk{ + Text: text, + Style: style, + } + chunk.Style.Font.SetEncoder(p.encoder) + + p.chunks = append(p.chunks, chunk) + p.wrapText() +} + +// Reset sets the entire text and also the style of the paragraph +// to those specified. It behaves as if the paragraph was a new one. +func (p *StyledParagraph) Reset(text string, style TextStyle) { + p.chunks = []TextChunk{} + p.Append(text, style) +} + +// SetTextAlignment sets the horizontal alignment of the text within the space provided. +func (p *StyledParagraph) SetTextAlignment(align TextAlignment) { + p.alignment = align +} + +// SetEncoder sets the text encoding. +func (p *StyledParagraph) SetEncoder(encoder textencoding.TextEncoder) { + p.encoder = encoder + p.defaultStyle.Font.SetEncoder(encoder) + + // Sync with the text font too. + // XXX/FIXME: Keep in 1 place only. + for _, chunk := range p.chunks { + chunk.Style.Font.SetEncoder(encoder) + } +} + +// SetLineHeight sets the line height (1.0 default). +func (p *StyledParagraph) SetLineHeight(lineheight float64) { + p.lineHeight = lineheight +} + +// SetEnableWrap sets the line wrapping enabled flag. +func (p *StyledParagraph) SetEnableWrap(enableWrap bool) { + p.enableWrap = enableWrap + p.defaultWrap = false +} + +// SetPos sets absolute positioning with specified coordinates. +func (p *StyledParagraph) SetPos(x, y float64) { + p.positioning = positionAbsolute + p.xPos = x + p.yPos = y +} + +// SetAngle sets the rotation angle of the text. +func (p *StyledParagraph) SetAngle(angle float64) { + p.angle = angle +} + +// SetMargins sets the Paragraph's margins. +func (p *StyledParagraph) SetMargins(left, right, top, bottom float64) { + p.margins.left = left + p.margins.right = right + p.margins.top = top + p.margins.bottom = bottom +} + +// GetMargins returns the Paragraph's margins: left, right, top, bottom. +func (p *StyledParagraph) GetMargins() (float64, float64, float64, float64) { + return p.margins.left, p.margins.right, p.margins.top, p.margins.bottom +} + +// SetWidth sets the the Paragraph width. This is essentially the wrapping width, +// i.e. the width the text can extend to prior to wrapping over to next line. +func (p *StyledParagraph) SetWidth(width float64) { + p.wrapWidth = width + p.wrapText() +} + +// Width returns the width of the Paragraph. +func (p *StyledParagraph) Width() float64 { + if p.enableWrap { + return p.wrapWidth + } + + return p.getTextWidth() / 1000.0 +} + +// Height returns the height of the Paragraph. The height is calculated based on the input text and how it is wrapped +// within the container. Does not include Margins. +func (p *StyledParagraph) Height() float64 { + if len(p.lines) == 0 { + p.wrapText() + } + + var height float64 + for _, line := range p.lines { + var lineHeight float64 + for _, chunk := range line { + h := p.lineHeight * chunk.Style.FontSize + if h > lineHeight { + lineHeight = h + } + } + + height += lineHeight + } + + return height +} + +// getTextWidth calculates the text width as if all in one line (not taking wrapping into account). +func (p *StyledParagraph) getTextWidth() float64 { + var width float64 + for _, chunk := range p.chunks { + style := &chunk.Style + + for _, rune := range chunk.Text { + glyph, found := p.encoder.RuneToGlyph(rune) + if !found { + common.Log.Debug("error! Glyph not found for rune: %s\n", rune) + + // XXX/FIXME: return error. + return -1 + } + + // Ignore newline for this.. Handles as if all in one line. + if glyph == "controlLF" { + continue + } + + metrics, found := style.Font.GetGlyphCharMetrics(glyph) + if !found { + common.Log.Debug("Glyph char metrics not found! %s\n", glyph) + + // XXX/FIXME: return error. + return -1 + } + + width += style.FontSize * metrics.Wx + } + } + + return width +} + +// getTextHeight calculates the text height as if all in one line (not taking wrapping into account). +func (p *StyledParagraph) getTextHeight() float64 { + var height float64 + for _, chunk := range p.chunks { + h := chunk.Style.FontSize * p.lineHeight + if h > height { + height = h + } + } + + return height +} + +// wrapText splits text into lines. It uses a simple greedy algorithm to wrap +// fill the lines. +// XXX/TODO: Consider the Knuth/Plass algorithm or an alternative. +func (p *StyledParagraph) wrapText() error { + if !p.enableWrap { + p.lines = [][]TextChunk{p.chunks} + return nil + } + + p.lines = [][]TextChunk{} + var line []TextChunk + var lineWidth float64 + + for _, chunk := range p.chunks { + style := chunk.Style + + var part []rune + var glyphs []string + var widths []float64 + + for _, r := range chunk.Text { + glyph, found := p.encoder.RuneToGlyph(r) + if !found { + common.Log.Debug("error! Glyph not found for rune: %v\n", r) + + // XXX/FIXME: return error. + return errors.New("glyph not found for rune") + } + + // newline wrapping. + if glyph == "controlLF" { + // moves to next line. + line = append(line, TextChunk{ + Text: strings.TrimRightFunc(string(part), unicode.IsSpace), + Style: style, + }) + p.lines = append(p.lines, line) + line = []TextChunk{} + + lineWidth = 0 + part = []rune{} + widths = []float64{} + glyphs = []string{} + continue + } + + metrics, found := style.Font.GetGlyphCharMetrics(glyph) + if !found { + common.Log.Debug("Glyph char metrics not found! %s\n", glyph) + + // XXX/FIXME: return error. + return errors.New("glyph char metrics missing") + } + + w := style.FontSize * metrics.Wx + if lineWidth+w > p.wrapWidth*1000.0 { + // Goes out of bounds: Wrap. + // Breaks on the character. + // XXX/TODO: when goes outside: back up to next space, + // otherwise break on the character. + idx := -1 + for j := len(glyphs) - 1; j >= 0; j-- { + if glyphs[j] == "space" { + idx = j + break + } + } + + text := string(part) + if idx >= 0 { + text = string(part[0 : idx+1]) + + part = part[idx+1:] + part = append(part, r) + glyphs = glyphs[idx+1:] + glyphs = append(glyphs, glyph) + widths = widths[idx+1:] + widths = append(widths, w) + + lineWidth = 0 + for _, width := range widths { + lineWidth += width + } + } else { + lineWidth = w + part = []rune{r} + glyphs = []string{glyph} + widths = []float64{w} + } + + line = append(line, TextChunk{ + Text: strings.TrimRightFunc(string(text), unicode.IsSpace), + Style: style, + }) + p.lines = append(p.lines, line) + line = []TextChunk{} + } else { + lineWidth += w + part = append(part, r) + glyphs = append(glyphs, glyph) + widths = append(widths, w) + } + } + + if len(part) > 0 { + line = append(line, TextChunk{ + Text: string(part), + Style: style, + }) + } + } + + if len(line) > 0 { + p.lines = append(p.lines, line) + } + + return nil +} + +// GeneratePageBlocks generates the page blocks. Multiple blocks are generated +// if the contents wrap over multiple pages. Implements the Drawable interface. +func (p *StyledParagraph) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + origContext := ctx + blocks := []*Block{} + + blk := NewBlock(ctx.PageWidth, ctx.PageHeight) + if p.positioning.isRelative() { + // Account for Paragraph Margins. + ctx.X += p.margins.left + ctx.Y += p.margins.top + ctx.Width -= p.margins.left + p.margins.right + ctx.Height -= p.margins.top + p.margins.bottom + + // Use available space. + p.SetWidth(ctx.Width) + + if p.Height() > ctx.Height { + // Goes out of the bounds. Write on a new template instead and create a new context at upper + // left corner. + // XXX/TODO: Handle case when Paragraph is larger than the Page... + // Should be fine if we just break on the paragraph, i.e. splitting it up over 2+ pages + + blocks = append(blocks, blk) + blk = NewBlock(ctx.PageWidth, ctx.PageHeight) + + // New Page. + ctx.Page++ + newContext := ctx + newContext.Y = ctx.Margins.top // + p.Margins.top + newContext.X = ctx.Margins.left + p.margins.left + newContext.Height = ctx.PageHeight - ctx.Margins.top - ctx.Margins.bottom - p.margins.bottom + newContext.Width = ctx.PageWidth - ctx.Margins.left - ctx.Margins.right - p.margins.left - p.margins.right + ctx = newContext + } + } else { + // Absolute. + if p.wrapWidth == 0 { + // Use necessary space. + p.SetWidth(p.getTextWidth()) + } + ctx.X = p.xPos + ctx.Y = p.yPos + } + + // Place the Paragraph on the template at position (x,y) based on the ctx. + ctx, err := drawStyledParagraphOnBlock(blk, p, ctx) + if err != nil { + common.Log.Debug("error: %v", err) + return nil, ctx, err + } + + blocks = append(blocks, blk) + if p.positioning.isRelative() { + ctx.X -= p.margins.left // Move back. + ctx.Width = origContext.Width + return blocks, ctx, nil + } + // Absolute: not changing the context. + return blocks, origContext, nil +} + +// Draw block on specified location on Page, adding to the content stream. +func drawStyledParagraphOnBlock(blk *Block, p *StyledParagraph, ctx DrawContext) (DrawContext, error) { + // Find first free index for the font resources of the paragraph + num := 1 + fontName := core.PdfObjectName(fmt.Sprintf("Font%d", num)) + for blk.resources.HasFontByName(fontName) { + num++ + fontName = core.PdfObjectName(fmt.Sprintf("Font%d", num)) + } + + // Add default font to the page resources + err := blk.resources.SetFontByName(fontName, p.defaultStyle.Font.ToPdfObject()) + if err != nil { + return ctx, err + } + num++ + + defaultFontName := fontName + defaultFontSize := p.defaultStyle.FontSize + + // Wrap the text into lines. + p.wrapText() + + // Add the fonts of all chunks to the page resources + fonts := [][]core.PdfObjectName{} + + for _, line := range p.lines { + fontLine := []core.PdfObjectName{} + + for _, chunk := range line { + fontName = core.PdfObjectName(fmt.Sprintf("Font%d", num)) + + err := blk.resources.SetFontByName(fontName, chunk.Style.Font.ToPdfObject()) + if err != nil { + return ctx, err + } + + fontLine = append(fontLine, fontName) + num++ + } + + fonts = append(fonts, fontLine) + } + + // Create the content stream. + cc := contentstream.NewContentCreator() + cc.Add_q() + + yPos := ctx.PageHeight - ctx.Y - defaultFontSize*p.lineHeight + cc.Translate(ctx.X, yPos) + + if p.angle != 0 { + cc.RotateDeg(p.angle) + } + + cc.Add_BT() + + for idx, line := range p.lines { + if idx != 0 { + // Move to next line if not first. + cc.Add_Tstar() + } + + isLastLine := idx == len(p.lines)-1 + + // Get width of the line (excluding spaces). + var width float64 + var spaceWidth float64 + var spaces uint + + for _, chunk := range line { + style := &chunk.Style + + spaceMetrics, found := style.Font.GetGlyphCharMetrics("space") + if !found { + return ctx, errors.New("the font does not have a space glyph") + } + + var chunkSpaces uint + for _, r := range chunk.Text { + glyph, found := p.encoder.RuneToGlyph(r) + if !found { + common.Log.Debug("Rune 0x%x not supported by text encoder", r) + return ctx, errors.New("unsupported rune in text encoding") + } + + if glyph == "space" { + chunkSpaces++ + continue + } + if glyph == "controlLF" { + continue + } + + metrics, found := style.Font.GetGlyphCharMetrics(glyph) + if !found { + common.Log.Debug("Unsupported glyph %s in font\n", glyph) + return ctx, errors.New("unsupported text glyph") + } + + width += style.FontSize * metrics.Wx + } + + spaceWidth += float64(chunkSpaces) * spaceMetrics.Wx * style.FontSize + spaces += chunkSpaces + } + + // Add line shifts + objs := []core.PdfObject{} + switch p.alignment { + case TextAlignmentJustify: + // Not to justify last line. + if spaces > 0 && !isLastLine { + spaceWidth = (p.wrapWidth*1000.0 - width) / float64(spaces) / defaultFontSize + } + case TextAlignmentCenter: + // Start with a shift. + shift := (p.wrapWidth*1000.0 - width - spaceWidth) / 2 / defaultFontSize + objs = append(objs, core.MakeFloat(-shift)) + case TextAlignmentRight: + shift := (p.wrapWidth*1000.0 - width - spaceWidth) / defaultFontSize + objs = append(objs, core.MakeFloat(-shift)) + } + + if len(objs) > 0 { + cc.Add_Tf(defaultFontName, defaultFontSize). + Add_TL(defaultFontSize * p.lineHeight). + Add_TJ(objs...) + } + + // Render line text chunks + for k, chunk := range line { + style := &chunk.Style + + r, g, b := style.Color.ToRGB() + fontName := defaultFontName + fontSize := defaultFontSize + + if p.alignment != TextAlignmentJustify || isLastLine { + spaceMetrics, found := style.Font.GetGlyphCharMetrics("space") + if !found { + return ctx, errors.New("the font does not have a space glyph") + } + + fontName = fonts[idx][k] + fontSize = style.FontSize + spaceWidth = spaceMetrics.Wx + } + + encStr := "" + for _, rn := range chunk.Text { + glyph, found := p.encoder.RuneToGlyph(rn) + if !found { + common.Log.Debug("Rune 0x%x not supported by text encoder", r) + return ctx, errors.New("unsupported rune in text encoding") + } + + if glyph == "space" { + if !found { + common.Log.Debug("Unsupported glyph %s in font\n", glyph) + return ctx, errors.New("unsupported text glyph") + } + + if len(encStr) > 0 { + cc.Add_rg(r, g, b). + Add_Tf(fonts[idx][k], style.FontSize). + Add_TL(style.FontSize * p.lineHeight). + Add_TJ([]core.PdfObject{core.MakeString(encStr)}...) + + encStr = "" + } + + cc.Add_Tf(fontName, fontSize). + Add_TL(fontSize * p.lineHeight). + Add_TJ([]core.PdfObject{core.MakeFloat(-spaceWidth)}...) + } else { + encStr += p.encoder.Encode(string(rn)) + } + } + + if len(encStr) > 0 { + cc.Add_rg(r, g, b). + Add_Tf(fonts[idx][k], style.FontSize). + Add_TL(style.FontSize * p.lineHeight). + Add_TJ([]core.PdfObject{core.MakeString(encStr)}...) + } + } + } + cc.Add_ET() + cc.Add_Q() + + ops := cc.Operations() + ops.WrapIfNeeded() + + blk.addContents(ops) + + if p.positioning.isRelative() { + pHeight := p.Height() + p.margins.bottom + ctx.Y += pHeight + ctx.Height -= pHeight + + // If the division is inline, calculate context new X coordinate. + if ctx.Inline { + ctx.X += p.Width() + p.margins.right + } + } + + return ctx, nil +} diff --git a/internal/pdf/creator/subchapter.go b/internal/pdf/creator/subchapter.go new file mode 100644 index 0000000..eb5ffe5 --- /dev/null +++ b/internal/pdf/creator/subchapter.go @@ -0,0 +1,179 @@ +package creator + +import ( + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/fonts" +) + +// Subchapter simply represents a sub chapter pertaining to a specific Chapter. It can contain multiple +// Drawables, just like a chapter. +type Subchapter struct { + chapterNum int + subchapterNum int + title string + heading *Paragraph + + contents []Drawable + + // Show chapter numbering + showNumbering bool + + // Include in TOC. + includeInTOC bool + + // Positioning: relative / absolute. + positioning positioning + + // Margins to be applied around the block when drawing on Page. + margins margins + + // Reference to the creator's TOC. + toc *TableOfContents +} + +// NewSubchapter creates a new Subchapter under Chapter ch with specified title. +// All other parameters are set to their defaults. +func (c *Creator) NewSubchapter(ch *Chapter, title string) *Subchapter { + subchap := &Subchapter{} + + ch.subchapters++ + subchap.subchapterNum = ch.subchapters + + subchap.chapterNum = ch.number + subchap.title = title + + heading := fmt.Sprintf("%d.%d %s", subchap.chapterNum, subchap.subchapterNum, title) + p := NewParagraph(heading) + + p.SetFontSize(14) + p.SetFont(fonts.NewFontHelvetica()) // bold? + + subchap.showNumbering = true + subchap.includeInTOC = true + + subchap.heading = p + subchap.contents = []Drawable{} + + // Add subchapter to ch. + ch.Add(subchap) + + // Keep a reference for toc. + subchap.toc = c.toc + + return subchap +} + +// SetShowNumbering sets a flag to indicate whether or not to show chapter numbers as part of title. +func (subchap *Subchapter) SetShowNumbering(show bool) { + if show { + heading := fmt.Sprintf("%d.%d. %s", subchap.chapterNum, subchap.subchapterNum, subchap.title) + subchap.heading.SetText(heading) + } else { + heading := subchap.title + subchap.heading.SetText(heading) + } + subchap.showNumbering = show +} + +// SetIncludeInTOC sets a flag to indicate whether or not to include in the table of contents. +func (subchap *Subchapter) SetIncludeInTOC(includeInTOC bool) { + subchap.includeInTOC = includeInTOC +} + +// GetHeading returns the Subchapter's heading Paragraph to address style (font type, size, etc). +func (subchap *Subchapter) GetHeading() *Paragraph { + return subchap.heading +} + +// Set absolute coordinates. +/* +func (subchap *subchapter) SetPos(x, y float64) { + subchap.positioning = positionAbsolute + subchap.xPos = x + subchap.yPos = y +} +*/ + +// SetMargins sets the Subchapter's margins (left, right, top, bottom). +// These margins are typically not needed as the Creator's page margins are used preferably. +func (subchap *Subchapter) SetMargins(left, right, top, bottom float64) { + subchap.margins.left = left + subchap.margins.right = right + subchap.margins.top = top + subchap.margins.bottom = bottom +} + +// GetMargins returns the Subchapter's margins: left, right, top, bottom. +func (subchap *Subchapter) GetMargins() (float64, float64, float64, float64) { + return subchap.margins.left, subchap.margins.right, subchap.margins.top, subchap.margins.bottom +} + +// Add adds a new Drawable to the chapter. +// The currently supported Drawables are: *Paragraph, *Image, *Block, *Table. +func (subchap *Subchapter) Add(d Drawable) { + switch d.(type) { + case *Chapter, *Subchapter: + common.Log.Debug("error: Cannot add chapter or subchapter to a subchapter") + case *Paragraph, *Image, *Block, *Table, *PageBreak: + subchap.contents = append(subchap.contents, d) + default: + common.Log.Debug("Unsupported: %T", d) + } +} + +// GeneratePageBlocks generates the page blocks. Multiple blocks are generated if the contents wrap over +// multiple pages. Implements the Drawable interface. +func (subchap *Subchapter) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + origCtx := ctx + + if subchap.positioning.isRelative() { + // Update context. + ctx.X += subchap.margins.left + ctx.Y += subchap.margins.top + ctx.Width -= subchap.margins.left + subchap.margins.right + ctx.Height -= subchap.margins.top + } + + blocks, ctx, err := subchap.heading.GeneratePageBlocks(ctx) + if err != nil { + return blocks, ctx, err + } + if len(blocks) > 1 { + ctx.Page++ // did not fit - moved to next Page. + } + if subchap.includeInTOC { + // Add to TOC. + subchap.toc.add(subchap.title, subchap.chapterNum, subchap.subchapterNum, ctx.Page) + } + + for _, d := range subchap.contents { + newBlocks, c, err := d.GeneratePageBlocks(ctx) + if err != nil { + return blocks, ctx, err + } + if len(newBlocks) < 1 { + continue + } + + // The first block is always appended to the last.. + blocks[len(blocks)-1].mergeBlocks(newBlocks[0]) + blocks = append(blocks, newBlocks[1:]...) + + ctx = c + } + + if subchap.positioning.isRelative() { + // Move back X to same start of line. + ctx.X = origCtx.X + } + + if subchap.positioning.isAbsolute() { + // If absolute: return original context. + return blocks, origCtx, nil + + } + + return blocks, ctx, nil +} diff --git a/internal/pdf/creator/table.go b/internal/pdf/creator/table.go new file mode 100644 index 0000000..3502b3f --- /dev/null +++ b/internal/pdf/creator/table.go @@ -0,0 +1,628 @@ +package creator + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// Table allows organizing content in an rows X columns matrix, which can spawn across multiple pages. +type Table struct { + // Number of rows and columns. + rows int + cols int + + // Current cell. Current cell in the table. + // For 4x4 table, if in the 2nd row, 3rd column, then + // curCell = 4+3 = 7 + curCell int + + // Column width fractions: should add up to 1. + colWidths []float64 + + // Row heights. + rowHeights []float64 + + // Default row height. + defaultRowHeight float64 + + // Content cells. + cells []*TableCell + + // Positioning: relative / absolute. + positioning positioning + + // Absolute coordinates (when in absolute mode). + xPos, yPos float64 + + // Margins to be applied around the block when drawing on Page. + margins margins +} + +// NewTable create a new Table with a specified number of columns. +func NewTable(cols int) *Table { + t := &Table{} + t.rows = 0 + t.cols = cols + + t.curCell = 0 + + // Initialize column widths as all equal. + t.colWidths = []float64{} + colWidth := float64(1.0) / float64(cols) + for i := 0; i < cols; i++ { + t.colWidths = append(t.colWidths, colWidth) + } + + t.rowHeights = []float64{} + + // Default row height + // XXX/TODO: Base on contents instead? + t.defaultRowHeight = 10.0 + + t.cells = []*TableCell{} + + return t +} + +// SetColumnWidths sets the fractional column widths. +// Each width should be in the range 0-1 and is a fraction of the table width. +// The number of width inputs must match number of columns, otherwise an error is returned. +func (table *Table) SetColumnWidths(widths ...float64) error { + if len(widths) != table.cols { + common.Log.Debug("Mismatching number of widths and columns") + return errors.New("range check error") + } + + table.colWidths = widths + + return nil +} + +// Height returns the total height of all rows. +func (table *Table) Height() float64 { + sum := float64(0.0) + for _, h := range table.rowHeights { + sum += h + } + + return sum +} + +// SetMargins sets the Table's left, right, top, bottom margins. +func (table *Table) SetMargins(left, right, top, bottom float64) { + table.margins.left = left + table.margins.right = right + table.margins.top = top + table.margins.bottom = bottom +} + +// GetMargins returns the left, right, top, bottom Margins. +func (table *Table) GetMargins() (float64, float64, float64, float64) { + return table.margins.left, table.margins.right, table.margins.top, table.margins.bottom +} + +// SetRowHeight sets the height for a specified row. +func (table *Table) SetRowHeight(row int, h float64) error { + if row < 1 || row > len(table.rowHeights) { + return errors.New("range check error") + } + + table.rowHeights[row-1] = h + return nil +} + +// CurRow returns the currently active cell's row number. +func (table *Table) CurRow() int { + curRow := (table.curCell-1)/table.cols + 1 + return curRow +} + +// CurCol returns the currently active cell's column number. +func (table *Table) CurCol() int { + curCol := (table.curCell-1)%(table.cols) + 1 + return curCol +} + +// SetPos sets the Table's positioning to absolute mode and specifies the upper-left corner coordinates as (x,y). +// Note that this is only sensible to use when the table does not wrap over multiple pages. +// TODO: Should be able to set width too (not just based on context/relative positioning mode). +func (table *Table) SetPos(x, y float64) { + table.positioning = positionAbsolute + table.xPos = x + table.yPos = y +} + +// GeneratePageBlocks generate the page blocks. Multiple blocks are generated if the contents wrap over multiple pages. +// Implements the Drawable interface. +func (table *Table) GeneratePageBlocks(ctx DrawContext) ([]*Block, DrawContext, error) { + blocks := []*Block{} + block := NewBlock(ctx.PageWidth, ctx.PageHeight) + + origCtx := ctx + if table.positioning.isAbsolute() { + ctx.X = table.xPos + ctx.Y = table.yPos + } else { + // Relative mode: add margins. + ctx.X += table.margins.left + ctx.Y += table.margins.top + ctx.Width -= table.margins.left + table.margins.right + ctx.Height -= table.margins.bottom + table.margins.top + } + tableWidth := ctx.Width + + // Store table's upper left corner. + ulX := ctx.X + ulY := ctx.Y + + ctx.Height = ctx.PageHeight - ctx.Y - ctx.Margins.bottom + origHeight := ctx.Height + + // Start row keeps track of starting row (wraps to 0 on new page). + startrow := 0 + + // Prepare for drawing: Calculate cell dimensions, row, cell heights. + for _, cell := range table.cells { + // Get total width fraction + wf := float64(0.0) + for i := 0; i < cell.colspan; i++ { + wf += table.colWidths[cell.col+i-1] + } + // Get x pos relative to table upper left corner. + xrel := float64(0.0) + for i := 0; i < cell.col-1; i++ { + xrel += table.colWidths[i] * tableWidth + } + // Get y pos relative to table upper left corner. + yrel := float64(0.0) + for i := startrow; i < cell.row-1; i++ { + yrel += table.rowHeights[i] + } + + // Calculate the width out of available width. + w := wf * tableWidth + + // Get total height. + h := float64(0.0) + for i := 0; i < cell.rowspan; i++ { + h += table.rowHeights[cell.row+i-1] + } + + // For text: Calculate width, height, wrapping within available space if specified. + switch t := cell.content.(type) { + case *Paragraph: + p := t + if p.enableWrap { + p.SetWidth(w - cell.indent) + } + + newh := p.Height() + p.margins.bottom + p.margins.bottom + newh += 0.5 * p.fontSize * p.lineHeight // TODO: Make the top margin configurable? + if newh > h { + diffh := newh - h + // Add diff to last row. + table.rowHeights[cell.row+cell.rowspan-2] += diffh + } + case *StyledParagraph: + sp := t + if sp.enableWrap { + sp.SetWidth(w - cell.indent) + } + + newh := sp.Height() + sp.margins.top + sp.margins.bottom + newh += 0.5 * sp.getTextHeight() // TODO: Make the top margin configurable? + if newh > h { + diffh := newh - h + // Add diff to last row. + table.rowHeights[cell.row+cell.rowspan-2] += diffh + } + case *Image: + img := t + newh := img.Height() + img.margins.top + img.margins.bottom + if newh > h { + diffh := newh - h + // Add diff to last row. + table.rowHeights[cell.row+cell.rowspan-2] += diffh + } + case *Division: + div := t + + ctx := DrawContext{ + X: xrel, + Y: yrel, + Width: w, + } + + // Mock call to generate page blocks. + divBlocks, updCtx, err := div.GeneratePageBlocks(ctx) + if err != nil { + return nil, ctx, err + } + + if len(divBlocks) > 1 { + // Wraps across page, make cell reach all the way to bottom of current page. + newh := ctx.Height - h + if newh > h { + diffh := newh - h + // Add diff to last row. + table.rowHeights[cell.row+cell.rowspan-2] += diffh + } + } + + newh := div.Height() + div.margins.top + div.margins.bottom + _ = updCtx + + // Get available width and height. + if newh > h { + diffh := newh - h + // Add diff to last row. + table.rowHeights[cell.row+cell.rowspan-2] += diffh + } + } + + } + + // Draw cells. + // row height, cell height + for _, cell := range table.cells { + // Get total width fraction + wf := float64(0.0) + for i := 0; i < cell.colspan; i++ { + wf += table.colWidths[cell.col+i-1] + } + // Get x pos relative to table upper left corner. + xrel := float64(0.0) + for i := 0; i < cell.col-1; i++ { + xrel += table.colWidths[i] * tableWidth + } + // Get y pos relative to table upper left corner. + yrel := float64(0.0) + for i := startrow; i < cell.row-1; i++ { + yrel += table.rowHeights[i] + } + + // Calculate the width out of available width. + w := wf * tableWidth + + // Get total height. + h := float64(0.0) + for i := 0; i < cell.rowspan; i++ { + h += table.rowHeights[cell.row+i-1] + } + + ctx.Height = origHeight - yrel + + if h > ctx.Height { + // Go to next page. + blocks = append(blocks, block) + block = NewBlock(ctx.PageWidth, ctx.PageHeight) + ulX = ctx.Margins.left + ulY = ctx.Margins.top + ctx.Height = ctx.PageHeight - ctx.Margins.top - ctx.Margins.bottom + + startrow = cell.row - 1 + yrel = 0 + } + + // Height should be how much space there is left of the page. + ctx.Width = w + ctx.X = ulX + xrel + ctx.Y = ulY + yrel + + if cell.backgroundColor != nil { + // Draw background (fill) + rect := NewRectangle(ctx.X, ctx.Y, w, h) + r := cell.backgroundColor.R() + g := cell.backgroundColor.G() + b := cell.backgroundColor.B() + rect.SetFillColor(ColorRGBFromArithmetic(r, g, b)) + if cell.borderStyle != CellBorderStyleNone { + // and border. + rect.SetBorderWidth(cell.borderWidth) + r := cell.borderColor.R() + g := cell.borderColor.G() + b := cell.borderColor.B() + rect.SetBorderColor(ColorRGBFromArithmetic(r, g, b)) + } else { + rect.SetBorderWidth(0) + } + err := block.Draw(rect) + if err != nil { + common.Log.Debug("error: %v\n", err) + } + } else if cell.borderStyle != CellBorderStyleNone { + // Draw border (no fill). + rect := NewRectangle(ctx.X, ctx.Y, w, h) + rect.SetBorderWidth(cell.borderWidth) + r := cell.borderColor.R() + g := cell.borderColor.G() + b := cell.borderColor.B() + rect.SetBorderColor(ColorRGBFromArithmetic(r, g, b)) + err := block.Draw(rect) + if err != nil { + common.Log.Debug("error: %v\n", err) + } + } + + if cell.content != nil { + // Account for horizontal alignment: + cw := cell.content.Width() // content width. + switch cell.horizontalAlignment { + case CellHorizontalAlignmentLeft: + // Account for indent. + ctx.X += cell.indent + ctx.Width -= cell.indent + case CellHorizontalAlignmentCenter: + // Difference between available space and content space. + dw := w - cw + if dw > 0 { + ctx.X += dw / 2 + ctx.Width -= dw / 2 + } + case CellHorizontalAlignmentRight: + if w > cw { + ctx.X = ctx.X + w - cw - cell.indent + ctx.Width = cw + } + } + + // Account for vertical alignment. + ch := cell.content.Height() // content height. + switch cell.verticalAlignment { + case CellVerticalAlignmentTop: + // Default: do nothing. + case CellVerticalAlignmentMiddle: + dh := h - ch + if dh > 0 { + ctx.Y += dh / 2 + ctx.Height -= dh / 2 + } + case CellVerticalAlignmentBottom: + if h > ch { + ctx.Y = ctx.Y + h - ch + ctx.Height = ch + } + } + + err := block.DrawWithContext(cell.content, ctx) + if err != nil { + common.Log.Debug("error: %v\n", err) + } + } + + ctx.Y += h + } + blocks = append(blocks, block) + + if table.positioning.isAbsolute() { + return blocks, origCtx, nil + } + // Relative mode. + // Move back X after. + ctx.X = origCtx.X + // Return original width. + ctx.Width = origCtx.Width + // Add the bottom margin. + ctx.Y += table.margins.bottom + + return blocks, ctx, nil +} + +// CellBorderStyle defines the table cell's border style. +type CellBorderStyle int + +// Currently supported table styles are: None (no border) and boxed (line along each side). +const ( + // No border + CellBorderStyleNone CellBorderStyle = iota + + // Borders along all sides (boxed). + CellBorderStyleBox +) + +// CellHorizontalAlignment defines the table cell's horizontal alignment. +type CellHorizontalAlignment int + +// Table cells have three horizontal alignment modes: left, center and right. +const ( + // Align cell content on the left (with specified indent); unused space on the right. + CellHorizontalAlignmentLeft CellHorizontalAlignment = iota + + // Align cell content in the middle (unused space divided equally on the left/right). + CellHorizontalAlignmentCenter + + // Align the cell content on the right; unsued space on the left. + CellHorizontalAlignmentRight +) + +// CellVerticalAlignment defines the table cell's vertical alignment. +type CellVerticalAlignment int + +// Table cells have three vertical alignment modes: top, middle and bottom. +const ( + // Align cell content vertically to the top; unused space below. + CellVerticalAlignmentTop CellVerticalAlignment = iota + + // Align cell content in the middle; unused space divided equally above and below. + CellVerticalAlignmentMiddle + + // Align cell content on the bottom; unused space above. + CellVerticalAlignmentBottom +) + +// TableCell defines a table cell which can contain a Drawable as content. +type TableCell struct { + // Background + backgroundColor *model.PdfColorDeviceRGB + + // Border + borderStyle CellBorderStyle + borderColor *model.PdfColorDeviceRGB + borderWidth float64 + + // The row and column which the cell starts from. + row, col int + + // Row, column span. + rowspan int + colspan int + + // Each cell can contain 1 drawable. + content VectorDrawable + + // Alignment + horizontalAlignment CellHorizontalAlignment + verticalAlignment CellVerticalAlignment + + // Left indent. + indent float64 + + // Table reference + table *Table +} + +// NewCell makes a new cell and inserts into the table at current position in the table. +func (table *Table) NewCell() *TableCell { + table.curCell++ + + curRow := (table.curCell-1)/table.cols + 1 + for curRow > table.rows { + table.rows++ + table.rowHeights = append(table.rowHeights, table.defaultRowHeight) + } + curCol := (table.curCell-1)%(table.cols) + 1 + + cell := &TableCell{} + cell.row = curRow + cell.col = curCol + + // Default left indent + cell.indent = 5 + + cell.borderStyle = CellBorderStyleNone + cell.borderColor = model.NewPdfColorDeviceRGB(0, 0, 0) + + // Alignment defaults. + cell.horizontalAlignment = CellHorizontalAlignmentLeft + cell.verticalAlignment = CellVerticalAlignmentTop + + cell.rowspan = 1 + cell.colspan = 1 + + table.cells = append(table.cells, cell) + + // Keep reference to the table. + cell.table = table + + return cell +} + +// SkipCells skips over a specified number of cells in the table. +func (table *Table) SkipCells(num int) { + if num < 0 { + common.Log.Debug("Table: cannot skip back to previous cells") + return + } + table.curCell += num +} + +// SkipRows skips over a specified number of rows in the table. +func (table *Table) SkipRows(num int) { + ncells := num*table.cols - 1 + if ncells < 0 { + common.Log.Debug("Table: cannot skip back to previous cells") + return + } + table.curCell += ncells +} + +// SkipOver skips over a specified number of rows and cols. +func (table *Table) SkipOver(rows, cols int) { + ncells := rows*table.cols + cols - 1 + if ncells < 0 { + common.Log.Debug("Table: cannot skip back to previous cells") + return + } + table.curCell += ncells +} + +// SetIndent sets the cell's left indent. +func (cell *TableCell) SetIndent(indent float64) { + cell.indent = indent +} + +// SetHorizontalAlignment sets the cell's horizontal alignment of content. +// Can be one of: +// - CellHorizontalAlignmentLeft +// - CellHorizontalAlignmentCenter +// - CellHorizontalAlignmentRight +func (cell *TableCell) SetHorizontalAlignment(halign CellHorizontalAlignment) { + cell.horizontalAlignment = halign +} + +// SetVerticalAlignment set the cell's vertical alignment of content. +// Can be one of: +// - CellHorizontalAlignmentTop +// - CellHorizontalAlignmentMiddle +// - CellHorizontalAlignmentBottom +func (cell *TableCell) SetVerticalAlignment(valign CellVerticalAlignment) { + cell.verticalAlignment = valign +} + +// SetBorder sets the cell's border style. +func (cell *TableCell) SetBorder(style CellBorderStyle, width float64) { + cell.borderStyle = style + cell.borderWidth = width +} + +// SetBorderColor sets the cell's border color. +func (cell *TableCell) SetBorderColor(col Color) { + cell.borderColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// SetBackgroundColor sets the cell's background color. +func (cell *TableCell) SetBackgroundColor(col Color) { + cell.backgroundColor = model.NewPdfColorDeviceRGB(col.ToRGB()) +} + +// Width returns the cell's width based on the input draw context. +func (cell *TableCell) Width(ctx DrawContext) float64 { + fraction := float64(0.0) + for j := 0; j < cell.colspan; j++ { + fraction += cell.table.colWidths[cell.col+j-1] + } + w := ctx.Width * fraction + return w +} + +// SetContent sets the cell's content. The content is a VectorDrawable, i.e. a Drawable with a known height and width. +// The currently supported VectorDrawable is: *Paragraph, *StyledParagraph. +func (cell *TableCell) SetContent(vd VectorDrawable) error { + switch t := vd.(type) { + case *Paragraph: + if t.defaultWrap { + // Default paragraph settings in table: no wrapping. + t.enableWrap = false // No wrapping. + } + + cell.content = vd + case *StyledParagraph: + if t.defaultWrap { + // Default styled paragraph settings in table: no wrapping. + t.enableWrap = false // No wrapping. + } + + cell.content = vd + case *Image: + cell.content = vd + case *Division: + cell.content = vd + default: + common.Log.Debug("error: unsupported cell content type %T\n", vd) + return errors.New("type check error") + } + + return nil +} diff --git a/internal/pdf/creator/text_style.go b/internal/pdf/creator/text_style.go new file mode 100644 index 0000000..7dee445 --- /dev/null +++ b/internal/pdf/creator/text_style.go @@ -0,0 +1,38 @@ +package creator + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/fonts" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// TextStyle is a collection of properties that can be assigned to a chunk of text. +type TextStyle struct { + // The color of the text. + Color Color + + // The font the text will use. + Font fonts.Font + + // The size of the font. + FontSize float64 +} + +// NewTextStyle creates a new text style object which can be used with chunks +// of text. Uses default parameters: Helvetica, WinAnsiEncoding and wrap +// enabled with a wrap width of 100 points. +func NewTextStyle() TextStyle { + font := fonts.NewFontHelvetica() + font.SetEncoder(textencoding.NewWinAnsiTextEncoder()) + + return TextStyle{ + Color: ColorRGBFrom8bit(0, 0, 0), + Font: font, + FontSize: 10, + } +} + +// TextChunk represents a chunk of text along with a particular style. +type TextChunk struct { + Text string + Style TextStyle +} diff --git a/internal/pdf/creator/toc.go b/internal/pdf/creator/toc.go new file mode 100644 index 0000000..b576f03 --- /dev/null +++ b/internal/pdf/creator/toc.go @@ -0,0 +1,38 @@ +package creator + +// TableOfContents provides an overview over chapters and subchapters when creating a document with Creator. +type TableOfContents struct { + entries []TableOfContentsEntry +} + +// Make a new table of contents. +func newTableOfContents() *TableOfContents { + toc := TableOfContents{} + toc.entries = []TableOfContentsEntry{} + return &toc +} + +// Entries returns the table of content entries. +func (toc *TableOfContents) Entries() []TableOfContentsEntry { + return toc.entries +} + +// Add a TOC entry. +func (toc *TableOfContents) add(title string, chapter, subchapter, pageNum int) { + entry := TableOfContentsEntry{} + entry.Title = title + entry.Chapter = chapter + entry.Subchapter = subchapter + entry.PageNumber = pageNum + + toc.entries = append(toc.entries, entry) +} + +// TableOfContentsEntry defines a single entry in the TableOfContents. +// Each entry has a title, chapter number, sub chapter (0 if chapter) and the page number. +type TableOfContentsEntry struct { + Title string + Chapter int + Subchapter int // 0 if chapter + PageNumber int // Page number +} diff --git a/internal/pdf/extractor/const.go b/internal/pdf/extractor/const.go new file mode 100644 index 0000000..d21c1e0 --- /dev/null +++ b/internal/pdf/extractor/const.go @@ -0,0 +1,3 @@ +package extractor + +var isTesting = false diff --git a/internal/pdf/extractor/extractor.go b/internal/pdf/extractor/extractor.go new file mode 100644 index 0000000..311dc93 --- /dev/null +++ b/internal/pdf/extractor/extractor.go @@ -0,0 +1,23 @@ +package extractor + +import "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" + +// Extractor stores and offers functionality for extracting content from PDF pages. +type Extractor struct { + contents string + resources *model.PdfPageResources +} + +// New returns an Extractor instance for extracting content from the input PDF page. +func New(page *model.PdfPage) (*Extractor, error) { + contents, err := page.GetAllContentStreams() + if err != nil { + return nil, err + } + + e := &Extractor{} + e.contents = contents + e.resources = page.Resources + + return e, nil +} diff --git a/internal/pdf/extractor/text.go b/internal/pdf/extractor/text.go new file mode 100644 index 0000000..6b63211 --- /dev/null +++ b/internal/pdf/extractor/text.go @@ -0,0 +1,225 @@ +package extractor + +import ( + "bytes" + "errors" + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/cmap" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/contentstream" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model" +) + +// ExtractText processes and extracts all text data in content streams and returns as a string. Takes into +// account character encoding via CMaps in the PDF file. +// The text is processed linearly e.g. in the order in which it appears. A best effort is done to add +// spaces and newlines. +func (e *Extractor) ExtractText() (string, error) { + var buf bytes.Buffer + + cstreamParser := contentstream.NewContentStreamParser(e.contents) + operations, err := cstreamParser.Parse() + if err != nil { + return buf.String(), err + } + + processor := contentstream.NewContentStreamProcessor(*operations) + + var codemap *cmap.CMap + inText := false + xPos, yPos := float64(-1), float64(-1) + + processor.AddHandler(contentstream.HandlerConditionEnumAllOperands, "", + func(op *contentstream.ContentStreamOperation, gs contentstream.GraphicsState, resources *model.PdfPageResources) error { + operand := op.Operand + switch operand { + case "BT": + inText = true + case "ET": + inText = false + case "Tf": + if !inText { + common.Log.Debug("Tf operand outside text") + return nil + } + + if len(op.Params) != 2 { + common.Log.Debug("error Tf should only get 2 input params, got %d", len(op.Params)) + return errors.New("Incorrect parameter count") + } + + codemap = nil + + fontName, ok := op.Params[0].(*core.PdfObjectName) + if !ok { + common.Log.Debug("error Tf font input not a name") + return errors.New("Tf range error") + } + + if resources == nil { + return nil + } + + fontObj, found := resources.GetFontByName(*fontName) + if !found { + common.Log.Debug("Font not found...") + return errors.New("Font not in resources") + } + + fontObj = core.TraceToDirectObject(fontObj) + if fontDict, isDict := fontObj.(*core.PdfObjectDictionary); isDict { + toUnicode := fontDict.Get("ToUnicode") + if toUnicode != nil { + toUnicode = core.TraceToDirectObject(toUnicode) + toUnicodeStream, ok := toUnicode.(*core.PdfObjectStream) + if !ok { + return errors.New("invalid ToUnicode entry - not a stream") + } + decoded, err := core.DecodeStream(toUnicodeStream) + if err != nil { + return err + } + + codemap, err = cmap.LoadCmapFromData(decoded) + if err != nil { + return err + } + } + } + case "T*": + if !inText { + common.Log.Debug("T* operand outside text") + return nil + } + buf.WriteString("\n") + case "Td", "TD": + if !inText { + common.Log.Debug("Td/TD operand outside text") + return nil + } + + // Params: [tx ty], corresponeds to Tm=Tlm=[1 0 0;0 1 0;tx ty 1]*Tm + if len(op.Params) != 2 { + common.Log.Debug("Td/TD invalid arguments") + return nil + } + tx, err := getNumberAsFloat(op.Params[0]) + if err != nil { + common.Log.Debug("Td Float parse error") + return nil + } + ty, err := getNumberAsFloat(op.Params[1]) + if err != nil { + common.Log.Debug("Td Float parse error") + return nil + } + + if tx > 0 { + buf.WriteString(" ") + } + if ty < 0 { + // TODO: More flexible space characters? + buf.WriteString("\n") + } + case "Tm": + if !inText { + common.Log.Debug("Tm operand outside text") + return nil + } + + // Params: a,b,c,d,e,f as in Tm = [a b 0; c d 0; e f 1]. + // The last two (e,f) represent translation. + if len(op.Params) != 6 { + return errors.New("Tm: Invalid number of inputs") + } + xfloat, ok := op.Params[4].(*core.PdfObjectFloat) + if !ok { + xint, ok := op.Params[4].(*core.PdfObjectInteger) + if !ok { + return nil + } + xfloat = core.MakeFloat(float64(*xint)) + } + yfloat, ok := op.Params[5].(*core.PdfObjectFloat) + if !ok { + yint, ok := op.Params[5].(*core.PdfObjectInteger) + if !ok { + return nil + } + yfloat = core.MakeFloat(float64(*yint)) + } + if yPos == -1 { + yPos = float64(*yfloat) + } else if yPos > float64(*yfloat) { + buf.WriteString("\n") + xPos = float64(*xfloat) + yPos = float64(*yfloat) + return nil + } + if xPos == -1 { + xPos = float64(*xfloat) + } else if xPos < float64(*xfloat) { + buf.WriteString("\t") + xPos = float64(*xfloat) + } + case "TJ": + if !inText { + common.Log.Debug("TJ operand outside text") + return nil + } + if len(op.Params) < 1 { + return nil + } + paramList, ok := op.Params[0].(*core.PdfObjectArray) + if !ok { + return fmt.Errorf("invalid parameter type, no array (%T)", op.Params[0]) + } + for _, obj := range *paramList { + switch v := obj.(type) { + case *core.PdfObjectString: + if codemap != nil { + buf.WriteString(codemap.CharcodeBytesToUnicode([]byte(*v))) + } else { + buf.WriteString(string(*v)) + } + case *core.PdfObjectFloat: + if *v < -100 { + buf.WriteString(" ") + } + case *core.PdfObjectInteger: + if *v < -100 { + buf.WriteString(" ") + } + } + } + case "Tj": + if !inText { + common.Log.Debug("Tj operand outside text") + return nil + } + if len(op.Params) < 1 { + return nil + } + param, ok := op.Params[0].(*core.PdfObjectString) + if !ok { + return fmt.Errorf("invalid parameter type, not string (%T)", op.Params[0]) + } + if codemap != nil { + buf.WriteString(codemap.CharcodeBytesToUnicode([]byte(*param))) + } else { + buf.WriteString(string(*param)) + } + } + + return nil + }) + + err = processor.Process(e.resources) + if err != nil { + common.Log.Error("error processing: %v", err) + return buf.String(), err + } + return buf.String(), nil +} diff --git a/internal/pdf/extractor/utils.go b/internal/pdf/extractor/utils.go new file mode 100644 index 0000000..450b784 --- /dev/null +++ b/internal/pdf/extractor/utils.go @@ -0,0 +1,20 @@ +package extractor + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// getNumberAsFloat can retrieve numeric values from PdfObject (both integer/float). +func getNumberAsFloat(obj core.PdfObject) (float64, error) { + if fObj, ok := obj.(*core.PdfObjectFloat); ok { + return float64(*fObj), nil + } + + if iObj, ok := obj.(*core.PdfObjectInteger); ok { + return float64(*iObj), nil + } + + return 0, errors.New("Not a number") +} diff --git a/internal/pdf/model/annotations.go b/internal/pdf/model/annotations.go new file mode 100644 index 0000000..bedafbf --- /dev/null +++ b/internal/pdf/model/annotations.go @@ -0,0 +1,1899 @@ +package model + +import ( + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// PDFAnnotation contains common attributes of an annotation. The context object contains the subannotation, +// which can be a markup annotation or other types. +type PdfAnnotation struct { + context PdfModel // Sub-annotation. + Rect core.PdfObject + Contents core.PdfObject + P core.PdfObject // Reference to page object. + NM core.PdfObject + M core.PdfObject + F core.PdfObject + AP core.PdfObject + AS core.PdfObject + Border core.PdfObject + C core.PdfObject + StructParent core.PdfObject + OC core.PdfObject + + primitive *core.PdfIndirectObject +} + +// Context in this case is a reference to the subannotation. +func (a *PdfAnnotation) GetContext() PdfModel { + return a.context +} + +// Set the sub annotation (context). +func (a *PdfAnnotation) SetContext(ctx PdfModel) { + a.context = ctx +} + +func (a *PdfAnnotation) String() string { + s := "" + + obj, ok := a.ToPdfObject().(*core.PdfIndirectObject) + if ok { + s = fmt.Sprintf("%T: %s", a.context, obj.PdfObject.String()) + } + + return s +} + +// Additional elements for mark-up annotations. +type PdfAnnotationMarkup struct { + T core.PdfObject + Popup *PdfAnnotationPopup + CA core.PdfObject + RC core.PdfObject + CreationDate core.PdfObject + IRT core.PdfObject + Subj core.PdfObject + RT core.PdfObject + IT core.PdfObject + ExData core.PdfObject +} + +// Subtype: Text +type PdfAnnotationText struct { + *PdfAnnotation + *PdfAnnotationMarkup + Open core.PdfObject + Name core.PdfObject + State core.PdfObject + StateModel core.PdfObject +} + +// Subtype: Link +type PdfAnnotationLink struct { + *PdfAnnotation + A core.PdfObject + Dest core.PdfObject + H core.PdfObject + PA core.PdfObject + QuadPoints core.PdfObject + BS core.PdfObject +} + +// Subtype: FreeText +type PdfAnnotationFreeText struct { + *PdfAnnotation + *PdfAnnotationMarkup + DA core.PdfObject + Q core.PdfObject + RC core.PdfObject + DS core.PdfObject + CL core.PdfObject + IT core.PdfObject + BE core.PdfObject + RD core.PdfObject + BS core.PdfObject + LE core.PdfObject +} + +// Subtype: Line +type PdfAnnotationLine struct { + *PdfAnnotation + *PdfAnnotationMarkup + L core.PdfObject + BS core.PdfObject + LE core.PdfObject + IC core.PdfObject + LL core.PdfObject + LLE core.PdfObject + Cap core.PdfObject + IT core.PdfObject + LLO core.PdfObject + CP core.PdfObject + Measure core.PdfObject + CO core.PdfObject +} + +// Subtype: Square +type PdfAnnotationSquare struct { + *PdfAnnotation + *PdfAnnotationMarkup + BS core.PdfObject + IC core.PdfObject + BE core.PdfObject + RD core.PdfObject +} + +// Subtype: Circle +type PdfAnnotationCircle struct { + *PdfAnnotation + *PdfAnnotationMarkup + BS core.PdfObject + IC core.PdfObject + BE core.PdfObject + RD core.PdfObject +} + +// Subtype: Polygon +type PdfAnnotationPolygon struct { + *PdfAnnotation + *PdfAnnotationMarkup + Vertices core.PdfObject + LE core.PdfObject + BS core.PdfObject + IC core.PdfObject + BE core.PdfObject + IT core.PdfObject + Measure core.PdfObject +} + +// Subtype: PolyLine +type PdfAnnotationPolyLine struct { + *PdfAnnotation + *PdfAnnotationMarkup + Vertices core.PdfObject + LE core.PdfObject + BS core.PdfObject + IC core.PdfObject + BE core.PdfObject + IT core.PdfObject + Measure core.PdfObject +} + +// Subtype: Highlight +type PdfAnnotationHighlight struct { + *PdfAnnotation + *PdfAnnotationMarkup + QuadPoints core.PdfObject +} + +// Subtype: Underline +type PdfAnnotationUnderline struct { + *PdfAnnotation + *PdfAnnotationMarkup + QuadPoints core.PdfObject +} + +// Subtype: Squiggly +type PdfAnnotationSquiggly struct { + *PdfAnnotation + *PdfAnnotationMarkup + QuadPoints core.PdfObject +} + +// Subtype: StrikeOut +type PdfAnnotationStrikeOut struct { + *PdfAnnotation + *PdfAnnotationMarkup + QuadPoints core.PdfObject +} + +// Subtype: Caret +type PdfAnnotationCaret struct { + *PdfAnnotation + *PdfAnnotationMarkup + RD core.PdfObject + Sy core.PdfObject +} + +// Subtype: Stamp +type PdfAnnotationStamp struct { + *PdfAnnotation + *PdfAnnotationMarkup + Name core.PdfObject +} + +// Subtype: Ink +type PdfAnnotationInk struct { + *PdfAnnotation + *PdfAnnotationMarkup + InkList core.PdfObject + BS core.PdfObject +} + +// Subtype: Popup +type PdfAnnotationPopup struct { + *PdfAnnotation + Parent core.PdfObject + Open core.PdfObject +} + +// Subtype: FileAttachment +type PdfAnnotationFileAttachment struct { + *PdfAnnotation + *PdfAnnotationMarkup + FS core.PdfObject + Name core.PdfObject +} + +// Subtype: Sound +type PdfAnnotationSound struct { + *PdfAnnotation + *PdfAnnotationMarkup + Sound core.PdfObject + Name core.PdfObject +} + +// Subtype: Rich Media +type PdfAnnotationRichMedia struct { + *PdfAnnotation + RichMediaSettings core.PdfObject + RichMediaContent core.PdfObject +} + +// Subtype: Movie +type PdfAnnotationMovie struct { + *PdfAnnotation + T core.PdfObject + Movie core.PdfObject + A core.PdfObject +} + +// Subtype: Screen +type PdfAnnotationScreen struct { + *PdfAnnotation + T core.PdfObject + MK core.PdfObject + A core.PdfObject + AA core.PdfObject +} + +// Subtype: Widget +type PdfAnnotationWidget struct { + *PdfAnnotation + H core.PdfObject + MK core.PdfObject + A core.PdfObject + AA core.PdfObject + BS core.PdfObject + Parent core.PdfObject +} + +// Subtype: Watermark +type PdfAnnotationWatermark struct { + *PdfAnnotation + FixedPrint core.PdfObject +} + +// Subtype: PrinterMark +type PdfAnnotationPrinterMark struct { + *PdfAnnotation + MN core.PdfObject +} + +// Subtype: TrapNet +type PdfAnnotationTrapNet struct { + *PdfAnnotation +} + +// Subtype: 3D +type PdfAnnotation3D struct { + *PdfAnnotation + T3DD core.PdfObject + T3DV core.PdfObject + T3DA core.PdfObject + T3DI core.PdfObject + T3DB core.PdfObject +} + +// Subtype: Projection +type PdfAnnotationProjection struct { + *PdfAnnotation + *PdfAnnotationMarkup +} + +// Subtype: Redact +type PdfAnnotationRedact struct { + *PdfAnnotation + *PdfAnnotationMarkup + QuadPoints core.PdfObject + IC core.PdfObject + RO core.PdfObject + OverlayText core.PdfObject + Repeat core.PdfObject + DA core.PdfObject + Q core.PdfObject +} + +// Construct a new PDF annotation model and initializes the underlying PDF primitive. +func NewPdfAnnotation() *PdfAnnotation { + annot := &PdfAnnotation{} + + container := &core.PdfIndirectObject{} + container.PdfObject = core.MakeDict() + + annot.primitive = container + return annot +} + +// Create a new text annotation. +func NewPdfAnnotationText() *PdfAnnotationText { + annotation := NewPdfAnnotation() + textAnnotation := &PdfAnnotationText{} + textAnnotation.PdfAnnotation = annotation + textAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(textAnnotation) + return textAnnotation +} + +// Create a new link annotation. +func NewPdfAnnotationLink() *PdfAnnotationLink { + annotation := NewPdfAnnotation() + linkAnnotation := &PdfAnnotationLink{} + linkAnnotation.PdfAnnotation = annotation + annotation.SetContext(linkAnnotation) + return linkAnnotation +} + +// Create a new free text annotation. +func NewPdfAnnotationFreeText() *PdfAnnotationFreeText { + annotation := NewPdfAnnotation() + freetextAnnotation := &PdfAnnotationFreeText{} + freetextAnnotation.PdfAnnotation = annotation + freetextAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(freetextAnnotation) + return freetextAnnotation +} + +// Create a new line annotation. +func NewPdfAnnotationLine() *PdfAnnotationLine { + annotation := NewPdfAnnotation() + lineAnnotation := &PdfAnnotationLine{} + lineAnnotation.PdfAnnotation = annotation + lineAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(lineAnnotation) + return lineAnnotation +} + +// Create a new square annotation. +func NewPdfAnnotationSquare() *PdfAnnotationSquare { + annotation := NewPdfAnnotation() + rectAnnotation := &PdfAnnotationSquare{} + rectAnnotation.PdfAnnotation = annotation + rectAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(rectAnnotation) + return rectAnnotation +} + +// Create a new circle annotation. +func NewPdfAnnotationCircle() *PdfAnnotationCircle { + annotation := NewPdfAnnotation() + circAnnotation := &PdfAnnotationCircle{} + circAnnotation.PdfAnnotation = annotation + circAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(circAnnotation) + return circAnnotation +} + +// Create a new polygon annotation. +func NewPdfAnnotationPolygon() *PdfAnnotationPolygon { + annotation := NewPdfAnnotation() + polygonAnnotation := &PdfAnnotationPolygon{} + polygonAnnotation.PdfAnnotation = annotation + polygonAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(polygonAnnotation) + return polygonAnnotation +} + +// Create a new polyline annotation. +func NewPdfAnnotationPolyLine() *PdfAnnotationPolyLine { + annotation := NewPdfAnnotation() + polylineAnnotation := &PdfAnnotationPolyLine{} + polylineAnnotation.PdfAnnotation = annotation + polylineAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(polylineAnnotation) + return polylineAnnotation +} + +// Create a new text highlight annotation. +func NewPdfAnnotationHighlight() *PdfAnnotationHighlight { + annotation := NewPdfAnnotation() + highlightAnnotation := &PdfAnnotationHighlight{} + highlightAnnotation.PdfAnnotation = annotation + highlightAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(highlightAnnotation) + return highlightAnnotation +} + +// Create a new text underline annotation. +func NewPdfAnnotationUnderline() *PdfAnnotationUnderline { + annotation := NewPdfAnnotation() + underlineAnnotation := &PdfAnnotationUnderline{} + underlineAnnotation.PdfAnnotation = annotation + underlineAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(underlineAnnotation) + return underlineAnnotation +} + +// Create a new text squiggly annotation. +func NewPdfAnnotationSquiggly() *PdfAnnotationSquiggly { + annotation := NewPdfAnnotation() + squigglyAnnotation := &PdfAnnotationSquiggly{} + squigglyAnnotation.PdfAnnotation = annotation + squigglyAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(squigglyAnnotation) + return squigglyAnnotation +} + +// Create a new text strikeout annotation. +func NewPdfAnnotationStrikeOut() *PdfAnnotationStrikeOut { + annotation := NewPdfAnnotation() + strikeoutAnnotation := &PdfAnnotationStrikeOut{} + strikeoutAnnotation.PdfAnnotation = annotation + strikeoutAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(strikeoutAnnotation) + return strikeoutAnnotation +} + +// Create a new caret annotation. +func NewPdfAnnotationCaret() *PdfAnnotationCaret { + annotation := NewPdfAnnotation() + caretAnnotation := &PdfAnnotationCaret{} + caretAnnotation.PdfAnnotation = annotation + caretAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(caretAnnotation) + return caretAnnotation +} + +// Create a new stamp annotation. +func NewPdfAnnotationStamp() *PdfAnnotationStamp { + annotation := NewPdfAnnotation() + stampAnnotation := &PdfAnnotationStamp{} + stampAnnotation.PdfAnnotation = annotation + stampAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(stampAnnotation) + return stampAnnotation +} + +// Create a new ink annotation. +func NewPdfAnnotationInk() *PdfAnnotationInk { + annotation := NewPdfAnnotation() + inkAnnotation := &PdfAnnotationInk{} + inkAnnotation.PdfAnnotation = annotation + inkAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(inkAnnotation) + return inkAnnotation +} + +// Create a new popup annotation. +func NewPdfAnnotationPopup() *PdfAnnotationPopup { + annotation := NewPdfAnnotation() + popupAnnotation := &PdfAnnotationPopup{} + popupAnnotation.PdfAnnotation = annotation + annotation.SetContext(popupAnnotation) + return popupAnnotation +} + +// Create a new file attachment annotation. +func NewPdfAnnotationFileAttachment() *PdfAnnotationFileAttachment { + annotation := NewPdfAnnotation() + fileAnnotation := &PdfAnnotationFileAttachment{} + fileAnnotation.PdfAnnotation = annotation + fileAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(fileAnnotation) + return fileAnnotation +} + +// Create a new sound annotation. +func NewPdfAnnotationSound() *PdfAnnotationSound { + annotation := NewPdfAnnotation() + soundAnnotation := &PdfAnnotationSound{} + soundAnnotation.PdfAnnotation = annotation + soundAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(soundAnnotation) + return soundAnnotation +} + +// Create a new rich media annotation. +func NewPdfAnnotationRichMedia() *PdfAnnotationRichMedia { + annotation := NewPdfAnnotation() + richmediaAnnotation := &PdfAnnotationRichMedia{} + richmediaAnnotation.PdfAnnotation = annotation + annotation.SetContext(richmediaAnnotation) + return richmediaAnnotation +} + +// Create a new movie annotation. +func NewPdfAnnotationMovie() *PdfAnnotationMovie { + annotation := NewPdfAnnotation() + movieAnnotation := &PdfAnnotationMovie{} + movieAnnotation.PdfAnnotation = annotation + annotation.SetContext(movieAnnotation) + return movieAnnotation +} + +// Create a new screen annotation. +func NewPdfAnnotationScreen() *PdfAnnotationScreen { + annotation := NewPdfAnnotation() + screenAnnotation := &PdfAnnotationScreen{} + screenAnnotation.PdfAnnotation = annotation + annotation.SetContext(screenAnnotation) + return screenAnnotation +} + +// Create a new watermark annotation. +func NewPdfAnnotationWatermark() *PdfAnnotationWatermark { + annotation := NewPdfAnnotation() + watermarkAnnotation := &PdfAnnotationWatermark{} + watermarkAnnotation.PdfAnnotation = annotation + annotation.SetContext(watermarkAnnotation) + return watermarkAnnotation +} + +// Create a new printermark annotation. +func NewPdfAnnotationPrinterMark() *PdfAnnotationPrinterMark { + annotation := NewPdfAnnotation() + printermarkAnnotation := &PdfAnnotationPrinterMark{} + printermarkAnnotation.PdfAnnotation = annotation + annotation.SetContext(printermarkAnnotation) + return printermarkAnnotation +} + +// Create a new trapnet annotation. +func NewPdfAnnotationTrapNet() *PdfAnnotationTrapNet { + annotation := NewPdfAnnotation() + trapnetAnnotation := &PdfAnnotationTrapNet{} + trapnetAnnotation.PdfAnnotation = annotation + annotation.SetContext(trapnetAnnotation) + return trapnetAnnotation +} + +// Create a new 3d annotation. +func NewPdfAnnotation3D() *PdfAnnotation3D { + annotation := NewPdfAnnotation() + x3dAnnotation := &PdfAnnotation3D{} + x3dAnnotation.PdfAnnotation = annotation + annotation.SetContext(x3dAnnotation) + return x3dAnnotation +} + +// Create a new projection annotation. +func NewPdfAnnotationProjection() *PdfAnnotationProjection { + annotation := NewPdfAnnotation() + projectionAnnotation := &PdfAnnotationProjection{} + projectionAnnotation.PdfAnnotation = annotation + projectionAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(projectionAnnotation) + return projectionAnnotation +} + +// Create a new redact annotation. +func NewPdfAnnotationRedact() *PdfAnnotationRedact { + annotation := NewPdfAnnotation() + redactAnnotation := &PdfAnnotationRedact{} + redactAnnotation.PdfAnnotation = annotation + redactAnnotation.PdfAnnotationMarkup = &PdfAnnotationMarkup{} + annotation.SetContext(redactAnnotation) + return redactAnnotation +} + +// Create a new annotation widget and initializes the underlying primitive. +func NewPdfAnnotationWidget() *PdfAnnotationWidget { + annotation := NewPdfAnnotation() + annotationWidget := &PdfAnnotationWidget{} + annotationWidget.PdfAnnotation = annotation + annotation.SetContext(annotationWidget) + return annotationWidget +} + +// Used for PDF parsing. Loads a PDF annotation model from a PDF primitive dictionary object. +// Loads the common PDF annotation dictionary, and anything needed for the annotation subtype. +func (r *PdfReader) newPdfAnnotationFromIndirectObject(container *core.PdfIndirectObject) (*PdfAnnotation, error) { + d, isDict := container.PdfObject.(*core.PdfObjectDictionary) + if !isDict { + return nil, fmt.Errorf("annotation indirect object not containing a dictionary") + } + + // Check if cached, return cached model if exists. + if model := r.modelManager.GetModelFromPrimitive(d); model != nil { + annot, ok := model.(*PdfAnnotation) + if !ok { + return nil, fmt.Errorf("cached model not a PDF annotation") + } + return annot, nil + } + + annot := &PdfAnnotation{} + annot.primitive = container + r.modelManager.Register(d, annot) + + if obj := d.Get("Type"); obj != nil { + str, ok := obj.(*core.PdfObjectName) + if !ok { + common.Log.Trace("Incompatibility! Invalid type of Type (%T) - should be Name", obj) + } else { + if *str != "Annot" { + // Log a debug message. + // Not returning an error on this + common.Log.Trace("Unsuspected Type != Annot (%s)", *str) + } + } + } + + if obj := d.Get("Rect"); obj != nil { + annot.Rect = obj + } + + if obj := d.Get("Contents"); obj != nil { + annot.Contents = obj + } + + if obj := d.Get("P"); obj != nil { + annot.P = obj + } + + if obj := d.Get("NM"); obj != nil { + annot.NM = obj + } + + if obj := d.Get("M"); obj != nil { + annot.M = obj + } + + if obj := d.Get("F"); obj != nil { + annot.F = obj + } + + if obj := d.Get("AP"); obj != nil { + annot.AP = obj + } + + if obj := d.Get("AS"); obj != nil { + annot.AS = obj + } + + if obj := d.Get("Border"); obj != nil { + annot.Border = obj + } + + if obj := d.Get("C"); obj != nil { + annot.C = obj + } + + if obj := d.Get("StructParent"); obj != nil { + annot.StructParent = obj + } + + if obj := d.Get("OC"); obj != nil { + annot.OC = obj + } + + subtypeObj := d.Get("Subtype") + if subtypeObj == nil { + common.Log.Debug("warning: Compatibility issue - annotation Subtype missing - assuming no subtype") + annot.context = nil + return annot, nil + } + subtype, ok := subtypeObj.(*core.PdfObjectName) + if !ok { + common.Log.Debug("error: Invalid Subtype object type != name (%T)", subtypeObj) + return nil, fmt.Errorf("invalid Subtype object type != name (%T)", subtypeObj) + } + switch *subtype { + case "Text": + ctx, err := r.newPdfAnnotationTextFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Link": + ctx, err := r.newPdfAnnotationLinkFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "FreeText": + ctx, err := r.newPdfAnnotationFreeTextFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Line": + ctx, err := r.newPdfAnnotationLineFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + common.Log.Trace("LINE ANNOTATION: annot (%T): %+v\n", annot, annot) + common.Log.Trace("LINE ANNOTATION: ctx (%T): %+v\n", ctx, ctx) + common.Log.Trace("LINE ANNOTATION Markup: ctx (%T): %+v\n", ctx.PdfAnnotationMarkup, ctx.PdfAnnotationMarkup) + + return annot, nil + case "Square": + ctx, err := r.newPdfAnnotationSquareFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Circle": + ctx, err := r.newPdfAnnotationCircleFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Polygon": + ctx, err := r.newPdfAnnotationPolygonFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "PolyLine": + ctx, err := r.newPdfAnnotationPolyLineFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Highlight": + ctx, err := r.newPdfAnnotationHighlightFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Underline": + ctx, err := r.newPdfAnnotationUnderlineFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Squiggly": + ctx, err := r.newPdfAnnotationSquigglyFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "StrikeOut": + ctx, err := r.newPdfAnnotationStrikeOut(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Caret": + ctx, err := r.newPdfAnnotationCaretFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Stamp": + ctx, err := r.newPdfAnnotationStampFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Ink": + ctx, err := r.newPdfAnnotationInkFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Popup": + ctx, err := r.newPdfAnnotationPopupFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "FileAttachment": + ctx, err := r.newPdfAnnotationFileAttachmentFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Sound": + ctx, err := r.newPdfAnnotationSoundFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "RichMedia": + ctx, err := r.newPdfAnnotationRichMediaFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Movie": + ctx, err := r.newPdfAnnotationMovieFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Screen": + ctx, err := r.newPdfAnnotationScreenFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Widget": + ctx, err := r.newPdfAnnotationWidgetFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "PrinterMark": + ctx, err := r.newPdfAnnotationPrinterMarkFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "TrapNet": + ctx, err := r.newPdfAnnotationTrapNetFromDict() + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Watermark": + ctx, err := r.newPdfAnnotationWatermarkFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "3D": + ctx, err := r.newPdfAnnotation3DFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Projection": + ctx, err := r.newPdfAnnotationProjectionFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + case "Redact": + ctx, err := r.newPdfAnnotationRedactFromDict(d) + if err != nil { + return nil, err + } + ctx.PdfAnnotation = annot + annot.context = ctx + return annot, nil + } + + err := fmt.Errorf("unknown annotation (%s)", *subtype) + return nil, err +} + +// Load data for markup annotation subtypes. +func (r *PdfReader) newPdfAnnotationMarkupFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationMarkup, error) { + annot := &PdfAnnotationMarkup{} + + if obj := d.Get("T"); obj != nil { + annot.T = obj + } + + if obj := d.Get("Popup"); obj != nil { + indObj, isIndirect := obj.(*core.PdfIndirectObject) + if !isIndirect { + if _, isNull := obj.(*core.PdfObjectNull); !isNull { + return nil, fmt.Errorf("popup should point to an indirect object") + } + } else { + popupAnnotObj, err := r.newPdfAnnotationFromIndirectObject(indObj) + if err != nil { + return nil, err + } + popupAnnot, isPopupAnnot := popupAnnotObj.context.(*PdfAnnotationPopup) + if !isPopupAnnot { + return nil, fmt.Errorf("popup not referring to a popup annotation") + } + + annot.Popup = popupAnnot + } + } + + if obj := d.Get("CA"); obj != nil { + annot.CA = obj + } + if obj := d.Get("RC"); obj != nil { + annot.RC = obj + } + if obj := d.Get("CreationDate"); obj != nil { + annot.CreationDate = obj + } + if obj := d.Get("IRT"); obj != nil { + annot.IRT = obj + } + if obj := d.Get("Subj"); obj != nil { + annot.Subj = obj + } + if obj := d.Get("RT"); obj != nil { + annot.RT = obj + } + if obj := d.Get("IT"); obj != nil { + annot.IT = obj + } + if obj := d.Get("ExData"); obj != nil { + annot.ExData = obj + } + + return annot, nil +} + +func (r *PdfReader) newPdfAnnotationTextFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationText, error) { + annot := PdfAnnotationText{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.Open = d.Get("Open") + annot.Name = d.Get("Name") + annot.State = d.Get("State") + annot.StateModel = d.Get("StateModel") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationLinkFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationLink, error) { + annot := PdfAnnotationLink{} + + annot.A = d.Get("A") + annot.Dest = d.Get("Dest") + annot.H = d.Get("H") + annot.PA = d.Get("PA") + annot.QuadPoints = d.Get("QuadPoints") + annot.BS = d.Get("BS") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationFreeTextFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationFreeText, error) { + annot := PdfAnnotationFreeText{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.DA = d.Get("DA") + annot.Q = d.Get("Q") + annot.RC = d.Get("RC") + annot.DS = d.Get("DS") + annot.CL = d.Get("CL") + annot.IT = d.Get("IT") + annot.BE = d.Get("BE") + annot.RD = d.Get("RD") + annot.BS = d.Get("BS") + annot.LE = d.Get("LE") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationLineFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationLine, error) { + annot := PdfAnnotationLine{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.L = d.Get("L") + annot.BS = d.Get("BS") + annot.LE = d.Get("LE") + annot.IC = d.Get("IC") + annot.LL = d.Get("LL") + annot.LLE = d.Get("LLE") + annot.Cap = d.Get("Cap") + annot.IT = d.Get("IT") + annot.LLO = d.Get("LLO") + annot.CP = d.Get("CP") + annot.Measure = d.Get("Measure") + annot.CO = d.Get("CO") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationSquareFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationSquare, error) { + annot := PdfAnnotationSquare{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.BS = d.Get("BS") + annot.IC = d.Get("IC") + annot.BE = d.Get("BE") + annot.RD = d.Get("RD") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationCircleFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationCircle, error) { + annot := PdfAnnotationCircle{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.BS = d.Get("BS") + annot.IC = d.Get("IC") + annot.BE = d.Get("BE") + annot.RD = d.Get("RD") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationPolygonFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationPolygon, error) { + annot := PdfAnnotationPolygon{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.Vertices = d.Get("Vertices") + annot.LE = d.Get("LE") + annot.BS = d.Get("BS") + annot.IC = d.Get("IC") + annot.BE = d.Get("BE") + annot.IT = d.Get("IT") + annot.Measure = d.Get("Measure") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationPolyLineFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationPolyLine, error) { + annot := PdfAnnotationPolyLine{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.Vertices = d.Get("Vertices") + annot.LE = d.Get("LE") + annot.BS = d.Get("BS") + annot.IC = d.Get("IC") + annot.BE = d.Get("BE") + annot.IT = d.Get("IT") + annot.Measure = d.Get("Measure") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationHighlightFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationHighlight, error) { + annot := PdfAnnotationHighlight{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.QuadPoints = d.Get("QuadPoints") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationUnderlineFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationUnderline, error) { + annot := PdfAnnotationUnderline{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.QuadPoints = d.Get("QuadPoints") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationSquigglyFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationSquiggly, error) { + annot := PdfAnnotationSquiggly{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.QuadPoints = d.Get("QuadPoints") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationStrikeOut(d *core.PdfObjectDictionary) (*PdfAnnotationStrikeOut, error) { + annot := PdfAnnotationStrikeOut{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.QuadPoints = d.Get("QuadPoints") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationCaretFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationCaret, error) { + annot := PdfAnnotationCaret{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.RD = d.Get("RD") + annot.Sy = d.Get("Sy") + + return &annot, nil +} +func (r *PdfReader) newPdfAnnotationStampFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationStamp, error) { + annot := PdfAnnotationStamp{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.Name = d.Get("Name") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationInkFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationInk, error) { + annot := PdfAnnotationInk{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.InkList = d.Get("InkList") + annot.BS = d.Get("BS") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationPopupFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationPopup, error) { + annot := PdfAnnotationPopup{} + + annot.Parent = d.Get("Parent") + annot.Open = d.Get("Open") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationFileAttachmentFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationFileAttachment, error) { + annot := PdfAnnotationFileAttachment{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.FS = d.Get("FS") + annot.Name = d.Get("Name") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationSoundFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationSound, error) { + annot := PdfAnnotationSound{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.Name = d.Get("Name") + annot.Sound = d.Get("Sound") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationRichMediaFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationRichMedia, error) { + annot := &PdfAnnotationRichMedia{} + + annot.RichMediaSettings = d.Get("RichMediaSettings") + annot.RichMediaContent = d.Get("RichMediaContent") + + return annot, nil +} + +func (r *PdfReader) newPdfAnnotationMovieFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationMovie, error) { + annot := PdfAnnotationMovie{} + + annot.T = d.Get("T") + annot.Movie = d.Get("Movie") + annot.A = d.Get("A") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationScreenFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationScreen, error) { + annot := PdfAnnotationScreen{} + + annot.T = d.Get("T") + annot.MK = d.Get("MK") + annot.A = d.Get("A") + annot.AA = d.Get("AA") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationWidgetFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationWidget, error) { + annot := PdfAnnotationWidget{} + + annot.H = d.Get("H") + + annot.MK = d.Get("MK") + // MK can be an indirect object... + // Expected to be a dictionary. + + annot.A = d.Get("A") + annot.AA = d.Get("AA") + annot.BS = d.Get("BS") + annot.Parent = d.Get("Parent") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationPrinterMarkFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationPrinterMark, error) { + annot := PdfAnnotationPrinterMark{} + + annot.MN = d.Get("MN") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationTrapNetFromDict() (*PdfAnnotationTrapNet, error) { + annot := PdfAnnotationTrapNet{} + // empty?e + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationWatermarkFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationWatermark, error) { + annot := PdfAnnotationWatermark{} + + annot.FixedPrint = d.Get("FixedPrint") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotation3DFromDict(d *core.PdfObjectDictionary) (*PdfAnnotation3D, error) { + annot := PdfAnnotation3D{} + + annot.T3DD = d.Get("3DD") + annot.T3DV = d.Get("3DV") + annot.T3DA = d.Get("3DA") + annot.T3DI = d.Get("3DI") + annot.T3DB = d.Get("3DB") + + return &annot, nil +} + +func (r *PdfReader) newPdfAnnotationProjectionFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationProjection, error) { + annot := &PdfAnnotationProjection{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + return annot, nil +} + +func (r *PdfReader) newPdfAnnotationRedactFromDict(d *core.PdfObjectDictionary) (*PdfAnnotationRedact, error) { + annot := PdfAnnotationRedact{} + + markup, err := r.newPdfAnnotationMarkupFromDict(d) + if err != nil { + return nil, err + } + annot.PdfAnnotationMarkup = markup + + annot.QuadPoints = d.Get("QuadPoints") + annot.IC = d.Get("IC") + annot.RO = d.Get("RO") + annot.OverlayText = d.Get("OverlayText") + annot.Repeat = d.Get("Repeat") + annot.DA = d.Get("DA") + annot.Q = d.Get("Q") + + return &annot, nil +} + +func (a *PdfAnnotation) GetContainingPdfObject() core.PdfObject { + return a.primitive +} + +// Note: Call the sub-annotation's Tocore.PdfObject to set both the generic and non-generic information. +// TODO/FIXME: Consider doing it here instead. +func (a *PdfAnnotation) ToPdfObject() core.PdfObject { + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.Set("Type", core.MakeName("Annot")) + d.SetIfNotNil("Rect", a.Rect) + d.SetIfNotNil("Contents", a.Contents) + d.SetIfNotNil("P", a.P) + d.SetIfNotNil("NM", a.NM) + d.SetIfNotNil("M", a.M) + d.SetIfNotNil("F", a.F) + d.SetIfNotNil("AP", a.AP) + d.SetIfNotNil("AS", a.AS) + d.SetIfNotNil("Border", a.Border) + d.SetIfNotNil("C", a.C) + d.SetIfNotNil("StructParent", a.StructParent) + d.SetIfNotNil("OC", a.OC) + + return container +} + +// Markup portion of the annotation. +func (a *PdfAnnotationMarkup) appendToPdfDictionary(d *core.PdfObjectDictionary) { + d.SetIfNotNil("T", a.T) + if a.Popup != nil { + d.Set("Popup", a.Popup.ToPdfObject()) + } + d.SetIfNotNil("CA", a.CA) + d.SetIfNotNil("RC", a.RC) + d.SetIfNotNil("CreationDate", a.CreationDate) + d.SetIfNotNil("IRT", a.IRT) + d.SetIfNotNil("Subj", a.Subj) + d.SetIfNotNil("RT", a.RT) + d.SetIfNotNil("IT", a.IT) + d.SetIfNotNil("ExData", a.ExData) +} + +func (a *PdfAnnotationText) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + if a.PdfAnnotationMarkup != nil { + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + } + + d.SetIfNotNil("Subtype", core.MakeName("Text")) + d.SetIfNotNil("Open", a.Open) + d.SetIfNotNil("Name", a.Name) + d.SetIfNotNil("State", a.State) + d.SetIfNotNil("StateModel", a.StateModel) + return container +} + +func (a *PdfAnnotationLink) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("Link")) + d.SetIfNotNil("A", a.A) + d.SetIfNotNil("Dest", a.Dest) + d.SetIfNotNil("H", a.H) + d.SetIfNotNil("PA", a.PA) + d.SetIfNotNil("QuadPoints", a.QuadPoints) + d.SetIfNotNil("BS", a.BS) + return container +} + +func (a *PdfAnnotationFreeText) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("FreeText")) + d.SetIfNotNil("DA", a.DA) + d.SetIfNotNil("Q", a.Q) + d.SetIfNotNil("RC", a.RC) + d.SetIfNotNil("DS", a.DS) + d.SetIfNotNil("CL", a.CL) + d.SetIfNotNil("IT", a.IT) + d.SetIfNotNil("BE", a.BE) + d.SetIfNotNil("RD", a.RD) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("LE", a.LE) + + return container +} +func (a *PdfAnnotationLine) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Line")) + d.SetIfNotNil("L", a.L) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("LE", a.LE) + d.SetIfNotNil("IC", a.IC) + d.SetIfNotNil("LL", a.LL) + d.SetIfNotNil("LLE", a.LLE) + d.SetIfNotNil("Cap", a.Cap) + d.SetIfNotNil("IT", a.IT) + d.SetIfNotNil("LLO", a.LLO) + d.SetIfNotNil("CP", a.CP) + d.SetIfNotNil("Measure", a.Measure) + d.SetIfNotNil("CO", a.CO) + + return container +} + +func (a *PdfAnnotationSquare) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + if a.PdfAnnotationMarkup != nil { + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + } + + d.SetIfNotNil("Subtype", core.MakeName("Square")) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("IC", a.IC) + d.SetIfNotNil("BE", a.BE) + d.SetIfNotNil("RD", a.RD) + + return container +} + +func (a *PdfAnnotationCircle) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Circle")) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("IC", a.IC) + d.SetIfNotNil("BE", a.BE) + d.SetIfNotNil("RD", a.RD) + + return container +} + +func (a *PdfAnnotationPolygon) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Polygon")) + d.SetIfNotNil("Vertices", a.Vertices) + d.SetIfNotNil("LE", a.LE) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("IC", a.IC) + d.SetIfNotNil("BE", a.BE) + d.SetIfNotNil("IT", a.IT) + d.SetIfNotNil("Measure", a.Measure) + + return container +} + +func (a *PdfAnnotationPolyLine) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("PolyLine")) + d.SetIfNotNil("Vertices", a.Vertices) + d.SetIfNotNil("LE", a.LE) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("IC", a.IC) + d.SetIfNotNil("BE", a.BE) + d.SetIfNotNil("IT", a.IT) + d.SetIfNotNil("Measure", a.Measure) + + return container +} + +func (a *PdfAnnotationHighlight) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Highlight")) + d.SetIfNotNil("QuadPoints", a.QuadPoints) + return container +} + +func (a *PdfAnnotationUnderline) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Underline")) + d.SetIfNotNil("QuadPoints", a.QuadPoints) + return container +} + +func (a *PdfAnnotationSquiggly) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Squiggly")) + d.SetIfNotNil("QuadPoints", a.QuadPoints) + return container +} + +func (a *PdfAnnotationStrikeOut) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("StrikeOut")) + d.SetIfNotNil("QuadPoints", a.QuadPoints) + return container +} + +func (a *PdfAnnotationCaret) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Caret")) + d.SetIfNotNil("RD", a.RD) + d.SetIfNotNil("Sy", a.Sy) + return container +} + +func (a *PdfAnnotationStamp) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Stamp")) + d.SetIfNotNil("Name", a.Name) + return container +} + +func (a *PdfAnnotationInk) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Ink")) + d.SetIfNotNil("InkList", a.InkList) + d.SetIfNotNil("BS", a.BS) + return container +} + +func (a *PdfAnnotationPopup) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("Popup")) + d.SetIfNotNil("Parent", a.Parent) + d.SetIfNotNil("Open", a.Open) + return container +} + +func (a *PdfAnnotationFileAttachment) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("FileAttachment")) + d.SetIfNotNil("FS", a.FS) + d.SetIfNotNil("Name", a.Name) + return container +} + +func (a *PdfAnnotationRichMedia) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("RichMedia")) + d.SetIfNotNil("RichMediaSettings", a.RichMediaSettings) + d.SetIfNotNil("RichMediaContent", a.RichMediaContent) + return container +} + +func (a *PdfAnnotationSound) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Sound")) + d.SetIfNotNil("Sound", a.Sound) + d.SetIfNotNil("Name", a.Name) + return container +} + +func (a *PdfAnnotationMovie) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("Movie")) + d.SetIfNotNil("T", a.T) + d.SetIfNotNil("Movie", a.Movie) + d.SetIfNotNil("A", a.A) + return container +} + +func (a *PdfAnnotationScreen) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("Screen")) + d.SetIfNotNil("T", a.T) + d.SetIfNotNil("MK", a.MK) + d.SetIfNotNil("A", a.A) + d.SetIfNotNil("AA", a.AA) + return container +} + +func (a *PdfAnnotationWidget) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("Widget")) + d.SetIfNotNil("H", a.H) + d.SetIfNotNil("MK", a.MK) + d.SetIfNotNil("A", a.A) + d.SetIfNotNil("AA", a.AA) + d.SetIfNotNil("BS", a.BS) + d.SetIfNotNil("Parent", a.Parent) + + return container +} + +func (a *PdfAnnotationPrinterMark) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("PrinterMark")) + d.SetIfNotNil("MN", a.MN) + return container +} + +func (a *PdfAnnotationTrapNet) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("TrapNet")) + return container +} + +func (a *PdfAnnotationWatermark) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + + d.SetIfNotNil("Subtype", core.MakeName("Watermark")) + d.SetIfNotNil("FixedPrint", a.FixedPrint) + + return container +} + +func (a *PdfAnnotation3D) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + d.SetIfNotNil("Subtype", core.MakeName("3D")) + d.SetIfNotNil("3DD", a.T3DD) + d.SetIfNotNil("3DV", a.T3DV) + d.SetIfNotNil("3DA", a.T3DA) + d.SetIfNotNil("3DI", a.T3DI) + d.SetIfNotNil("3DB", a.T3DB) + return container +} + +func (a *PdfAnnotationProjection) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + return container +} + +func (a *PdfAnnotationRedact) ToPdfObject() core.PdfObject { + a.PdfAnnotation.ToPdfObject() + container := a.primitive + d := container.PdfObject.(*core.PdfObjectDictionary) + a.PdfAnnotationMarkup.appendToPdfDictionary(d) + + d.SetIfNotNil("Subtype", core.MakeName("Redact")) + d.SetIfNotNil("QuadPoints", a.QuadPoints) + d.SetIfNotNil("IC", a.IC) + d.SetIfNotNil("RO", a.RO) + d.SetIfNotNil("OverlayText", a.OverlayText) + d.SetIfNotNil("Repeat", a.Repeat) + d.SetIfNotNil("DA", a.DA) + d.SetIfNotNil("Q", a.Q) + return container +} + +// Border definitions. + +type BorderStyle int + +const ( + BorderStyleSolid BorderStyle = iota + BorderStyleDashed BorderStyle = iota + BorderStyleBeveled BorderStyle = iota + BorderStyleInset BorderStyle = iota + BorderStyleUnderline BorderStyle = iota +) + +func (bs *BorderStyle) GetPdfName() string { + switch *bs { + case BorderStyleSolid: + return "S" + case BorderStyleDashed: + return "D" + case BorderStyleBeveled: + return "B" + case BorderStyleInset: + return "I" + case BorderStyleUnderline: + return "U" + } + + return "" // Should not happen. +} + +// Border style +type PdfBorderStyle struct { + W *float64 // Border width + S *BorderStyle // Border style + D *[]int // Dash array. + + container core.PdfObject +} + +func NewBorderStyle() *PdfBorderStyle { + bs := &PdfBorderStyle{} + return bs +} + +func (bs *PdfBorderStyle) SetBorderWidth(width float64) { + bs.W = &width +} + +func (bs *PdfBorderStyle) GetBorderWidth() float64 { + if bs.W == nil { + return 1 // Default. + } + return *bs.W +} + +func (a *PdfBorderStyle) ToPdfObject() core.PdfObject { + d := core.MakeDict() + if a.container != nil { + if indObj, is := a.container.(*core.PdfIndirectObject); is { + indObj.PdfObject = d + } + } + + d.Set("Subtype", core.MakeName("Border")) + if a.W != nil { + d.Set("W", core.MakeFloat(*a.W)) + } + if a.S != nil { + d.Set("S", core.MakeName(a.S.GetPdfName())) + } + if a.D != nil { + d.Set("D", core.MakeArrayFromIntegers(*a.D)) + } + + if a.container != nil { + return a.container + } else { + return d + } +} + +// Border effect +type BorderEffect int + +const ( + BorderEffectNoEffect BorderEffect = iota + BorderEffectCloudy BorderEffect = iota +) + +type PdfBorderEffect struct { + S *BorderEffect // Border effect type + I *float64 // Intensity of the effect +} diff --git a/internal/pdf/model/colorspace.go b/internal/pdf/model/colorspace.go new file mode 100644 index 0000000..6a9f324 --- /dev/null +++ b/internal/pdf/model/colorspace.go @@ -0,0 +1,2805 @@ +package model + +import ( + "errors" + "fmt" + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// The colorspace defines the data storage format for each color and color representation. +// +// Device based colorspace, specified by name +// - /DeviceGray +// - /DeviceRGB +// - /DeviceCMYK +// +// CIE based colorspace specified by [name, dictionary] +// - [/CalGray dict] +// - [/CalRGB dict] +// - [/Lab dict] +// - [/ICCBased dict] +// +// Special colorspaces +// - /Pattern +// - /Indexed +// - /Separation +// - /DeviceN +// +// Work is in progress to support all colorspaces. At the moment ICCBased color spaces fall back to the alternate +// colorspace which works OK in most cases. For full color support, will need fully featured ICC support. +type PdfColorspace interface { + String() string + ImageToRGB(Image) (Image, error) + ColorToRGB(color PdfColor) (PdfColor, error) + GetNumComponents() int + ToPdfObject() core.PdfObject + ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) + ColorFromFloats(vals []float64) (PdfColor, error) + + // Returns the decode array for the CS, i.e. the range of each component. + DecodeArray() []float64 +} + +type PdfColor interface { +} + +// NewPdfColorspaceFromcore.PdfObject loads a PdfColorspace from a core.PdfObject. Returns an error if there is +// a failure in loading. +func NewPdfColorspaceFromPdfObject(obj core.PdfObject) (PdfColorspace, error) { + var container *core.PdfIndirectObject + var csName *core.PdfObjectName + var csArray *core.PdfObjectArray + + if indObj, isInd := obj.(*core.PdfIndirectObject); isInd { + container = indObj + } + + // 8.6.3 p. 149 (PDF32000_2008): + // A colour space shall be defined by an array object whose first element is a name object identifying the + // colour space family. The remaining array elements, if any, are parameters that further characterize the + // colour space; their number and types vary according to the particular family. + // + // For families that do not require parameters, the colour space may be specified simply by the family name + // itself instead of an array. + + obj = core.TraceToDirectObject(obj) + switch t := obj.(type) { + case *core.PdfObjectArray: + csArray = t + case *core.PdfObjectName: + csName = t + } + + // If specified by a name directly: Device colorspace or Pattern. + if csName != nil { + switch *csName { + case "DeviceGray": + return NewPdfColorspaceDeviceGray(), nil + case "DeviceRGB": + return NewPdfColorspaceDeviceRGB(), nil + case "DeviceCMYK": + return NewPdfColorspaceDeviceCMYK(), nil + case "Pattern": + return NewPdfColorspaceSpecialPattern(), nil + default: + common.Log.Debug("error: Unknown colorspace %s", *csName) + return nil, ErrRangeError + } + } + + if csArray != nil && len(*csArray) > 0 { + var csObject core.PdfObject = container + if container == nil { + csObject = csArray + } + firstEl := core.TraceToDirectObject((*csArray)[0]) + if name, isName := firstEl.(*core.PdfObjectName); isName { + switch *name { + case "DeviceGray": + if len(*csArray) == 1 { + return NewPdfColorspaceDeviceGray(), nil + } + case "DeviceRGB": + if len(*csArray) == 1 { + return NewPdfColorspaceDeviceRGB(), nil + } + case "DeviceCMYK": + if len(*csArray) == 1 { + return NewPdfColorspaceDeviceCMYK(), nil + } + case "CalGray": + return newPdfColorspaceCalGrayFromPdfObject(csObject) + case "CalRGB": + return newPdfColorspaceCalRGBFromPdfObject(csObject) + case "Lab": + return newPdfColorspaceLabFromPdfObject(csObject) + case "ICCBased": + return newPdfColorspaceICCBasedFromPdfObject(csObject) + case "Pattern": + return newPdfColorspaceSpecialPatternFromPdfObject(csObject) + case "Indexed": + return newPdfColorspaceSpecialIndexedFromPdfObject(csObject) + case "Separation": + return newPdfColorspaceSpecialSeparationFromPdfObject(csObject) + case "DeviceN": + return newPdfColorspaceDeviceNFromPdfObject(csObject) + default: + common.Log.Debug("Array with invalid name: %s", *name) + } + } + } + + common.Log.Debug("PDF File Error: Colorspace type error: %s", obj.String()) + return nil, ErrTypeCheck +} + +// determine PDF colorspace from a core.PdfObject. Returns the colorspace name and an error on failure. +// If the colorspace was not found, will return an empty string. +func determineColorspaceNameFromPdfObject(obj core.PdfObject) (core.PdfObjectName, error) { + var csName *core.PdfObjectName + var csArray *core.PdfObjectArray + + if indObj, is := obj.(*core.PdfIndirectObject); is { + if array, is := indObj.PdfObject.(*core.PdfObjectArray); is { + csArray = array + } else if name, is := indObj.PdfObject.(*core.PdfObjectName); is { + csName = name + } + } else if array, is := obj.(*core.PdfObjectArray); is { + csArray = array + } else if name, is := obj.(*core.PdfObjectName); is { + csName = name + } + + // If specified by a name directly: Device colorspace or Pattern. + if csName != nil { + switch *csName { + case "DeviceGray", "DeviceRGB", "DeviceCMYK": + return *csName, nil + case "Pattern": + return *csName, nil + } + } + + if csArray != nil && len(*csArray) > 0 { + if name, is := (*csArray)[0].(*core.PdfObjectName); is { + switch *name { + case "DeviceGray", "DeviceRGB", "DeviceCMYK": + if len(*csArray) == 1 { + return *name, nil + } + case "CalGray", "CalRGB", "Lab": + return *name, nil + case "ICCBased", "Pattern", "Indexed": + return *name, nil + case "Separation", "DeviceN": + return *name, nil + } + } + } + + // Not found + return "", nil +} + +// Gray scale component. +// No specific parameters + +// A grayscale value shall be represented by a single number in the range 0.0 to 1.0 where 0.0 corresponds to black +// and 1.0 to white. +type PdfColorDeviceGray float64 + +func NewPdfColorDeviceGray(grayVal float64) *PdfColorDeviceGray { + color := PdfColorDeviceGray(grayVal) + return &color +} + +func (*PdfColorDeviceGray) GetNumComponents() int { + return 1 +} + +func (d *PdfColorDeviceGray) Val() float64 { + return float64(*d) +} + +// Convert to an integer format. +func (d *PdfColorDeviceGray) ToInteger(bits int) uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + return uint32(maxVal * d.Val()) +} + +type PdfColorspaceDeviceGray struct{} + +func NewPdfColorspaceDeviceGray() *PdfColorspaceDeviceGray { + return &PdfColorspaceDeviceGray{} +} + +func (*PdfColorspaceDeviceGray) GetNumComponents() int { + return 1 +} + +// DecodeArray returns the range of color component values in DeviceGray colorspace. +func (*PdfColorspaceDeviceGray) DecodeArray() []float64 { + return []float64{0, 1.0} +} + +func (*PdfColorspaceDeviceGray) ToPdfObject() core.PdfObject { + return core.MakeName("DeviceGray") +} + +func (*PdfColorspaceDeviceGray) String() string { + return "DeviceGray" +} + +func (*PdfColorspaceDeviceGray) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 1 { + return nil, errors.New("range check") + } + + val := vals[0] + + if val < 0.0 || val > 1.0 { + return nil, errors.New("range check") + } + + return NewPdfColorDeviceGray(val), nil +} + +func (d *PdfColorspaceDeviceGray) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 1 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return d.ColorFromFloats(floats) +} + +// Convert gray -> rgb for a single color component. +func (*PdfColorspaceDeviceGray) ColorToRGB(color PdfColor) (PdfColor, error) { + gray, ok := color.(*PdfColorDeviceGray) + if !ok { + common.Log.Debug("Input color not device gray %T", color) + return nil, errors.New("type check error") + } + + return NewPdfColorDeviceRGB(float64(*gray), float64(*gray), float64(*gray)), nil +} + +// Convert 1-component grayscale data to 3-component RGB. +func (*PdfColorspaceDeviceGray) ImageToRGB(img Image) (Image, error) { + rgbImage := img + + samples := img.GetSamples() + common.Log.Trace("DeviceGray-ToRGB Samples: % d", samples) + + rgbSamples := []uint32{} + for i := 0; i < len(samples); i++ { + grayVal := samples[i] + rgbSamples = append(rgbSamples, grayVal, grayVal, grayVal) + } + rgbImage.BitsPerComponent = 8 + rgbImage.ColorComponents = 3 + rgbImage.SetSamples(rgbSamples) + + common.Log.Trace("DeviceGray -> RGB") + common.Log.Trace("samples: %v", samples) + common.Log.Trace("RGB samples: %v", rgbSamples) + common.Log.Trace("%v -> %v", img, rgbImage) + + return rgbImage, nil +} + +////////////////////// +// Device RGB +// R, G, B components. +// No specific parameters + +// Each component is defined in the range 0.0 - 1.0 where 1.0 is the primary intensity. +type PdfColorDeviceRGB [3]float64 + +func NewPdfColorDeviceRGB(r, g, b float64) *PdfColorDeviceRGB { + color := PdfColorDeviceRGB{r, g, b} + return &color +} + +func (*PdfColorDeviceRGB) GetNumComponents() int { + return 3 +} + +func (d *PdfColorDeviceRGB) R() float64 { + return float64(d[0]) +} + +func (d *PdfColorDeviceRGB) G() float64 { + return float64(d[1]) +} + +func (d *PdfColorDeviceRGB) B() float64 { + return float64(d[2]) +} + +// Convert to an integer format. +func (d *PdfColorDeviceRGB) ToInteger(bits int) [3]uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + return [3]uint32{uint32(maxVal * d.R()), uint32(maxVal * d.G()), uint32(maxVal * d.B())} +} + +func (d *PdfColorDeviceRGB) ToGray() *PdfColorDeviceGray { + // Calculate grayValue [0-1] + grayValue := 0.3*d.R() + 0.59*d.G() + 0.11*d.B() + + // Clip to [0-1] + grayValue = math.Min(math.Max(grayValue, 0.0), 1.0) + + return NewPdfColorDeviceGray(grayValue) +} + +// RGB colorspace. + +type PdfColorspaceDeviceRGB struct{} + +func NewPdfColorspaceDeviceRGB() *PdfColorspaceDeviceRGB { + return &PdfColorspaceDeviceRGB{} +} + +func (*PdfColorspaceDeviceRGB) String() string { + return "DeviceRGB" +} + +func (*PdfColorspaceDeviceRGB) GetNumComponents() int { + return 3 +} + +// DecodeArray returns the range of color component values in DeviceRGB colorspace. +func (*PdfColorspaceDeviceRGB) DecodeArray() []float64 { + return []float64{0.0, 1.0, 0.0, 1.0, 0.0, 1.0} +} + +func (*PdfColorspaceDeviceRGB) ToPdfObject() core.PdfObject { + return core.MakeName("DeviceRGB") +} + +func (*PdfColorspaceDeviceRGB) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 3 { + return nil, errors.New("range check") + } + + // Red. + r := vals[0] + if r < 0.0 || r > 1.0 { + return nil, errors.New("range check") + } + + // Green. + g := vals[1] + if g < 0.0 || g > 1.0 { + return nil, errors.New("range check") + } + + // Blue. + b := vals[2] + if b < 0.0 || b > 1.0 { + return nil, errors.New("range check") + } + + color := NewPdfColorDeviceRGB(r, g, b) + return color, nil + +} + +// Get the color from a series of pdf objects (3 for rgb). +func (cd *PdfColorspaceDeviceRGB) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 3 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return cd.ColorFromFloats(floats) +} + +func (*PdfColorspaceDeviceRGB) ColorToRGB(color PdfColor) (PdfColor, error) { + rgb, ok := color.(*PdfColorDeviceRGB) + if !ok { + common.Log.Debug("Input color not device RGB") + return nil, errors.New("type check error") + } + return rgb, nil +} + +func (*PdfColorspaceDeviceRGB) ImageToRGB(img Image) (Image, error) { + return img, nil +} + +func (*PdfColorspaceDeviceRGB) ImageToGray(img Image) (Image, error) { + grayImage := img + + samples := img.GetSamples() + + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + graySamples := []uint32{} + for i := 0; i < len(samples); i += 3 { + // Normalized data, range 0-1. + r := float64(samples[i]) / maxVal + g := float64(samples[i+1]) / maxVal + b := float64(samples[i+2]) / maxVal + + // Calculate grayValue [0-1] + grayValue := 0.3*r + 0.59*g + 0.11*b + + // Clip to [0-1] + grayValue = math.Min(math.Max(grayValue, 0.0), 1.0) + + // Convert to uint32 + val := uint32(grayValue * maxVal) + graySamples = append(graySamples, val) + } + grayImage.SetSamples(graySamples) + grayImage.ColorComponents = 1 + + return grayImage, nil +} + +////////////////////// +// DeviceCMYK +// C, M, Y, K components. +// No other parameters. + +// Each component is defined in the range 0.0 - 1.0 where 1.0 is the primary intensity. +type PdfColorDeviceCMYK [4]float64 + +func NewPdfColorDeviceCMYK(c, m, y, k float64) *PdfColorDeviceCMYK { + color := PdfColorDeviceCMYK{c, m, y, k} + return &color +} + +func (*PdfColorDeviceCMYK) GetNumComponents() int { + return 4 +} + +func (cd *PdfColorDeviceCMYK) C() float64 { + return float64(cd[0]) +} + +func (cd *PdfColorDeviceCMYK) M() float64 { + return float64(cd[1]) +} + +func (cd *PdfColorDeviceCMYK) Y() float64 { + return float64(cd[2]) +} + +func (cd *PdfColorDeviceCMYK) K() float64 { + return float64(cd[3]) +} + +// Convert to an integer format. +func (cd *PdfColorDeviceCMYK) ToInteger(bits int) [4]uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + return [4]uint32{uint32(maxVal * cd.C()), uint32(maxVal * cd.M()), uint32(maxVal * cd.Y()), uint32(maxVal * cd.K())} +} + +type PdfColorspaceDeviceCMYK struct{} + +func NewPdfColorspaceDeviceCMYK() *PdfColorspaceDeviceCMYK { + return &PdfColorspaceDeviceCMYK{} +} + +func (*PdfColorspaceDeviceCMYK) String() string { + return "DeviceCMYK" +} + +func (*PdfColorspaceDeviceCMYK) GetNumComponents() int { + return 4 +} + +// DecodeArray returns the range of color component values in DeviceCMYK colorspace. +func (*PdfColorspaceDeviceCMYK) DecodeArray() []float64 { + return []float64{0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0} +} + +func (*PdfColorspaceDeviceCMYK) ToPdfObject() core.PdfObject { + return core.MakeName("DeviceCMYK") +} + +func (*PdfColorspaceDeviceCMYK) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 4 { + return nil, errors.New("range check") + } + + // Cyan + c := vals[0] + if c < 0.0 || c > 1.0 { + return nil, errors.New("range check") + } + + // Magenta + m := vals[1] + if m < 0.0 || m > 1.0 { + return nil, errors.New("range check") + } + + // Yellow. + y := vals[2] + if y < 0.0 || y > 1.0 { + return nil, errors.New("range check") + } + + // Key. + k := vals[3] + if k < 0.0 || k > 1.0 { + return nil, errors.New("range check") + } + + color := NewPdfColorDeviceCMYK(c, m, y, k) + return color, nil +} + +// Get the color from a series of pdf objects (4 for cmyk). +func (cd *PdfColorspaceDeviceCMYK) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 4 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return cd.ColorFromFloats(floats) +} + +func (cd *PdfColorspaceDeviceCMYK) ColorToRGB(color PdfColor) (PdfColor, error) { + cmyk, ok := color.(*PdfColorDeviceCMYK) + if !ok { + common.Log.Debug("Input color not device cmyk") + return nil, errors.New("type check error") + } + + c := cmyk.C() + m := cmyk.M() + y := cmyk.Y() + k := cmyk.K() + + c = c*(1-k) + k + m = m*(1-k) + k + y = y*(1-k) + k + + r := 1 - c + g := 1 - m + b := 1 - y + + return NewPdfColorDeviceRGB(r, g, b), nil +} + +func (*PdfColorspaceDeviceCMYK) ImageToRGB(img Image) (Image, error) { + rgbImage := img + + samples := img.GetSamples() + + common.Log.Trace("CMYK -> RGB") + common.Log.Trace("image bpc: %d, color comps: %d", img.BitsPerComponent, img.ColorComponents) + common.Log.Trace("Len data: %d, len samples: %d", len(img.Data), len(samples)) + common.Log.Trace("Height: %d, Width: %d", img.Height, img.Width) + if len(samples)%4 != 0 { + //common.Log.Debug("samples: % d", samples) + common.Log.Debug("Input image: %#v", img) + common.Log.Debug("CMYK -> RGB fail, len samples: %d", len(samples)) + return img, errors.New("CMYK data not a multiple of 4") + } + + decode := img.decode + if decode == nil { + decode = []float64{0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0} + } + if len(decode) != 8 { + common.Log.Debug("invalid decode array (%d): % .3f", len(decode), decode) + return img, errors.New("invalid decode array") + } + common.Log.Trace("Decode array: % f", decode) + + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + common.Log.Trace("MaxVal: %f", maxVal) + rgbSamples := []uint32{} + for i := 0; i < len(samples); i += 4 { + // Normalized c, m, y, k values. + c := interpolate(float64(samples[i]), 0, maxVal, decode[0], decode[1]) + m := interpolate(float64(samples[i+1]), 0, maxVal, decode[2], decode[3]) + y := interpolate(float64(samples[i+2]), 0, maxVal, decode[4], decode[5]) + k := interpolate(float64(samples[i+3]), 0, maxVal, decode[6], decode[7]) + + c = c*(1-k) + k + m = m*(1-k) + k + y = y*(1-k) + k + + r := 1 - c + g := 1 - m + b := 1 - y + + // Convert to uint32 format. + R := uint32(r * maxVal) + G := uint32(g * maxVal) + B := uint32(b * maxVal) + //common.Log.Trace("(%f,%f,%f,%f) -> (%f,%f,%f) [%d,%d,%d]", c, m, y, k, r, g, b, R, G, B) + + rgbSamples = append(rgbSamples, R, G, B) + } + rgbImage.SetSamples(rgbSamples) + rgbImage.ColorComponents = 3 + + return rgbImage, nil +} + +////////////////////// +// CIE based gray level. +// Single component +// Each component is defined in the range 0.0 - 1.0 where 1.0 is the primary intensity. + +type PdfColorCalGray float64 + +func NewPdfColorCalGray(grayVal float64) *PdfColorCalGray { + color := PdfColorCalGray(grayVal) + return &color +} + +func (*PdfColorCalGray) GetNumComponents() int { + return 1 +} + +func (pc *PdfColorCalGray) Val() float64 { + return float64(*pc) +} + +// Convert to an integer format. +func (pc *PdfColorCalGray) ToInteger(bits int) uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + return uint32(maxVal * pc.Val()) +} + +// CalGray color space. +type PdfColorspaceCalGray struct { + WhitePoint []float64 // [XW, YW, ZW]: Required + BlackPoint []float64 // [XB, YB, ZB] + Gamma float64 + + container *core.PdfIndirectObject +} + +func NewPdfColorspaceCalGray() *PdfColorspaceCalGray { + cs := &PdfColorspaceCalGray{} + + // Set optional parameters to default values. + cs.BlackPoint = []float64{0.0, 0.0, 0.0} + cs.Gamma = 1 + + return cs +} + +func (*PdfColorspaceCalGray) String() string { + return "CalGray" +} + +func (*PdfColorspaceCalGray) GetNumComponents() int { + return 1 +} + +// DecodeArray returns the range of color component values in CalGray colorspace. +func (*PdfColorspaceCalGray) DecodeArray() []float64 { + return []float64{0.0, 1.0} +} + +func newPdfColorspaceCalGrayFromPdfObject(obj core.PdfObject) (*PdfColorspaceCalGray, error) { + cs := NewPdfColorspaceCalGray() + + // If within an indirect object, then make a note of it. If we write out the core.PdfObject later + // we can reference the same container. Otherwise is not within a container, but rather + // a new array. + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("type error") + } + + if len(*array) != 2 { + return nil, fmt.Errorf("invalid CalGray colorspace") + } + + // Name. + obj = core.TraceToDirectObject((*array)[0]) + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("CalGray name not a Name object") + } + if *name != "CalGray" { + return nil, fmt.Errorf("not a CalGray colorspace") + } + + // Dict. + obj = core.TraceToDirectObject((*array)[1]) + dict, ok := obj.(*core.PdfObjectDictionary) + if !ok { + return nil, fmt.Errorf("CalGray dict not a Dictionary object") + } + + // WhitePoint (Required): [Xw, Yw, Zw] + obj = dict.Get("WhitePoint") + obj = core.TraceToDirectObject(obj) + whitePointArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("CalGray: Invalid WhitePoint") + } + if len(*whitePointArray) != 3 { + return nil, fmt.Errorf("CalGray: Invalid WhitePoint array") + } + whitePoint, err := whitePointArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.WhitePoint = whitePoint + + // BlackPoint (Optional) + obj = dict.Get("BlackPoint") + if obj != nil { + obj = core.TraceToDirectObject(obj) + blackPointArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("CalGray: Invalid BlackPoint") + } + if len(*blackPointArray) != 3 { + return nil, fmt.Errorf("CalGray: Invalid BlackPoint array") + } + blackPoint, err := blackPointArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.BlackPoint = blackPoint + } + + // Gamma (Optional) + obj = dict.Get("Gamma") + if obj != nil { + obj = core.TraceToDirectObject(obj) + gamma, err := getNumberAsFloat(obj) + if err != nil { + return nil, fmt.Errorf("CalGray: gamma not a number") + } + cs.Gamma = gamma + } + + return cs, nil +} + +// Return as PDF object format [name dictionary] +func (pc *PdfColorspaceCalGray) ToPdfObject() core.PdfObject { + // CalGray color space dictionary.. + cspace := &core.PdfObjectArray{} + + cspace.Append(core.MakeName("CalGray")) + + dict := core.MakeDict() + if pc.WhitePoint != nil { + dict.Set("WhitePoint", core.MakeArray(core.MakeFloat(pc.WhitePoint[0]), core.MakeFloat(pc.WhitePoint[1]), core.MakeFloat(pc.WhitePoint[2]))) + } else { + common.Log.Error("CalGray: Missing WhitePoint (Required)") + } + + if pc.BlackPoint != nil { + dict.Set("BlackPoint", core.MakeArray(core.MakeFloat(pc.BlackPoint[0]), core.MakeFloat(pc.BlackPoint[1]), core.MakeFloat(pc.BlackPoint[2]))) + } + + dict.Set("Gamma", core.MakeFloat(pc.Gamma)) + cspace.Append(dict) + + if pc.container != nil { + pc.container.PdfObject = cspace + return pc.container + } + + return cspace +} + +func (*PdfColorspaceCalGray) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 1 { + return nil, errors.New("range check") + } + + val := vals[0] + if val < 0.0 || val > 1.0 { + return nil, errors.New("range check") + } + + color := NewPdfColorCalGray(val) + return color, nil +} + +func (pc *PdfColorspaceCalGray) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 1 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return pc.ColorFromFloats(floats) +} + +func (pc *PdfColorspaceCalGray) ColorToRGB(color PdfColor) (PdfColor, error) { + calgray, ok := color.(*PdfColorCalGray) + if !ok { + common.Log.Debug("Input color not cal gray") + return nil, errors.New("type check error") + } + + ANorm := calgray.Val() + + // A -> X,Y,Z + X := pc.WhitePoint[0] * math.Pow(ANorm, pc.Gamma) + Y := pc.WhitePoint[1] * math.Pow(ANorm, pc.Gamma) + Z := pc.WhitePoint[2] * math.Pow(ANorm, pc.Gamma) + + // X,Y,Z -> rgb + // http://stackoverflow.com/questions/21576719/how-to-convert-cie-color-space-into-rgb-or-hex-color-code-in-php + r := 3.240479*X + -1.537150*Y + -0.498535*Z + g := -0.969256*X + 1.875992*Y + 0.041556*Z + b := 0.055648*X + -0.204043*Y + 1.057311*Z + + // Clip. + r = math.Min(math.Max(r, 0), 1.0) + g = math.Min(math.Max(g, 0), 1.0) + b = math.Min(math.Max(b, 0), 1.0) + + return NewPdfColorDeviceRGB(r, g, b), nil +} + +// A, B, C -> X, Y, Z +func (pc *PdfColorspaceCalGray) ImageToRGB(img Image) (Image, error) { + rgbImage := img + + samples := img.GetSamples() + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + + rgbSamples := []uint32{} + for i := 0; i < len(samples); i++ { + // A represents the gray component of calibrated gray space. + // It shall be in the range 0.0 - 1.0 + ANorm := float64(samples[i]) / maxVal + + // A -> X,Y,Z + X := pc.WhitePoint[0] * math.Pow(ANorm, pc.Gamma) + Y := pc.WhitePoint[1] * math.Pow(ANorm, pc.Gamma) + Z := pc.WhitePoint[2] * math.Pow(ANorm, pc.Gamma) + + // X,Y,Z -> rgb + // http://stackoverflow.com/questions/21576719/how-to-convert-cie-color-space-into-rgb-or-hex-color-code-in-php + r := 3.240479*X + -1.537150*Y + -0.498535*Z + g := -0.969256*X + 1.875992*Y + 0.041556*Z + b := 0.055648*X + -0.204043*Y + 1.057311*Z + + // Clip. + r = math.Min(math.Max(r, 0), 1.0) + g = math.Min(math.Max(g, 0), 1.0) + b = math.Min(math.Max(b, 0), 1.0) + + // Convert to uint32. + R := uint32(r * maxVal) + G := uint32(g * maxVal) + B := uint32(b * maxVal) + + rgbSamples = append(rgbSamples, R, G, B) + } + rgbImage.SetSamples(rgbSamples) + rgbImage.ColorComponents = 3 + + return rgbImage, nil +} + +////////////////////// +// Colorimetric CIE RGB colorspace. +// A, B, C components +// Each component is defined in the range 0.0 - 1.0 where 1.0 is the primary intensity. + +type PdfColorCalRGB [3]float64 + +func NewPdfColorCalRGB(a, b, c float64) *PdfColorCalRGB { + color := PdfColorCalRGB{a, b, c} + return &color +} + +func (*PdfColorCalRGB) GetNumComponents() int { + return 3 +} + +func (pc *PdfColorCalRGB) A() float64 { + return float64(pc[0]) +} + +func (pc *PdfColorCalRGB) B() float64 { + return float64(pc[1]) +} + +func (pc *PdfColorCalRGB) C() float64 { + return float64(pc[2]) +} + +// Convert to an integer format. +func (pc *PdfColorCalRGB) ToInteger(bits int) [3]uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + return [3]uint32{uint32(maxVal * pc.A()), uint32(maxVal * pc.B()), uint32(maxVal * pc.C())} +} + +// A, B, C components +type PdfColorspaceCalRGB struct { + WhitePoint []float64 + BlackPoint []float64 + Gamma []float64 + Matrix []float64 // [XA YA ZA XB YB ZB XC YC ZC] ; default value identity [1 0 0 0 1 0 0 0 1] + + container *core.PdfIndirectObject +} + +// require parameters? +func NewPdfColorspaceCalRGB() *PdfColorspaceCalRGB { + cs := &PdfColorspaceCalRGB{} + + // Set optional parameters to default values. + cs.BlackPoint = []float64{0.0, 0.0, 0.0} + cs.Gamma = []float64{1.0, 1.0, 1.0} + cs.Matrix = []float64{1, 0, 0, 0, 1, 0, 0, 0, 1} // Identity matrix. + + return cs +} + +func (*PdfColorspaceCalRGB) String() string { + return "CalRGB" +} + +func (*PdfColorspaceCalRGB) GetNumComponents() int { + return 3 +} + +// DecodeArray returns the range of color component values in CalRGB colorspace. +func (*PdfColorspaceCalRGB) DecodeArray() []float64 { + return []float64{0.0, 1.0, 0.0, 1.0, 0.0, 1.0} +} + +func newPdfColorspaceCalRGBFromPdfObject(obj core.PdfObject) (*PdfColorspaceCalRGB, error) { + cs := NewPdfColorspaceCalRGB() + + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("type error") + } + + if len(*array) != 2 { + return nil, fmt.Errorf("invalid CalRGB colorspace") + } + + // Name. + obj = core.TraceToDirectObject((*array)[0]) + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("CalRGB name not a Name object") + } + if *name != "CalRGB" { + return nil, fmt.Errorf("not a CalRGB colorspace") + } + + // Dict. + obj = core.TraceToDirectObject((*array)[1]) + dict, ok := obj.(*core.PdfObjectDictionary) + if !ok { + return nil, fmt.Errorf("CalRGB name not a Name object") + } + + // WhitePoint (Required): [Xw, Yw, Zw] + obj = dict.Get("WhitePoint") + obj = core.TraceToDirectObject(obj) + whitePointArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("CalRGB: Invalid WhitePoint") + } + if len(*whitePointArray) != 3 { + return nil, fmt.Errorf("CalRGB: Invalid WhitePoint array") + } + whitePoint, err := whitePointArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.WhitePoint = whitePoint + + // BlackPoint (Optional) + obj = dict.Get("BlackPoint") + if obj != nil { + obj = core.TraceToDirectObject(obj) + blackPointArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("CalRGB: Invalid BlackPoint") + } + if len(*blackPointArray) != 3 { + return nil, fmt.Errorf("CalRGB: Invalid BlackPoint array") + } + blackPoint, err := blackPointArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.BlackPoint = blackPoint + } + + // Gamma (Optional) + obj = dict.Get("Gamma") + if obj != nil { + obj = core.TraceToDirectObject(obj) + gammaArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("CalRGB: Invalid Gamma") + } + if len(*gammaArray) != 3 { + return nil, fmt.Errorf("CalRGB: Invalid Gamma array") + } + gamma, err := gammaArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.Gamma = gamma + } + + // Matrix (Optional). + obj = dict.Get("Matrix") + if obj != nil { + obj = core.TraceToDirectObject(obj) + matrixArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("CalRGB: Invalid Matrix") + } + if len(*matrixArray) != 9 { + common.Log.Error("Matrix array: %s", matrixArray.String()) + return nil, fmt.Errorf("CalRGB: Invalid Matrix array") + } + matrix, err := matrixArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.Matrix = matrix + } + + return cs, nil +} + +// Return as PDF object format [name dictionary] +func (pc *PdfColorspaceCalRGB) ToPdfObject() core.PdfObject { + // CalRGB color space dictionary.. + cspace := &core.PdfObjectArray{} + + cspace.Append(core.MakeName("CalRGB")) + + dict := core.MakeDict() + if pc.WhitePoint != nil { + wp := core.MakeArray(core.MakeFloat(pc.WhitePoint[0]), core.MakeFloat(pc.WhitePoint[1]), core.MakeFloat(pc.WhitePoint[2])) + dict.Set("WhitePoint", wp) + } else { + common.Log.Error("CalRGB: Missing WhitePoint (Required)") + } + + if pc.BlackPoint != nil { + bp := core.MakeArray(core.MakeFloat(pc.BlackPoint[0]), core.MakeFloat(pc.BlackPoint[1]), core.MakeFloat(pc.BlackPoint[2])) + dict.Set("BlackPoint", bp) + } + if pc.Gamma != nil { + g := core.MakeArray(core.MakeFloat(pc.Gamma[0]), core.MakeFloat(pc.Gamma[1]), core.MakeFloat(pc.Gamma[2])) + dict.Set("Gamma", g) + } + if pc.Matrix != nil { + matrix := core.MakeArray(core.MakeFloat(pc.Matrix[0]), core.MakeFloat(pc.Matrix[1]), core.MakeFloat(pc.Matrix[2]), + core.MakeFloat(pc.Matrix[3]), core.MakeFloat(pc.Matrix[4]), core.MakeFloat(pc.Matrix[5]), + core.MakeFloat(pc.Matrix[6]), core.MakeFloat(pc.Matrix[7]), core.MakeFloat(pc.Matrix[8])) + dict.Set("Matrix", matrix) + } + cspace.Append(dict) + + if pc.container != nil { + pc.container.PdfObject = cspace + return pc.container + } + + return cspace +} + +func (*PdfColorspaceCalRGB) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 3 { + return nil, errors.New("range check") + } + + // A + a := vals[0] + if a < 0.0 || a > 1.0 { + return nil, errors.New("range check") + } + + // B + b := vals[1] + if b < 0.0 || b > 1.0 { + return nil, errors.New("range check") + } + + // C. + c := vals[2] + if c < 0.0 || c > 1.0 { + return nil, errors.New("range check") + } + + color := NewPdfColorCalRGB(a, b, c) + return color, nil +} + +func (cd *PdfColorspaceCalRGB) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 3 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return cd.ColorFromFloats(floats) +} + +func (cd *PdfColorspaceCalRGB) ColorToRGB(color PdfColor) (PdfColor, error) { + calrgb, ok := color.(*PdfColorCalRGB) + if !ok { + common.Log.Debug("Input color not cal rgb") + return nil, errors.New("type check error") + } + + // A, B, C in range 0.0 to 1.0 + aVal := calrgb.A() + bVal := calrgb.B() + cVal := calrgb.C() + + // A, B, C -> X,Y,Z + // Gamma [GR GC GB] + // Matrix [XA YA ZA XB YB ZB XC YC ZC] + X := cd.Matrix[0]*math.Pow(aVal, cd.Gamma[0]) + cd.Matrix[3]*math.Pow(bVal, cd.Gamma[1]) + cd.Matrix[6]*math.Pow(cVal, cd.Gamma[2]) + Y := cd.Matrix[1]*math.Pow(aVal, cd.Gamma[0]) + cd.Matrix[4]*math.Pow(bVal, cd.Gamma[1]) + cd.Matrix[7]*math.Pow(cVal, cd.Gamma[2]) + Z := cd.Matrix[2]*math.Pow(aVal, cd.Gamma[0]) + cd.Matrix[5]*math.Pow(bVal, cd.Gamma[1]) + cd.Matrix[8]*math.Pow(cVal, cd.Gamma[2]) + + // X, Y, Z -> R, G, B + // http://stackoverflow.com/questions/21576719/how-to-convert-cie-color-space-into-rgb-or-hex-color-code-in-php + r := 3.240479*X + -1.537150*Y + -0.498535*Z + g := -0.969256*X + 1.875992*Y + 0.041556*Z + b := 0.055648*X + -0.204043*Y + 1.057311*Z + + // Clip. + r = math.Min(math.Max(r, 0), 1.0) + g = math.Min(math.Max(g, 0), 1.0) + b = math.Min(math.Max(b, 0), 1.0) + + return NewPdfColorDeviceRGB(r, g, b), nil +} + +func (pc *PdfColorspaceCalRGB) ImageToRGB(img Image) (Image, error) { + rgbImage := img + + samples := img.GetSamples() + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + + rgbSamples := []uint32{} + for i := 0; i < len(samples)-2; i++ { + // A, B, C in range 0.0 to 1.0 + aVal := float64(samples[i]) / maxVal + bVal := float64(samples[i+1]) / maxVal + cVal := float64(samples[i+2]) / maxVal + + // A, B, C -> X,Y,Z + // Gamma [GR GC GB] + // Matrix [XA YA ZA XB YB ZB XC YC ZC] + X := pc.Matrix[0]*math.Pow(aVal, pc.Gamma[0]) + pc.Matrix[3]*math.Pow(bVal, pc.Gamma[1]) + pc.Matrix[6]*math.Pow(cVal, pc.Gamma[2]) + Y := pc.Matrix[1]*math.Pow(aVal, pc.Gamma[0]) + pc.Matrix[4]*math.Pow(bVal, pc.Gamma[1]) + pc.Matrix[7]*math.Pow(cVal, pc.Gamma[2]) + Z := pc.Matrix[2]*math.Pow(aVal, pc.Gamma[0]) + pc.Matrix[5]*math.Pow(bVal, pc.Gamma[1]) + pc.Matrix[8]*math.Pow(cVal, pc.Gamma[2]) + + // X, Y, Z -> R, G, B + // http://stackoverflow.com/questions/21576719/how-to-convert-cie-color-space-into-rgb-or-hex-color-code-in-php + r := 3.240479*X + -1.537150*Y + -0.498535*Z + g := -0.969256*X + 1.875992*Y + 0.041556*Z + b := 0.055648*X + -0.204043*Y + 1.057311*Z + + // Clip. + r = math.Min(math.Max(r, 0), 1.0) + g = math.Min(math.Max(g, 0), 1.0) + b = math.Min(math.Max(b, 0), 1.0) + + // Convert to uint32. + R := uint32(r * maxVal) + G := uint32(g * maxVal) + B := uint32(b * maxVal) + + rgbSamples = append(rgbSamples, R, G, B) + } + rgbImage.SetSamples(rgbSamples) + rgbImage.ColorComponents = 3 + + return rgbImage, nil +} + +////////////////////// +// L*, a*, b* 3 component colorspace. +// Each component is defined in the range 0.0 - 1.0 where 1.0 is the primary intensity. + +type PdfColorLab [3]float64 + +func NewPdfColorLab(l, a, b float64) *PdfColorLab { + color := PdfColorLab{l, a, b} + return &color +} + +func (*PdfColorLab) GetNumComponents() int { + return 3 +} + +func (pc *PdfColorLab) L() float64 { + return float64(pc[0]) +} + +func (pc *PdfColorLab) A() float64 { + return float64(pc[1]) +} + +func (pc *PdfColorLab) B() float64 { + return float64(pc[2]) +} + +// Convert to an integer format. +func (pc *PdfColorLab) ToInteger(bits int) [3]uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + return [3]uint32{uint32(maxVal * pc.L()), uint32(maxVal * pc.A()), uint32(maxVal * pc.B())} +} + +// L*, a*, b* 3 component colorspace. +type PdfColorspaceLab struct { + WhitePoint []float64 // Required. + BlackPoint []float64 + Range []float64 // [amin amax bmin bmax] + + container *core.PdfIndirectObject +} + +func (*PdfColorspaceLab) String() string { + return "Lab" +} + +func (*PdfColorspaceLab) GetNumComponents() int { + return 3 +} + +// DecodeArray returns the range of color component values in the Lab colorspace. +func (pc *PdfColorspaceLab) DecodeArray() []float64 { + // Range for L + decode := []float64{0, 100} + + // Range for A,B specified by range or default + if len(pc.Range) == 4 { + decode = append(decode, pc.Range...) + } else { + decode = append(decode, -100, 100, -100, 100) + } + + return decode +} + +// require parameters? +func NewPdfColorspaceLab() *PdfColorspaceLab { + cs := &PdfColorspaceLab{} + + // Set optional parameters to default values. + cs.BlackPoint = []float64{0.0, 0.0, 0.0} + cs.Range = []float64{-100, 100, -100, 100} // Identity matrix. + + return cs +} + +func newPdfColorspaceLabFromPdfObject(obj core.PdfObject) (*PdfColorspaceLab, error) { + cs := NewPdfColorspaceLab() + + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("type error") + } + + if len(*array) != 2 { + return nil, fmt.Errorf("invalid CalRGB colorspace") + } + + // Name. + obj = core.TraceToDirectObject((*array)[0]) + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("levelab name not a Name object") + } + if *name != "Lab" { + return nil, fmt.Errorf("not a Lab colorspace") + } + + // Dict. + obj = core.TraceToDirectObject((*array)[1]) + dict, ok := obj.(*core.PdfObjectDictionary) + if !ok { + return nil, fmt.Errorf("colorspace dictionary missing or invalid") + } + + // WhitePoint (Required): [Xw, Yw, Zw] + obj = dict.Get("WhitePoint") + obj = core.TraceToDirectObject(obj) + whitePointArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("lab Invalid WhitePoint") + } + if len(*whitePointArray) != 3 { + return nil, fmt.Errorf("lab: Invalid WhitePoint array") + } + whitePoint, err := whitePointArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.WhitePoint = whitePoint + + // BlackPoint (Optional) + obj = dict.Get("BlackPoint") + if obj != nil { + obj = core.TraceToDirectObject(obj) + blackPointArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("lab: Invalid BlackPoint") + } + if len(*blackPointArray) != 3 { + return nil, fmt.Errorf("lab: Invalid BlackPoint array") + } + blackPoint, err := blackPointArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.BlackPoint = blackPoint + } + + // Range (Optional) + obj = dict.Get("Range") + if obj != nil { + obj = core.TraceToDirectObject(obj) + rangeArray, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Error("range type error") + return nil, fmt.Errorf("lab: Type error") + } + if len(*rangeArray) != 4 { + common.Log.Error("Range range error") + return nil, fmt.Errorf("lab: Range error") + } + rang, err := rangeArray.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.Range = rang + } + + return cs, nil +} + +// Return as PDF object format [name dictionary] +func (pc *PdfColorspaceLab) ToPdfObject() core.PdfObject { + // CalRGB color space dictionary.. + csObj := &core.PdfObjectArray{} + + csObj.Append(core.MakeName("Lab")) + + dict := core.MakeDict() + if pc.WhitePoint != nil { + wp := core.MakeArray(core.MakeFloat(pc.WhitePoint[0]), core.MakeFloat(pc.WhitePoint[1]), core.MakeFloat(pc.WhitePoint[2])) + dict.Set("WhitePoint", wp) + } else { + common.Log.Error("Lab: Missing WhitePoint (Required)") + } + + if pc.BlackPoint != nil { + bp := core.MakeArray(core.MakeFloat(pc.BlackPoint[0]), core.MakeFloat(pc.BlackPoint[1]), core.MakeFloat(pc.BlackPoint[2])) + dict.Set("BlackPoint", bp) + } + + if pc.Range != nil { + val := core.MakeArray(core.MakeFloat(pc.Range[0]), core.MakeFloat(pc.Range[1]), core.MakeFloat(pc.Range[2]), core.MakeFloat(pc.Range[3])) + dict.Set("Range", val) + } + csObj.Append(dict) + + if pc.container != nil { + pc.container.PdfObject = csObj + return pc.container + } + + return csObj +} + +func (pc *PdfColorspaceLab) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 3 { + return nil, errors.New("range check") + } + + // L + l := vals[0] + if l < 0.0 || l > 100.0 { + common.Log.Debug("L out of range (got %v should be 0-100)", l) + return nil, errors.New("range check") + } + + // A + a := vals[1] + aMin := float64(-100) + aMax := float64(100) + if len(pc.Range) > 1 { + aMin = pc.Range[0] + aMax = pc.Range[1] + } + if a < aMin || a > aMax { + common.Log.Debug("A out of range (got %v; range %v to %v)", a, aMin, aMax) + return nil, errors.New("range check") + } + + // B. + b := vals[2] + bMin := float64(-100) + bMax := float64(100) + if len(pc.Range) > 3 { + bMin = pc.Range[2] + bMax = pc.Range[3] + } + if b < bMin || b > bMax { + common.Log.Debug("b out of range (got %v; range %v to %v)", b, bMin, bMax) + return nil, errors.New("range check") + } + + color := NewPdfColorLab(l, a, b) + return color, nil +} + +func (pc *PdfColorspaceLab) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 3 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return pc.ColorFromFloats(floats) +} + +func (pc *PdfColorspaceLab) ColorToRGB(color PdfColor) (PdfColor, error) { + gFunc := func(x float64) float64 { + if x >= 6.0/29 { + return x * x * x + } else { + return 108.0 / 841 * (x - 4/29) + } + } + + lab, ok := color.(*PdfColorLab) + if !ok { + common.Log.Debug("input color not lab") + return nil, errors.New("type check error") + } + + // Get L*, a*, b* values. + LStar := lab.L() + AStar := lab.A() + BStar := lab.B() + + // Convert L*,a*,b* -> L, M, N + L := (LStar+16)/116 + AStar/500 + M := (LStar + 16) / 116 + N := (LStar+16)/116 - BStar/200 + + // L, M, N -> X,Y,Z + X := pc.WhitePoint[0] * gFunc(L) + Y := pc.WhitePoint[1] * gFunc(M) + Z := pc.WhitePoint[2] * gFunc(N) + + // Convert to RGB. + // X, Y, Z -> R, G, B + // http://stackoverflow.com/questions/21576719/how-to-convert-cie-color-space-into-rgb-or-hex-color-code-in-php + r := 3.240479*X + -1.537150*Y + -0.498535*Z + g := -0.969256*X + 1.875992*Y + 0.041556*Z + b := 0.055648*X + -0.204043*Y + 1.057311*Z + + // Clip. + r = math.Min(math.Max(r, 0), 1.0) + g = math.Min(math.Max(g, 0), 1.0) + b = math.Min(math.Max(b, 0), 1.0) + + return NewPdfColorDeviceRGB(r, g, b), nil +} + +func (pc *PdfColorspaceLab) ImageToRGB(img Image) (Image, error) { + g := func(x float64) float64 { + if x >= 6.0/29 { + return x * x * x + } else { + return 108.0 / 841 * (x - 4/29) + } + } + + rgbImage := img + + // Each n-bit unit within the bit stream shall be interpreted as an unsigned integer in the range 0 to 2n- 1, + // with the high-order bit first. + // The image dictionary’s Decode entry maps this integer to a colour component value, equivalent to what could be + // used with colour operators such as sc or g. + + componentRanges := img.decode + if len(componentRanges) != 6 { + // If image's Decode not appropriate, fall back to default decode array. + common.Log.Trace("Image - Lab Decode range != 6... use [0 100 amin amax bmin bmax] default decode array") + componentRanges = pc.DecodeArray() + } + + samples := img.GetSamples() + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + + rgbSamples := []uint32{} + for i := 0; i < len(samples); i += 3 { + // Get normalized L*, a*, b* values. [0-1] + LNorm := float64(samples[i]) / maxVal + ANorm := float64(samples[i+1]) / maxVal + BNorm := float64(samples[i+2]) / maxVal + + LStar := interpolate(LNorm, 0.0, 1.0, componentRanges[0], componentRanges[1]) + AStar := interpolate(ANorm, 0.0, 1.0, componentRanges[2], componentRanges[3]) + BStar := interpolate(BNorm, 0.0, 1.0, componentRanges[4], componentRanges[5]) + + // Convert L*,a*,b* -> L, M, N + L := (LStar+16)/116 + AStar/500 + M := (LStar + 16) / 116 + N := (LStar+16)/116 - BStar/200 + + // L, M, N -> X,Y,Z + X := pc.WhitePoint[0] * g(L) + Y := pc.WhitePoint[1] * g(M) + Z := pc.WhitePoint[2] * g(N) + + // Convert to RGB. + // X, Y, Z -> R, G, B + // http://stackoverflow.com/questions/21576719/how-to-convert-cie-color-space-into-rgb-or-hex-color-code-in-php + r := 3.240479*X + -1.537150*Y + -0.498535*Z + g := -0.969256*X + 1.875992*Y + 0.041556*Z + b := 0.055648*X + -0.204043*Y + 1.057311*Z + + // Clip. + r = math.Min(math.Max(r, 0), 1.0) + g = math.Min(math.Max(g, 0), 1.0) + b = math.Min(math.Max(b, 0), 1.0) + + // Convert to uint32. + R := uint32(r * maxVal) + G := uint32(g * maxVal) + B := uint32(b * maxVal) + + rgbSamples = append(rgbSamples, R, G, B) + } + rgbImage.SetSamples(rgbSamples) + rgbImage.ColorComponents = 3 + + return rgbImage, nil +} + +////////////////////// +// ICC Based colors. +// Each component is defined in the range 0.0 - 1.0 where 1.0 is the primary intensity. + +/* +type PdfColorICCBased []float64 + +func NewPdfColorICCBased(vals []float64) *PdfColorICCBased { + color := PdfColorICCBased{} + for _, val := range vals { + color = append(color, val) + } + return &color +} + +func (this *PdfColorICCBased) GetNumComponents() int { + return len(*this) +} + +// Convert to an integer format. +func (this *PdfColorICCBased) ToInteger(bits int) []uint32 { + maxVal := math.Pow(2, float64(bits)) - 1 + ints := []uint32{} + for _, val := range *this { + ints = append(ints, uint32(maxVal*val)) + } + + return ints + +} +*/ +// See p. 157 for calculations... + +// format [/ICCBased stream] +// +// The stream shall contain the ICC profile. +// A conforming reader shall support ICC.1:2004:10 as required by PDF 1.7, which will enable it +// to properly render all embedded ICC profiles regardless of the PDF version +// +// In the current implementation, we rely on the alternative colormap provided. +type PdfColorspaceICCBased struct { + N int // Number of color components (Required). Can be 1,3, or 4. + Alternate PdfColorspace // Alternate colorspace for non-conforming readers. + // If omitted ICC not supported: then use DeviceGray, + // DeviceRGB or DeviceCMYK for N=1,3,4 respectively. + Range []float64 // Array of 2xN numbers, specifying range of each color component. + Metadata *core.PdfObjectStream // Metadata stream. + Data []byte // ICC colormap data. + + container *core.PdfIndirectObject + stream *core.PdfObjectStream +} + +func (pc *PdfColorspaceICCBased) GetNumComponents() int { + return pc.N +} + +// DecodeArray returns the range of color component values in the ICCBased colorspace. +func (pc *PdfColorspaceICCBased) DecodeArray() []float64 { + return pc.Range +} + +func (*PdfColorspaceICCBased) String() string { + return "ICCBased" +} + +func NewPdfColorspaceICCBased(N int) (*PdfColorspaceICCBased, error) { + cs := &PdfColorspaceICCBased{} + + if N != 1 && N != 3 && N != 4 { + return nil, fmt.Errorf("invalid N (1/3/4)") + } + + cs.N = N + + return cs, nil +} + +// Input format [/ICCBased stream] +func newPdfColorspaceICCBasedFromPdfObject(obj core.PdfObject) (*PdfColorspaceICCBased, error) { + cs := &PdfColorspaceICCBased{} + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("type error") + } + + if len(*array) != 2 { + return nil, fmt.Errorf("invalid ICCBased colorspace") + } + + // Name. + obj = core.TraceToDirectObject((*array)[0]) + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("ICCBased name not a Name object") + } + if *name != "ICCBased" { + return nil, fmt.Errorf("not an ICCBased colorspace") + } + + // Stream + obj = (*array)[1] + stream, ok := obj.(*core.PdfObjectStream) + if !ok { + common.Log.Error("ICCBased not pointing to stream: %T", obj) + return nil, fmt.Errorf("ICCBased stream invalid") + } + + dict := stream.PdfObjectDictionary + + n, ok := dict.Get("N").(*core.PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("ICCBased missing N from stream dict") + } + if *n != 1 && *n != 3 && *n != 4 { + return nil, fmt.Errorf("ICCBased colorspace invalid N (not 1,3,4)") + } + cs.N = int(*n) + + if obj := dict.Get("Alternate"); obj != nil { + alternate, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + return nil, err + } + cs.Alternate = alternate + } + + if obj := dict.Get("Range"); obj != nil { + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("ICCBased Range not an array") + } + if len(*array) != 2*cs.N { + return nil, fmt.Errorf("ICCBased Range wrong number of elements") + } + r, err := array.GetAsFloat64Slice() + if err != nil { + return nil, err + } + cs.Range = r + } + + if obj := dict.Get("Metadata"); obj != nil { + stream, ok := obj.(*core.PdfObjectStream) + if !ok { + return nil, fmt.Errorf("ICCBased Metadata not a stream") + } + cs.Metadata = stream + } + + data, err := core.DecodeStream(stream) + if err != nil { + return nil, err + } + cs.Data = data + cs.stream = stream + + return cs, nil +} + +// Return as PDF object format [name stream] +func (pc *PdfColorspaceICCBased) ToPdfObject() core.PdfObject { + csObj := &core.PdfObjectArray{} + + csObj.Append(core.MakeName("ICCBased")) + + var stream *core.PdfObjectStream + if pc.stream != nil { + stream = pc.stream + } else { + stream = &core.PdfObjectStream{} + } + dict := core.MakeDict() + + dict.Set("N", core.MakeInteger(int64(pc.N))) + + if pc.Alternate != nil { + dict.Set("Alternate", pc.Alternate.ToPdfObject()) + } + + if pc.Metadata != nil { + dict.Set("Metadata", pc.Metadata) + } + if pc.Range != nil { + ranges := []core.PdfObject{} + for _, r := range pc.Range { + ranges = append(ranges, core.MakeFloat(r)) + } + dict.Set("Range", core.MakeArray(ranges...)) + } + + // Encode with a default encoder? + dict.Set("Length", core.MakeInteger(int64(len(pc.Data)))) + // Need to have a representation of the stream... + stream.Stream = pc.Data + stream.PdfObjectDictionary = dict + + csObj.Append(stream) + + if pc.container != nil { + pc.container.PdfObject = csObj + return pc.container + } + + return csObj +} + +func (pc *PdfColorspaceICCBased) ColorFromFloats(vals []float64) (PdfColor, error) { + if pc.Alternate == nil { + switch pc.N { + case 1: + cs := NewPdfColorspaceDeviceGray() + return cs.ColorFromFloats(vals) + case 3: + cs := NewPdfColorspaceDeviceRGB() + return cs.ColorFromFloats(vals) + case 4: + cs := NewPdfColorspaceDeviceCMYK() + return cs.ColorFromFloats(vals) + default: + return nil, errors.New("ICC Based colorspace missing alternative") + } + } + + return pc.Alternate.ColorFromFloats(vals) +} + +func (pc *PdfColorspaceICCBased) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if pc.Alternate == nil { + switch pc.N { + case 1: + cs := NewPdfColorspaceDeviceGray() + return cs.ColorFromPdfObjects(objects) + case 3: + cs := NewPdfColorspaceDeviceRGB() + return cs.ColorFromPdfObjects(objects) + case 4: + cs := NewPdfColorspaceDeviceCMYK() + return cs.ColorFromPdfObjects(objects) + default: + return nil, errors.New("ICC Based colorspace missing alternative") + } + } + + return pc.Alternate.ColorFromPdfObjects(objects) +} + +func (pc *PdfColorspaceICCBased) ColorToRGB(color PdfColor) (PdfColor, error) { + if pc.Alternate == nil { + common.Log.Debug("ICC Based colorspace missing alternative") + switch pc.N { + case 1: + common.Log.Debug("ICC Based colorspace missing alternative - using DeviceGray (N=1)") + grayCS := NewPdfColorspaceDeviceGray() + return grayCS.ColorToRGB(color) + case 3: + common.Log.Debug("ICC Based colorspace missing alternative - using DeviceRGB (N=3)") + // Already in RGB. + return color, nil + case 4: + common.Log.Debug("ICC Based colorspace missing alternative - using DeviceCMYK (N=4)") + // CMYK + cmykCS := NewPdfColorspaceDeviceCMYK() + return cmykCS.ColorToRGB(color) + default: + return nil, errors.New("ICC Based colorspace missing alternative") + } + } + + common.Log.Trace("ICC Based colorspace with alternative: %#v", pc) + return pc.Alternate.ColorToRGB(color) +} + +func (pc *PdfColorspaceICCBased) ImageToRGB(img Image) (Image, error) { + if pc.Alternate == nil { + common.Log.Debug("ICC Based colorspace missing alternative") + switch pc.N { + case 1: + common.Log.Debug("ICC Based colorspace missing alternative - using DeviceGray (N=1)") + grayCS := NewPdfColorspaceDeviceGray() + return grayCS.ImageToRGB(img) + case 3: + common.Log.Debug("ICC Based colorspace missing alternative - using DeviceRGB (N=3)") + // Already in RGB. + return img, nil + case 4: + common.Log.Debug("ICC Based colorspace missing alternative - using DeviceCMYK (N=4)") + // CMYK + cmykCS := NewPdfColorspaceDeviceCMYK() + return cmykCS.ImageToRGB(img) + default: + return img, errors.New("ICC Based colorspace missing alternative") + } + } + common.Log.Trace("ICC Based colorspace with alternative: %#v", pc) + + output, err := pc.Alternate.ImageToRGB(img) + common.Log.Trace("ICC Input image: %+v", img) + common.Log.Trace("ICC Output image: %+v", output) + return output, err //this.Alternate.ImageToRGB(img) +} + +////////////////////// +// Pattern color. + +type PdfColorPattern struct { + Color PdfColor // Color defined in underlying colorspace. + PatternName core.PdfObjectName // Name of the pattern (reference via resource dicts). +} + +// Pattern colorspace. +// Can be defined either as /Pattern or with an underlying colorspace [/Pattern cs]. +type PdfColorspaceSpecialPattern struct { + UnderlyingCS PdfColorspace + + container *core.PdfIndirectObject +} + +func NewPdfColorspaceSpecialPattern() *PdfColorspaceSpecialPattern { + return &PdfColorspaceSpecialPattern{} +} + +func (*PdfColorspaceSpecialPattern) String() string { + return "Pattern" +} + +func (pc *PdfColorspaceSpecialPattern) GetNumComponents() int { + return pc.UnderlyingCS.GetNumComponents() +} + +// DecodeArray returns an empty slice as there are no components associated with pattern colorspace. +func (*PdfColorspaceSpecialPattern) DecodeArray() []float64 { + return []float64{} +} + +func newPdfColorspaceSpecialPatternFromPdfObject(obj core.PdfObject) (*PdfColorspaceSpecialPattern, error) { + common.Log.Trace("New Pattern CS from obj: %s %T", obj.String(), obj) + cs := NewPdfColorspaceSpecialPattern() + + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + if name, isName := obj.(*core.PdfObjectName); isName { + if *name != "Pattern" { + return nil, fmt.Errorf("invalid name") + } + + return cs, nil + } + + array, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Error("invalid Pattern CS Object: %#v", obj) + return nil, fmt.Errorf("invalid Pattern CS object") + } + if len(*array) != 1 && len(*array) != 2 { + common.Log.Error("invalid Pattern CS array: %#v", array) + return nil, fmt.Errorf("invalid Pattern CS array") + } + + obj = (*array)[0] + if name, isName := obj.(*core.PdfObjectName); isName { + if *name != "Pattern" { + common.Log.Error("invalid Pattern CS array name: %#v", name) + return nil, fmt.Errorf("invalid name") + } + } + + // Has an underlying color space. + if len(*array) > 1 { + obj = (*array)[1] + obj = core.TraceToDirectObject(obj) + baseCS, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + return nil, err + } + cs.UnderlyingCS = baseCS + } + + common.Log.Trace("Returning Pattern with underlying cs: %T", cs.UnderlyingCS) + return cs, nil +} + +func (pc *PdfColorspaceSpecialPattern) ToPdfObject() core.PdfObject { + if pc.UnderlyingCS == nil { + return core.MakeName("Pattern") + } + + csObj := core.MakeArray(core.MakeName("Pattern")) + csObj.Append(pc.UnderlyingCS.ToPdfObject()) + + if pc.container != nil { + pc.container.PdfObject = csObj + return pc.container + } + + return csObj +} + +func (pc *PdfColorspaceSpecialPattern) ColorFromFloats(vals []float64) (PdfColor, error) { + if pc.UnderlyingCS == nil { + return nil, errors.New("underlying CS not specified") + } + return pc.UnderlyingCS.ColorFromFloats(vals) +} + +// The first objects (if present) represent the color in underlying colorspace. The last one represents +// the name of the pattern. +func (pc *PdfColorspaceSpecialPattern) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) < 1 { + return nil, errors.New("invalid number of parameters") + } + patternColor := &PdfColorPattern{} + + // Pattern name. + pname, ok := objects[len(objects)-1].(*core.PdfObjectName) + if !ok { + common.Log.Debug("Pattern name not a name (got %T)", objects[len(objects)-1]) + return nil, ErrTypeError + } + patternColor.PatternName = *pname + + // Pattern color if specified. + if len(objects) > 1 { + colorObjs := objects[0 : len(objects)-1] + if pc.UnderlyingCS == nil { + common.Log.Debug("Pattern color with defined color components but underlying cs missing") + return nil, errors.New("underlying CS not defined") + } + color, err := pc.UnderlyingCS.ColorFromPdfObjects(colorObjs) + if err != nil { + common.Log.Debug("error: Unable to convert color via underlying cs: %v", err) + return nil, err + } + patternColor.Color = color + } + + return patternColor, nil +} + +// Only converts color used with uncolored patterns (defined in underlying colorspace). Does not go into the +// pattern objects and convert those. If that is desired, needs to be done separately. +func (pc *PdfColorspaceSpecialPattern) ColorToRGB(color PdfColor) (PdfColor, error) { + patternColor, ok := color.(*PdfColorPattern) + if !ok { + common.Log.Debug("Color not pattern (got %T)", color) + return nil, ErrTypeError + } + + if patternColor.Color == nil { + // No color defined, can return same back. No transform needed. + return color, nil + } + + if pc.UnderlyingCS == nil { + return nil, errors.New("underlying CS not defined") + } + + return pc.UnderlyingCS.ColorToRGB(patternColor.Color) +} + +// An image cannot be defined in a pattern colorspace, returns an error. +func (*PdfColorspaceSpecialPattern) ImageToRGB(img Image) (Image, error) { + common.Log.Debug("error: Image cannot be specified in Pattern colorspace") + return img, errors.New("invalid colorspace for image (pattern)") +} + +// //////////////////// +// Indexed colorspace. An indexed color space is a lookup table, where the input element is an index to the lookup +// table and the output is a color defined in the lookup table in the Base colorspace. +// [/Indexed base hival lookup] +type PdfColorspaceSpecialIndexed struct { + Base PdfColorspace + HiVal int + Lookup core.PdfObject + + colorLookup []byte // m*(hival+1); m is number of components in Base colorspace + + container *core.PdfIndirectObject +} + +func NewPdfColorspaceSpecialIndexed() *PdfColorspaceSpecialIndexed { + cs := &PdfColorspaceSpecialIndexed{} + cs.HiVal = 255 + return cs +} + +func (*PdfColorspaceSpecialIndexed) String() string { + return "Indexed" +} + +func (*PdfColorspaceSpecialIndexed) GetNumComponents() int { + return 1 +} + +// DecodeArray returns the component range values for the Indexed colorspace. +func (pc *PdfColorspaceSpecialIndexed) DecodeArray() []float64 { + return []float64{0, float64(pc.HiVal)} +} + +func newPdfColorspaceSpecialIndexedFromPdfObject(obj core.PdfObject) (*PdfColorspaceSpecialIndexed, error) { + cs := NewPdfColorspaceSpecialIndexed() + + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("type error") + } + + if len(*array) != 4 { + return nil, fmt.Errorf("indexed CS: invalid array length") + } + + // Check name. + obj = (*array)[0] + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("indexed CS: invalid name") + } + if *name != "Indexed" { + return nil, fmt.Errorf("indexed CS: wrong name") + } + + // Get base colormap. + obj = (*array)[1] + + // Base cs cannot be another /Indexed or /Pattern space. + baseName, _ := determineColorspaceNameFromPdfObject(obj) + if baseName == "Indexed" || baseName == "Pattern" { + common.Log.Debug("error: Indexed colorspace cannot have Indexed/Pattern CS as base (%v)", baseName) + return nil, ErrRangeError + } + + baseCs, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + return nil, err + } + cs.Base = baseCs + + // Get hi val. + obj = (*array)[2] + val, err := getNumberAsInt64(obj) + if err != nil { + return nil, err + } + if val > 255 { + return nil, fmt.Errorf("indexed CS: Invalid hival") + } + cs.HiVal = int(val) + + // Index table. + obj = (*array)[3] + cs.Lookup = obj + obj = core.TraceToDirectObject(obj) + var data []byte + if str, ok := obj.(*core.PdfObjectString); ok { + data = []byte(*str) + common.Log.Trace("Indexed string color data: % d", data) + } else if stream, ok := obj.(*core.PdfObjectStream); ok { + common.Log.Trace("Indexed stream: %s", obj.String()) + common.Log.Trace("Encoded (%d) : %# x", len(stream.Stream), stream.Stream) + decoded, err := core.DecodeStream(stream) + if err != nil { + return nil, err + } + common.Log.Trace("Decoded (%d) : % X", len(decoded), decoded) + data = decoded + } else { + return nil, fmt.Errorf("indexed CS: Invalid table format") + } + + if len(data) < cs.Base.GetNumComponents()*(cs.HiVal+1) { + // Sometimes the table length is too short. In this case we need to + // note what absolute maximum index is. + common.Log.Debug("PDF Incompatibility: Index stream too short") + common.Log.Debug("Fail, len(data): %d, components: %d, hiVal: %d", len(data), cs.Base.GetNumComponents(), cs.HiVal) + } else { + // trim + data = data[:cs.Base.GetNumComponents()*(cs.HiVal+1)] + } + + cs.colorLookup = data + + return cs, nil +} + +func (pc *PdfColorspaceSpecialIndexed) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 1 { + return nil, errors.New("range check") + } + + N := pc.Base.GetNumComponents() + + index := int(vals[0]) * N + if index < 0 || (index+N-1) >= len(pc.colorLookup) { + return nil, errors.New("outside range") + } + + cvals := pc.colorLookup[index : index+N] + floats := []float64{} + for _, val := range cvals { + floats = append(floats, float64(val)/255.0) + } + color, err := pc.Base.ColorFromFloats(floats) + if err != nil { + return nil, err + } + + return color, nil +} + +func (pc *PdfColorspaceSpecialIndexed) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 1 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return pc.ColorFromFloats(floats) +} + +func (pc *PdfColorspaceSpecialIndexed) ColorToRGB(color PdfColor) (PdfColor, error) { + if pc.Base == nil { + return nil, errors.New("indexed base colorspace undefined") + } + + return pc.Base.ColorToRGB(color) +} + +// Convert an indexed image to RGB. +func (pc *PdfColorspaceSpecialIndexed) ImageToRGB(img Image) (Image, error) { + //baseImage := img + // Make a new representation of the image to be converted with the base colorspace. + baseImage := Image{} + baseImage.Height = img.Height + baseImage.Width = img.Width + baseImage.alphaData = img.alphaData + baseImage.BitsPerComponent = img.BitsPerComponent + baseImage.hasAlpha = img.hasAlpha + baseImage.ColorComponents = img.ColorComponents + + samples := img.GetSamples() + N := pc.Base.GetNumComponents() + + baseSamples := []uint32{} + // Convert the indexed data to base color map data. + for i := 0; i < len(samples); i++ { + // Each data point represents an index location. + // For each entry there are N values. + index := int(samples[i]) * N + common.Log.Trace("Indexed Index: %d", index) + // Ensure does not go out of bounds. + if index+N-1 >= len(pc.colorLookup) { + // Clip to the end value. + index = len(pc.colorLookup) - N - 1 + common.Log.Trace("Clipping to index: %d", index) + } + + cvals := pc.colorLookup[index : index+N] + common.Log.Trace("C Vals: % d", cvals) + for _, val := range cvals { + baseSamples = append(baseSamples, uint32(val)) + } + } + baseImage.SetSamples(baseSamples) + baseImage.ColorComponents = N + + common.Log.Trace("Input samples: %d", samples) + common.Log.Trace("-> Output samples: %d", baseSamples) + + // Convert to rgb. + return pc.Base.ImageToRGB(baseImage) +} + +// [/Indexed base hival lookup] +func (pc *PdfColorspaceSpecialIndexed) ToPdfObject() core.PdfObject { + csObj := core.MakeArray(core.MakeName("Indexed")) + csObj.Append(pc.Base.ToPdfObject()) + csObj.Append(core.MakeInteger(int64(pc.HiVal))) + csObj.Append(pc.Lookup) + + if pc.container != nil { + pc.container.PdfObject = csObj + return pc.container + } + + return csObj +} + +// //////////////////// +// Separation colorspace. +// At the moment the colour space is set to a Separation space, the conforming reader shall determine whether the +// device has an available colorant (e.g. dye) corresponding to the name of the requested space. If so, the conforming +// reader shall ignore the alternateSpace and tintTransform parameters; subsequent painting operations within the +// space shall apply the designated colorant directly, according to the tint values supplied. +// +// Format: [/Separation name alternateSpace tintTransform] +type PdfColorspaceSpecialSeparation struct { + ColorantName *core.PdfObjectName + AlternateSpace PdfColorspace + TintTransform PdfFunction + + // Container, if when parsing CS array is inside a container. + container *core.PdfIndirectObject +} + +func NewPdfColorspaceSpecialSeparation() *PdfColorspaceSpecialSeparation { + cs := &PdfColorspaceSpecialSeparation{} + return cs +} + +func (*PdfColorspaceSpecialSeparation) String() string { + return "Separation" +} + +func (*PdfColorspaceSpecialSeparation) GetNumComponents() int { + return 1 +} + +// DecodeArray returns the component range values for the Separation colorspace. +func (*PdfColorspaceSpecialSeparation) DecodeArray() []float64 { + return []float64{0, 1.0} +} + +// Object is an array or indirect object containing the array. +func newPdfColorspaceSpecialSeparationFromPdfObject(obj core.PdfObject) (*PdfColorspaceSpecialSeparation, error) { + cs := NewPdfColorspaceSpecialSeparation() + + // If within an indirect object, then make a note of it. If we write out the core.PdfObject later + // we can reference the same container. Otherwise is not within a container, but rather + // a new array. + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + obj = core.TraceToDirectObject(obj) + array, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("separation CS: Invalid object") + } + + if len(*array) != 4 { + return nil, fmt.Errorf("separation CS: Incorrect array length") + } + + // Check name. + obj = (*array)[0] + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("separation CS: invalid family name") + } + if *name != "Separation" { + return nil, fmt.Errorf("separation CS: wrong family name") + } + + // Get colorant name. + obj = (*array)[1] + name, ok = obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("separation CS: Invalid colorant name") + } + cs.ColorantName = name + + // Get base colormap. + obj = (*array)[2] + alternativeCs, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + return nil, err + } + cs.AlternateSpace = alternativeCs + + // Tint transform is specified by a PDF function. + tintTransform, err := newPdfFunctionFromPdfObject((*array)[3]) + if err != nil { + return nil, err + } + + cs.TintTransform = tintTransform + + return cs, nil +} + +func (pc *PdfColorspaceSpecialSeparation) ToPdfObject() core.PdfObject { + csArray := core.MakeArray(core.MakeName("Separation")) + + csArray.Append(pc.ColorantName) + csArray.Append(pc.AlternateSpace.ToPdfObject()) + csArray.Append(pc.TintTransform.ToPdfObject()) + + // If in a container, replace the contents and return back. + // Helps not getting too many duplicates of the same objects. + if pc.container != nil { + pc.container.PdfObject = csArray + return pc.container + } + + return csArray +} + +func (pc *PdfColorspaceSpecialSeparation) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != 1 { + return nil, errors.New("range check") + } + + tint := vals[0] + input := []float64{tint} + output, err := pc.TintTransform.Evaluate(input) + if err != nil { + common.Log.Debug("error, failed to evaluate: %v", err) + common.Log.Trace("Tint transform: %+v", pc.TintTransform) + return nil, err + } + + common.Log.Trace("Processing ColorFromFloats(%+v) on AlternateSpace: %#v", output, pc.AlternateSpace) + color, err := pc.AlternateSpace.ColorFromFloats(output) + if err != nil { + common.Log.Debug("error, failed to evaluate in alternate space: %v", err) + return nil, err + } + + return color, nil +} + +func (pc *PdfColorspaceSpecialSeparation) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != 1 { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return pc.ColorFromFloats(floats) +} + +func (pc *PdfColorspaceSpecialSeparation) ColorToRGB(color PdfColor) (PdfColor, error) { + if pc.AlternateSpace == nil { + return nil, errors.New("alternate colorspace undefined") + } + + return pc.AlternateSpace.ColorToRGB(color) +} + +// ImageToRGB converts an image with samples in Separation CS to an image with samples specified in +// DeviceRGB CS. +func (pc *PdfColorspaceSpecialSeparation) ImageToRGB(img Image) (Image, error) { + altImage := img + + samples := img.GetSamples() + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + + common.Log.Trace("Separation color space -> ToRGB conversion") + common.Log.Trace("samples in: %d", len(samples)) + common.Log.Trace("TintTransform: %+v", pc.TintTransform) + + altDecode := pc.AlternateSpace.DecodeArray() + + altSamples := []uint32{} + // Convert tints to color data in the alternate colorspace. + for i := 0; i < len(samples); i++ { + // A single tint component is in the range 0.0 - 1.0 + tint := float64(samples[i]) / maxVal + + // Convert the tint value to the alternate space value. + outputs, err := pc.TintTransform.Evaluate([]float64{tint}) + //common.Log.Trace("%v Converting tint value: %f -> [% f]", this.AlternateSpace, tint, outputs) + + if err != nil { + return img, err + } + + for i, val := range outputs { + // Convert component value to 0-1 range. + altVal := interpolate(val, altDecode[i*2], altDecode[i*2+1], 0, 1) + + // Rescale to [0, maxVal] + altComponent := uint32(altVal * maxVal) + + altSamples = append(altSamples, altComponent) + } + } + common.Log.Trace("Samples out: %d", len(altSamples)) + altImage.SetSamples(altSamples) + altImage.ColorComponents = pc.AlternateSpace.GetNumComponents() + + // Set the image's decode parameters for interpretation in the alternative CS. + altImage.decode = altDecode + + // Convert to RGB via the alternate colorspace. + return pc.AlternateSpace.ImageToRGB(altImage) +} + +// //////////////////// +// DeviceN color spaces are similar to Separation color spaces, except they can contain an arbitrary +// number of color components. +// +// Format: [/DeviceN names alternateSpace tintTransform] +// +// or: [/DeviceN names alternateSpace tintTransform attributes] +type PdfColorspaceDeviceN struct { + ColorantNames *core.PdfObjectArray + AlternateSpace PdfColorspace + TintTransform PdfFunction + Attributes *PdfColorspaceDeviceNAttributes + + // Optional + container *core.PdfIndirectObject +} + +func NewPdfColorspaceDeviceN() *PdfColorspaceDeviceN { + cs := &PdfColorspaceDeviceN{} + return cs +} + +func (*PdfColorspaceDeviceN) String() string { + return "DeviceN" +} + +// GetNumComponents returns the number of input color components, i.e. that are input to the tint transform. +func (pc *PdfColorspaceDeviceN) GetNumComponents() int { + return len(*pc.ColorantNames) +} + +// DecodeArray returns the component range values for the DeviceN colorspace. +// [0 1.0 0 1.0 ...] for each color component. +func (pc *PdfColorspaceDeviceN) DecodeArray() []float64 { + decode := []float64{} + for i := 0; i < pc.GetNumComponents(); i++ { + decode = append(decode, 0.0, 1.0) + } + return decode +} + +func newPdfColorspaceDeviceNFromPdfObject(obj core.PdfObject) (*PdfColorspaceDeviceN, error) { + cs := NewPdfColorspaceDeviceN() + + // If within an indirect object, then make a note of it. If we write out the core.PdfObject later + // we can reference the same container. Otherwise is not within a container, but rather + // a new array. + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + cs.container = indObj + } + + // Check the CS array. + obj = core.TraceToDirectObject(obj) + csArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("DeviceN CS: Invalid object") + } + + if len(*csArray) != 4 && len(*csArray) != 5 { + return nil, fmt.Errorf("DeviceN CS: Incorrect array length") + } + + // Check name. + obj = (*csArray)[0] + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("DeviceN CS: invalid family name") + } + if *name != "DeviceN" { + return nil, fmt.Errorf("DeviceN CS: wrong family name") + } + + // Get colorant names. Specifies the number of components too. + obj = (*csArray)[1] + obj = core.TraceToDirectObject(obj) + nameArray, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("DeviceN CS: Invalid names array") + } + cs.ColorantNames = nameArray + + // Get base colormap. + obj = (*csArray)[2] + alternativeCs, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + return nil, err + } + cs.AlternateSpace = alternativeCs + + // Tint transform is specified by a PDF function. + tintTransform, err := newPdfFunctionFromPdfObject((*csArray)[3]) + if err != nil { + return nil, err + } + cs.TintTransform = tintTransform + + // Attributes. + if len(*csArray) == 5 { + attr, err := newPdfColorspaceDeviceNAttributesFromPdfObject((*csArray)[4]) + if err != nil { + return nil, err + } + cs.Attributes = attr + } + + return cs, nil +} + +// Format: [/DeviceN names alternateSpace tintTransform] +// or: [/DeviceN names alternateSpace tintTransform attributes] + +func (pc *PdfColorspaceDeviceN) ToPdfObject() core.PdfObject { + csArray := core.MakeArray(core.MakeName("DeviceN")) + csArray.Append(pc.ColorantNames) + csArray.Append(pc.AlternateSpace.ToPdfObject()) + csArray.Append(pc.TintTransform.ToPdfObject()) + if pc.Attributes != nil { + csArray.Append(pc.Attributes.ToPdfObject()) + } + + if pc.container != nil { + pc.container.PdfObject = csArray + return pc.container + } + + return csArray +} + +func (pc *PdfColorspaceDeviceN) ColorFromFloats(vals []float64) (PdfColor, error) { + if len(vals) != pc.GetNumComponents() { + return nil, errors.New("range check") + } + + output, err := pc.TintTransform.Evaluate(vals) + if err != nil { + return nil, err + } + + color, err := pc.AlternateSpace.ColorFromFloats(output) + if err != nil { + return nil, err + } + return color, nil +} + +func (pc *PdfColorspaceDeviceN) ColorFromPdfObjects(objects []core.PdfObject) (PdfColor, error) { + if len(objects) != pc.GetNumComponents() { + return nil, errors.New("range check") + } + + floats, err := getNumbersAsFloat(objects) + if err != nil { + return nil, err + } + + return pc.ColorFromFloats(floats) +} + +func (pc *PdfColorspaceDeviceN) ColorToRGB(color PdfColor) (PdfColor, error) { + if pc.AlternateSpace == nil { + return nil, errors.New("DeviceN alternate space undefined") + } + return pc.AlternateSpace.ColorToRGB(color) +} + +func (pc *PdfColorspaceDeviceN) ImageToRGB(img Image) (Image, error) { + altImage := img + + samples := img.GetSamples() + maxVal := math.Pow(2, float64(img.BitsPerComponent)) - 1 + + // Convert tints to color data in the alternate colorspace. + altSamples := []uint32{} + for i := 0; i < len(samples); i += pc.GetNumComponents() { + // The input to the tint transformation is the tint + // for each color component. + // + // A single tint component is in the range 0.0 - 1.0 + inputs := []float64{} + for j := 0; j < pc.GetNumComponents(); j++ { + tint := float64(samples[i+j]) / maxVal + inputs = append(inputs, tint) + } + + // Transform the tints to the alternate colorspace. + // (scaled units). + outputs, err := pc.TintTransform.Evaluate(inputs) + if err != nil { + return img, err + } + + for _, val := range outputs { + // Clip. + val = math.Min(math.Max(0, val), 1.0) + // Rescale to [0, maxVal] + altComponent := uint32(val * maxVal) + altSamples = append(altSamples, altComponent) + } + } + altImage.SetSamples(altSamples) + + // Convert to RGB via the alternate colorspace. + return pc.AlternateSpace.ImageToRGB(altImage) +} + +// Additional information about the components of colour space that conforming readers may use. +// Conforming readers need not use the alternateSpace and tintTransform parameters, and may +// instead use custom blending algorithms, along with other information provided in the attributes +// dictionary if present. +type PdfColorspaceDeviceNAttributes struct { + Subtype *core.PdfObjectName // DeviceN or NChannel (DeviceN default) + Colorants core.PdfObject + Process core.PdfObject + MixingHints core.PdfObject + + // Optional + container *core.PdfIndirectObject +} + +func newPdfColorspaceDeviceNAttributesFromPdfObject(obj core.PdfObject) (*PdfColorspaceDeviceNAttributes, error) { + attr := &PdfColorspaceDeviceNAttributes{} + + var dict *core.PdfObjectDictionary + if indObj, isInd := obj.(*core.PdfIndirectObject); isInd { + attr.container = indObj + var ok bool + dict, ok = indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + common.Log.Error("DeviceN attribute type error") + return nil, errors.New("type error") + } + } else if d, isDict := obj.(*core.PdfObjectDictionary); isDict { + dict = d + } else { + common.Log.Error("DeviceN attribute type error") + return nil, errors.New("type error") + } + + if obj := dict.Get("Subtype"); obj != nil { + name, ok := core.TraceToDirectObject(obj).(*core.PdfObjectName) + if !ok { + common.Log.Error("DeviceN attribute Subtype type error") + return nil, errors.New("type error") + } + + attr.Subtype = name + } + + if obj := dict.Get("Colorants"); obj != nil { + attr.Colorants = obj + } + + if obj := dict.Get("Process"); obj != nil { + attr.Process = obj + } + + if obj := dict.Get("MixingHints"); obj != nil { + attr.MixingHints = obj + } + + return attr, nil +} + +func (pda *PdfColorspaceDeviceNAttributes) ToPdfObject() core.PdfObject { + dict := core.MakeDict() + + if pda.Subtype != nil { + dict.Set("Subtype", pda.Subtype) + } + dict.SetIfNotNil("Colorants", pda.Colorants) + dict.SetIfNotNil("Process", pda.Process) + dict.SetIfNotNil("MixingHints", pda.MixingHints) + + if pda.container != nil { + pda.container.PdfObject = dict + return pda.container + } + + return dict +} diff --git a/internal/pdf/model/const.go b/internal/pdf/model/const.go new file mode 100644 index 0000000..af2ea72 --- /dev/null +++ b/internal/pdf/model/const.go @@ -0,0 +1,14 @@ +package model + +import ( + "errors" +) + +var ( + ErrRequiredAttributeMissing = errors.New("required attribute missing") + ErrInvalidAttribute = errors.New("invalid attribute") + ErrTypeError = errors.New("type check error") + + // ErrRangeError typically occurs when an input parameter is out of range or has invalid value. + ErrRangeError = errors.New("range check error") +) diff --git a/internal/pdf/model/font.go b/internal/pdf/model/font.go new file mode 100644 index 0000000..d76a3fe --- /dev/null +++ b/internal/pdf/model/font.go @@ -0,0 +1,393 @@ +package model + +import ( + "errors" + "os" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/fonts" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// The PdfFont structure represents an underlying font structure which can be of type: +// - Type0 +// - Type1 +// - TrueType +// etc. +type PdfFont struct { + context any // The underlying font: Type0, Type1, Truetype, etc.. +} + +// Set the encoding for the underlying font. +func (font PdfFont) SetEncoder(encoder textencoding.TextEncoder) { + switch t := font.context.(type) { + case *pdfFontTrueType: + t.SetEncoder(encoder) + } +} + +func (font PdfFont) GetGlyphCharMetrics(glyph string) (fonts.CharMetrics, bool) { + switch t := font.context.(type) { + case *pdfFontTrueType: + return t.GetGlyphCharMetrics(glyph) + } + + return fonts.CharMetrics{}, false +} + +func (font PdfFont) ToPdfObject() core.PdfObject { + switch f := font.context.(type) { + case *pdfFontTrueType: + return f.ToPdfObject() + } + + // If not supported, return null.. + common.Log.Debug("Unsupported font (%T) - returning null object", font.context) + return core.MakeNull() +} + +type pdfFontTrueType struct { + Encoder textencoding.TextEncoder + + firstChar int + lastChar int + charWidths []float64 + + // Subtype shall be TrueType. + // Encoding is subject to limitations that are described in 9.6.6, "Character Encoding". + // BaseFont is derived differently. + BaseFont core.PdfObject + FirstChar core.PdfObject + LastChar core.PdfObject + Widths core.PdfObject + FontDescriptor *PdfFontDescriptor + Encoding core.PdfObject + ToUnicode core.PdfObject + + container *core.PdfIndirectObject +} + +func (font pdfFontTrueType) SetEncoder(encoder textencoding.TextEncoder) { + font.Encoder = encoder +} + +func (font pdfFontTrueType) GetGlyphCharMetrics(glyph string) (fonts.CharMetrics, bool) { + metrics := fonts.CharMetrics{} + + code, found := font.Encoder.GlyphToCharcode(glyph) + if !found { + return metrics, false + } + + if int(code) < font.firstChar { + common.Log.Debug("Code lower than firstchar (%d < %d)", code, font.firstChar) + return metrics, false + } + + if int(code) > font.lastChar { + common.Log.Debug("Code higher than lastchar (%d < %d)", code, font.lastChar) + return metrics, false + } + + index := int(code) - font.firstChar + if index >= len(font.charWidths) { + common.Log.Debug("Code outside of widths range") + return metrics, false + } + + width := font.charWidths[index] + metrics.Wx = width + + return metrics, true +} + +func (ftt *pdfFontTrueType) ToPdfObject() core.PdfObject { + if ftt.container == nil { + ftt.container = &core.PdfIndirectObject{} + } + d := core.MakeDict() + ftt.container.PdfObject = d + + d.Set("Type", core.MakeName("Font")) + d.Set("Subtype", core.MakeName("TrueType")) + + if ftt.BaseFont != nil { + d.Set("BaseFont", ftt.BaseFont) + } + if ftt.FirstChar != nil { + d.Set("FirstChar", ftt.FirstChar) + } + if ftt.LastChar != nil { + d.Set("LastChar", ftt.LastChar) + } + if ftt.Widths != nil { + d.Set("Widths", ftt.Widths) + } + if ftt.FontDescriptor != nil { + d.Set("FontDescriptor", ftt.FontDescriptor.ToPdfObject()) + } + if ftt.Encoding != nil { + d.Set("Encoding", ftt.Encoding) + } + if ftt.ToUnicode != nil { + d.Set("ToUnicode", ftt.ToUnicode) + } + + return ftt.container +} + +func NewPdfFontFromTTFFile(filePath string) (*PdfFont, error) { + ttf, err := fonts.TtfParse(filePath) + if err != nil { + common.Log.Debug("error loading ttf font: %v", err) + return nil, err + } + + truefont := &pdfFontTrueType{} + + truefont.Encoder = textencoding.NewWinAnsiTextEncoder() + truefont.firstChar = 32 + truefont.lastChar = 255 + + truefont.BaseFont = core.MakeName(ttf.PostScriptName) + truefont.FirstChar = core.MakeInteger(32) + truefont.LastChar = core.MakeInteger(255) + + k := 1000.0 / float64(ttf.UnitsPerEm) + + if len(ttf.Widths) <= 0 { + return nil, errors.New("missing required attribute (Widths)") + } + + missingWidth := k * float64(ttf.Widths[0]) + vals := []float64{} + + for charcode := 32; charcode <= 255; charcode++ { + runeVal, found := truefont.Encoder.CharcodeToRune(byte(charcode)) + if !found { + common.Log.Debug("Rune not found (charcode: %d)", charcode) + vals = append(vals, missingWidth) + continue + } + + pos, ok := ttf.Chars[uint16(runeVal)] + if !ok { + common.Log.Debug("Rune not in TTF Chars") + vals = append(vals, missingWidth) + continue + } + + w := k * float64(ttf.Widths[pos]) + + vals = append(vals, w) + } + + truefont.Widths = &core.PdfIndirectObject{PdfObject: core.MakeArrayFromFloats(vals)} + + if len(vals) < (255 - 32 + 1) { + common.Log.Debug("invalid length of widths, %d < %d", len(vals), 255-32+1) + return nil, errors.New("range check error") + } + + truefont.charWidths = vals[:255-32+1] + + // Default. + // XXX/FIXME TODO: Only use the encoder object. + + truefont.Encoding = core.MakeName("WinAnsiEncoding") + + descriptor := &PdfFontDescriptor{} + descriptor.Ascent = core.MakeFloat(k * float64(ttf.TypoAscender)) + descriptor.Descent = core.MakeFloat(k * float64(ttf.TypoDescender)) + descriptor.CapHeight = core.MakeFloat(k * float64(ttf.CapHeight)) + descriptor.FontBBox = core.MakeArrayFromFloats([]float64{k * float64(ttf.Xmin), k * float64(ttf.Ymin), k * float64(ttf.Xmax), k * float64(ttf.Ymax)}) + descriptor.ItalicAngle = core.MakeFloat(float64(ttf.ItalicAngle)) + descriptor.MissingWidth = core.MakeFloat(k * float64(ttf.Widths[0])) + + ttfBytes, err := os.ReadFile(filePath) + if err != nil { + common.Log.Debug("Unable to read file contents: %v", err) + return nil, err + } + + // XXX/TODO: Encode the file... + stream, err := core.MakeStream(ttfBytes, core.NewFlateEncoder()) + if err != nil { + common.Log.Debug("Unable to make stream: %v", err) + return nil, err + } + stream.PdfObjectDictionary.Set("Length1", core.MakeInteger(int64(len(ttfBytes)))) + descriptor.FontFile2 = stream + + if ttf.Bold { + descriptor.StemV = core.MakeInteger(120) + } else { + descriptor.StemV = core.MakeInteger(70) + } + + // Flags. + flags := 1 << 5 + if ttf.IsFixedPitch { + flags |= 1 + } + if ttf.ItalicAngle != 0 { + flags |= 1 << 6 + } + descriptor.Flags = core.MakeInteger(int64(flags)) + + // Build Font. + truefont.FontDescriptor = descriptor + + font := &PdfFont{} + font.context = truefont + + return font, nil +} + +// Font descriptors specifies metrics and other attributes of a font. +type PdfFontDescriptor struct { + FontName core.PdfObject + FontFamily core.PdfObject + FontStretch core.PdfObject + FontWeight core.PdfObject + Flags core.PdfObject + FontBBox core.PdfObject + ItalicAngle core.PdfObject + Ascent core.PdfObject + Descent core.PdfObject + Leading core.PdfObject + CapHeight core.PdfObject + XHeight core.PdfObject + StemV core.PdfObject + StemH core.PdfObject + AvgWidth core.PdfObject + MaxWidth core.PdfObject + MissingWidth core.PdfObject + FontFile core.PdfObject + FontFile2 core.PdfObject + FontFile3 core.PdfObject + CharSet core.PdfObject + + // Additional entries for CIDFonts + Style core.PdfObject + Lang core.PdfObject + FD core.PdfObject + CIDSet core.PdfObject + + // Container. + container *core.PdfIndirectObject +} + +// Convert to a PDF dictionary inside an indirect object. +func (pfd *PdfFontDescriptor) ToPdfObject() core.PdfObject { + d := core.MakeDict() + if pfd.container == nil { + pfd.container = &core.PdfIndirectObject{} + } + pfd.container.PdfObject = d + + d.Set("Type", core.MakeName("FontDescriptor")) + + if pfd.FontName != nil { + d.Set("FontName", pfd.FontName) + } + + if pfd.FontFamily != nil { + d.Set("FontFamily", pfd.FontFamily) + } + + if pfd.FontStretch != nil { + d.Set("FontStretch", pfd.FontStretch) + } + + if pfd.FontWeight != nil { + d.Set("FontWeight", pfd.FontWeight) + } + + if pfd.Flags != nil { + d.Set("Flags", pfd.Flags) + } + + if pfd.FontBBox != nil { + d.Set("FontBBox", pfd.FontBBox) + } + + if pfd.ItalicAngle != nil { + d.Set("ItalicAngle", pfd.ItalicAngle) + } + + if pfd.Ascent != nil { + d.Set("Ascent", pfd.Ascent) + } + + if pfd.Descent != nil { + d.Set("Descent", pfd.Descent) + } + + if pfd.Leading != nil { + d.Set("Leading", pfd.Leading) + } + + if pfd.CapHeight != nil { + d.Set("CapHeight", pfd.CapHeight) + } + + if pfd.XHeight != nil { + d.Set("XHeight", pfd.XHeight) + } + + if pfd.StemV != nil { + d.Set("StemV", pfd.StemV) + } + + if pfd.StemH != nil { + d.Set("StemH", pfd.StemH) + } + + if pfd.AvgWidth != nil { + d.Set("AvgWidth", pfd.AvgWidth) + } + + if pfd.MaxWidth != nil { + d.Set("MaxWidth", pfd.MaxWidth) + } + + if pfd.MissingWidth != nil { + d.Set("MissingWidth", pfd.MissingWidth) + } + + if pfd.FontFile != nil { + d.Set("FontFile", pfd.FontFile) + } + + if pfd.FontFile2 != nil { + d.Set("FontFile2", pfd.FontFile2) + } + + if pfd.FontFile3 != nil { + d.Set("FontFile3", pfd.FontFile3) + } + + if pfd.CharSet != nil { + d.Set("CharSet", pfd.CharSet) + } + + if pfd.Style != nil { + d.Set("FontName", pfd.FontName) + } + + if pfd.Lang != nil { + d.Set("Lang", pfd.Lang) + } + + if pfd.FD != nil { + d.Set("FD", pfd.FD) + } + + if pfd.CIDSet != nil { + d.Set("CIDSet", pfd.CIDSet) + } + + return pfd.container +} diff --git a/internal/pdf/model/fonts/afms/Courier-Bold.afm b/internal/pdf/model/fonts/afms/Courier-Bold.afm new file mode 100644 index 0000000..d25d776 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Courier-Bold.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Mon Jun 23 16:28:00 1997 +Comment UniqueID 43048 +Comment VMusage 41139 52164 +FontName Courier-Bold +FullName Courier Bold +FamilyName Courier +Weight Bold +ItalicAngle 0 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -113 -250 749 801 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 439 +Ascender 629 +Descender -157 +StdHW 84 +StdVW 106 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 202 -15 398 572 ; +C 34 ; WX 600 ; N quotedbl ; B 135 277 465 562 ; +C 35 ; WX 600 ; N numbersign ; B 56 -45 544 651 ; +C 36 ; WX 600 ; N dollar ; B 82 -126 519 666 ; +C 37 ; WX 600 ; N percent ; B 5 -15 595 616 ; +C 38 ; WX 600 ; N ampersand ; B 36 -15 546 543 ; +C 39 ; WX 600 ; N quoteright ; B 171 277 423 562 ; +C 40 ; WX 600 ; N parenleft ; B 219 -102 461 616 ; +C 41 ; WX 600 ; N parenright ; B 139 -102 381 616 ; +C 42 ; WX 600 ; N asterisk ; B 91 219 509 601 ; +C 43 ; WX 600 ; N plus ; B 71 39 529 478 ; +C 44 ; WX 600 ; N comma ; B 123 -111 393 174 ; +C 45 ; WX 600 ; N hyphen ; B 100 203 500 313 ; +C 46 ; WX 600 ; N period ; B 192 -15 408 171 ; +C 47 ; WX 600 ; N slash ; B 98 -77 502 626 ; +C 48 ; WX 600 ; N zero ; B 87 -15 513 616 ; +C 49 ; WX 600 ; N one ; B 81 0 539 616 ; +C 50 ; WX 600 ; N two ; B 61 0 499 616 ; +C 51 ; WX 600 ; N three ; B 63 -15 501 616 ; +C 52 ; WX 600 ; N four ; B 53 0 507 616 ; +C 53 ; WX 600 ; N five ; B 70 -15 521 601 ; +C 54 ; WX 600 ; N six ; B 90 -15 521 616 ; +C 55 ; WX 600 ; N seven ; B 55 0 494 601 ; +C 56 ; WX 600 ; N eight ; B 83 -15 517 616 ; +C 57 ; WX 600 ; N nine ; B 79 -15 510 616 ; +C 58 ; WX 600 ; N colon ; B 191 -15 407 425 ; +C 59 ; WX 600 ; N semicolon ; B 123 -111 408 425 ; +C 60 ; WX 600 ; N less ; B 66 15 523 501 ; +C 61 ; WX 600 ; N equal ; B 71 118 529 398 ; +C 62 ; WX 600 ; N greater ; B 77 15 534 501 ; +C 63 ; WX 600 ; N question ; B 98 -14 501 580 ; +C 64 ; WX 600 ; N at ; B 16 -15 584 616 ; +C 65 ; WX 600 ; N A ; B -9 0 609 562 ; +C 66 ; WX 600 ; N B ; B 30 0 573 562 ; +C 67 ; WX 600 ; N C ; B 22 -18 560 580 ; +C 68 ; WX 600 ; N D ; B 30 0 594 562 ; +C 69 ; WX 600 ; N E ; B 25 0 560 562 ; +C 70 ; WX 600 ; N F ; B 39 0 570 562 ; +C 71 ; WX 600 ; N G ; B 22 -18 594 580 ; +C 72 ; WX 600 ; N H ; B 20 0 580 562 ; +C 73 ; WX 600 ; N I ; B 77 0 523 562 ; +C 74 ; WX 600 ; N J ; B 37 -18 601 562 ; +C 75 ; WX 600 ; N K ; B 21 0 599 562 ; +C 76 ; WX 600 ; N L ; B 39 0 578 562 ; +C 77 ; WX 600 ; N M ; B -2 0 602 562 ; +C 78 ; WX 600 ; N N ; B 8 -12 610 562 ; +C 79 ; WX 600 ; N O ; B 22 -18 578 580 ; +C 80 ; WX 600 ; N P ; B 48 0 559 562 ; +C 81 ; WX 600 ; N Q ; B 32 -138 578 580 ; +C 82 ; WX 600 ; N R ; B 24 0 599 562 ; +C 83 ; WX 600 ; N S ; B 47 -22 553 582 ; +C 84 ; WX 600 ; N T ; B 21 0 579 562 ; +C 85 ; WX 600 ; N U ; B 4 -18 596 562 ; +C 86 ; WX 600 ; N V ; B -13 0 613 562 ; +C 87 ; WX 600 ; N W ; B -18 0 618 562 ; +C 88 ; WX 600 ; N X ; B 12 0 588 562 ; +C 89 ; WX 600 ; N Y ; B 12 0 589 562 ; +C 90 ; WX 600 ; N Z ; B 62 0 539 562 ; +C 91 ; WX 600 ; N bracketleft ; B 245 -102 475 616 ; +C 92 ; WX 600 ; N backslash ; B 99 -77 503 626 ; +C 93 ; WX 600 ; N bracketright ; B 125 -102 355 616 ; +C 94 ; WX 600 ; N asciicircum ; B 108 250 492 616 ; +C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 178 277 428 562 ; +C 97 ; WX 600 ; N a ; B 35 -15 570 454 ; +C 98 ; WX 600 ; N b ; B 0 -15 584 626 ; +C 99 ; WX 600 ; N c ; B 40 -15 545 459 ; +C 100 ; WX 600 ; N d ; B 20 -15 591 626 ; +C 101 ; WX 600 ; N e ; B 40 -15 563 454 ; +C 102 ; WX 600 ; N f ; B 83 0 547 626 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 30 -146 580 454 ; +C 104 ; WX 600 ; N h ; B 5 0 592 626 ; +C 105 ; WX 600 ; N i ; B 77 0 523 658 ; +C 106 ; WX 600 ; N j ; B 63 -146 440 658 ; +C 107 ; WX 600 ; N k ; B 20 0 585 626 ; +C 108 ; WX 600 ; N l ; B 77 0 523 626 ; +C 109 ; WX 600 ; N m ; B -22 0 626 454 ; +C 110 ; WX 600 ; N n ; B 18 0 592 454 ; +C 111 ; WX 600 ; N o ; B 30 -15 570 454 ; +C 112 ; WX 600 ; N p ; B -1 -142 570 454 ; +C 113 ; WX 600 ; N q ; B 20 -142 591 454 ; +C 114 ; WX 600 ; N r ; B 47 0 580 454 ; +C 115 ; WX 600 ; N s ; B 68 -17 535 459 ; +C 116 ; WX 600 ; N t ; B 47 -15 532 562 ; +C 117 ; WX 600 ; N u ; B -1 -15 569 439 ; +C 118 ; WX 600 ; N v ; B -1 0 601 439 ; +C 119 ; WX 600 ; N w ; B -18 0 618 439 ; +C 120 ; WX 600 ; N x ; B 6 0 594 439 ; +C 121 ; WX 600 ; N y ; B -4 -142 601 439 ; +C 122 ; WX 600 ; N z ; B 81 0 520 439 ; +C 123 ; WX 600 ; N braceleft ; B 160 -102 464 616 ; +C 124 ; WX 600 ; N bar ; B 255 -250 345 750 ; +C 125 ; WX 600 ; N braceright ; B 136 -102 440 616 ; +C 126 ; WX 600 ; N asciitilde ; B 71 153 530 356 ; +C 161 ; WX 600 ; N exclamdown ; B 202 -146 398 449 ; +C 162 ; WX 600 ; N cent ; B 66 -49 518 614 ; +C 163 ; WX 600 ; N sterling ; B 72 -28 558 611 ; +C 164 ; WX 600 ; N fraction ; B 25 -60 576 661 ; +C 165 ; WX 600 ; N yen ; B 10 0 590 562 ; +C 166 ; WX 600 ; N florin ; B -30 -131 572 616 ; +C 167 ; WX 600 ; N section ; B 83 -70 517 580 ; +C 168 ; WX 600 ; N currency ; B 54 49 546 517 ; +C 169 ; WX 600 ; N quotesingle ; B 227 277 373 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 71 277 535 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 8 70 553 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 141 70 459 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 141 70 459 446 ; +C 174 ; WX 600 ; N fi ; B 12 0 593 626 ; +C 175 ; WX 600 ; N fl ; B 12 0 593 626 ; +C 177 ; WX 600 ; N endash ; B 65 203 535 313 ; +C 178 ; WX 600 ; N dagger ; B 106 -70 494 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 106 -70 494 580 ; +C 180 ; WX 600 ; N periodcentered ; B 196 165 404 351 ; +C 182 ; WX 600 ; N paragraph ; B 6 -70 576 580 ; +C 183 ; WX 600 ; N bullet ; B 140 132 460 430 ; +C 184 ; WX 600 ; N quotesinglbase ; B 175 -142 427 143 ; +C 185 ; WX 600 ; N quotedblbase ; B 65 -142 529 143 ; +C 186 ; WX 600 ; N quotedblright ; B 61 277 525 562 ; +C 187 ; WX 600 ; N guillemotright ; B 47 70 592 446 ; +C 188 ; WX 600 ; N ellipsis ; B 26 -15 574 116 ; +C 189 ; WX 600 ; N perthousand ; B -113 -15 713 616 ; +C 191 ; WX 600 ; N questiondown ; B 99 -146 502 449 ; +C 193 ; WX 600 ; N grave ; B 132 508 395 661 ; +C 194 ; WX 600 ; N acute ; B 205 508 468 661 ; +C 195 ; WX 600 ; N circumflex ; B 103 483 497 657 ; +C 196 ; WX 600 ; N tilde ; B 89 493 512 636 ; +C 197 ; WX 600 ; N macron ; B 88 505 512 585 ; +C 198 ; WX 600 ; N breve ; B 83 468 517 631 ; +C 199 ; WX 600 ; N dotaccent ; B 230 498 370 638 ; +C 200 ; WX 600 ; N dieresis ; B 128 498 472 638 ; +C 202 ; WX 600 ; N ring ; B 198 481 402 678 ; +C 203 ; WX 600 ; N cedilla ; B 205 -206 387 0 ; +C 205 ; WX 600 ; N hungarumlaut ; B 68 488 588 661 ; +C 206 ; WX 600 ; N ogonek ; B 169 -199 400 0 ; +C 207 ; WX 600 ; N caron ; B 103 493 497 667 ; +C 208 ; WX 600 ; N emdash ; B -10 203 610 313 ; +C 225 ; WX 600 ; N AE ; B -29 0 602 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 147 196 453 580 ; +C 232 ; WX 600 ; N Lslash ; B 39 0 578 562 ; +C 233 ; WX 600 ; N Oslash ; B 22 -22 578 584 ; +C 234 ; WX 600 ; N OE ; B -25 0 595 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 147 196 453 580 ; +C 241 ; WX 600 ; N ae ; B -4 -15 601 454 ; +C 245 ; WX 600 ; N dotlessi ; B 77 0 523 439 ; +C 248 ; WX 600 ; N lslash ; B 77 0 523 626 ; +C 249 ; WX 600 ; N oslash ; B 30 -24 570 463 ; +C 250 ; WX 600 ; N oe ; B -18 -15 611 454 ; +C 251 ; WX 600 ; N germandbls ; B 22 -15 596 626 ; +C -1 ; WX 600 ; N Idieresis ; B 77 0 523 761 ; +C -1 ; WX 600 ; N eacute ; B 40 -15 563 661 ; +C -1 ; WX 600 ; N abreve ; B 35 -15 570 661 ; +C -1 ; WX 600 ; N uhungarumlaut ; B -1 -15 628 661 ; +C -1 ; WX 600 ; N ecaron ; B 40 -15 563 667 ; +C -1 ; WX 600 ; N Ydieresis ; B 12 0 589 761 ; +C -1 ; WX 600 ; N divide ; B 71 16 529 500 ; +C -1 ; WX 600 ; N Yacute ; B 12 0 589 784 ; +C -1 ; WX 600 ; N Acircumflex ; B -9 0 609 780 ; +C -1 ; WX 600 ; N aacute ; B 35 -15 570 661 ; +C -1 ; WX 600 ; N Ucircumflex ; B 4 -18 596 780 ; +C -1 ; WX 600 ; N yacute ; B -4 -142 601 661 ; +C -1 ; WX 600 ; N scommaaccent ; B 68 -250 535 459 ; +C -1 ; WX 600 ; N ecircumflex ; B 40 -15 563 657 ; +C -1 ; WX 600 ; N Uring ; B 4 -18 596 801 ; +C -1 ; WX 600 ; N Udieresis ; B 4 -18 596 761 ; +C -1 ; WX 600 ; N aogonek ; B 35 -199 586 454 ; +C -1 ; WX 600 ; N Uacute ; B 4 -18 596 784 ; +C -1 ; WX 600 ; N uogonek ; B -1 -199 585 439 ; +C -1 ; WX 600 ; N Edieresis ; B 25 0 560 761 ; +C -1 ; WX 600 ; N Dcroat ; B 30 0 594 562 ; +C -1 ; WX 600 ; N commaaccent ; B 205 -250 397 -57 ; +C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Emacron ; B 25 0 560 708 ; +C -1 ; WX 600 ; N ccaron ; B 40 -15 545 667 ; +C -1 ; WX 600 ; N aring ; B 35 -15 570 678 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 8 -250 610 562 ; +C -1 ; WX 600 ; N lacute ; B 77 0 523 801 ; +C -1 ; WX 600 ; N agrave ; B 35 -15 570 661 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 21 -250 579 562 ; +C -1 ; WX 600 ; N Cacute ; B 22 -18 560 784 ; +C -1 ; WX 600 ; N atilde ; B 35 -15 570 636 ; +C -1 ; WX 600 ; N Edotaccent ; B 25 0 560 761 ; +C -1 ; WX 600 ; N scaron ; B 68 -17 535 667 ; +C -1 ; WX 600 ; N scedilla ; B 68 -206 535 459 ; +C -1 ; WX 600 ; N iacute ; B 77 0 523 661 ; +C -1 ; WX 600 ; N lozenge ; B 66 0 534 740 ; +C -1 ; WX 600 ; N Rcaron ; B 24 0 599 790 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 22 -250 594 580 ; +C -1 ; WX 600 ; N ucircumflex ; B -1 -15 569 657 ; +C -1 ; WX 600 ; N acircumflex ; B 35 -15 570 657 ; +C -1 ; WX 600 ; N Amacron ; B -9 0 609 708 ; +C -1 ; WX 600 ; N rcaron ; B 47 0 580 667 ; +C -1 ; WX 600 ; N ccedilla ; B 40 -206 545 459 ; +C -1 ; WX 600 ; N Zdotaccent ; B 62 0 539 761 ; +C -1 ; WX 600 ; N Thorn ; B 48 0 557 562 ; +C -1 ; WX 600 ; N Omacron ; B 22 -18 578 708 ; +C -1 ; WX 600 ; N Racute ; B 24 0 599 784 ; +C -1 ; WX 600 ; N Sacute ; B 47 -22 553 784 ; +C -1 ; WX 600 ; N dcaron ; B 20 -15 727 626 ; +C -1 ; WX 600 ; N Umacron ; B 4 -18 596 708 ; +C -1 ; WX 600 ; N uring ; B -1 -15 569 678 ; +C -1 ; WX 600 ; N threesuperior ; B 138 222 433 616 ; +C -1 ; WX 600 ; N Ograve ; B 22 -18 578 784 ; +C -1 ; WX 600 ; N Agrave ; B -9 0 609 784 ; +C -1 ; WX 600 ; N Abreve ; B -9 0 609 784 ; +C -1 ; WX 600 ; N multiply ; B 81 39 520 478 ; +C -1 ; WX 600 ; N uacute ; B -1 -15 569 661 ; +C -1 ; WX 600 ; N Tcaron ; B 21 0 579 790 ; +C -1 ; WX 600 ; N partialdiff ; B 63 -38 537 728 ; +C -1 ; WX 600 ; N ydieresis ; B -4 -142 601 638 ; +C -1 ; WX 600 ; N Nacute ; B 8 -12 610 784 ; +C -1 ; WX 600 ; N icircumflex ; B 73 0 523 657 ; +C -1 ; WX 600 ; N Ecircumflex ; B 25 0 560 780 ; +C -1 ; WX 600 ; N adieresis ; B 35 -15 570 638 ; +C -1 ; WX 600 ; N edieresis ; B 40 -15 563 638 ; +C -1 ; WX 600 ; N cacute ; B 40 -15 545 661 ; +C -1 ; WX 600 ; N nacute ; B 18 0 592 661 ; +C -1 ; WX 600 ; N umacron ; B -1 -15 569 585 ; +C -1 ; WX 600 ; N Ncaron ; B 8 -12 610 790 ; +C -1 ; WX 600 ; N Iacute ; B 77 0 523 784 ; +C -1 ; WX 600 ; N plusminus ; B 71 24 529 515 ; +C -1 ; WX 600 ; N brokenbar ; B 255 -175 345 675 ; +C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Gbreve ; B 22 -18 594 784 ; +C -1 ; WX 600 ; N Idotaccent ; B 77 0 523 761 ; +C -1 ; WX 600 ; N summation ; B 15 -10 586 706 ; +C -1 ; WX 600 ; N Egrave ; B 25 0 560 784 ; +C -1 ; WX 600 ; N racute ; B 47 0 580 661 ; +C -1 ; WX 600 ; N omacron ; B 30 -15 570 585 ; +C -1 ; WX 600 ; N Zacute ; B 62 0 539 784 ; +C -1 ; WX 600 ; N Zcaron ; B 62 0 539 790 ; +C -1 ; WX 600 ; N greaterequal ; B 26 0 523 696 ; +C -1 ; WX 600 ; N Eth ; B 30 0 594 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 22 -206 560 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 77 -250 523 626 ; +C -1 ; WX 600 ; N tcaron ; B 47 -15 532 703 ; +C -1 ; WX 600 ; N eogonek ; B 40 -199 563 454 ; +C -1 ; WX 600 ; N Uogonek ; B 4 -199 596 562 ; +C -1 ; WX 600 ; N Aacute ; B -9 0 609 784 ; +C -1 ; WX 600 ; N Adieresis ; B -9 0 609 761 ; +C -1 ; WX 600 ; N egrave ; B 40 -15 563 661 ; +C -1 ; WX 600 ; N zacute ; B 81 0 520 661 ; +C -1 ; WX 600 ; N iogonek ; B 77 -199 523 658 ; +C -1 ; WX 600 ; N Oacute ; B 22 -18 578 784 ; +C -1 ; WX 600 ; N oacute ; B 30 -15 570 661 ; +C -1 ; WX 600 ; N amacron ; B 35 -15 570 585 ; +C -1 ; WX 600 ; N sacute ; B 68 -17 535 661 ; +C -1 ; WX 600 ; N idieresis ; B 77 0 523 618 ; +C -1 ; WX 600 ; N Ocircumflex ; B 22 -18 578 780 ; +C -1 ; WX 600 ; N Ugrave ; B 4 -18 596 784 ; +C -1 ; WX 600 ; N Delta ; B 6 0 594 688 ; +C -1 ; WX 600 ; N thorn ; B -14 -142 570 626 ; +C -1 ; WX 600 ; N twosuperior ; B 143 230 436 616 ; +C -1 ; WX 600 ; N Odieresis ; B 22 -18 578 761 ; +C -1 ; WX 600 ; N mu ; B -1 -142 569 439 ; +C -1 ; WX 600 ; N igrave ; B 77 0 523 661 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 30 -15 668 661 ; +C -1 ; WX 600 ; N Eogonek ; B 25 -199 576 562 ; +C -1 ; WX 600 ; N dcroat ; B 20 -15 591 626 ; +C -1 ; WX 600 ; N threequarters ; B -47 -60 648 661 ; +C -1 ; WX 600 ; N Scedilla ; B 47 -206 553 582 ; +C -1 ; WX 600 ; N lcaron ; B 77 0 597 626 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 21 -250 599 562 ; +C -1 ; WX 600 ; N Lacute ; B 39 0 578 784 ; +C -1 ; WX 600 ; N trademark ; B -9 230 749 562 ; +C -1 ; WX 600 ; N edotaccent ; B 40 -15 563 638 ; +C -1 ; WX 600 ; N Igrave ; B 77 0 523 784 ; +C -1 ; WX 600 ; N Imacron ; B 77 0 523 708 ; +C -1 ; WX 600 ; N Lcaron ; B 39 0 637 562 ; +C -1 ; WX 600 ; N onehalf ; B -47 -60 648 661 ; +C -1 ; WX 600 ; N lessequal ; B 26 0 523 696 ; +C -1 ; WX 600 ; N ocircumflex ; B 30 -15 570 657 ; +C -1 ; WX 600 ; N ntilde ; B 18 0 592 636 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 4 -18 638 784 ; +C -1 ; WX 600 ; N Eacute ; B 25 0 560 784 ; +C -1 ; WX 600 ; N emacron ; B 40 -15 563 585 ; +C -1 ; WX 600 ; N gbreve ; B 30 -146 580 661 ; +C -1 ; WX 600 ; N onequarter ; B -56 -60 656 661 ; +C -1 ; WX 600 ; N Scaron ; B 47 -22 553 790 ; +C -1 ; WX 600 ; N Scommaaccent ; B 47 -250 553 582 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 22 -18 628 784 ; +C -1 ; WX 600 ; N degree ; B 86 243 474 616 ; +C -1 ; WX 600 ; N ograve ; B 30 -15 570 661 ; +C -1 ; WX 600 ; N Ccaron ; B 22 -18 560 790 ; +C -1 ; WX 600 ; N ugrave ; B -1 -15 569 661 ; +C -1 ; WX 600 ; N radical ; B -19 -104 473 778 ; +C -1 ; WX 600 ; N Dcaron ; B 30 0 594 790 ; +C -1 ; WX 600 ; N rcommaaccent ; B 47 -250 580 454 ; +C -1 ; WX 600 ; N Ntilde ; B 8 -12 610 759 ; +C -1 ; WX 600 ; N otilde ; B 30 -15 570 636 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 24 -250 599 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 39 -250 578 562 ; +C -1 ; WX 600 ; N Atilde ; B -9 0 609 759 ; +C -1 ; WX 600 ; N Aogonek ; B -9 -199 625 562 ; +C -1 ; WX 600 ; N Aring ; B -9 0 609 801 ; +C -1 ; WX 600 ; N Otilde ; B 22 -18 578 759 ; +C -1 ; WX 600 ; N zdotaccent ; B 81 0 520 638 ; +C -1 ; WX 600 ; N Ecaron ; B 25 0 560 790 ; +C -1 ; WX 600 ; N Iogonek ; B 77 -199 523 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 20 -250 585 626 ; +C -1 ; WX 600 ; N minus ; B 71 203 529 313 ; +C -1 ; WX 600 ; N Icircumflex ; B 77 0 523 780 ; +C -1 ; WX 600 ; N ncaron ; B 18 0 592 667 ; +C -1 ; WX 600 ; N tcommaaccent ; B 47 -250 532 562 ; +C -1 ; WX 600 ; N logicalnot ; B 71 103 529 413 ; +C -1 ; WX 600 ; N odieresis ; B 30 -15 570 638 ; +C -1 ; WX 600 ; N udieresis ; B -1 -15 569 638 ; +C -1 ; WX 600 ; N notequal ; B 12 -47 537 563 ; +C -1 ; WX 600 ; N gcommaaccent ; B 30 -146 580 714 ; +C -1 ; WX 600 ; N eth ; B 58 -27 543 626 ; +C -1 ; WX 600 ; N zcaron ; B 81 0 520 667 ; +C -1 ; WX 600 ; N ncommaaccent ; B 18 -250 592 454 ; +C -1 ; WX 600 ; N onesuperior ; B 153 230 447 616 ; +C -1 ; WX 600 ; N imacron ; B 77 0 523 585 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Courier-BoldOblique.afm b/internal/pdf/model/fonts/afms/Courier-BoldOblique.afm new file mode 100644 index 0000000..9f365ee --- /dev/null +++ b/internal/pdf/model/fonts/afms/Courier-BoldOblique.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Mon Jun 23 16:28:46 1997 +Comment UniqueID 43049 +Comment VMusage 17529 79244 +FontName Courier-BoldOblique +FullName Courier Bold Oblique +FamilyName Courier +Weight Bold +ItalicAngle -12 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -57 -250 869 801 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 439 +Ascender 629 +Descender -157 +StdHW 84 +StdVW 106 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 215 -15 495 572 ; +C 34 ; WX 600 ; N quotedbl ; B 211 277 585 562 ; +C 35 ; WX 600 ; N numbersign ; B 88 -45 641 651 ; +C 36 ; WX 600 ; N dollar ; B 87 -126 630 666 ; +C 37 ; WX 600 ; N percent ; B 101 -15 625 616 ; +C 38 ; WX 600 ; N ampersand ; B 61 -15 595 543 ; +C 39 ; WX 600 ; N quoteright ; B 229 277 543 562 ; +C 40 ; WX 600 ; N parenleft ; B 265 -102 592 616 ; +C 41 ; WX 600 ; N parenright ; B 117 -102 444 616 ; +C 42 ; WX 600 ; N asterisk ; B 179 219 598 601 ; +C 43 ; WX 600 ; N plus ; B 114 39 596 478 ; +C 44 ; WX 600 ; N comma ; B 99 -111 430 174 ; +C 45 ; WX 600 ; N hyphen ; B 143 203 567 313 ; +C 46 ; WX 600 ; N period ; B 206 -15 427 171 ; +C 47 ; WX 600 ; N slash ; B 90 -77 626 626 ; +C 48 ; WX 600 ; N zero ; B 135 -15 593 616 ; +C 49 ; WX 600 ; N one ; B 93 0 562 616 ; +C 50 ; WX 600 ; N two ; B 61 0 594 616 ; +C 51 ; WX 600 ; N three ; B 71 -15 571 616 ; +C 52 ; WX 600 ; N four ; B 81 0 559 616 ; +C 53 ; WX 600 ; N five ; B 77 -15 621 601 ; +C 54 ; WX 600 ; N six ; B 135 -15 652 616 ; +C 55 ; WX 600 ; N seven ; B 147 0 622 601 ; +C 56 ; WX 600 ; N eight ; B 115 -15 604 616 ; +C 57 ; WX 600 ; N nine ; B 75 -15 592 616 ; +C 58 ; WX 600 ; N colon ; B 205 -15 480 425 ; +C 59 ; WX 600 ; N semicolon ; B 99 -111 481 425 ; +C 60 ; WX 600 ; N less ; B 120 15 613 501 ; +C 61 ; WX 600 ; N equal ; B 96 118 614 398 ; +C 62 ; WX 600 ; N greater ; B 97 15 589 501 ; +C 63 ; WX 600 ; N question ; B 183 -14 592 580 ; +C 64 ; WX 600 ; N at ; B 65 -15 642 616 ; +C 65 ; WX 600 ; N A ; B -9 0 632 562 ; +C 66 ; WX 600 ; N B ; B 30 0 630 562 ; +C 67 ; WX 600 ; N C ; B 74 -18 675 580 ; +C 68 ; WX 600 ; N D ; B 30 0 664 562 ; +C 69 ; WX 600 ; N E ; B 25 0 670 562 ; +C 70 ; WX 600 ; N F ; B 39 0 684 562 ; +C 71 ; WX 600 ; N G ; B 74 -18 675 580 ; +C 72 ; WX 600 ; N H ; B 20 0 700 562 ; +C 73 ; WX 600 ; N I ; B 77 0 643 562 ; +C 74 ; WX 600 ; N J ; B 58 -18 721 562 ; +C 75 ; WX 600 ; N K ; B 21 0 692 562 ; +C 76 ; WX 600 ; N L ; B 39 0 636 562 ; +C 77 ; WX 600 ; N M ; B -2 0 722 562 ; +C 78 ; WX 600 ; N N ; B 8 -12 730 562 ; +C 79 ; WX 600 ; N O ; B 74 -18 645 580 ; +C 80 ; WX 600 ; N P ; B 48 0 643 562 ; +C 81 ; WX 600 ; N Q ; B 83 -138 636 580 ; +C 82 ; WX 600 ; N R ; B 24 0 617 562 ; +C 83 ; WX 600 ; N S ; B 54 -22 673 582 ; +C 84 ; WX 600 ; N T ; B 86 0 679 562 ; +C 85 ; WX 600 ; N U ; B 101 -18 716 562 ; +C 86 ; WX 600 ; N V ; B 84 0 733 562 ; +C 87 ; WX 600 ; N W ; B 79 0 738 562 ; +C 88 ; WX 600 ; N X ; B 12 0 690 562 ; +C 89 ; WX 600 ; N Y ; B 109 0 709 562 ; +C 90 ; WX 600 ; N Z ; B 62 0 637 562 ; +C 91 ; WX 600 ; N bracketleft ; B 223 -102 606 616 ; +C 92 ; WX 600 ; N backslash ; B 222 -77 496 626 ; +C 93 ; WX 600 ; N bracketright ; B 103 -102 486 616 ; +C 94 ; WX 600 ; N asciicircum ; B 171 250 556 616 ; +C 95 ; WX 600 ; N underscore ; B -27 -125 585 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 297 277 487 562 ; +C 97 ; WX 600 ; N a ; B 61 -15 593 454 ; +C 98 ; WX 600 ; N b ; B 13 -15 636 626 ; +C 99 ; WX 600 ; N c ; B 81 -15 631 459 ; +C 100 ; WX 600 ; N d ; B 60 -15 645 626 ; +C 101 ; WX 600 ; N e ; B 81 -15 605 454 ; +C 102 ; WX 600 ; N f ; B 83 0 677 626 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 40 -146 674 454 ; +C 104 ; WX 600 ; N h ; B 18 0 615 626 ; +C 105 ; WX 600 ; N i ; B 77 0 546 658 ; +C 106 ; WX 600 ; N j ; B 36 -146 580 658 ; +C 107 ; WX 600 ; N k ; B 33 0 643 626 ; +C 108 ; WX 600 ; N l ; B 77 0 546 626 ; +C 109 ; WX 600 ; N m ; B -22 0 649 454 ; +C 110 ; WX 600 ; N n ; B 18 0 615 454 ; +C 111 ; WX 600 ; N o ; B 71 -15 622 454 ; +C 112 ; WX 600 ; N p ; B -32 -142 622 454 ; +C 113 ; WX 600 ; N q ; B 60 -142 685 454 ; +C 114 ; WX 600 ; N r ; B 47 0 655 454 ; +C 115 ; WX 600 ; N s ; B 66 -17 608 459 ; +C 116 ; WX 600 ; N t ; B 118 -15 567 562 ; +C 117 ; WX 600 ; N u ; B 70 -15 592 439 ; +C 118 ; WX 600 ; N v ; B 70 0 695 439 ; +C 119 ; WX 600 ; N w ; B 53 0 712 439 ; +C 120 ; WX 600 ; N x ; B 6 0 671 439 ; +C 121 ; WX 600 ; N y ; B -21 -142 695 439 ; +C 122 ; WX 600 ; N z ; B 81 0 614 439 ; +C 123 ; WX 600 ; N braceleft ; B 203 -102 595 616 ; +C 124 ; WX 600 ; N bar ; B 201 -250 505 750 ; +C 125 ; WX 600 ; N braceright ; B 114 -102 506 616 ; +C 126 ; WX 600 ; N asciitilde ; B 120 153 590 356 ; +C 161 ; WX 600 ; N exclamdown ; B 196 -146 477 449 ; +C 162 ; WX 600 ; N cent ; B 121 -49 605 614 ; +C 163 ; WX 600 ; N sterling ; B 106 -28 650 611 ; +C 164 ; WX 600 ; N fraction ; B 22 -60 708 661 ; +C 165 ; WX 600 ; N yen ; B 98 0 710 562 ; +C 166 ; WX 600 ; N florin ; B -57 -131 702 616 ; +C 167 ; WX 600 ; N section ; B 74 -70 620 580 ; +C 168 ; WX 600 ; N currency ; B 77 49 644 517 ; +C 169 ; WX 600 ; N quotesingle ; B 303 277 493 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 190 277 594 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 62 70 639 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 195 70 545 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 165 70 514 446 ; +C 174 ; WX 600 ; N fi ; B 12 0 644 626 ; +C 175 ; WX 600 ; N fl ; B 12 0 644 626 ; +C 177 ; WX 600 ; N endash ; B 108 203 602 313 ; +C 178 ; WX 600 ; N dagger ; B 175 -70 586 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 121 -70 587 580 ; +C 180 ; WX 600 ; N periodcentered ; B 248 165 461 351 ; +C 182 ; WX 600 ; N paragraph ; B 61 -70 700 580 ; +C 183 ; WX 600 ; N bullet ; B 196 132 523 430 ; +C 184 ; WX 600 ; N quotesinglbase ; B 144 -142 458 143 ; +C 185 ; WX 600 ; N quotedblbase ; B 34 -142 560 143 ; +C 186 ; WX 600 ; N quotedblright ; B 119 277 645 562 ; +C 187 ; WX 600 ; N guillemotright ; B 71 70 647 446 ; +C 188 ; WX 600 ; N ellipsis ; B 35 -15 587 116 ; +C 189 ; WX 600 ; N perthousand ; B -45 -15 743 616 ; +C 191 ; WX 600 ; N questiondown ; B 100 -146 509 449 ; +C 193 ; WX 600 ; N grave ; B 272 508 503 661 ; +C 194 ; WX 600 ; N acute ; B 312 508 609 661 ; +C 195 ; WX 600 ; N circumflex ; B 212 483 607 657 ; +C 196 ; WX 600 ; N tilde ; B 199 493 643 636 ; +C 197 ; WX 600 ; N macron ; B 195 505 637 585 ; +C 198 ; WX 600 ; N breve ; B 217 468 652 631 ; +C 199 ; WX 600 ; N dotaccent ; B 348 498 493 638 ; +C 200 ; WX 600 ; N dieresis ; B 246 498 595 638 ; +C 202 ; WX 600 ; N ring ; B 319 481 528 678 ; +C 203 ; WX 600 ; N cedilla ; B 168 -206 368 0 ; +C 205 ; WX 600 ; N hungarumlaut ; B 171 488 729 661 ; +C 206 ; WX 600 ; N ogonek ; B 143 -199 367 0 ; +C 207 ; WX 600 ; N caron ; B 238 493 633 667 ; +C 208 ; WX 600 ; N emdash ; B 33 203 677 313 ; +C 225 ; WX 600 ; N AE ; B -29 0 708 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 188 196 526 580 ; +C 232 ; WX 600 ; N Lslash ; B 39 0 636 562 ; +C 233 ; WX 600 ; N Oslash ; B 48 -22 673 584 ; +C 234 ; WX 600 ; N OE ; B 26 0 701 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 188 196 543 580 ; +C 241 ; WX 600 ; N ae ; B 21 -15 652 454 ; +C 245 ; WX 600 ; N dotlessi ; B 77 0 546 439 ; +C 248 ; WX 600 ; N lslash ; B 77 0 587 626 ; +C 249 ; WX 600 ; N oslash ; B 54 -24 638 463 ; +C 250 ; WX 600 ; N oe ; B 18 -15 662 454 ; +C 251 ; WX 600 ; N germandbls ; B 22 -15 629 626 ; +C -1 ; WX 600 ; N Idieresis ; B 77 0 643 761 ; +C -1 ; WX 600 ; N eacute ; B 81 -15 609 661 ; +C -1 ; WX 600 ; N abreve ; B 61 -15 658 661 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 70 -15 769 661 ; +C -1 ; WX 600 ; N ecaron ; B 81 -15 633 667 ; +C -1 ; WX 600 ; N Ydieresis ; B 109 0 709 761 ; +C -1 ; WX 600 ; N divide ; B 114 16 596 500 ; +C -1 ; WX 600 ; N Yacute ; B 109 0 709 784 ; +C -1 ; WX 600 ; N Acircumflex ; B -9 0 632 780 ; +C -1 ; WX 600 ; N aacute ; B 61 -15 609 661 ; +C -1 ; WX 600 ; N Ucircumflex ; B 101 -18 716 780 ; +C -1 ; WX 600 ; N yacute ; B -21 -142 695 661 ; +C -1 ; WX 600 ; N scommaaccent ; B 66 -250 608 459 ; +C -1 ; WX 600 ; N ecircumflex ; B 81 -15 607 657 ; +C -1 ; WX 600 ; N Uring ; B 101 -18 716 801 ; +C -1 ; WX 600 ; N Udieresis ; B 101 -18 716 761 ; +C -1 ; WX 600 ; N aogonek ; B 61 -199 593 454 ; +C -1 ; WX 600 ; N Uacute ; B 101 -18 716 784 ; +C -1 ; WX 600 ; N uogonek ; B 70 -199 592 439 ; +C -1 ; WX 600 ; N Edieresis ; B 25 0 670 761 ; +C -1 ; WX 600 ; N Dcroat ; B 30 0 664 562 ; +C -1 ; WX 600 ; N commaaccent ; B 151 -250 385 -57 ; +C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Emacron ; B 25 0 670 708 ; +C -1 ; WX 600 ; N ccaron ; B 81 -15 633 667 ; +C -1 ; WX 600 ; N aring ; B 61 -15 593 678 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 8 -250 730 562 ; +C -1 ; WX 600 ; N lacute ; B 77 0 639 801 ; +C -1 ; WX 600 ; N agrave ; B 61 -15 593 661 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 86 -250 679 562 ; +C -1 ; WX 600 ; N Cacute ; B 74 -18 675 784 ; +C -1 ; WX 600 ; N atilde ; B 61 -15 643 636 ; +C -1 ; WX 600 ; N Edotaccent ; B 25 0 670 761 ; +C -1 ; WX 600 ; N scaron ; B 66 -17 633 667 ; +C -1 ; WX 600 ; N scedilla ; B 66 -206 608 459 ; +C -1 ; WX 600 ; N iacute ; B 77 0 609 661 ; +C -1 ; WX 600 ; N lozenge ; B 145 0 614 740 ; +C -1 ; WX 600 ; N Rcaron ; B 24 0 659 790 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 74 -250 675 580 ; +C -1 ; WX 600 ; N ucircumflex ; B 70 -15 597 657 ; +C -1 ; WX 600 ; N acircumflex ; B 61 -15 607 657 ; +C -1 ; WX 600 ; N Amacron ; B -9 0 633 708 ; +C -1 ; WX 600 ; N rcaron ; B 47 0 655 667 ; +C -1 ; WX 600 ; N ccedilla ; B 81 -206 631 459 ; +C -1 ; WX 600 ; N Zdotaccent ; B 62 0 637 761 ; +C -1 ; WX 600 ; N Thorn ; B 48 0 620 562 ; +C -1 ; WX 600 ; N Omacron ; B 74 -18 663 708 ; +C -1 ; WX 600 ; N Racute ; B 24 0 665 784 ; +C -1 ; WX 600 ; N Sacute ; B 54 -22 673 784 ; +C -1 ; WX 600 ; N dcaron ; B 60 -15 861 626 ; +C -1 ; WX 600 ; N Umacron ; B 101 -18 716 708 ; +C -1 ; WX 600 ; N uring ; B 70 -15 592 678 ; +C -1 ; WX 600 ; N threesuperior ; B 193 222 526 616 ; +C -1 ; WX 600 ; N Ograve ; B 74 -18 645 784 ; +C -1 ; WX 600 ; N Agrave ; B -9 0 632 784 ; +C -1 ; WX 600 ; N Abreve ; B -9 0 684 784 ; +C -1 ; WX 600 ; N multiply ; B 104 39 606 478 ; +C -1 ; WX 600 ; N uacute ; B 70 -15 599 661 ; +C -1 ; WX 600 ; N Tcaron ; B 86 0 679 790 ; +C -1 ; WX 600 ; N partialdiff ; B 91 -38 627 728 ; +C -1 ; WX 600 ; N ydieresis ; B -21 -142 695 638 ; +C -1 ; WX 600 ; N Nacute ; B 8 -12 730 784 ; +C -1 ; WX 600 ; N icircumflex ; B 77 0 577 657 ; +C -1 ; WX 600 ; N Ecircumflex ; B 25 0 670 780 ; +C -1 ; WX 600 ; N adieresis ; B 61 -15 595 638 ; +C -1 ; WX 600 ; N edieresis ; B 81 -15 605 638 ; +C -1 ; WX 600 ; N cacute ; B 81 -15 649 661 ; +C -1 ; WX 600 ; N nacute ; B 18 0 639 661 ; +C -1 ; WX 600 ; N umacron ; B 70 -15 637 585 ; +C -1 ; WX 600 ; N Ncaron ; B 8 -12 730 790 ; +C -1 ; WX 600 ; N Iacute ; B 77 0 643 784 ; +C -1 ; WX 600 ; N plusminus ; B 76 24 614 515 ; +C -1 ; WX 600 ; N brokenbar ; B 217 -175 489 675 ; +C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Gbreve ; B 74 -18 684 784 ; +C -1 ; WX 600 ; N Idotaccent ; B 77 0 643 761 ; +C -1 ; WX 600 ; N summation ; B 15 -10 672 706 ; +C -1 ; WX 600 ; N Egrave ; B 25 0 670 784 ; +C -1 ; WX 600 ; N racute ; B 47 0 655 661 ; +C -1 ; WX 600 ; N omacron ; B 71 -15 637 585 ; +C -1 ; WX 600 ; N Zacute ; B 62 0 665 784 ; +C -1 ; WX 600 ; N Zcaron ; B 62 0 659 790 ; +C -1 ; WX 600 ; N greaterequal ; B 26 0 627 696 ; +C -1 ; WX 600 ; N Eth ; B 30 0 664 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 74 -206 675 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 77 -250 546 626 ; +C -1 ; WX 600 ; N tcaron ; B 118 -15 627 703 ; +C -1 ; WX 600 ; N eogonek ; B 81 -199 605 454 ; +C -1 ; WX 600 ; N Uogonek ; B 101 -199 716 562 ; +C -1 ; WX 600 ; N Aacute ; B -9 0 655 784 ; +C -1 ; WX 600 ; N Adieresis ; B -9 0 632 761 ; +C -1 ; WX 600 ; N egrave ; B 81 -15 605 661 ; +C -1 ; WX 600 ; N zacute ; B 81 0 614 661 ; +C -1 ; WX 600 ; N iogonek ; B 77 -199 546 658 ; +C -1 ; WX 600 ; N Oacute ; B 74 -18 645 784 ; +C -1 ; WX 600 ; N oacute ; B 71 -15 649 661 ; +C -1 ; WX 600 ; N amacron ; B 61 -15 637 585 ; +C -1 ; WX 600 ; N sacute ; B 66 -17 609 661 ; +C -1 ; WX 600 ; N idieresis ; B 77 0 561 618 ; +C -1 ; WX 600 ; N Ocircumflex ; B 74 -18 645 780 ; +C -1 ; WX 600 ; N Ugrave ; B 101 -18 716 784 ; +C -1 ; WX 600 ; N Delta ; B 6 0 594 688 ; +C -1 ; WX 600 ; N thorn ; B -32 -142 622 626 ; +C -1 ; WX 600 ; N twosuperior ; B 191 230 542 616 ; +C -1 ; WX 600 ; N Odieresis ; B 74 -18 645 761 ; +C -1 ; WX 600 ; N mu ; B 49 -142 592 439 ; +C -1 ; WX 600 ; N igrave ; B 77 0 546 661 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 71 -15 809 661 ; +C -1 ; WX 600 ; N Eogonek ; B 25 -199 670 562 ; +C -1 ; WX 600 ; N dcroat ; B 60 -15 712 626 ; +C -1 ; WX 600 ; N threequarters ; B 8 -60 699 661 ; +C -1 ; WX 600 ; N Scedilla ; B 54 -206 673 582 ; +C -1 ; WX 600 ; N lcaron ; B 77 0 731 626 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 21 -250 692 562 ; +C -1 ; WX 600 ; N Lacute ; B 39 0 636 784 ; +C -1 ; WX 600 ; N trademark ; B 86 230 869 562 ; +C -1 ; WX 600 ; N edotaccent ; B 81 -15 605 638 ; +C -1 ; WX 600 ; N Igrave ; B 77 0 643 784 ; +C -1 ; WX 600 ; N Imacron ; B 77 0 663 708 ; +C -1 ; WX 600 ; N Lcaron ; B 39 0 757 562 ; +C -1 ; WX 600 ; N onehalf ; B 22 -60 716 661 ; +C -1 ; WX 600 ; N lessequal ; B 26 0 671 696 ; +C -1 ; WX 600 ; N ocircumflex ; B 71 -15 622 657 ; +C -1 ; WX 600 ; N ntilde ; B 18 0 643 636 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 101 -18 805 784 ; +C -1 ; WX 600 ; N Eacute ; B 25 0 670 784 ; +C -1 ; WX 600 ; N emacron ; B 81 -15 637 585 ; +C -1 ; WX 600 ; N gbreve ; B 40 -146 674 661 ; +C -1 ; WX 600 ; N onequarter ; B 13 -60 707 661 ; +C -1 ; WX 600 ; N Scaron ; B 54 -22 689 790 ; +C -1 ; WX 600 ; N Scommaaccent ; B 54 -250 673 582 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 74 -18 795 784 ; +C -1 ; WX 600 ; N degree ; B 173 243 570 616 ; +C -1 ; WX 600 ; N ograve ; B 71 -15 622 661 ; +C -1 ; WX 600 ; N Ccaron ; B 74 -18 689 790 ; +C -1 ; WX 600 ; N ugrave ; B 70 -15 592 661 ; +C -1 ; WX 600 ; N radical ; B 67 -104 635 778 ; +C -1 ; WX 600 ; N Dcaron ; B 30 0 664 790 ; +C -1 ; WX 600 ; N rcommaaccent ; B 47 -250 655 454 ; +C -1 ; WX 600 ; N Ntilde ; B 8 -12 730 759 ; +C -1 ; WX 600 ; N otilde ; B 71 -15 643 636 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 24 -250 617 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 39 -250 636 562 ; +C -1 ; WX 600 ; N Atilde ; B -9 0 669 759 ; +C -1 ; WX 600 ; N Aogonek ; B -9 -199 632 562 ; +C -1 ; WX 600 ; N Aring ; B -9 0 632 801 ; +C -1 ; WX 600 ; N Otilde ; B 74 -18 669 759 ; +C -1 ; WX 600 ; N zdotaccent ; B 81 0 614 638 ; +C -1 ; WX 600 ; N Ecaron ; B 25 0 670 790 ; +C -1 ; WX 600 ; N Iogonek ; B 77 -199 643 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 33 -250 643 626 ; +C -1 ; WX 600 ; N minus ; B 114 203 596 313 ; +C -1 ; WX 600 ; N Icircumflex ; B 77 0 643 780 ; +C -1 ; WX 600 ; N ncaron ; B 18 0 633 667 ; +C -1 ; WX 600 ; N tcommaaccent ; B 118 -250 567 562 ; +C -1 ; WX 600 ; N logicalnot ; B 135 103 617 413 ; +C -1 ; WX 600 ; N odieresis ; B 71 -15 622 638 ; +C -1 ; WX 600 ; N udieresis ; B 70 -15 595 638 ; +C -1 ; WX 600 ; N notequal ; B 30 -47 626 563 ; +C -1 ; WX 600 ; N gcommaaccent ; B 40 -146 674 714 ; +C -1 ; WX 600 ; N eth ; B 93 -27 661 626 ; +C -1 ; WX 600 ; N zcaron ; B 81 0 643 667 ; +C -1 ; WX 600 ; N ncommaaccent ; B 18 -250 615 454 ; +C -1 ; WX 600 ; N onesuperior ; B 212 230 514 616 ; +C -1 ; WX 600 ; N imacron ; B 77 0 575 585 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Courier-Oblique.afm b/internal/pdf/model/fonts/afms/Courier-Oblique.afm new file mode 100644 index 0000000..acacb3d --- /dev/null +++ b/internal/pdf/model/fonts/afms/Courier-Oblique.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 17:37:52 1997 +Comment UniqueID 43051 +Comment VMusage 16248 75829 +FontName Courier-Oblique +FullName Courier Oblique +FamilyName Courier +Weight Medium +ItalicAngle -12 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -27 -250 849 805 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 426 +Ascender 629 +Descender -157 +StdHW 51 +StdVW 51 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 243 -15 464 572 ; +C 34 ; WX 600 ; N quotedbl ; B 273 328 532 562 ; +C 35 ; WX 600 ; N numbersign ; B 133 -32 596 639 ; +C 36 ; WX 600 ; N dollar ; B 108 -126 596 662 ; +C 37 ; WX 600 ; N percent ; B 134 -15 599 622 ; +C 38 ; WX 600 ; N ampersand ; B 87 -15 580 543 ; +C 39 ; WX 600 ; N quoteright ; B 283 328 495 562 ; +C 40 ; WX 600 ; N parenleft ; B 313 -108 572 622 ; +C 41 ; WX 600 ; N parenright ; B 137 -108 396 622 ; +C 42 ; WX 600 ; N asterisk ; B 212 257 580 607 ; +C 43 ; WX 600 ; N plus ; B 129 44 580 470 ; +C 44 ; WX 600 ; N comma ; B 157 -112 370 122 ; +C 45 ; WX 600 ; N hyphen ; B 152 231 558 285 ; +C 46 ; WX 600 ; N period ; B 238 -15 382 109 ; +C 47 ; WX 600 ; N slash ; B 112 -80 604 629 ; +C 48 ; WX 600 ; N zero ; B 154 -15 575 622 ; +C 49 ; WX 600 ; N one ; B 98 0 515 622 ; +C 50 ; WX 600 ; N two ; B 70 0 568 622 ; +C 51 ; WX 600 ; N three ; B 82 -15 538 622 ; +C 52 ; WX 600 ; N four ; B 108 0 541 622 ; +C 53 ; WX 600 ; N five ; B 99 -15 589 607 ; +C 54 ; WX 600 ; N six ; B 155 -15 629 622 ; +C 55 ; WX 600 ; N seven ; B 182 0 612 607 ; +C 56 ; WX 600 ; N eight ; B 132 -15 588 622 ; +C 57 ; WX 600 ; N nine ; B 93 -15 574 622 ; +C 58 ; WX 600 ; N colon ; B 238 -15 441 385 ; +C 59 ; WX 600 ; N semicolon ; B 157 -112 441 385 ; +C 60 ; WX 600 ; N less ; B 96 42 610 472 ; +C 61 ; WX 600 ; N equal ; B 109 138 600 376 ; +C 62 ; WX 600 ; N greater ; B 85 42 599 472 ; +C 63 ; WX 600 ; N question ; B 222 -15 583 572 ; +C 64 ; WX 600 ; N at ; B 127 -15 582 622 ; +C 65 ; WX 600 ; N A ; B 3 0 607 562 ; +C 66 ; WX 600 ; N B ; B 43 0 616 562 ; +C 67 ; WX 600 ; N C ; B 93 -18 655 580 ; +C 68 ; WX 600 ; N D ; B 43 0 645 562 ; +C 69 ; WX 600 ; N E ; B 53 0 660 562 ; +C 70 ; WX 600 ; N F ; B 53 0 660 562 ; +C 71 ; WX 600 ; N G ; B 83 -18 645 580 ; +C 72 ; WX 600 ; N H ; B 32 0 687 562 ; +C 73 ; WX 600 ; N I ; B 96 0 623 562 ; +C 74 ; WX 600 ; N J ; B 52 -18 685 562 ; +C 75 ; WX 600 ; N K ; B 38 0 671 562 ; +C 76 ; WX 600 ; N L ; B 47 0 607 562 ; +C 77 ; WX 600 ; N M ; B 4 0 715 562 ; +C 78 ; WX 600 ; N N ; B 7 -13 712 562 ; +C 79 ; WX 600 ; N O ; B 94 -18 625 580 ; +C 80 ; WX 600 ; N P ; B 79 0 644 562 ; +C 81 ; WX 600 ; N Q ; B 95 -138 625 580 ; +C 82 ; WX 600 ; N R ; B 38 0 598 562 ; +C 83 ; WX 600 ; N S ; B 76 -20 650 580 ; +C 84 ; WX 600 ; N T ; B 108 0 665 562 ; +C 85 ; WX 600 ; N U ; B 125 -18 702 562 ; +C 86 ; WX 600 ; N V ; B 105 -13 723 562 ; +C 87 ; WX 600 ; N W ; B 106 -13 722 562 ; +C 88 ; WX 600 ; N X ; B 23 0 675 562 ; +C 89 ; WX 600 ; N Y ; B 133 0 695 562 ; +C 90 ; WX 600 ; N Z ; B 86 0 610 562 ; +C 91 ; WX 600 ; N bracketleft ; B 246 -108 574 622 ; +C 92 ; WX 600 ; N backslash ; B 249 -80 468 629 ; +C 93 ; WX 600 ; N bracketright ; B 135 -108 463 622 ; +C 94 ; WX 600 ; N asciicircum ; B 175 354 587 622 ; +C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 343 328 457 562 ; +C 97 ; WX 600 ; N a ; B 76 -15 569 441 ; +C 98 ; WX 600 ; N b ; B 29 -15 625 629 ; +C 99 ; WX 600 ; N c ; B 106 -15 608 441 ; +C 100 ; WX 600 ; N d ; B 85 -15 640 629 ; +C 101 ; WX 600 ; N e ; B 106 -15 598 441 ; +C 102 ; WX 600 ; N f ; B 114 0 662 629 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 61 -157 657 441 ; +C 104 ; WX 600 ; N h ; B 33 0 592 629 ; +C 105 ; WX 600 ; N i ; B 95 0 515 657 ; +C 106 ; WX 600 ; N j ; B 52 -157 550 657 ; +C 107 ; WX 600 ; N k ; B 58 0 633 629 ; +C 108 ; WX 600 ; N l ; B 95 0 515 629 ; +C 109 ; WX 600 ; N m ; B -5 0 615 441 ; +C 110 ; WX 600 ; N n ; B 26 0 585 441 ; +C 111 ; WX 600 ; N o ; B 102 -15 588 441 ; +C 112 ; WX 600 ; N p ; B -24 -157 605 441 ; +C 113 ; WX 600 ; N q ; B 85 -157 682 441 ; +C 114 ; WX 600 ; N r ; B 60 0 636 441 ; +C 115 ; WX 600 ; N s ; B 78 -15 584 441 ; +C 116 ; WX 600 ; N t ; B 167 -15 561 561 ; +C 117 ; WX 600 ; N u ; B 101 -15 572 426 ; +C 118 ; WX 600 ; N v ; B 90 -10 681 426 ; +C 119 ; WX 600 ; N w ; B 76 -10 695 426 ; +C 120 ; WX 600 ; N x ; B 20 0 655 426 ; +C 121 ; WX 600 ; N y ; B -4 -157 683 426 ; +C 122 ; WX 600 ; N z ; B 99 0 593 426 ; +C 123 ; WX 600 ; N braceleft ; B 233 -108 569 622 ; +C 124 ; WX 600 ; N bar ; B 222 -250 485 750 ; +C 125 ; WX 600 ; N braceright ; B 140 -108 477 622 ; +C 126 ; WX 600 ; N asciitilde ; B 116 197 600 320 ; +C 161 ; WX 600 ; N exclamdown ; B 225 -157 445 430 ; +C 162 ; WX 600 ; N cent ; B 151 -49 588 614 ; +C 163 ; WX 600 ; N sterling ; B 124 -21 621 611 ; +C 164 ; WX 600 ; N fraction ; B 84 -57 646 665 ; +C 165 ; WX 600 ; N yen ; B 120 0 693 562 ; +C 166 ; WX 600 ; N florin ; B -26 -143 671 622 ; +C 167 ; WX 600 ; N section ; B 104 -78 590 580 ; +C 168 ; WX 600 ; N currency ; B 94 58 628 506 ; +C 169 ; WX 600 ; N quotesingle ; B 345 328 460 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 262 328 541 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 92 70 652 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 204 70 540 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 170 70 506 446 ; +C 174 ; WX 600 ; N fi ; B 3 0 619 629 ; +C 175 ; WX 600 ; N fl ; B 3 0 619 629 ; +C 177 ; WX 600 ; N endash ; B 124 231 586 285 ; +C 178 ; WX 600 ; N dagger ; B 217 -78 546 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 163 -78 546 580 ; +C 180 ; WX 600 ; N periodcentered ; B 275 189 434 327 ; +C 182 ; WX 600 ; N paragraph ; B 100 -78 630 562 ; +C 183 ; WX 600 ; N bullet ; B 224 130 485 383 ; +C 184 ; WX 600 ; N quotesinglbase ; B 185 -134 397 100 ; +C 185 ; WX 600 ; N quotedblbase ; B 115 -134 478 100 ; +C 186 ; WX 600 ; N quotedblright ; B 213 328 576 562 ; +C 187 ; WX 600 ; N guillemotright ; B 58 70 618 446 ; +C 188 ; WX 600 ; N ellipsis ; B 46 -15 575 111 ; +C 189 ; WX 600 ; N perthousand ; B 59 -15 627 622 ; +C 191 ; WX 600 ; N questiondown ; B 105 -157 466 430 ; +C 193 ; WX 600 ; N grave ; B 294 497 484 672 ; +C 194 ; WX 600 ; N acute ; B 348 497 612 672 ; +C 195 ; WX 600 ; N circumflex ; B 229 477 581 654 ; +C 196 ; WX 600 ; N tilde ; B 212 489 629 606 ; +C 197 ; WX 600 ; N macron ; B 232 525 600 565 ; +C 198 ; WX 600 ; N breve ; B 279 501 576 609 ; +C 199 ; WX 600 ; N dotaccent ; B 373 537 478 640 ; +C 200 ; WX 600 ; N dieresis ; B 272 537 579 640 ; +C 202 ; WX 600 ; N ring ; B 332 463 500 627 ; +C 203 ; WX 600 ; N cedilla ; B 197 -151 344 10 ; +C 205 ; WX 600 ; N hungarumlaut ; B 239 497 683 672 ; +C 206 ; WX 600 ; N ogonek ; B 189 -172 377 4 ; +C 207 ; WX 600 ; N caron ; B 262 492 614 669 ; +C 208 ; WX 600 ; N emdash ; B 49 231 661 285 ; +C 225 ; WX 600 ; N AE ; B 3 0 655 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 209 249 512 580 ; +C 232 ; WX 600 ; N Lslash ; B 47 0 607 562 ; +C 233 ; WX 600 ; N Oslash ; B 94 -80 625 629 ; +C 234 ; WX 600 ; N OE ; B 59 0 672 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 210 249 535 580 ; +C 241 ; WX 600 ; N ae ; B 41 -15 626 441 ; +C 245 ; WX 600 ; N dotlessi ; B 95 0 515 426 ; +C 248 ; WX 600 ; N lslash ; B 95 0 587 629 ; +C 249 ; WX 600 ; N oslash ; B 102 -80 588 506 ; +C 250 ; WX 600 ; N oe ; B 54 -15 615 441 ; +C 251 ; WX 600 ; N germandbls ; B 48 -15 617 629 ; +C -1 ; WX 600 ; N Idieresis ; B 96 0 623 753 ; +C -1 ; WX 600 ; N eacute ; B 106 -15 612 672 ; +C -1 ; WX 600 ; N abreve ; B 76 -15 576 609 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 101 -15 723 672 ; +C -1 ; WX 600 ; N ecaron ; B 106 -15 614 669 ; +C -1 ; WX 600 ; N Ydieresis ; B 133 0 695 753 ; +C -1 ; WX 600 ; N divide ; B 136 48 573 467 ; +C -1 ; WX 600 ; N Yacute ; B 133 0 695 805 ; +C -1 ; WX 600 ; N Acircumflex ; B 3 0 607 787 ; +C -1 ; WX 600 ; N aacute ; B 76 -15 612 672 ; +C -1 ; WX 600 ; N Ucircumflex ; B 125 -18 702 787 ; +C -1 ; WX 600 ; N yacute ; B -4 -157 683 672 ; +C -1 ; WX 600 ; N scommaaccent ; B 78 -250 584 441 ; +C -1 ; WX 600 ; N ecircumflex ; B 106 -15 598 654 ; +C -1 ; WX 600 ; N Uring ; B 125 -18 702 760 ; +C -1 ; WX 600 ; N Udieresis ; B 125 -18 702 753 ; +C -1 ; WX 600 ; N aogonek ; B 76 -172 569 441 ; +C -1 ; WX 600 ; N Uacute ; B 125 -18 702 805 ; +C -1 ; WX 600 ; N uogonek ; B 101 -172 572 426 ; +C -1 ; WX 600 ; N Edieresis ; B 53 0 660 753 ; +C -1 ; WX 600 ; N Dcroat ; B 43 0 645 562 ; +C -1 ; WX 600 ; N commaaccent ; B 145 -250 323 -58 ; +C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Emacron ; B 53 0 660 698 ; +C -1 ; WX 600 ; N ccaron ; B 106 -15 614 669 ; +C -1 ; WX 600 ; N aring ; B 76 -15 569 627 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 7 -250 712 562 ; +C -1 ; WX 600 ; N lacute ; B 95 0 640 805 ; +C -1 ; WX 600 ; N agrave ; B 76 -15 569 672 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 108 -250 665 562 ; +C -1 ; WX 600 ; N Cacute ; B 93 -18 655 805 ; +C -1 ; WX 600 ; N atilde ; B 76 -15 629 606 ; +C -1 ; WX 600 ; N Edotaccent ; B 53 0 660 753 ; +C -1 ; WX 600 ; N scaron ; B 78 -15 614 669 ; +C -1 ; WX 600 ; N scedilla ; B 78 -151 584 441 ; +C -1 ; WX 600 ; N iacute ; B 95 0 612 672 ; +C -1 ; WX 600 ; N lozenge ; B 94 0 519 706 ; +C -1 ; WX 600 ; N Rcaron ; B 38 0 642 802 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 83 -250 645 580 ; +C -1 ; WX 600 ; N ucircumflex ; B 101 -15 572 654 ; +C -1 ; WX 600 ; N acircumflex ; B 76 -15 581 654 ; +C -1 ; WX 600 ; N Amacron ; B 3 0 607 698 ; +C -1 ; WX 600 ; N rcaron ; B 60 0 636 669 ; +C -1 ; WX 600 ; N ccedilla ; B 106 -151 614 441 ; +C -1 ; WX 600 ; N Zdotaccent ; B 86 0 610 753 ; +C -1 ; WX 600 ; N Thorn ; B 79 0 606 562 ; +C -1 ; WX 600 ; N Omacron ; B 94 -18 628 698 ; +C -1 ; WX 600 ; N Racute ; B 38 0 670 805 ; +C -1 ; WX 600 ; N Sacute ; B 76 -20 650 805 ; +C -1 ; WX 600 ; N dcaron ; B 85 -15 849 629 ; +C -1 ; WX 600 ; N Umacron ; B 125 -18 702 698 ; +C -1 ; WX 600 ; N uring ; B 101 -15 572 627 ; +C -1 ; WX 600 ; N threesuperior ; B 213 240 501 622 ; +C -1 ; WX 600 ; N Ograve ; B 94 -18 625 805 ; +C -1 ; WX 600 ; N Agrave ; B 3 0 607 805 ; +C -1 ; WX 600 ; N Abreve ; B 3 0 607 732 ; +C -1 ; WX 600 ; N multiply ; B 103 43 607 470 ; +C -1 ; WX 600 ; N uacute ; B 101 -15 602 672 ; +C -1 ; WX 600 ; N Tcaron ; B 108 0 665 802 ; +C -1 ; WX 600 ; N partialdiff ; B 45 -38 546 710 ; +C -1 ; WX 600 ; N ydieresis ; B -4 -157 683 620 ; +C -1 ; WX 600 ; N Nacute ; B 7 -13 712 805 ; +C -1 ; WX 600 ; N icircumflex ; B 95 0 551 654 ; +C -1 ; WX 600 ; N Ecircumflex ; B 53 0 660 787 ; +C -1 ; WX 600 ; N adieresis ; B 76 -15 575 620 ; +C -1 ; WX 600 ; N edieresis ; B 106 -15 598 620 ; +C -1 ; WX 600 ; N cacute ; B 106 -15 612 672 ; +C -1 ; WX 600 ; N nacute ; B 26 0 602 672 ; +C -1 ; WX 600 ; N umacron ; B 101 -15 600 565 ; +C -1 ; WX 600 ; N Ncaron ; B 7 -13 712 802 ; +C -1 ; WX 600 ; N Iacute ; B 96 0 640 805 ; +C -1 ; WX 600 ; N plusminus ; B 96 44 594 558 ; +C -1 ; WX 600 ; N brokenbar ; B 238 -175 469 675 ; +C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Gbreve ; B 83 -18 645 732 ; +C -1 ; WX 600 ; N Idotaccent ; B 96 0 623 753 ; +C -1 ; WX 600 ; N summation ; B 15 -10 670 706 ; +C -1 ; WX 600 ; N Egrave ; B 53 0 660 805 ; +C -1 ; WX 600 ; N racute ; B 60 0 636 672 ; +C -1 ; WX 600 ; N omacron ; B 102 -15 600 565 ; +C -1 ; WX 600 ; N Zacute ; B 86 0 670 805 ; +C -1 ; WX 600 ; N Zcaron ; B 86 0 642 802 ; +C -1 ; WX 600 ; N greaterequal ; B 98 0 594 710 ; +C -1 ; WX 600 ; N Eth ; B 43 0 645 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 93 -151 658 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 95 -250 515 629 ; +C -1 ; WX 600 ; N tcaron ; B 167 -15 587 717 ; +C -1 ; WX 600 ; N eogonek ; B 106 -172 598 441 ; +C -1 ; WX 600 ; N Uogonek ; B 124 -172 702 562 ; +C -1 ; WX 600 ; N Aacute ; B 3 0 660 805 ; +C -1 ; WX 600 ; N Adieresis ; B 3 0 607 753 ; +C -1 ; WX 600 ; N egrave ; B 106 -15 598 672 ; +C -1 ; WX 600 ; N zacute ; B 99 0 612 672 ; +C -1 ; WX 600 ; N iogonek ; B 95 -172 515 657 ; +C -1 ; WX 600 ; N Oacute ; B 94 -18 640 805 ; +C -1 ; WX 600 ; N oacute ; B 102 -15 612 672 ; +C -1 ; WX 600 ; N amacron ; B 76 -15 600 565 ; +C -1 ; WX 600 ; N sacute ; B 78 -15 612 672 ; +C -1 ; WX 600 ; N idieresis ; B 95 0 545 620 ; +C -1 ; WX 600 ; N Ocircumflex ; B 94 -18 625 787 ; +C -1 ; WX 600 ; N Ugrave ; B 125 -18 702 805 ; +C -1 ; WX 600 ; N Delta ; B 6 0 598 688 ; +C -1 ; WX 600 ; N thorn ; B -24 -157 605 629 ; +C -1 ; WX 600 ; N twosuperior ; B 230 249 535 622 ; +C -1 ; WX 600 ; N Odieresis ; B 94 -18 625 753 ; +C -1 ; WX 600 ; N mu ; B 72 -157 572 426 ; +C -1 ; WX 600 ; N igrave ; B 95 0 515 672 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 102 -15 723 672 ; +C -1 ; WX 600 ; N Eogonek ; B 53 -172 660 562 ; +C -1 ; WX 600 ; N dcroat ; B 85 -15 704 629 ; +C -1 ; WX 600 ; N threequarters ; B 73 -56 659 666 ; +C -1 ; WX 600 ; N Scedilla ; B 76 -151 650 580 ; +C -1 ; WX 600 ; N lcaron ; B 95 0 667 629 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 38 -250 671 562 ; +C -1 ; WX 600 ; N Lacute ; B 47 0 607 805 ; +C -1 ; WX 600 ; N trademark ; B 75 263 742 562 ; +C -1 ; WX 600 ; N edotaccent ; B 106 -15 598 620 ; +C -1 ; WX 600 ; N Igrave ; B 96 0 623 805 ; +C -1 ; WX 600 ; N Imacron ; B 96 0 628 698 ; +C -1 ; WX 600 ; N Lcaron ; B 47 0 632 562 ; +C -1 ; WX 600 ; N onehalf ; B 65 -57 669 665 ; +C -1 ; WX 600 ; N lessequal ; B 98 0 645 710 ; +C -1 ; WX 600 ; N ocircumflex ; B 102 -15 588 654 ; +C -1 ; WX 600 ; N ntilde ; B 26 0 629 606 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 125 -18 761 805 ; +C -1 ; WX 600 ; N Eacute ; B 53 0 670 805 ; +C -1 ; WX 600 ; N emacron ; B 106 -15 600 565 ; +C -1 ; WX 600 ; N gbreve ; B 61 -157 657 609 ; +C -1 ; WX 600 ; N onequarter ; B 65 -57 674 665 ; +C -1 ; WX 600 ; N Scaron ; B 76 -20 672 802 ; +C -1 ; WX 600 ; N Scommaaccent ; B 76 -250 650 580 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 94 -18 751 805 ; +C -1 ; WX 600 ; N degree ; B 214 269 576 622 ; +C -1 ; WX 600 ; N ograve ; B 102 -15 588 672 ; +C -1 ; WX 600 ; N Ccaron ; B 93 -18 672 802 ; +C -1 ; WX 600 ; N ugrave ; B 101 -15 572 672 ; +C -1 ; WX 600 ; N radical ; B 85 -15 765 792 ; +C -1 ; WX 600 ; N Dcaron ; B 43 0 645 802 ; +C -1 ; WX 600 ; N rcommaaccent ; B 60 -250 636 441 ; +C -1 ; WX 600 ; N Ntilde ; B 7 -13 712 729 ; +C -1 ; WX 600 ; N otilde ; B 102 -15 629 606 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 38 -250 598 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 47 -250 607 562 ; +C -1 ; WX 600 ; N Atilde ; B 3 0 655 729 ; +C -1 ; WX 600 ; N Aogonek ; B 3 -172 607 562 ; +C -1 ; WX 600 ; N Aring ; B 3 0 607 750 ; +C -1 ; WX 600 ; N Otilde ; B 94 -18 655 729 ; +C -1 ; WX 600 ; N zdotaccent ; B 99 0 593 620 ; +C -1 ; WX 600 ; N Ecaron ; B 53 0 660 802 ; +C -1 ; WX 600 ; N Iogonek ; B 96 -172 623 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 58 -250 633 629 ; +C -1 ; WX 600 ; N minus ; B 129 232 580 283 ; +C -1 ; WX 600 ; N Icircumflex ; B 96 0 623 787 ; +C -1 ; WX 600 ; N ncaron ; B 26 0 614 669 ; +C -1 ; WX 600 ; N tcommaaccent ; B 165 -250 561 561 ; +C -1 ; WX 600 ; N logicalnot ; B 155 108 591 369 ; +C -1 ; WX 600 ; N odieresis ; B 102 -15 588 620 ; +C -1 ; WX 600 ; N udieresis ; B 101 -15 575 620 ; +C -1 ; WX 600 ; N notequal ; B 43 -16 621 529 ; +C -1 ; WX 600 ; N gcommaaccent ; B 61 -157 657 708 ; +C -1 ; WX 600 ; N eth ; B 102 -15 639 629 ; +C -1 ; WX 600 ; N zcaron ; B 99 0 624 669 ; +C -1 ; WX 600 ; N ncommaaccent ; B 26 -250 585 441 ; +C -1 ; WX 600 ; N onesuperior ; B 231 249 491 622 ; +C -1 ; WX 600 ; N imacron ; B 95 0 543 565 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Courier.afm b/internal/pdf/model/fonts/afms/Courier.afm new file mode 100644 index 0000000..be84b6b --- /dev/null +++ b/internal/pdf/model/fonts/afms/Courier.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 17:27:09 1997 +Comment UniqueID 43050 +Comment VMusage 39754 50779 +FontName Courier +FullName Courier +FamilyName Courier +Weight Medium +ItalicAngle 0 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -23 -250 715 805 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 426 +Ascender 629 +Descender -157 +StdHW 51 +StdVW 51 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 236 -15 364 572 ; +C 34 ; WX 600 ; N quotedbl ; B 187 328 413 562 ; +C 35 ; WX 600 ; N numbersign ; B 93 -32 507 639 ; +C 36 ; WX 600 ; N dollar ; B 105 -126 496 662 ; +C 37 ; WX 600 ; N percent ; B 81 -15 518 622 ; +C 38 ; WX 600 ; N ampersand ; B 63 -15 538 543 ; +C 39 ; WX 600 ; N quoteright ; B 213 328 376 562 ; +C 40 ; WX 600 ; N parenleft ; B 269 -108 440 622 ; +C 41 ; WX 600 ; N parenright ; B 160 -108 331 622 ; +C 42 ; WX 600 ; N asterisk ; B 116 257 484 607 ; +C 43 ; WX 600 ; N plus ; B 80 44 520 470 ; +C 44 ; WX 600 ; N comma ; B 181 -112 344 122 ; +C 45 ; WX 600 ; N hyphen ; B 103 231 497 285 ; +C 46 ; WX 600 ; N period ; B 229 -15 371 109 ; +C 47 ; WX 600 ; N slash ; B 125 -80 475 629 ; +C 48 ; WX 600 ; N zero ; B 106 -15 494 622 ; +C 49 ; WX 600 ; N one ; B 96 0 505 622 ; +C 50 ; WX 600 ; N two ; B 70 0 471 622 ; +C 51 ; WX 600 ; N three ; B 75 -15 466 622 ; +C 52 ; WX 600 ; N four ; B 78 0 500 622 ; +C 53 ; WX 600 ; N five ; B 92 -15 497 607 ; +C 54 ; WX 600 ; N six ; B 111 -15 497 622 ; +C 55 ; WX 600 ; N seven ; B 82 0 483 607 ; +C 56 ; WX 600 ; N eight ; B 102 -15 498 622 ; +C 57 ; WX 600 ; N nine ; B 96 -15 489 622 ; +C 58 ; WX 600 ; N colon ; B 229 -15 371 385 ; +C 59 ; WX 600 ; N semicolon ; B 181 -112 371 385 ; +C 60 ; WX 600 ; N less ; B 41 42 519 472 ; +C 61 ; WX 600 ; N equal ; B 80 138 520 376 ; +C 62 ; WX 600 ; N greater ; B 66 42 544 472 ; +C 63 ; WX 600 ; N question ; B 129 -15 492 572 ; +C 64 ; WX 600 ; N at ; B 77 -15 533 622 ; +C 65 ; WX 600 ; N A ; B 3 0 597 562 ; +C 66 ; WX 600 ; N B ; B 43 0 559 562 ; +C 67 ; WX 600 ; N C ; B 41 -18 540 580 ; +C 68 ; WX 600 ; N D ; B 43 0 574 562 ; +C 69 ; WX 600 ; N E ; B 53 0 550 562 ; +C 70 ; WX 600 ; N F ; B 53 0 545 562 ; +C 71 ; WX 600 ; N G ; B 31 -18 575 580 ; +C 72 ; WX 600 ; N H ; B 32 0 568 562 ; +C 73 ; WX 600 ; N I ; B 96 0 504 562 ; +C 74 ; WX 600 ; N J ; B 34 -18 566 562 ; +C 75 ; WX 600 ; N K ; B 38 0 582 562 ; +C 76 ; WX 600 ; N L ; B 47 0 554 562 ; +C 77 ; WX 600 ; N M ; B 4 0 596 562 ; +C 78 ; WX 600 ; N N ; B 7 -13 593 562 ; +C 79 ; WX 600 ; N O ; B 43 -18 557 580 ; +C 80 ; WX 600 ; N P ; B 79 0 558 562 ; +C 81 ; WX 600 ; N Q ; B 43 -138 557 580 ; +C 82 ; WX 600 ; N R ; B 38 0 588 562 ; +C 83 ; WX 600 ; N S ; B 72 -20 529 580 ; +C 84 ; WX 600 ; N T ; B 38 0 563 562 ; +C 85 ; WX 600 ; N U ; B 17 -18 583 562 ; +C 86 ; WX 600 ; N V ; B -4 -13 604 562 ; +C 87 ; WX 600 ; N W ; B -3 -13 603 562 ; +C 88 ; WX 600 ; N X ; B 23 0 577 562 ; +C 89 ; WX 600 ; N Y ; B 24 0 576 562 ; +C 90 ; WX 600 ; N Z ; B 86 0 514 562 ; +C 91 ; WX 600 ; N bracketleft ; B 269 -108 442 622 ; +C 92 ; WX 600 ; N backslash ; B 118 -80 482 629 ; +C 93 ; WX 600 ; N bracketright ; B 158 -108 331 622 ; +C 94 ; WX 600 ; N asciicircum ; B 94 354 506 622 ; +C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 224 328 387 562 ; +C 97 ; WX 600 ; N a ; B 53 -15 559 441 ; +C 98 ; WX 600 ; N b ; B 14 -15 575 629 ; +C 99 ; WX 600 ; N c ; B 66 -15 529 441 ; +C 100 ; WX 600 ; N d ; B 45 -15 591 629 ; +C 101 ; WX 600 ; N e ; B 66 -15 548 441 ; +C 102 ; WX 600 ; N f ; B 114 0 531 629 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 45 -157 566 441 ; +C 104 ; WX 600 ; N h ; B 18 0 582 629 ; +C 105 ; WX 600 ; N i ; B 95 0 505 657 ; +C 106 ; WX 600 ; N j ; B 82 -157 410 657 ; +C 107 ; WX 600 ; N k ; B 43 0 580 629 ; +C 108 ; WX 600 ; N l ; B 95 0 505 629 ; +C 109 ; WX 600 ; N m ; B -5 0 605 441 ; +C 110 ; WX 600 ; N n ; B 26 0 575 441 ; +C 111 ; WX 600 ; N o ; B 62 -15 538 441 ; +C 112 ; WX 600 ; N p ; B 9 -157 555 441 ; +C 113 ; WX 600 ; N q ; B 45 -157 591 441 ; +C 114 ; WX 600 ; N r ; B 60 0 559 441 ; +C 115 ; WX 600 ; N s ; B 80 -15 513 441 ; +C 116 ; WX 600 ; N t ; B 87 -15 530 561 ; +C 117 ; WX 600 ; N u ; B 21 -15 562 426 ; +C 118 ; WX 600 ; N v ; B 10 -10 590 426 ; +C 119 ; WX 600 ; N w ; B -4 -10 604 426 ; +C 120 ; WX 600 ; N x ; B 20 0 580 426 ; +C 121 ; WX 600 ; N y ; B 7 -157 592 426 ; +C 122 ; WX 600 ; N z ; B 99 0 502 426 ; +C 123 ; WX 600 ; N braceleft ; B 182 -108 437 622 ; +C 124 ; WX 600 ; N bar ; B 275 -250 326 750 ; +C 125 ; WX 600 ; N braceright ; B 163 -108 418 622 ; +C 126 ; WX 600 ; N asciitilde ; B 63 197 540 320 ; +C 161 ; WX 600 ; N exclamdown ; B 236 -157 364 430 ; +C 162 ; WX 600 ; N cent ; B 96 -49 500 614 ; +C 163 ; WX 600 ; N sterling ; B 84 -21 521 611 ; +C 164 ; WX 600 ; N fraction ; B 92 -57 509 665 ; +C 165 ; WX 600 ; N yen ; B 26 0 574 562 ; +C 166 ; WX 600 ; N florin ; B 4 -143 539 622 ; +C 167 ; WX 600 ; N section ; B 113 -78 488 580 ; +C 168 ; WX 600 ; N currency ; B 73 58 527 506 ; +C 169 ; WX 600 ; N quotesingle ; B 259 328 341 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 143 328 471 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 37 70 563 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 149 70 451 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 149 70 451 446 ; +C 174 ; WX 600 ; N fi ; B 3 0 597 629 ; +C 175 ; WX 600 ; N fl ; B 3 0 597 629 ; +C 177 ; WX 600 ; N endash ; B 75 231 525 285 ; +C 178 ; WX 600 ; N dagger ; B 141 -78 459 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 141 -78 459 580 ; +C 180 ; WX 600 ; N periodcentered ; B 222 189 378 327 ; +C 182 ; WX 600 ; N paragraph ; B 50 -78 511 562 ; +C 183 ; WX 600 ; N bullet ; B 172 130 428 383 ; +C 184 ; WX 600 ; N quotesinglbase ; B 213 -134 376 100 ; +C 185 ; WX 600 ; N quotedblbase ; B 143 -134 457 100 ; +C 186 ; WX 600 ; N quotedblright ; B 143 328 457 562 ; +C 187 ; WX 600 ; N guillemotright ; B 37 70 563 446 ; +C 188 ; WX 600 ; N ellipsis ; B 37 -15 563 111 ; +C 189 ; WX 600 ; N perthousand ; B 3 -15 600 622 ; +C 191 ; WX 600 ; N questiondown ; B 108 -157 471 430 ; +C 193 ; WX 600 ; N grave ; B 151 497 378 672 ; +C 194 ; WX 600 ; N acute ; B 242 497 469 672 ; +C 195 ; WX 600 ; N circumflex ; B 124 477 476 654 ; +C 196 ; WX 600 ; N tilde ; B 105 489 503 606 ; +C 197 ; WX 600 ; N macron ; B 120 525 480 565 ; +C 198 ; WX 600 ; N breve ; B 153 501 447 609 ; +C 199 ; WX 600 ; N dotaccent ; B 249 537 352 640 ; +C 200 ; WX 600 ; N dieresis ; B 148 537 453 640 ; +C 202 ; WX 600 ; N ring ; B 218 463 382 627 ; +C 203 ; WX 600 ; N cedilla ; B 224 -151 362 10 ; +C 205 ; WX 600 ; N hungarumlaut ; B 133 497 540 672 ; +C 206 ; WX 600 ; N ogonek ; B 211 -172 407 4 ; +C 207 ; WX 600 ; N caron ; B 124 492 476 669 ; +C 208 ; WX 600 ; N emdash ; B 0 231 600 285 ; +C 225 ; WX 600 ; N AE ; B 3 0 550 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 156 249 442 580 ; +C 232 ; WX 600 ; N Lslash ; B 47 0 554 562 ; +C 233 ; WX 600 ; N Oslash ; B 43 -80 557 629 ; +C 234 ; WX 600 ; N OE ; B 7 0 567 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 157 249 443 580 ; +C 241 ; WX 600 ; N ae ; B 19 -15 570 441 ; +C 245 ; WX 600 ; N dotlessi ; B 95 0 505 426 ; +C 248 ; WX 600 ; N lslash ; B 95 0 505 629 ; +C 249 ; WX 600 ; N oslash ; B 62 -80 538 506 ; +C 250 ; WX 600 ; N oe ; B 19 -15 559 441 ; +C 251 ; WX 600 ; N germandbls ; B 48 -15 588 629 ; +C -1 ; WX 600 ; N Idieresis ; B 96 0 504 753 ; +C -1 ; WX 600 ; N eacute ; B 66 -15 548 672 ; +C -1 ; WX 600 ; N abreve ; B 53 -15 559 609 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 21 -15 580 672 ; +C -1 ; WX 600 ; N ecaron ; B 66 -15 548 669 ; +C -1 ; WX 600 ; N Ydieresis ; B 24 0 576 753 ; +C -1 ; WX 600 ; N divide ; B 87 48 513 467 ; +C -1 ; WX 600 ; N Yacute ; B 24 0 576 805 ; +C -1 ; WX 600 ; N Acircumflex ; B 3 0 597 787 ; +C -1 ; WX 600 ; N aacute ; B 53 -15 559 672 ; +C -1 ; WX 600 ; N Ucircumflex ; B 17 -18 583 787 ; +C -1 ; WX 600 ; N yacute ; B 7 -157 592 672 ; +C -1 ; WX 600 ; N scommaaccent ; B 80 -250 513 441 ; +C -1 ; WX 600 ; N ecircumflex ; B 66 -15 548 654 ; +C -1 ; WX 600 ; N Uring ; B 17 -18 583 760 ; +C -1 ; WX 600 ; N Udieresis ; B 17 -18 583 753 ; +C -1 ; WX 600 ; N aogonek ; B 53 -172 587 441 ; +C -1 ; WX 600 ; N Uacute ; B 17 -18 583 805 ; +C -1 ; WX 600 ; N uogonek ; B 21 -172 590 426 ; +C -1 ; WX 600 ; N Edieresis ; B 53 0 550 753 ; +C -1 ; WX 600 ; N Dcroat ; B 30 0 574 562 ; +C -1 ; WX 600 ; N commaaccent ; B 198 -250 335 -58 ; +C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Emacron ; B 53 0 550 698 ; +C -1 ; WX 600 ; N ccaron ; B 66 -15 529 669 ; +C -1 ; WX 600 ; N aring ; B 53 -15 559 627 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 7 -250 593 562 ; +C -1 ; WX 600 ; N lacute ; B 95 0 505 805 ; +C -1 ; WX 600 ; N agrave ; B 53 -15 559 672 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 38 -250 563 562 ; +C -1 ; WX 600 ; N Cacute ; B 41 -18 540 805 ; +C -1 ; WX 600 ; N atilde ; B 53 -15 559 606 ; +C -1 ; WX 600 ; N Edotaccent ; B 53 0 550 753 ; +C -1 ; WX 600 ; N scaron ; B 80 -15 513 669 ; +C -1 ; WX 600 ; N scedilla ; B 80 -151 513 441 ; +C -1 ; WX 600 ; N iacute ; B 95 0 505 672 ; +C -1 ; WX 600 ; N lozenge ; B 18 0 443 706 ; +C -1 ; WX 600 ; N Rcaron ; B 38 0 588 802 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 31 -250 575 580 ; +C -1 ; WX 600 ; N ucircumflex ; B 21 -15 562 654 ; +C -1 ; WX 600 ; N acircumflex ; B 53 -15 559 654 ; +C -1 ; WX 600 ; N Amacron ; B 3 0 597 698 ; +C -1 ; WX 600 ; N rcaron ; B 60 0 559 669 ; +C -1 ; WX 600 ; N ccedilla ; B 66 -151 529 441 ; +C -1 ; WX 600 ; N Zdotaccent ; B 86 0 514 753 ; +C -1 ; WX 600 ; N Thorn ; B 79 0 538 562 ; +C -1 ; WX 600 ; N Omacron ; B 43 -18 557 698 ; +C -1 ; WX 600 ; N Racute ; B 38 0 588 805 ; +C -1 ; WX 600 ; N Sacute ; B 72 -20 529 805 ; +C -1 ; WX 600 ; N dcaron ; B 45 -15 715 629 ; +C -1 ; WX 600 ; N Umacron ; B 17 -18 583 698 ; +C -1 ; WX 600 ; N uring ; B 21 -15 562 627 ; +C -1 ; WX 600 ; N threesuperior ; B 155 240 406 622 ; +C -1 ; WX 600 ; N Ograve ; B 43 -18 557 805 ; +C -1 ; WX 600 ; N Agrave ; B 3 0 597 805 ; +C -1 ; WX 600 ; N Abreve ; B 3 0 597 732 ; +C -1 ; WX 600 ; N multiply ; B 87 43 515 470 ; +C -1 ; WX 600 ; N uacute ; B 21 -15 562 672 ; +C -1 ; WX 600 ; N Tcaron ; B 38 0 563 802 ; +C -1 ; WX 600 ; N partialdiff ; B 17 -38 459 710 ; +C -1 ; WX 600 ; N ydieresis ; B 7 -157 592 620 ; +C -1 ; WX 600 ; N Nacute ; B 7 -13 593 805 ; +C -1 ; WX 600 ; N icircumflex ; B 94 0 505 654 ; +C -1 ; WX 600 ; N Ecircumflex ; B 53 0 550 787 ; +C -1 ; WX 600 ; N adieresis ; B 53 -15 559 620 ; +C -1 ; WX 600 ; N edieresis ; B 66 -15 548 620 ; +C -1 ; WX 600 ; N cacute ; B 66 -15 529 672 ; +C -1 ; WX 600 ; N nacute ; B 26 0 575 672 ; +C -1 ; WX 600 ; N umacron ; B 21 -15 562 565 ; +C -1 ; WX 600 ; N Ncaron ; B 7 -13 593 802 ; +C -1 ; WX 600 ; N Iacute ; B 96 0 504 805 ; +C -1 ; WX 600 ; N plusminus ; B 87 44 513 558 ; +C -1 ; WX 600 ; N brokenbar ; B 275 -175 326 675 ; +C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Gbreve ; B 31 -18 575 732 ; +C -1 ; WX 600 ; N Idotaccent ; B 96 0 504 753 ; +C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; +C -1 ; WX 600 ; N Egrave ; B 53 0 550 805 ; +C -1 ; WX 600 ; N racute ; B 60 0 559 672 ; +C -1 ; WX 600 ; N omacron ; B 62 -15 538 565 ; +C -1 ; WX 600 ; N Zacute ; B 86 0 514 805 ; +C -1 ; WX 600 ; N Zcaron ; B 86 0 514 802 ; +C -1 ; WX 600 ; N greaterequal ; B 98 0 502 710 ; +C -1 ; WX 600 ; N Eth ; B 30 0 574 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 41 -151 540 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 95 -250 505 629 ; +C -1 ; WX 600 ; N tcaron ; B 87 -15 530 717 ; +C -1 ; WX 600 ; N eogonek ; B 66 -172 548 441 ; +C -1 ; WX 600 ; N Uogonek ; B 17 -172 583 562 ; +C -1 ; WX 600 ; N Aacute ; B 3 0 597 805 ; +C -1 ; WX 600 ; N Adieresis ; B 3 0 597 753 ; +C -1 ; WX 600 ; N egrave ; B 66 -15 548 672 ; +C -1 ; WX 600 ; N zacute ; B 99 0 502 672 ; +C -1 ; WX 600 ; N iogonek ; B 95 -172 505 657 ; +C -1 ; WX 600 ; N Oacute ; B 43 -18 557 805 ; +C -1 ; WX 600 ; N oacute ; B 62 -15 538 672 ; +C -1 ; WX 600 ; N amacron ; B 53 -15 559 565 ; +C -1 ; WX 600 ; N sacute ; B 80 -15 513 672 ; +C -1 ; WX 600 ; N idieresis ; B 95 0 505 620 ; +C -1 ; WX 600 ; N Ocircumflex ; B 43 -18 557 787 ; +C -1 ; WX 600 ; N Ugrave ; B 17 -18 583 805 ; +C -1 ; WX 600 ; N Delta ; B 6 0 598 688 ; +C -1 ; WX 600 ; N thorn ; B -6 -157 555 629 ; +C -1 ; WX 600 ; N twosuperior ; B 177 249 424 622 ; +C -1 ; WX 600 ; N Odieresis ; B 43 -18 557 753 ; +C -1 ; WX 600 ; N mu ; B 21 -157 562 426 ; +C -1 ; WX 600 ; N igrave ; B 95 0 505 672 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 62 -15 580 672 ; +C -1 ; WX 600 ; N Eogonek ; B 53 -172 561 562 ; +C -1 ; WX 600 ; N dcroat ; B 45 -15 591 629 ; +C -1 ; WX 600 ; N threequarters ; B 8 -56 593 666 ; +C -1 ; WX 600 ; N Scedilla ; B 72 -151 529 580 ; +C -1 ; WX 600 ; N lcaron ; B 95 0 533 629 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 38 -250 582 562 ; +C -1 ; WX 600 ; N Lacute ; B 47 0 554 805 ; +C -1 ; WX 600 ; N trademark ; B -23 263 623 562 ; +C -1 ; WX 600 ; N edotaccent ; B 66 -15 548 620 ; +C -1 ; WX 600 ; N Igrave ; B 96 0 504 805 ; +C -1 ; WX 600 ; N Imacron ; B 96 0 504 698 ; +C -1 ; WX 600 ; N Lcaron ; B 47 0 554 562 ; +C -1 ; WX 600 ; N onehalf ; B 0 -57 611 665 ; +C -1 ; WX 600 ; N lessequal ; B 98 0 502 710 ; +C -1 ; WX 600 ; N ocircumflex ; B 62 -15 538 654 ; +C -1 ; WX 600 ; N ntilde ; B 26 0 575 606 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 17 -18 590 805 ; +C -1 ; WX 600 ; N Eacute ; B 53 0 550 805 ; +C -1 ; WX 600 ; N emacron ; B 66 -15 548 565 ; +C -1 ; WX 600 ; N gbreve ; B 45 -157 566 609 ; +C -1 ; WX 600 ; N onequarter ; B 0 -57 600 665 ; +C -1 ; WX 600 ; N Scaron ; B 72 -20 529 802 ; +C -1 ; WX 600 ; N Scommaaccent ; B 72 -250 529 580 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 43 -18 580 805 ; +C -1 ; WX 600 ; N degree ; B 123 269 477 622 ; +C -1 ; WX 600 ; N ograve ; B 62 -15 538 672 ; +C -1 ; WX 600 ; N Ccaron ; B 41 -18 540 802 ; +C -1 ; WX 600 ; N ugrave ; B 21 -15 562 672 ; +C -1 ; WX 600 ; N radical ; B 3 -15 597 792 ; +C -1 ; WX 600 ; N Dcaron ; B 43 0 574 802 ; +C -1 ; WX 600 ; N rcommaaccent ; B 60 -250 559 441 ; +C -1 ; WX 600 ; N Ntilde ; B 7 -13 593 729 ; +C -1 ; WX 600 ; N otilde ; B 62 -15 538 606 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 38 -250 588 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 47 -250 554 562 ; +C -1 ; WX 600 ; N Atilde ; B 3 0 597 729 ; +C -1 ; WX 600 ; N Aogonek ; B 3 -172 608 562 ; +C -1 ; WX 600 ; N Aring ; B 3 0 597 750 ; +C -1 ; WX 600 ; N Otilde ; B 43 -18 557 729 ; +C -1 ; WX 600 ; N zdotaccent ; B 99 0 502 620 ; +C -1 ; WX 600 ; N Ecaron ; B 53 0 550 802 ; +C -1 ; WX 600 ; N Iogonek ; B 96 -172 504 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 43 -250 580 629 ; +C -1 ; WX 600 ; N minus ; B 80 232 520 283 ; +C -1 ; WX 600 ; N Icircumflex ; B 96 0 504 787 ; +C -1 ; WX 600 ; N ncaron ; B 26 0 575 669 ; +C -1 ; WX 600 ; N tcommaaccent ; B 87 -250 530 561 ; +C -1 ; WX 600 ; N logicalnot ; B 87 108 513 369 ; +C -1 ; WX 600 ; N odieresis ; B 62 -15 538 620 ; +C -1 ; WX 600 ; N udieresis ; B 21 -15 562 620 ; +C -1 ; WX 600 ; N notequal ; B 15 -16 540 529 ; +C -1 ; WX 600 ; N gcommaaccent ; B 45 -157 566 708 ; +C -1 ; WX 600 ; N eth ; B 62 -15 538 629 ; +C -1 ; WX 600 ; N zcaron ; B 99 0 502 669 ; +C -1 ; WX 600 ; N ncommaaccent ; B 26 -250 575 441 ; +C -1 ; WX 600 ; N onesuperior ; B 172 249 428 622 ; +C -1 ; WX 600 ; N imacron ; B 95 0 505 565 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Helvetica-Bold.afm b/internal/pdf/model/fonts/afms/Helvetica-Bold.afm new file mode 100644 index 0000000..0d41049 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Helvetica-Bold.afm @@ -0,0 +1,2827 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:43:52 1997 +Comment UniqueID 43052 +Comment VMusage 37169 48194 +FontName Helvetica-Bold +FullName Helvetica Bold +FamilyName Helvetica +Weight Bold +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -170 -228 1003 962 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 532 +Ascender 718 +Descender -207 +StdHW 118 +StdVW 140 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 90 0 244 718 ; +C 34 ; WX 474 ; N quotedbl ; B 98 447 376 718 ; +C 35 ; WX 556 ; N numbersign ; B 18 0 538 698 ; +C 36 ; WX 556 ; N dollar ; B 30 -115 523 775 ; +C 37 ; WX 889 ; N percent ; B 28 -19 861 710 ; +C 38 ; WX 722 ; N ampersand ; B 54 -19 701 718 ; +C 39 ; WX 278 ; N quoteright ; B 69 445 209 718 ; +C 40 ; WX 333 ; N parenleft ; B 35 -208 314 734 ; +C 41 ; WX 333 ; N parenright ; B 19 -208 298 734 ; +C 42 ; WX 389 ; N asterisk ; B 27 387 362 718 ; +C 43 ; WX 584 ; N plus ; B 40 0 544 506 ; +C 44 ; WX 278 ; N comma ; B 64 -168 214 146 ; +C 45 ; WX 333 ; N hyphen ; B 27 215 306 345 ; +C 46 ; WX 278 ; N period ; B 64 0 214 146 ; +C 47 ; WX 278 ; N slash ; B -33 -19 311 737 ; +C 48 ; WX 556 ; N zero ; B 32 -19 524 710 ; +C 49 ; WX 556 ; N one ; B 69 0 378 710 ; +C 50 ; WX 556 ; N two ; B 26 0 511 710 ; +C 51 ; WX 556 ; N three ; B 27 -19 516 710 ; +C 52 ; WX 556 ; N four ; B 27 0 526 710 ; +C 53 ; WX 556 ; N five ; B 27 -19 516 698 ; +C 54 ; WX 556 ; N six ; B 31 -19 520 710 ; +C 55 ; WX 556 ; N seven ; B 25 0 528 698 ; +C 56 ; WX 556 ; N eight ; B 32 -19 524 710 ; +C 57 ; WX 556 ; N nine ; B 30 -19 522 710 ; +C 58 ; WX 333 ; N colon ; B 92 0 242 512 ; +C 59 ; WX 333 ; N semicolon ; B 92 -168 242 512 ; +C 60 ; WX 584 ; N less ; B 38 -8 546 514 ; +C 61 ; WX 584 ; N equal ; B 40 87 544 419 ; +C 62 ; WX 584 ; N greater ; B 38 -8 546 514 ; +C 63 ; WX 611 ; N question ; B 60 0 556 727 ; +C 64 ; WX 975 ; N at ; B 118 -19 856 737 ; +C 65 ; WX 722 ; N A ; B 20 0 702 718 ; +C 66 ; WX 722 ; N B ; B 76 0 669 718 ; +C 67 ; WX 722 ; N C ; B 44 -19 684 737 ; +C 68 ; WX 722 ; N D ; B 76 0 685 718 ; +C 69 ; WX 667 ; N E ; B 76 0 621 718 ; +C 70 ; WX 611 ; N F ; B 76 0 587 718 ; +C 71 ; WX 778 ; N G ; B 44 -19 713 737 ; +C 72 ; WX 722 ; N H ; B 71 0 651 718 ; +C 73 ; WX 278 ; N I ; B 64 0 214 718 ; +C 74 ; WX 556 ; N J ; B 22 -18 484 718 ; +C 75 ; WX 722 ; N K ; B 87 0 722 718 ; +C 76 ; WX 611 ; N L ; B 76 0 583 718 ; +C 77 ; WX 833 ; N M ; B 69 0 765 718 ; +C 78 ; WX 722 ; N N ; B 69 0 654 718 ; +C 79 ; WX 778 ; N O ; B 44 -19 734 737 ; +C 80 ; WX 667 ; N P ; B 76 0 627 718 ; +C 81 ; WX 778 ; N Q ; B 44 -52 737 737 ; +C 82 ; WX 722 ; N R ; B 76 0 677 718 ; +C 83 ; WX 667 ; N S ; B 39 -19 629 737 ; +C 84 ; WX 611 ; N T ; B 14 0 598 718 ; +C 85 ; WX 722 ; N U ; B 72 -19 651 718 ; +C 86 ; WX 667 ; N V ; B 19 0 648 718 ; +C 87 ; WX 944 ; N W ; B 16 0 929 718 ; +C 88 ; WX 667 ; N X ; B 14 0 653 718 ; +C 89 ; WX 667 ; N Y ; B 15 0 653 718 ; +C 90 ; WX 611 ; N Z ; B 25 0 586 718 ; +C 91 ; WX 333 ; N bracketleft ; B 63 -196 309 722 ; +C 92 ; WX 278 ; N backslash ; B -33 -19 311 737 ; +C 93 ; WX 333 ; N bracketright ; B 24 -196 270 722 ; +C 94 ; WX 584 ; N asciicircum ; B 62 323 522 698 ; +C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; +C 96 ; WX 278 ; N quoteleft ; B 69 454 209 727 ; +C 97 ; WX 556 ; N a ; B 29 -14 527 546 ; +C 98 ; WX 611 ; N b ; B 61 -14 578 718 ; +C 99 ; WX 556 ; N c ; B 34 -14 524 546 ; +C 100 ; WX 611 ; N d ; B 34 -14 551 718 ; +C 101 ; WX 556 ; N e ; B 23 -14 528 546 ; +C 102 ; WX 333 ; N f ; B 10 0 318 727 ; L i fi ; L l fl ; +C 103 ; WX 611 ; N g ; B 40 -217 553 546 ; +C 104 ; WX 611 ; N h ; B 65 0 546 718 ; +C 105 ; WX 278 ; N i ; B 69 0 209 725 ; +C 106 ; WX 278 ; N j ; B 3 -214 209 725 ; +C 107 ; WX 556 ; N k ; B 69 0 562 718 ; +C 108 ; WX 278 ; N l ; B 69 0 209 718 ; +C 109 ; WX 889 ; N m ; B 64 0 826 546 ; +C 110 ; WX 611 ; N n ; B 65 0 546 546 ; +C 111 ; WX 611 ; N o ; B 34 -14 578 546 ; +C 112 ; WX 611 ; N p ; B 62 -207 578 546 ; +C 113 ; WX 611 ; N q ; B 34 -207 552 546 ; +C 114 ; WX 389 ; N r ; B 64 0 373 546 ; +C 115 ; WX 556 ; N s ; B 30 -14 519 546 ; +C 116 ; WX 333 ; N t ; B 10 -6 309 676 ; +C 117 ; WX 611 ; N u ; B 66 -14 545 532 ; +C 118 ; WX 556 ; N v ; B 13 0 543 532 ; +C 119 ; WX 778 ; N w ; B 10 0 769 532 ; +C 120 ; WX 556 ; N x ; B 15 0 541 532 ; +C 121 ; WX 556 ; N y ; B 10 -214 539 532 ; +C 122 ; WX 500 ; N z ; B 20 0 480 532 ; +C 123 ; WX 389 ; N braceleft ; B 48 -196 365 722 ; +C 124 ; WX 280 ; N bar ; B 84 -225 196 775 ; +C 125 ; WX 389 ; N braceright ; B 24 -196 341 722 ; +C 126 ; WX 584 ; N asciitilde ; B 61 163 523 343 ; +C 161 ; WX 333 ; N exclamdown ; B 90 -186 244 532 ; +C 162 ; WX 556 ; N cent ; B 34 -118 524 628 ; +C 163 ; WX 556 ; N sterling ; B 28 -16 541 718 ; +C 164 ; WX 167 ; N fraction ; B -170 -19 336 710 ; +C 165 ; WX 556 ; N yen ; B -9 0 565 698 ; +C 166 ; WX 556 ; N florin ; B -10 -210 516 737 ; +C 167 ; WX 556 ; N section ; B 34 -184 522 727 ; +C 168 ; WX 556 ; N currency ; B -3 76 559 636 ; +C 169 ; WX 238 ; N quotesingle ; B 70 447 168 718 ; +C 170 ; WX 500 ; N quotedblleft ; B 64 454 436 727 ; +C 171 ; WX 556 ; N guillemotleft ; B 88 76 468 484 ; +C 172 ; WX 333 ; N guilsinglleft ; B 83 76 250 484 ; +C 173 ; WX 333 ; N guilsinglright ; B 83 76 250 484 ; +C 174 ; WX 611 ; N fi ; B 10 0 542 727 ; +C 175 ; WX 611 ; N fl ; B 10 0 542 727 ; +C 177 ; WX 556 ; N endash ; B 0 227 556 333 ; +C 178 ; WX 556 ; N dagger ; B 36 -171 520 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 36 -171 520 718 ; +C 180 ; WX 278 ; N periodcentered ; B 58 172 220 334 ; +C 182 ; WX 556 ; N paragraph ; B -8 -191 539 700 ; +C 183 ; WX 350 ; N bullet ; B 10 194 340 524 ; +C 184 ; WX 278 ; N quotesinglbase ; B 69 -146 209 127 ; +C 185 ; WX 500 ; N quotedblbase ; B 64 -146 436 127 ; +C 186 ; WX 500 ; N quotedblright ; B 64 445 436 718 ; +C 187 ; WX 556 ; N guillemotright ; B 88 76 468 484 ; +C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; +C 189 ; WX 1000 ; N perthousand ; B -3 -19 1003 710 ; +C 191 ; WX 611 ; N questiondown ; B 55 -195 551 532 ; +C 193 ; WX 333 ; N grave ; B -23 604 225 750 ; +C 194 ; WX 333 ; N acute ; B 108 604 356 750 ; +C 195 ; WX 333 ; N circumflex ; B -10 604 343 750 ; +C 196 ; WX 333 ; N tilde ; B -17 610 350 737 ; +C 197 ; WX 333 ; N macron ; B -6 604 339 678 ; +C 198 ; WX 333 ; N breve ; B -2 604 335 750 ; +C 199 ; WX 333 ; N dotaccent ; B 104 614 230 729 ; +C 200 ; WX 333 ; N dieresis ; B 6 614 327 729 ; +C 202 ; WX 333 ; N ring ; B 59 568 275 776 ; +C 203 ; WX 333 ; N cedilla ; B 6 -228 245 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 9 604 486 750 ; +C 206 ; WX 333 ; N ogonek ; B 71 -228 304 0 ; +C 207 ; WX 333 ; N caron ; B -10 604 343 750 ; +C 208 ; WX 1000 ; N emdash ; B 0 227 1000 333 ; +C 225 ; WX 1000 ; N AE ; B 5 0 954 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 22 401 347 737 ; +C 232 ; WX 611 ; N Lslash ; B -20 0 583 718 ; +C 233 ; WX 778 ; N Oslash ; B 33 -27 744 745 ; +C 234 ; WX 1000 ; N OE ; B 37 -19 961 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 6 401 360 737 ; +C 241 ; WX 889 ; N ae ; B 29 -14 858 546 ; +C 245 ; WX 278 ; N dotlessi ; B 69 0 209 532 ; +C 248 ; WX 278 ; N lslash ; B -18 0 296 718 ; +C 249 ; WX 611 ; N oslash ; B 22 -29 589 560 ; +C 250 ; WX 944 ; N oe ; B 34 -14 912 546 ; +C 251 ; WX 611 ; N germandbls ; B 69 -14 579 731 ; +C -1 ; WX 278 ; N Idieresis ; B -21 0 300 915 ; +C -1 ; WX 556 ; N eacute ; B 23 -14 528 750 ; +C -1 ; WX 556 ; N abreve ; B 29 -14 527 750 ; +C -1 ; WX 611 ; N uhungarumlaut ; B 66 -14 625 750 ; +C -1 ; WX 556 ; N ecaron ; B 23 -14 528 750 ; +C -1 ; WX 667 ; N Ydieresis ; B 15 0 653 915 ; +C -1 ; WX 584 ; N divide ; B 40 -42 544 548 ; +C -1 ; WX 667 ; N Yacute ; B 15 0 653 936 ; +C -1 ; WX 722 ; N Acircumflex ; B 20 0 702 936 ; +C -1 ; WX 556 ; N aacute ; B 29 -14 527 750 ; +C -1 ; WX 722 ; N Ucircumflex ; B 72 -19 651 936 ; +C -1 ; WX 556 ; N yacute ; B 10 -214 539 750 ; +C -1 ; WX 556 ; N scommaaccent ; B 30 -228 519 546 ; +C -1 ; WX 556 ; N ecircumflex ; B 23 -14 528 750 ; +C -1 ; WX 722 ; N Uring ; B 72 -19 651 962 ; +C -1 ; WX 722 ; N Udieresis ; B 72 -19 651 915 ; +C -1 ; WX 556 ; N aogonek ; B 29 -224 545 546 ; +C -1 ; WX 722 ; N Uacute ; B 72 -19 651 936 ; +C -1 ; WX 611 ; N uogonek ; B 66 -228 545 532 ; +C -1 ; WX 667 ; N Edieresis ; B 76 0 621 915 ; +C -1 ; WX 722 ; N Dcroat ; B -5 0 685 718 ; +C -1 ; WX 250 ; N commaaccent ; B 64 -228 199 -50 ; +C -1 ; WX 737 ; N copyright ; B -11 -19 749 737 ; +C -1 ; WX 667 ; N Emacron ; B 76 0 621 864 ; +C -1 ; WX 556 ; N ccaron ; B 34 -14 524 750 ; +C -1 ; WX 556 ; N aring ; B 29 -14 527 776 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 69 -228 654 718 ; +C -1 ; WX 278 ; N lacute ; B 69 0 329 936 ; +C -1 ; WX 556 ; N agrave ; B 29 -14 527 750 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 14 -228 598 718 ; +C -1 ; WX 722 ; N Cacute ; B 44 -19 684 936 ; +C -1 ; WX 556 ; N atilde ; B 29 -14 527 737 ; +C -1 ; WX 667 ; N Edotaccent ; B 76 0 621 915 ; +C -1 ; WX 556 ; N scaron ; B 30 -14 519 750 ; +C -1 ; WX 556 ; N scedilla ; B 30 -228 519 546 ; +C -1 ; WX 278 ; N iacute ; B 69 0 329 750 ; +C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; +C -1 ; WX 722 ; N Rcaron ; B 76 0 677 936 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 44 -228 713 737 ; +C -1 ; WX 611 ; N ucircumflex ; B 66 -14 545 750 ; +C -1 ; WX 556 ; N acircumflex ; B 29 -14 527 750 ; +C -1 ; WX 722 ; N Amacron ; B 20 0 702 864 ; +C -1 ; WX 389 ; N rcaron ; B 18 0 373 750 ; +C -1 ; WX 556 ; N ccedilla ; B 34 -228 524 546 ; +C -1 ; WX 611 ; N Zdotaccent ; B 25 0 586 915 ; +C -1 ; WX 667 ; N Thorn ; B 76 0 627 718 ; +C -1 ; WX 778 ; N Omacron ; B 44 -19 734 864 ; +C -1 ; WX 722 ; N Racute ; B 76 0 677 936 ; +C -1 ; WX 667 ; N Sacute ; B 39 -19 629 936 ; +C -1 ; WX 743 ; N dcaron ; B 34 -14 750 718 ; +C -1 ; WX 722 ; N Umacron ; B 72 -19 651 864 ; +C -1 ; WX 611 ; N uring ; B 66 -14 545 776 ; +C -1 ; WX 333 ; N threesuperior ; B 8 271 326 710 ; +C -1 ; WX 778 ; N Ograve ; B 44 -19 734 936 ; +C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; +C -1 ; WX 722 ; N Abreve ; B 20 0 702 936 ; +C -1 ; WX 584 ; N multiply ; B 40 1 545 505 ; +C -1 ; WX 611 ; N uacute ; B 66 -14 545 750 ; +C -1 ; WX 611 ; N Tcaron ; B 14 0 598 936 ; +C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; +C -1 ; WX 556 ; N ydieresis ; B 10 -214 539 729 ; +C -1 ; WX 722 ; N Nacute ; B 69 0 654 936 ; +C -1 ; WX 278 ; N icircumflex ; B -37 0 316 750 ; +C -1 ; WX 667 ; N Ecircumflex ; B 76 0 621 936 ; +C -1 ; WX 556 ; N adieresis ; B 29 -14 527 729 ; +C -1 ; WX 556 ; N edieresis ; B 23 -14 528 729 ; +C -1 ; WX 556 ; N cacute ; B 34 -14 524 750 ; +C -1 ; WX 611 ; N nacute ; B 65 0 546 750 ; +C -1 ; WX 611 ; N umacron ; B 66 -14 545 678 ; +C -1 ; WX 722 ; N Ncaron ; B 69 0 654 936 ; +C -1 ; WX 278 ; N Iacute ; B 64 0 329 936 ; +C -1 ; WX 584 ; N plusminus ; B 40 0 544 506 ; +C -1 ; WX 280 ; N brokenbar ; B 84 -150 196 700 ; +C -1 ; WX 737 ; N registered ; B -11 -19 748 737 ; +C -1 ; WX 778 ; N Gbreve ; B 44 -19 713 936 ; +C -1 ; WX 278 ; N Idotaccent ; B 64 0 214 915 ; +C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; +C -1 ; WX 667 ; N Egrave ; B 76 0 621 936 ; +C -1 ; WX 389 ; N racute ; B 64 0 384 750 ; +C -1 ; WX 611 ; N omacron ; B 34 -14 578 678 ; +C -1 ; WX 611 ; N Zacute ; B 25 0 586 936 ; +C -1 ; WX 611 ; N Zcaron ; B 25 0 586 936 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; +C -1 ; WX 722 ; N Eth ; B -5 0 685 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 44 -228 684 737 ; +C -1 ; WX 278 ; N lcommaaccent ; B 69 -228 213 718 ; +C -1 ; WX 389 ; N tcaron ; B 10 -6 421 878 ; +C -1 ; WX 556 ; N eogonek ; B 23 -228 528 546 ; +C -1 ; WX 722 ; N Uogonek ; B 72 -228 651 718 ; +C -1 ; WX 722 ; N Aacute ; B 20 0 702 936 ; +C -1 ; WX 722 ; N Adieresis ; B 20 0 702 915 ; +C -1 ; WX 556 ; N egrave ; B 23 -14 528 750 ; +C -1 ; WX 500 ; N zacute ; B 20 0 480 750 ; +C -1 ; WX 278 ; N iogonek ; B 16 -224 249 725 ; +C -1 ; WX 778 ; N Oacute ; B 44 -19 734 936 ; +C -1 ; WX 611 ; N oacute ; B 34 -14 578 750 ; +C -1 ; WX 556 ; N amacron ; B 29 -14 527 678 ; +C -1 ; WX 556 ; N sacute ; B 30 -14 519 750 ; +C -1 ; WX 278 ; N idieresis ; B -21 0 300 729 ; +C -1 ; WX 778 ; N Ocircumflex ; B 44 -19 734 936 ; +C -1 ; WX 722 ; N Ugrave ; B 72 -19 651 936 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 611 ; N thorn ; B 62 -208 578 718 ; +C -1 ; WX 333 ; N twosuperior ; B 9 283 324 710 ; +C -1 ; WX 778 ; N Odieresis ; B 44 -19 734 915 ; +C -1 ; WX 611 ; N mu ; B 66 -207 545 532 ; +C -1 ; WX 278 ; N igrave ; B -50 0 209 750 ; +C -1 ; WX 611 ; N ohungarumlaut ; B 34 -14 625 750 ; +C -1 ; WX 667 ; N Eogonek ; B 76 -224 639 718 ; +C -1 ; WX 611 ; N dcroat ; B 34 -14 650 718 ; +C -1 ; WX 834 ; N threequarters ; B 16 -19 799 710 ; +C -1 ; WX 667 ; N Scedilla ; B 39 -228 629 737 ; +C -1 ; WX 400 ; N lcaron ; B 69 0 408 718 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 87 -228 722 718 ; +C -1 ; WX 611 ; N Lacute ; B 76 0 583 936 ; +C -1 ; WX 1000 ; N trademark ; B 44 306 956 718 ; +C -1 ; WX 556 ; N edotaccent ; B 23 -14 528 729 ; +C -1 ; WX 278 ; N Igrave ; B -50 0 214 936 ; +C -1 ; WX 278 ; N Imacron ; B -33 0 312 864 ; +C -1 ; WX 611 ; N Lcaron ; B 76 0 583 718 ; +C -1 ; WX 834 ; N onehalf ; B 26 -19 794 710 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; +C -1 ; WX 611 ; N ocircumflex ; B 34 -14 578 750 ; +C -1 ; WX 611 ; N ntilde ; B 65 0 546 737 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 72 -19 681 936 ; +C -1 ; WX 667 ; N Eacute ; B 76 0 621 936 ; +C -1 ; WX 556 ; N emacron ; B 23 -14 528 678 ; +C -1 ; WX 611 ; N gbreve ; B 40 -217 553 750 ; +C -1 ; WX 834 ; N onequarter ; B 26 -19 766 710 ; +C -1 ; WX 667 ; N Scaron ; B 39 -19 629 936 ; +C -1 ; WX 667 ; N Scommaaccent ; B 39 -228 629 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 44 -19 734 936 ; +C -1 ; WX 400 ; N degree ; B 57 426 343 712 ; +C -1 ; WX 611 ; N ograve ; B 34 -14 578 750 ; +C -1 ; WX 722 ; N Ccaron ; B 44 -19 684 936 ; +C -1 ; WX 611 ; N ugrave ; B 66 -14 545 750 ; +C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; +C -1 ; WX 722 ; N Dcaron ; B 76 0 685 936 ; +C -1 ; WX 389 ; N rcommaaccent ; B 64 -228 373 546 ; +C -1 ; WX 722 ; N Ntilde ; B 69 0 654 923 ; +C -1 ; WX 611 ; N otilde ; B 34 -14 578 737 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 76 -228 677 718 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 76 -228 583 718 ; +C -1 ; WX 722 ; N Atilde ; B 20 0 702 923 ; +C -1 ; WX 722 ; N Aogonek ; B 20 -224 742 718 ; +C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; +C -1 ; WX 778 ; N Otilde ; B 44 -19 734 923 ; +C -1 ; WX 500 ; N zdotaccent ; B 20 0 480 729 ; +C -1 ; WX 667 ; N Ecaron ; B 76 0 621 936 ; +C -1 ; WX 278 ; N Iogonek ; B -11 -228 222 718 ; +C -1 ; WX 556 ; N kcommaaccent ; B 69 -228 562 718 ; +C -1 ; WX 584 ; N minus ; B 40 197 544 309 ; +C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 936 ; +C -1 ; WX 611 ; N ncaron ; B 65 0 546 750 ; +C -1 ; WX 333 ; N tcommaaccent ; B 10 -228 309 676 ; +C -1 ; WX 584 ; N logicalnot ; B 40 108 544 419 ; +C -1 ; WX 611 ; N odieresis ; B 34 -14 578 729 ; +C -1 ; WX 611 ; N udieresis ; B 66 -14 545 729 ; +C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; +C -1 ; WX 611 ; N gcommaaccent ; B 40 -217 553 850 ; +C -1 ; WX 611 ; N eth ; B 34 -14 578 737 ; +C -1 ; WX 500 ; N zcaron ; B 20 0 480 750 ; +C -1 ; WX 611 ; N ncommaaccent ; B 65 -228 546 546 ; +C -1 ; WX 333 ; N onesuperior ; B 26 283 237 710 ; +C -1 ; WX 278 ; N imacron ; B -8 0 285 678 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2481 +KPX A C -40 +KPX A Cacute -40 +KPX A Ccaron -40 +KPX A Ccedilla -40 +KPX A G -50 +KPX A Gbreve -50 +KPX A Gcommaaccent -50 +KPX A O -40 +KPX A Oacute -40 +KPX A Ocircumflex -40 +KPX A Odieresis -40 +KPX A Ograve -40 +KPX A Ohungarumlaut -40 +KPX A Omacron -40 +KPX A Oslash -40 +KPX A Otilde -40 +KPX A Q -40 +KPX A T -90 +KPX A Tcaron -90 +KPX A Tcommaaccent -90 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -80 +KPX A W -60 +KPX A Y -110 +KPX A Yacute -110 +KPX A Ydieresis -110 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -30 +KPX A y -30 +KPX A yacute -30 +KPX A ydieresis -30 +KPX Aacute C -40 +KPX Aacute Cacute -40 +KPX Aacute Ccaron -40 +KPX Aacute Ccedilla -40 +KPX Aacute G -50 +KPX Aacute Gbreve -50 +KPX Aacute Gcommaaccent -50 +KPX Aacute O -40 +KPX Aacute Oacute -40 +KPX Aacute Ocircumflex -40 +KPX Aacute Odieresis -40 +KPX Aacute Ograve -40 +KPX Aacute Ohungarumlaut -40 +KPX Aacute Omacron -40 +KPX Aacute Oslash -40 +KPX Aacute Otilde -40 +KPX Aacute Q -40 +KPX Aacute T -90 +KPX Aacute Tcaron -90 +KPX Aacute Tcommaaccent -90 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -80 +KPX Aacute W -60 +KPX Aacute Y -110 +KPX Aacute Yacute -110 +KPX Aacute Ydieresis -110 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -30 +KPX Aacute y -30 +KPX Aacute yacute -30 +KPX Aacute ydieresis -30 +KPX Abreve C -40 +KPX Abreve Cacute -40 +KPX Abreve Ccaron -40 +KPX Abreve Ccedilla -40 +KPX Abreve G -50 +KPX Abreve Gbreve -50 +KPX Abreve Gcommaaccent -50 +KPX Abreve O -40 +KPX Abreve Oacute -40 +KPX Abreve Ocircumflex -40 +KPX Abreve Odieresis -40 +KPX Abreve Ograve -40 +KPX Abreve Ohungarumlaut -40 +KPX Abreve Omacron -40 +KPX Abreve Oslash -40 +KPX Abreve Otilde -40 +KPX Abreve Q -40 +KPX Abreve T -90 +KPX Abreve Tcaron -90 +KPX Abreve Tcommaaccent -90 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -80 +KPX Abreve W -60 +KPX Abreve Y -110 +KPX Abreve Yacute -110 +KPX Abreve Ydieresis -110 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -30 +KPX Abreve y -30 +KPX Abreve yacute -30 +KPX Abreve ydieresis -30 +KPX Acircumflex C -40 +KPX Acircumflex Cacute -40 +KPX Acircumflex Ccaron -40 +KPX Acircumflex Ccedilla -40 +KPX Acircumflex G -50 +KPX Acircumflex Gbreve -50 +KPX Acircumflex Gcommaaccent -50 +KPX Acircumflex O -40 +KPX Acircumflex Oacute -40 +KPX Acircumflex Ocircumflex -40 +KPX Acircumflex Odieresis -40 +KPX Acircumflex Ograve -40 +KPX Acircumflex Ohungarumlaut -40 +KPX Acircumflex Omacron -40 +KPX Acircumflex Oslash -40 +KPX Acircumflex Otilde -40 +KPX Acircumflex Q -40 +KPX Acircumflex T -90 +KPX Acircumflex Tcaron -90 +KPX Acircumflex Tcommaaccent -90 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -80 +KPX Acircumflex W -60 +KPX Acircumflex Y -110 +KPX Acircumflex Yacute -110 +KPX Acircumflex Ydieresis -110 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -30 +KPX Acircumflex y -30 +KPX Acircumflex yacute -30 +KPX Acircumflex ydieresis -30 +KPX Adieresis C -40 +KPX Adieresis Cacute -40 +KPX Adieresis Ccaron -40 +KPX Adieresis Ccedilla -40 +KPX Adieresis G -50 +KPX Adieresis Gbreve -50 +KPX Adieresis Gcommaaccent -50 +KPX Adieresis O -40 +KPX Adieresis Oacute -40 +KPX Adieresis Ocircumflex -40 +KPX Adieresis Odieresis -40 +KPX Adieresis Ograve -40 +KPX Adieresis Ohungarumlaut -40 +KPX Adieresis Omacron -40 +KPX Adieresis Oslash -40 +KPX Adieresis Otilde -40 +KPX Adieresis Q -40 +KPX Adieresis T -90 +KPX Adieresis Tcaron -90 +KPX Adieresis Tcommaaccent -90 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -80 +KPX Adieresis W -60 +KPX Adieresis Y -110 +KPX Adieresis Yacute -110 +KPX Adieresis Ydieresis -110 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -30 +KPX Adieresis y -30 +KPX Adieresis yacute -30 +KPX Adieresis ydieresis -30 +KPX Agrave C -40 +KPX Agrave Cacute -40 +KPX Agrave Ccaron -40 +KPX Agrave Ccedilla -40 +KPX Agrave G -50 +KPX Agrave Gbreve -50 +KPX Agrave Gcommaaccent -50 +KPX Agrave O -40 +KPX Agrave Oacute -40 +KPX Agrave Ocircumflex -40 +KPX Agrave Odieresis -40 +KPX Agrave Ograve -40 +KPX Agrave Ohungarumlaut -40 +KPX Agrave Omacron -40 +KPX Agrave Oslash -40 +KPX Agrave Otilde -40 +KPX Agrave Q -40 +KPX Agrave T -90 +KPX Agrave Tcaron -90 +KPX Agrave Tcommaaccent -90 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -80 +KPX Agrave W -60 +KPX Agrave Y -110 +KPX Agrave Yacute -110 +KPX Agrave Ydieresis -110 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -30 +KPX Agrave y -30 +KPX Agrave yacute -30 +KPX Agrave ydieresis -30 +KPX Amacron C -40 +KPX Amacron Cacute -40 +KPX Amacron Ccaron -40 +KPX Amacron Ccedilla -40 +KPX Amacron G -50 +KPX Amacron Gbreve -50 +KPX Amacron Gcommaaccent -50 +KPX Amacron O -40 +KPX Amacron Oacute -40 +KPX Amacron Ocircumflex -40 +KPX Amacron Odieresis -40 +KPX Amacron Ograve -40 +KPX Amacron Ohungarumlaut -40 +KPX Amacron Omacron -40 +KPX Amacron Oslash -40 +KPX Amacron Otilde -40 +KPX Amacron Q -40 +KPX Amacron T -90 +KPX Amacron Tcaron -90 +KPX Amacron Tcommaaccent -90 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -80 +KPX Amacron W -60 +KPX Amacron Y -110 +KPX Amacron Yacute -110 +KPX Amacron Ydieresis -110 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -30 +KPX Amacron y -30 +KPX Amacron yacute -30 +KPX Amacron ydieresis -30 +KPX Aogonek C -40 +KPX Aogonek Cacute -40 +KPX Aogonek Ccaron -40 +KPX Aogonek Ccedilla -40 +KPX Aogonek G -50 +KPX Aogonek Gbreve -50 +KPX Aogonek Gcommaaccent -50 +KPX Aogonek O -40 +KPX Aogonek Oacute -40 +KPX Aogonek Ocircumflex -40 +KPX Aogonek Odieresis -40 +KPX Aogonek Ograve -40 +KPX Aogonek Ohungarumlaut -40 +KPX Aogonek Omacron -40 +KPX Aogonek Oslash -40 +KPX Aogonek Otilde -40 +KPX Aogonek Q -40 +KPX Aogonek T -90 +KPX Aogonek Tcaron -90 +KPX Aogonek Tcommaaccent -90 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -80 +KPX Aogonek W -60 +KPX Aogonek Y -110 +KPX Aogonek Yacute -110 +KPX Aogonek Ydieresis -110 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -30 +KPX Aogonek y -30 +KPX Aogonek yacute -30 +KPX Aogonek ydieresis -30 +KPX Aring C -40 +KPX Aring Cacute -40 +KPX Aring Ccaron -40 +KPX Aring Ccedilla -40 +KPX Aring G -50 +KPX Aring Gbreve -50 +KPX Aring Gcommaaccent -50 +KPX Aring O -40 +KPX Aring Oacute -40 +KPX Aring Ocircumflex -40 +KPX Aring Odieresis -40 +KPX Aring Ograve -40 +KPX Aring Ohungarumlaut -40 +KPX Aring Omacron -40 +KPX Aring Oslash -40 +KPX Aring Otilde -40 +KPX Aring Q -40 +KPX Aring T -90 +KPX Aring Tcaron -90 +KPX Aring Tcommaaccent -90 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -80 +KPX Aring W -60 +KPX Aring Y -110 +KPX Aring Yacute -110 +KPX Aring Ydieresis -110 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -30 +KPX Aring y -30 +KPX Aring yacute -30 +KPX Aring ydieresis -30 +KPX Atilde C -40 +KPX Atilde Cacute -40 +KPX Atilde Ccaron -40 +KPX Atilde Ccedilla -40 +KPX Atilde G -50 +KPX Atilde Gbreve -50 +KPX Atilde Gcommaaccent -50 +KPX Atilde O -40 +KPX Atilde Oacute -40 +KPX Atilde Ocircumflex -40 +KPX Atilde Odieresis -40 +KPX Atilde Ograve -40 +KPX Atilde Ohungarumlaut -40 +KPX Atilde Omacron -40 +KPX Atilde Oslash -40 +KPX Atilde Otilde -40 +KPX Atilde Q -40 +KPX Atilde T -90 +KPX Atilde Tcaron -90 +KPX Atilde Tcommaaccent -90 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -80 +KPX Atilde W -60 +KPX Atilde Y -110 +KPX Atilde Yacute -110 +KPX Atilde Ydieresis -110 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -30 +KPX Atilde y -30 +KPX Atilde yacute -30 +KPX Atilde ydieresis -30 +KPX B A -30 +KPX B Aacute -30 +KPX B Abreve -30 +KPX B Acircumflex -30 +KPX B Adieresis -30 +KPX B Agrave -30 +KPX B Amacron -30 +KPX B Aogonek -30 +KPX B Aring -30 +KPX B Atilde -30 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -40 +KPX D W -40 +KPX D Y -70 +KPX D Yacute -70 +KPX D Ydieresis -70 +KPX D comma -30 +KPX D period -30 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -70 +KPX Dcaron Yacute -70 +KPX Dcaron Ydieresis -70 +KPX Dcaron comma -30 +KPX Dcaron period -30 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -70 +KPX Dcroat Yacute -70 +KPX Dcroat Ydieresis -70 +KPX Dcroat comma -30 +KPX Dcroat period -30 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -20 +KPX F aacute -20 +KPX F abreve -20 +KPX F acircumflex -20 +KPX F adieresis -20 +KPX F agrave -20 +KPX F amacron -20 +KPX F aogonek -20 +KPX F aring -20 +KPX F atilde -20 +KPX F comma -100 +KPX F period -100 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J comma -20 +KPX J period -20 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -15 +KPX K eacute -15 +KPX K ecaron -15 +KPX K ecircumflex -15 +KPX K edieresis -15 +KPX K edotaccent -15 +KPX K egrave -15 +KPX K emacron -15 +KPX K eogonek -15 +KPX K o -35 +KPX K oacute -35 +KPX K ocircumflex -35 +KPX K odieresis -35 +KPX K ograve -35 +KPX K ohungarumlaut -35 +KPX K omacron -35 +KPX K oslash -35 +KPX K otilde -35 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -40 +KPX K yacute -40 +KPX K ydieresis -40 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -15 +KPX Kcommaaccent eacute -15 +KPX Kcommaaccent ecaron -15 +KPX Kcommaaccent ecircumflex -15 +KPX Kcommaaccent edieresis -15 +KPX Kcommaaccent edotaccent -15 +KPX Kcommaaccent egrave -15 +KPX Kcommaaccent emacron -15 +KPX Kcommaaccent eogonek -15 +KPX Kcommaaccent o -35 +KPX Kcommaaccent oacute -35 +KPX Kcommaaccent ocircumflex -35 +KPX Kcommaaccent odieresis -35 +KPX Kcommaaccent ograve -35 +KPX Kcommaaccent ohungarumlaut -35 +KPX Kcommaaccent omacron -35 +KPX Kcommaaccent oslash -35 +KPX Kcommaaccent otilde -35 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -40 +KPX Kcommaaccent yacute -40 +KPX Kcommaaccent ydieresis -40 +KPX L T -90 +KPX L Tcaron -90 +KPX L Tcommaaccent -90 +KPX L V -110 +KPX L W -80 +KPX L Y -120 +KPX L Yacute -120 +KPX L Ydieresis -120 +KPX L quotedblright -140 +KPX L quoteright -140 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -90 +KPX Lacute Tcaron -90 +KPX Lacute Tcommaaccent -90 +KPX Lacute V -110 +KPX Lacute W -80 +KPX Lacute Y -120 +KPX Lacute Yacute -120 +KPX Lacute Ydieresis -120 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -140 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcommaaccent T -90 +KPX Lcommaaccent Tcaron -90 +KPX Lcommaaccent Tcommaaccent -90 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -80 +KPX Lcommaaccent Y -120 +KPX Lcommaaccent Yacute -120 +KPX Lcommaaccent Ydieresis -120 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -140 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -90 +KPX Lslash Tcaron -90 +KPX Lslash Tcommaaccent -90 +KPX Lslash V -110 +KPX Lslash W -80 +KPX Lslash Y -120 +KPX Lslash Yacute -120 +KPX Lslash Ydieresis -120 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -140 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -50 +KPX O Aacute -50 +KPX O Abreve -50 +KPX O Acircumflex -50 +KPX O Adieresis -50 +KPX O Agrave -50 +KPX O Amacron -50 +KPX O Aogonek -50 +KPX O Aring -50 +KPX O Atilde -50 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -50 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -50 +KPX Oacute Aacute -50 +KPX Oacute Abreve -50 +KPX Oacute Acircumflex -50 +KPX Oacute Adieresis -50 +KPX Oacute Agrave -50 +KPX Oacute Amacron -50 +KPX Oacute Aogonek -50 +KPX Oacute Aring -50 +KPX Oacute Atilde -50 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -50 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -50 +KPX Ocircumflex Aacute -50 +KPX Ocircumflex Abreve -50 +KPX Ocircumflex Acircumflex -50 +KPX Ocircumflex Adieresis -50 +KPX Ocircumflex Agrave -50 +KPX Ocircumflex Amacron -50 +KPX Ocircumflex Aogonek -50 +KPX Ocircumflex Aring -50 +KPX Ocircumflex Atilde -50 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -50 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -50 +KPX Odieresis Aacute -50 +KPX Odieresis Abreve -50 +KPX Odieresis Acircumflex -50 +KPX Odieresis Adieresis -50 +KPX Odieresis Agrave -50 +KPX Odieresis Amacron -50 +KPX Odieresis Aogonek -50 +KPX Odieresis Aring -50 +KPX Odieresis Atilde -50 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -50 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -50 +KPX Ograve Aacute -50 +KPX Ograve Abreve -50 +KPX Ograve Acircumflex -50 +KPX Ograve Adieresis -50 +KPX Ograve Agrave -50 +KPX Ograve Amacron -50 +KPX Ograve Aogonek -50 +KPX Ograve Aring -50 +KPX Ograve Atilde -50 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -50 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -50 +KPX Ohungarumlaut Aacute -50 +KPX Ohungarumlaut Abreve -50 +KPX Ohungarumlaut Acircumflex -50 +KPX Ohungarumlaut Adieresis -50 +KPX Ohungarumlaut Agrave -50 +KPX Ohungarumlaut Amacron -50 +KPX Ohungarumlaut Aogonek -50 +KPX Ohungarumlaut Aring -50 +KPX Ohungarumlaut Atilde -50 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -50 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -50 +KPX Omacron Aacute -50 +KPX Omacron Abreve -50 +KPX Omacron Acircumflex -50 +KPX Omacron Adieresis -50 +KPX Omacron Agrave -50 +KPX Omacron Amacron -50 +KPX Omacron Aogonek -50 +KPX Omacron Aring -50 +KPX Omacron Atilde -50 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -50 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -50 +KPX Oslash Aacute -50 +KPX Oslash Abreve -50 +KPX Oslash Acircumflex -50 +KPX Oslash Adieresis -50 +KPX Oslash Agrave -50 +KPX Oslash Amacron -50 +KPX Oslash Aogonek -50 +KPX Oslash Aring -50 +KPX Oslash Atilde -50 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -50 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -50 +KPX Otilde Aacute -50 +KPX Otilde Abreve -50 +KPX Otilde Acircumflex -50 +KPX Otilde Adieresis -50 +KPX Otilde Agrave -50 +KPX Otilde Amacron -50 +KPX Otilde Aogonek -50 +KPX Otilde Aring -50 +KPX Otilde Atilde -50 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -50 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -100 +KPX P Aacute -100 +KPX P Abreve -100 +KPX P Acircumflex -100 +KPX P Adieresis -100 +KPX P Agrave -100 +KPX P Amacron -100 +KPX P Aogonek -100 +KPX P Aring -100 +KPX P Atilde -100 +KPX P a -30 +KPX P aacute -30 +KPX P abreve -30 +KPX P acircumflex -30 +KPX P adieresis -30 +KPX P agrave -30 +KPX P amacron -30 +KPX P aogonek -30 +KPX P aring -30 +KPX P atilde -30 +KPX P comma -120 +KPX P e -30 +KPX P eacute -30 +KPX P ecaron -30 +KPX P ecircumflex -30 +KPX P edieresis -30 +KPX P edotaccent -30 +KPX P egrave -30 +KPX P emacron -30 +KPX P eogonek -30 +KPX P o -40 +KPX P oacute -40 +KPX P ocircumflex -40 +KPX P odieresis -40 +KPX P ograve -40 +KPX P ohungarumlaut -40 +KPX P omacron -40 +KPX P oslash -40 +KPX P otilde -40 +KPX P period -120 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX Q comma 20 +KPX Q period 20 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -20 +KPX R Tcaron -20 +KPX R Tcommaaccent -20 +KPX R U -20 +KPX R Uacute -20 +KPX R Ucircumflex -20 +KPX R Udieresis -20 +KPX R Ugrave -20 +KPX R Uhungarumlaut -20 +KPX R Umacron -20 +KPX R Uogonek -20 +KPX R Uring -20 +KPX R V -50 +KPX R W -40 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -20 +KPX Racute Tcaron -20 +KPX Racute Tcommaaccent -20 +KPX Racute U -20 +KPX Racute Uacute -20 +KPX Racute Ucircumflex -20 +KPX Racute Udieresis -20 +KPX Racute Ugrave -20 +KPX Racute Uhungarumlaut -20 +KPX Racute Umacron -20 +KPX Racute Uogonek -20 +KPX Racute Uring -20 +KPX Racute V -50 +KPX Racute W -40 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -20 +KPX Rcaron Tcaron -20 +KPX Rcaron Tcommaaccent -20 +KPX Rcaron U -20 +KPX Rcaron Uacute -20 +KPX Rcaron Ucircumflex -20 +KPX Rcaron Udieresis -20 +KPX Rcaron Ugrave -20 +KPX Rcaron Uhungarumlaut -20 +KPX Rcaron Umacron -20 +KPX Rcaron Uogonek -20 +KPX Rcaron Uring -20 +KPX Rcaron V -50 +KPX Rcaron W -40 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -20 +KPX Rcommaaccent Tcaron -20 +KPX Rcommaaccent Tcommaaccent -20 +KPX Rcommaaccent U -20 +KPX Rcommaaccent Uacute -20 +KPX Rcommaaccent Ucircumflex -20 +KPX Rcommaaccent Udieresis -20 +KPX Rcommaaccent Ugrave -20 +KPX Rcommaaccent Uhungarumlaut -20 +KPX Rcommaaccent Umacron -20 +KPX Rcommaaccent Uogonek -20 +KPX Rcommaaccent Uring -20 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -40 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX T A -90 +KPX T Aacute -90 +KPX T Abreve -90 +KPX T Acircumflex -90 +KPX T Adieresis -90 +KPX T Agrave -90 +KPX T Amacron -90 +KPX T Aogonek -90 +KPX T Aring -90 +KPX T Atilde -90 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -80 +KPX T aacute -80 +KPX T abreve -80 +KPX T acircumflex -80 +KPX T adieresis -80 +KPX T agrave -80 +KPX T amacron -80 +KPX T aogonek -80 +KPX T aring -80 +KPX T atilde -80 +KPX T colon -40 +KPX T comma -80 +KPX T e -60 +KPX T eacute -60 +KPX T ecaron -60 +KPX T ecircumflex -60 +KPX T edieresis -60 +KPX T edotaccent -60 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -60 +KPX T hyphen -120 +KPX T o -80 +KPX T oacute -80 +KPX T ocircumflex -80 +KPX T odieresis -80 +KPX T ograve -80 +KPX T ohungarumlaut -80 +KPX T omacron -80 +KPX T oslash -80 +KPX T otilde -80 +KPX T period -80 +KPX T r -80 +KPX T racute -80 +KPX T rcommaaccent -80 +KPX T semicolon -40 +KPX T u -90 +KPX T uacute -90 +KPX T ucircumflex -90 +KPX T udieresis -90 +KPX T ugrave -90 +KPX T uhungarumlaut -90 +KPX T umacron -90 +KPX T uogonek -90 +KPX T uring -90 +KPX T w -60 +KPX T y -60 +KPX T yacute -60 +KPX T ydieresis -60 +KPX Tcaron A -90 +KPX Tcaron Aacute -90 +KPX Tcaron Abreve -90 +KPX Tcaron Acircumflex -90 +KPX Tcaron Adieresis -90 +KPX Tcaron Agrave -90 +KPX Tcaron Amacron -90 +KPX Tcaron Aogonek -90 +KPX Tcaron Aring -90 +KPX Tcaron Atilde -90 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -80 +KPX Tcaron aacute -80 +KPX Tcaron abreve -80 +KPX Tcaron acircumflex -80 +KPX Tcaron adieresis -80 +KPX Tcaron agrave -80 +KPX Tcaron amacron -80 +KPX Tcaron aogonek -80 +KPX Tcaron aring -80 +KPX Tcaron atilde -80 +KPX Tcaron colon -40 +KPX Tcaron comma -80 +KPX Tcaron e -60 +KPX Tcaron eacute -60 +KPX Tcaron ecaron -60 +KPX Tcaron ecircumflex -60 +KPX Tcaron edieresis -60 +KPX Tcaron edotaccent -60 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -60 +KPX Tcaron hyphen -120 +KPX Tcaron o -80 +KPX Tcaron oacute -80 +KPX Tcaron ocircumflex -80 +KPX Tcaron odieresis -80 +KPX Tcaron ograve -80 +KPX Tcaron ohungarumlaut -80 +KPX Tcaron omacron -80 +KPX Tcaron oslash -80 +KPX Tcaron otilde -80 +KPX Tcaron period -80 +KPX Tcaron r -80 +KPX Tcaron racute -80 +KPX Tcaron rcommaaccent -80 +KPX Tcaron semicolon -40 +KPX Tcaron u -90 +KPX Tcaron uacute -90 +KPX Tcaron ucircumflex -90 +KPX Tcaron udieresis -90 +KPX Tcaron ugrave -90 +KPX Tcaron uhungarumlaut -90 +KPX Tcaron umacron -90 +KPX Tcaron uogonek -90 +KPX Tcaron uring -90 +KPX Tcaron w -60 +KPX Tcaron y -60 +KPX Tcaron yacute -60 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -90 +KPX Tcommaaccent Aacute -90 +KPX Tcommaaccent Abreve -90 +KPX Tcommaaccent Acircumflex -90 +KPX Tcommaaccent Adieresis -90 +KPX Tcommaaccent Agrave -90 +KPX Tcommaaccent Amacron -90 +KPX Tcommaaccent Aogonek -90 +KPX Tcommaaccent Aring -90 +KPX Tcommaaccent Atilde -90 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -80 +KPX Tcommaaccent aacute -80 +KPX Tcommaaccent abreve -80 +KPX Tcommaaccent acircumflex -80 +KPX Tcommaaccent adieresis -80 +KPX Tcommaaccent agrave -80 +KPX Tcommaaccent amacron -80 +KPX Tcommaaccent aogonek -80 +KPX Tcommaaccent aring -80 +KPX Tcommaaccent atilde -80 +KPX Tcommaaccent colon -40 +KPX Tcommaaccent comma -80 +KPX Tcommaaccent e -60 +KPX Tcommaaccent eacute -60 +KPX Tcommaaccent ecaron -60 +KPX Tcommaaccent ecircumflex -60 +KPX Tcommaaccent edieresis -60 +KPX Tcommaaccent edotaccent -60 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -60 +KPX Tcommaaccent hyphen -120 +KPX Tcommaaccent o -80 +KPX Tcommaaccent oacute -80 +KPX Tcommaaccent ocircumflex -80 +KPX Tcommaaccent odieresis -80 +KPX Tcommaaccent ograve -80 +KPX Tcommaaccent ohungarumlaut -80 +KPX Tcommaaccent omacron -80 +KPX Tcommaaccent oslash -80 +KPX Tcommaaccent otilde -80 +KPX Tcommaaccent period -80 +KPX Tcommaaccent r -80 +KPX Tcommaaccent racute -80 +KPX Tcommaaccent rcommaaccent -80 +KPX Tcommaaccent semicolon -40 +KPX Tcommaaccent u -90 +KPX Tcommaaccent uacute -90 +KPX Tcommaaccent ucircumflex -90 +KPX Tcommaaccent udieresis -90 +KPX Tcommaaccent ugrave -90 +KPX Tcommaaccent uhungarumlaut -90 +KPX Tcommaaccent umacron -90 +KPX Tcommaaccent uogonek -90 +KPX Tcommaaccent uring -90 +KPX Tcommaaccent w -60 +KPX Tcommaaccent y -60 +KPX Tcommaaccent yacute -60 +KPX Tcommaaccent ydieresis -60 +KPX U A -50 +KPX U Aacute -50 +KPX U Abreve -50 +KPX U Acircumflex -50 +KPX U Adieresis -50 +KPX U Agrave -50 +KPX U Amacron -50 +KPX U Aogonek -50 +KPX U Aring -50 +KPX U Atilde -50 +KPX U comma -30 +KPX U period -30 +KPX Uacute A -50 +KPX Uacute Aacute -50 +KPX Uacute Abreve -50 +KPX Uacute Acircumflex -50 +KPX Uacute Adieresis -50 +KPX Uacute Agrave -50 +KPX Uacute Amacron -50 +KPX Uacute Aogonek -50 +KPX Uacute Aring -50 +KPX Uacute Atilde -50 +KPX Uacute comma -30 +KPX Uacute period -30 +KPX Ucircumflex A -50 +KPX Ucircumflex Aacute -50 +KPX Ucircumflex Abreve -50 +KPX Ucircumflex Acircumflex -50 +KPX Ucircumflex Adieresis -50 +KPX Ucircumflex Agrave -50 +KPX Ucircumflex Amacron -50 +KPX Ucircumflex Aogonek -50 +KPX Ucircumflex Aring -50 +KPX Ucircumflex Atilde -50 +KPX Ucircumflex comma -30 +KPX Ucircumflex period -30 +KPX Udieresis A -50 +KPX Udieresis Aacute -50 +KPX Udieresis Abreve -50 +KPX Udieresis Acircumflex -50 +KPX Udieresis Adieresis -50 +KPX Udieresis Agrave -50 +KPX Udieresis Amacron -50 +KPX Udieresis Aogonek -50 +KPX Udieresis Aring -50 +KPX Udieresis Atilde -50 +KPX Udieresis comma -30 +KPX Udieresis period -30 +KPX Ugrave A -50 +KPX Ugrave Aacute -50 +KPX Ugrave Abreve -50 +KPX Ugrave Acircumflex -50 +KPX Ugrave Adieresis -50 +KPX Ugrave Agrave -50 +KPX Ugrave Amacron -50 +KPX Ugrave Aogonek -50 +KPX Ugrave Aring -50 +KPX Ugrave Atilde -50 +KPX Ugrave comma -30 +KPX Ugrave period -30 +KPX Uhungarumlaut A -50 +KPX Uhungarumlaut Aacute -50 +KPX Uhungarumlaut Abreve -50 +KPX Uhungarumlaut Acircumflex -50 +KPX Uhungarumlaut Adieresis -50 +KPX Uhungarumlaut Agrave -50 +KPX Uhungarumlaut Amacron -50 +KPX Uhungarumlaut Aogonek -50 +KPX Uhungarumlaut Aring -50 +KPX Uhungarumlaut Atilde -50 +KPX Uhungarumlaut comma -30 +KPX Uhungarumlaut period -30 +KPX Umacron A -50 +KPX Umacron Aacute -50 +KPX Umacron Abreve -50 +KPX Umacron Acircumflex -50 +KPX Umacron Adieresis -50 +KPX Umacron Agrave -50 +KPX Umacron Amacron -50 +KPX Umacron Aogonek -50 +KPX Umacron Aring -50 +KPX Umacron Atilde -50 +KPX Umacron comma -30 +KPX Umacron period -30 +KPX Uogonek A -50 +KPX Uogonek Aacute -50 +KPX Uogonek Abreve -50 +KPX Uogonek Acircumflex -50 +KPX Uogonek Adieresis -50 +KPX Uogonek Agrave -50 +KPX Uogonek Amacron -50 +KPX Uogonek Aogonek -50 +KPX Uogonek Aring -50 +KPX Uogonek Atilde -50 +KPX Uogonek comma -30 +KPX Uogonek period -30 +KPX Uring A -50 +KPX Uring Aacute -50 +KPX Uring Abreve -50 +KPX Uring Acircumflex -50 +KPX Uring Adieresis -50 +KPX Uring Agrave -50 +KPX Uring Amacron -50 +KPX Uring Aogonek -50 +KPX Uring Aring -50 +KPX Uring Atilde -50 +KPX Uring comma -30 +KPX Uring period -30 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -50 +KPX V Gbreve -50 +KPX V Gcommaaccent -50 +KPX V O -50 +KPX V Oacute -50 +KPX V Ocircumflex -50 +KPX V Odieresis -50 +KPX V Ograve -50 +KPX V Ohungarumlaut -50 +KPX V Omacron -50 +KPX V Oslash -50 +KPX V Otilde -50 +KPX V a -60 +KPX V aacute -60 +KPX V abreve -60 +KPX V acircumflex -60 +KPX V adieresis -60 +KPX V agrave -60 +KPX V amacron -60 +KPX V aogonek -60 +KPX V aring -60 +KPX V atilde -60 +KPX V colon -40 +KPX V comma -120 +KPX V e -50 +KPX V eacute -50 +KPX V ecaron -50 +KPX V ecircumflex -50 +KPX V edieresis -50 +KPX V edotaccent -50 +KPX V egrave -50 +KPX V emacron -50 +KPX V eogonek -50 +KPX V hyphen -80 +KPX V o -90 +KPX V oacute -90 +KPX V ocircumflex -90 +KPX V odieresis -90 +KPX V ograve -90 +KPX V ohungarumlaut -90 +KPX V omacron -90 +KPX V oslash -90 +KPX V otilde -90 +KPX V period -120 +KPX V semicolon -40 +KPX V u -60 +KPX V uacute -60 +KPX V ucircumflex -60 +KPX V udieresis -60 +KPX V ugrave -60 +KPX V uhungarumlaut -60 +KPX V umacron -60 +KPX V uogonek -60 +KPX V uring -60 +KPX W A -60 +KPX W Aacute -60 +KPX W Abreve -60 +KPX W Acircumflex -60 +KPX W Adieresis -60 +KPX W Agrave -60 +KPX W Amacron -60 +KPX W Aogonek -60 +KPX W Aring -60 +KPX W Atilde -60 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W colon -10 +KPX W comma -80 +KPX W e -35 +KPX W eacute -35 +KPX W ecaron -35 +KPX W ecircumflex -35 +KPX W edieresis -35 +KPX W edotaccent -35 +KPX W egrave -35 +KPX W emacron -35 +KPX W eogonek -35 +KPX W hyphen -40 +KPX W o -60 +KPX W oacute -60 +KPX W ocircumflex -60 +KPX W odieresis -60 +KPX W ograve -60 +KPX W ohungarumlaut -60 +KPX W omacron -60 +KPX W oslash -60 +KPX W otilde -60 +KPX W period -80 +KPX W semicolon -10 +KPX W u -45 +KPX W uacute -45 +KPX W ucircumflex -45 +KPX W udieresis -45 +KPX W ugrave -45 +KPX W uhungarumlaut -45 +KPX W umacron -45 +KPX W uogonek -45 +KPX W uring -45 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -70 +KPX Y Oacute -70 +KPX Y Ocircumflex -70 +KPX Y Odieresis -70 +KPX Y Ograve -70 +KPX Y Ohungarumlaut -70 +KPX Y Omacron -70 +KPX Y Oslash -70 +KPX Y Otilde -70 +KPX Y a -90 +KPX Y aacute -90 +KPX Y abreve -90 +KPX Y acircumflex -90 +KPX Y adieresis -90 +KPX Y agrave -90 +KPX Y amacron -90 +KPX Y aogonek -90 +KPX Y aring -90 +KPX Y atilde -90 +KPX Y colon -50 +KPX Y comma -100 +KPX Y e -80 +KPX Y eacute -80 +KPX Y ecaron -80 +KPX Y ecircumflex -80 +KPX Y edieresis -80 +KPX Y edotaccent -80 +KPX Y egrave -80 +KPX Y emacron -80 +KPX Y eogonek -80 +KPX Y o -100 +KPX Y oacute -100 +KPX Y ocircumflex -100 +KPX Y odieresis -100 +KPX Y ograve -100 +KPX Y ohungarumlaut -100 +KPX Y omacron -100 +KPX Y oslash -100 +KPX Y otilde -100 +KPX Y period -100 +KPX Y semicolon -50 +KPX Y u -100 +KPX Y uacute -100 +KPX Y ucircumflex -100 +KPX Y udieresis -100 +KPX Y ugrave -100 +KPX Y uhungarumlaut -100 +KPX Y umacron -100 +KPX Y uogonek -100 +KPX Y uring -100 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -70 +KPX Yacute Oacute -70 +KPX Yacute Ocircumflex -70 +KPX Yacute Odieresis -70 +KPX Yacute Ograve -70 +KPX Yacute Ohungarumlaut -70 +KPX Yacute Omacron -70 +KPX Yacute Oslash -70 +KPX Yacute Otilde -70 +KPX Yacute a -90 +KPX Yacute aacute -90 +KPX Yacute abreve -90 +KPX Yacute acircumflex -90 +KPX Yacute adieresis -90 +KPX Yacute agrave -90 +KPX Yacute amacron -90 +KPX Yacute aogonek -90 +KPX Yacute aring -90 +KPX Yacute atilde -90 +KPX Yacute colon -50 +KPX Yacute comma -100 +KPX Yacute e -80 +KPX Yacute eacute -80 +KPX Yacute ecaron -80 +KPX Yacute ecircumflex -80 +KPX Yacute edieresis -80 +KPX Yacute edotaccent -80 +KPX Yacute egrave -80 +KPX Yacute emacron -80 +KPX Yacute eogonek -80 +KPX Yacute o -100 +KPX Yacute oacute -100 +KPX Yacute ocircumflex -100 +KPX Yacute odieresis -100 +KPX Yacute ograve -100 +KPX Yacute ohungarumlaut -100 +KPX Yacute omacron -100 +KPX Yacute oslash -100 +KPX Yacute otilde -100 +KPX Yacute period -100 +KPX Yacute semicolon -50 +KPX Yacute u -100 +KPX Yacute uacute -100 +KPX Yacute ucircumflex -100 +KPX Yacute udieresis -100 +KPX Yacute ugrave -100 +KPX Yacute uhungarumlaut -100 +KPX Yacute umacron -100 +KPX Yacute uogonek -100 +KPX Yacute uring -100 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -70 +KPX Ydieresis Oacute -70 +KPX Ydieresis Ocircumflex -70 +KPX Ydieresis Odieresis -70 +KPX Ydieresis Ograve -70 +KPX Ydieresis Ohungarumlaut -70 +KPX Ydieresis Omacron -70 +KPX Ydieresis Oslash -70 +KPX Ydieresis Otilde -70 +KPX Ydieresis a -90 +KPX Ydieresis aacute -90 +KPX Ydieresis abreve -90 +KPX Ydieresis acircumflex -90 +KPX Ydieresis adieresis -90 +KPX Ydieresis agrave -90 +KPX Ydieresis amacron -90 +KPX Ydieresis aogonek -90 +KPX Ydieresis aring -90 +KPX Ydieresis atilde -90 +KPX Ydieresis colon -50 +KPX Ydieresis comma -100 +KPX Ydieresis e -80 +KPX Ydieresis eacute -80 +KPX Ydieresis ecaron -80 +KPX Ydieresis ecircumflex -80 +KPX Ydieresis edieresis -80 +KPX Ydieresis edotaccent -80 +KPX Ydieresis egrave -80 +KPX Ydieresis emacron -80 +KPX Ydieresis eogonek -80 +KPX Ydieresis o -100 +KPX Ydieresis oacute -100 +KPX Ydieresis ocircumflex -100 +KPX Ydieresis odieresis -100 +KPX Ydieresis ograve -100 +KPX Ydieresis ohungarumlaut -100 +KPX Ydieresis omacron -100 +KPX Ydieresis oslash -100 +KPX Ydieresis otilde -100 +KPX Ydieresis period -100 +KPX Ydieresis semicolon -50 +KPX Ydieresis u -100 +KPX Ydieresis uacute -100 +KPX Ydieresis ucircumflex -100 +KPX Ydieresis udieresis -100 +KPX Ydieresis ugrave -100 +KPX Ydieresis uhungarumlaut -100 +KPX Ydieresis umacron -100 +KPX Ydieresis uogonek -100 +KPX Ydieresis uring -100 +KPX a g -10 +KPX a gbreve -10 +KPX a gcommaaccent -10 +KPX a v -15 +KPX a w -15 +KPX a y -20 +KPX a yacute -20 +KPX a ydieresis -20 +KPX aacute g -10 +KPX aacute gbreve -10 +KPX aacute gcommaaccent -10 +KPX aacute v -15 +KPX aacute w -15 +KPX aacute y -20 +KPX aacute yacute -20 +KPX aacute ydieresis -20 +KPX abreve g -10 +KPX abreve gbreve -10 +KPX abreve gcommaaccent -10 +KPX abreve v -15 +KPX abreve w -15 +KPX abreve y -20 +KPX abreve yacute -20 +KPX abreve ydieresis -20 +KPX acircumflex g -10 +KPX acircumflex gbreve -10 +KPX acircumflex gcommaaccent -10 +KPX acircumflex v -15 +KPX acircumflex w -15 +KPX acircumflex y -20 +KPX acircumflex yacute -20 +KPX acircumflex ydieresis -20 +KPX adieresis g -10 +KPX adieresis gbreve -10 +KPX adieresis gcommaaccent -10 +KPX adieresis v -15 +KPX adieresis w -15 +KPX adieresis y -20 +KPX adieresis yacute -20 +KPX adieresis ydieresis -20 +KPX agrave g -10 +KPX agrave gbreve -10 +KPX agrave gcommaaccent -10 +KPX agrave v -15 +KPX agrave w -15 +KPX agrave y -20 +KPX agrave yacute -20 +KPX agrave ydieresis -20 +KPX amacron g -10 +KPX amacron gbreve -10 +KPX amacron gcommaaccent -10 +KPX amacron v -15 +KPX amacron w -15 +KPX amacron y -20 +KPX amacron yacute -20 +KPX amacron ydieresis -20 +KPX aogonek g -10 +KPX aogonek gbreve -10 +KPX aogonek gcommaaccent -10 +KPX aogonek v -15 +KPX aogonek w -15 +KPX aogonek y -20 +KPX aogonek yacute -20 +KPX aogonek ydieresis -20 +KPX aring g -10 +KPX aring gbreve -10 +KPX aring gcommaaccent -10 +KPX aring v -15 +KPX aring w -15 +KPX aring y -20 +KPX aring yacute -20 +KPX aring ydieresis -20 +KPX atilde g -10 +KPX atilde gbreve -10 +KPX atilde gcommaaccent -10 +KPX atilde v -15 +KPX atilde w -15 +KPX atilde y -20 +KPX atilde yacute -20 +KPX atilde ydieresis -20 +KPX b l -10 +KPX b lacute -10 +KPX b lcommaaccent -10 +KPX b lslash -10 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c h -10 +KPX c k -20 +KPX c kcommaaccent -20 +KPX c l -20 +KPX c lacute -20 +KPX c lcommaaccent -20 +KPX c lslash -20 +KPX c y -10 +KPX c yacute -10 +KPX c ydieresis -10 +KPX cacute h -10 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX cacute l -20 +KPX cacute lacute -20 +KPX cacute lcommaaccent -20 +KPX cacute lslash -20 +KPX cacute y -10 +KPX cacute yacute -10 +KPX cacute ydieresis -10 +KPX ccaron h -10 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccaron l -20 +KPX ccaron lacute -20 +KPX ccaron lcommaaccent -20 +KPX ccaron lslash -20 +KPX ccaron y -10 +KPX ccaron yacute -10 +KPX ccaron ydieresis -10 +KPX ccedilla h -10 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX ccedilla l -20 +KPX ccedilla lacute -20 +KPX ccedilla lcommaaccent -20 +KPX ccedilla lslash -20 +KPX ccedilla y -10 +KPX ccedilla yacute -10 +KPX ccedilla ydieresis -10 +KPX colon space -40 +KPX comma quotedblright -120 +KPX comma quoteright -120 +KPX comma space -40 +KPX d d -10 +KPX d dcroat -10 +KPX d v -15 +KPX d w -15 +KPX d y -15 +KPX d yacute -15 +KPX d ydieresis -15 +KPX dcroat d -10 +KPX dcroat dcroat -10 +KPX dcroat v -15 +KPX dcroat w -15 +KPX dcroat y -15 +KPX dcroat yacute -15 +KPX dcroat ydieresis -15 +KPX e comma 10 +KPX e period 20 +KPX e v -15 +KPX e w -15 +KPX e x -15 +KPX e y -15 +KPX e yacute -15 +KPX e ydieresis -15 +KPX eacute comma 10 +KPX eacute period 20 +KPX eacute v -15 +KPX eacute w -15 +KPX eacute x -15 +KPX eacute y -15 +KPX eacute yacute -15 +KPX eacute ydieresis -15 +KPX ecaron comma 10 +KPX ecaron period 20 +KPX ecaron v -15 +KPX ecaron w -15 +KPX ecaron x -15 +KPX ecaron y -15 +KPX ecaron yacute -15 +KPX ecaron ydieresis -15 +KPX ecircumflex comma 10 +KPX ecircumflex period 20 +KPX ecircumflex v -15 +KPX ecircumflex w -15 +KPX ecircumflex x -15 +KPX ecircumflex y -15 +KPX ecircumflex yacute -15 +KPX ecircumflex ydieresis -15 +KPX edieresis comma 10 +KPX edieresis period 20 +KPX edieresis v -15 +KPX edieresis w -15 +KPX edieresis x -15 +KPX edieresis y -15 +KPX edieresis yacute -15 +KPX edieresis ydieresis -15 +KPX edotaccent comma 10 +KPX edotaccent period 20 +KPX edotaccent v -15 +KPX edotaccent w -15 +KPX edotaccent x -15 +KPX edotaccent y -15 +KPX edotaccent yacute -15 +KPX edotaccent ydieresis -15 +KPX egrave comma 10 +KPX egrave period 20 +KPX egrave v -15 +KPX egrave w -15 +KPX egrave x -15 +KPX egrave y -15 +KPX egrave yacute -15 +KPX egrave ydieresis -15 +KPX emacron comma 10 +KPX emacron period 20 +KPX emacron v -15 +KPX emacron w -15 +KPX emacron x -15 +KPX emacron y -15 +KPX emacron yacute -15 +KPX emacron ydieresis -15 +KPX eogonek comma 10 +KPX eogonek period 20 +KPX eogonek v -15 +KPX eogonek w -15 +KPX eogonek x -15 +KPX eogonek y -15 +KPX eogonek yacute -15 +KPX eogonek ydieresis -15 +KPX f comma -10 +KPX f e -10 +KPX f eacute -10 +KPX f ecaron -10 +KPX f ecircumflex -10 +KPX f edieresis -10 +KPX f edotaccent -10 +KPX f egrave -10 +KPX f emacron -10 +KPX f eogonek -10 +KPX f o -20 +KPX f oacute -20 +KPX f ocircumflex -20 +KPX f odieresis -20 +KPX f ograve -20 +KPX f ohungarumlaut -20 +KPX f omacron -20 +KPX f oslash -20 +KPX f otilde -20 +KPX f period -10 +KPX f quotedblright 30 +KPX f quoteright 30 +KPX g e 10 +KPX g eacute 10 +KPX g ecaron 10 +KPX g ecircumflex 10 +KPX g edieresis 10 +KPX g edotaccent 10 +KPX g egrave 10 +KPX g emacron 10 +KPX g eogonek 10 +KPX g g -10 +KPX g gbreve -10 +KPX g gcommaaccent -10 +KPX gbreve e 10 +KPX gbreve eacute 10 +KPX gbreve ecaron 10 +KPX gbreve ecircumflex 10 +KPX gbreve edieresis 10 +KPX gbreve edotaccent 10 +KPX gbreve egrave 10 +KPX gbreve emacron 10 +KPX gbreve eogonek 10 +KPX gbreve g -10 +KPX gbreve gbreve -10 +KPX gbreve gcommaaccent -10 +KPX gcommaaccent e 10 +KPX gcommaaccent eacute 10 +KPX gcommaaccent ecaron 10 +KPX gcommaaccent ecircumflex 10 +KPX gcommaaccent edieresis 10 +KPX gcommaaccent edotaccent 10 +KPX gcommaaccent egrave 10 +KPX gcommaaccent emacron 10 +KPX gcommaaccent eogonek 10 +KPX gcommaaccent g -10 +KPX gcommaaccent gbreve -10 +KPX gcommaaccent gcommaaccent -10 +KPX h y -20 +KPX h yacute -20 +KPX h ydieresis -20 +KPX k o -15 +KPX k oacute -15 +KPX k ocircumflex -15 +KPX k odieresis -15 +KPX k ograve -15 +KPX k ohungarumlaut -15 +KPX k omacron -15 +KPX k oslash -15 +KPX k otilde -15 +KPX kcommaaccent o -15 +KPX kcommaaccent oacute -15 +KPX kcommaaccent ocircumflex -15 +KPX kcommaaccent odieresis -15 +KPX kcommaaccent ograve -15 +KPX kcommaaccent ohungarumlaut -15 +KPX kcommaaccent omacron -15 +KPX kcommaaccent oslash -15 +KPX kcommaaccent otilde -15 +KPX l w -15 +KPX l y -15 +KPX l yacute -15 +KPX l ydieresis -15 +KPX lacute w -15 +KPX lacute y -15 +KPX lacute yacute -15 +KPX lacute ydieresis -15 +KPX lcommaaccent w -15 +KPX lcommaaccent y -15 +KPX lcommaaccent yacute -15 +KPX lcommaaccent ydieresis -15 +KPX lslash w -15 +KPX lslash y -15 +KPX lslash yacute -15 +KPX lslash ydieresis -15 +KPX m u -20 +KPX m uacute -20 +KPX m ucircumflex -20 +KPX m udieresis -20 +KPX m ugrave -20 +KPX m uhungarumlaut -20 +KPX m umacron -20 +KPX m uogonek -20 +KPX m uring -20 +KPX m y -30 +KPX m yacute -30 +KPX m ydieresis -30 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -40 +KPX n y -20 +KPX n yacute -20 +KPX n ydieresis -20 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -40 +KPX nacute y -20 +KPX nacute yacute -20 +KPX nacute ydieresis -20 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -40 +KPX ncaron y -20 +KPX ncaron yacute -20 +KPX ncaron ydieresis -20 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -40 +KPX ncommaaccent y -20 +KPX ncommaaccent yacute -20 +KPX ncommaaccent ydieresis -20 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -40 +KPX ntilde y -20 +KPX ntilde yacute -20 +KPX ntilde ydieresis -20 +KPX o v -20 +KPX o w -15 +KPX o x -30 +KPX o y -20 +KPX o yacute -20 +KPX o ydieresis -20 +KPX oacute v -20 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -20 +KPX oacute yacute -20 +KPX oacute ydieresis -20 +KPX ocircumflex v -20 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -20 +KPX ocircumflex yacute -20 +KPX ocircumflex ydieresis -20 +KPX odieresis v -20 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -20 +KPX odieresis yacute -20 +KPX odieresis ydieresis -20 +KPX ograve v -20 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -20 +KPX ograve yacute -20 +KPX ograve ydieresis -20 +KPX ohungarumlaut v -20 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -20 +KPX ohungarumlaut yacute -20 +KPX ohungarumlaut ydieresis -20 +KPX omacron v -20 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -20 +KPX omacron yacute -20 +KPX omacron ydieresis -20 +KPX oslash v -20 +KPX oslash w -15 +KPX oslash x -30 +KPX oslash y -20 +KPX oslash yacute -20 +KPX oslash ydieresis -20 +KPX otilde v -20 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -20 +KPX otilde yacute -20 +KPX otilde ydieresis -20 +KPX p y -15 +KPX p yacute -15 +KPX p ydieresis -15 +KPX period quotedblright -120 +KPX period quoteright -120 +KPX period space -40 +KPX quotedblright space -80 +KPX quoteleft quoteleft -46 +KPX quoteright d -80 +KPX quoteright dcroat -80 +KPX quoteright l -20 +KPX quoteright lacute -20 +KPX quoteright lcommaaccent -20 +KPX quoteright lslash -20 +KPX quoteright quoteright -46 +KPX quoteright r -40 +KPX quoteright racute -40 +KPX quoteright rcaron -40 +KPX quoteright rcommaaccent -40 +KPX quoteright s -60 +KPX quoteright sacute -60 +KPX quoteright scaron -60 +KPX quoteright scedilla -60 +KPX quoteright scommaaccent -60 +KPX quoteright space -80 +KPX quoteright v -20 +KPX r c -20 +KPX r cacute -20 +KPX r ccaron -20 +KPX r ccedilla -20 +KPX r comma -60 +KPX r d -20 +KPX r dcroat -20 +KPX r g -15 +KPX r gbreve -15 +KPX r gcommaaccent -15 +KPX r hyphen -20 +KPX r o -20 +KPX r oacute -20 +KPX r ocircumflex -20 +KPX r odieresis -20 +KPX r ograve -20 +KPX r ohungarumlaut -20 +KPX r omacron -20 +KPX r oslash -20 +KPX r otilde -20 +KPX r period -60 +KPX r q -20 +KPX r s -15 +KPX r sacute -15 +KPX r scaron -15 +KPX r scedilla -15 +KPX r scommaaccent -15 +KPX r t 20 +KPX r tcommaaccent 20 +KPX r v 10 +KPX r y 10 +KPX r yacute 10 +KPX r ydieresis 10 +KPX racute c -20 +KPX racute cacute -20 +KPX racute ccaron -20 +KPX racute ccedilla -20 +KPX racute comma -60 +KPX racute d -20 +KPX racute dcroat -20 +KPX racute g -15 +KPX racute gbreve -15 +KPX racute gcommaaccent -15 +KPX racute hyphen -20 +KPX racute o -20 +KPX racute oacute -20 +KPX racute ocircumflex -20 +KPX racute odieresis -20 +KPX racute ograve -20 +KPX racute ohungarumlaut -20 +KPX racute omacron -20 +KPX racute oslash -20 +KPX racute otilde -20 +KPX racute period -60 +KPX racute q -20 +KPX racute s -15 +KPX racute sacute -15 +KPX racute scaron -15 +KPX racute scedilla -15 +KPX racute scommaaccent -15 +KPX racute t 20 +KPX racute tcommaaccent 20 +KPX racute v 10 +KPX racute y 10 +KPX racute yacute 10 +KPX racute ydieresis 10 +KPX rcaron c -20 +KPX rcaron cacute -20 +KPX rcaron ccaron -20 +KPX rcaron ccedilla -20 +KPX rcaron comma -60 +KPX rcaron d -20 +KPX rcaron dcroat -20 +KPX rcaron g -15 +KPX rcaron gbreve -15 +KPX rcaron gcommaaccent -15 +KPX rcaron hyphen -20 +KPX rcaron o -20 +KPX rcaron oacute -20 +KPX rcaron ocircumflex -20 +KPX rcaron odieresis -20 +KPX rcaron ograve -20 +KPX rcaron ohungarumlaut -20 +KPX rcaron omacron -20 +KPX rcaron oslash -20 +KPX rcaron otilde -20 +KPX rcaron period -60 +KPX rcaron q -20 +KPX rcaron s -15 +KPX rcaron sacute -15 +KPX rcaron scaron -15 +KPX rcaron scedilla -15 +KPX rcaron scommaaccent -15 +KPX rcaron t 20 +KPX rcaron tcommaaccent 20 +KPX rcaron v 10 +KPX rcaron y 10 +KPX rcaron yacute 10 +KPX rcaron ydieresis 10 +KPX rcommaaccent c -20 +KPX rcommaaccent cacute -20 +KPX rcommaaccent ccaron -20 +KPX rcommaaccent ccedilla -20 +KPX rcommaaccent comma -60 +KPX rcommaaccent d -20 +KPX rcommaaccent dcroat -20 +KPX rcommaaccent g -15 +KPX rcommaaccent gbreve -15 +KPX rcommaaccent gcommaaccent -15 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent o -20 +KPX rcommaaccent oacute -20 +KPX rcommaaccent ocircumflex -20 +KPX rcommaaccent odieresis -20 +KPX rcommaaccent ograve -20 +KPX rcommaaccent ohungarumlaut -20 +KPX rcommaaccent omacron -20 +KPX rcommaaccent oslash -20 +KPX rcommaaccent otilde -20 +KPX rcommaaccent period -60 +KPX rcommaaccent q -20 +KPX rcommaaccent s -15 +KPX rcommaaccent sacute -15 +KPX rcommaaccent scaron -15 +KPX rcommaaccent scedilla -15 +KPX rcommaaccent scommaaccent -15 +KPX rcommaaccent t 20 +KPX rcommaaccent tcommaaccent 20 +KPX rcommaaccent v 10 +KPX rcommaaccent y 10 +KPX rcommaaccent yacute 10 +KPX rcommaaccent ydieresis 10 +KPX s w -15 +KPX sacute w -15 +KPX scaron w -15 +KPX scedilla w -15 +KPX scommaaccent w -15 +KPX semicolon space -40 +KPX space T -100 +KPX space Tcaron -100 +KPX space Tcommaaccent -100 +KPX space V -80 +KPX space W -80 +KPX space Y -120 +KPX space Yacute -120 +KPX space Ydieresis -120 +KPX space quotedblleft -80 +KPX space quoteleft -60 +KPX v a -20 +KPX v aacute -20 +KPX v abreve -20 +KPX v acircumflex -20 +KPX v adieresis -20 +KPX v agrave -20 +KPX v amacron -20 +KPX v aogonek -20 +KPX v aring -20 +KPX v atilde -20 +KPX v comma -80 +KPX v o -30 +KPX v oacute -30 +KPX v ocircumflex -30 +KPX v odieresis -30 +KPX v ograve -30 +KPX v ohungarumlaut -30 +KPX v omacron -30 +KPX v oslash -30 +KPX v otilde -30 +KPX v period -80 +KPX w comma -40 +KPX w o -20 +KPX w oacute -20 +KPX w ocircumflex -20 +KPX w odieresis -20 +KPX w ograve -20 +KPX w ohungarumlaut -20 +KPX w omacron -20 +KPX w oslash -20 +KPX w otilde -20 +KPX w period -40 +KPX x e -10 +KPX x eacute -10 +KPX x ecaron -10 +KPX x ecircumflex -10 +KPX x edieresis -10 +KPX x edotaccent -10 +KPX x egrave -10 +KPX x emacron -10 +KPX x eogonek -10 +KPX y a -30 +KPX y aacute -30 +KPX y abreve -30 +KPX y acircumflex -30 +KPX y adieresis -30 +KPX y agrave -30 +KPX y amacron -30 +KPX y aogonek -30 +KPX y aring -30 +KPX y atilde -30 +KPX y comma -80 +KPX y e -10 +KPX y eacute -10 +KPX y ecaron -10 +KPX y ecircumflex -10 +KPX y edieresis -10 +KPX y edotaccent -10 +KPX y egrave -10 +KPX y emacron -10 +KPX y eogonek -10 +KPX y o -25 +KPX y oacute -25 +KPX y ocircumflex -25 +KPX y odieresis -25 +KPX y ograve -25 +KPX y ohungarumlaut -25 +KPX y omacron -25 +KPX y oslash -25 +KPX y otilde -25 +KPX y period -80 +KPX yacute a -30 +KPX yacute aacute -30 +KPX yacute abreve -30 +KPX yacute acircumflex -30 +KPX yacute adieresis -30 +KPX yacute agrave -30 +KPX yacute amacron -30 +KPX yacute aogonek -30 +KPX yacute aring -30 +KPX yacute atilde -30 +KPX yacute comma -80 +KPX yacute e -10 +KPX yacute eacute -10 +KPX yacute ecaron -10 +KPX yacute ecircumflex -10 +KPX yacute edieresis -10 +KPX yacute edotaccent -10 +KPX yacute egrave -10 +KPX yacute emacron -10 +KPX yacute eogonek -10 +KPX yacute o -25 +KPX yacute oacute -25 +KPX yacute ocircumflex -25 +KPX yacute odieresis -25 +KPX yacute ograve -25 +KPX yacute ohungarumlaut -25 +KPX yacute omacron -25 +KPX yacute oslash -25 +KPX yacute otilde -25 +KPX yacute period -80 +KPX ydieresis a -30 +KPX ydieresis aacute -30 +KPX ydieresis abreve -30 +KPX ydieresis acircumflex -30 +KPX ydieresis adieresis -30 +KPX ydieresis agrave -30 +KPX ydieresis amacron -30 +KPX ydieresis aogonek -30 +KPX ydieresis aring -30 +KPX ydieresis atilde -30 +KPX ydieresis comma -80 +KPX ydieresis e -10 +KPX ydieresis eacute -10 +KPX ydieresis ecaron -10 +KPX ydieresis ecircumflex -10 +KPX ydieresis edieresis -10 +KPX ydieresis edotaccent -10 +KPX ydieresis egrave -10 +KPX ydieresis emacron -10 +KPX ydieresis eogonek -10 +KPX ydieresis o -25 +KPX ydieresis oacute -25 +KPX ydieresis ocircumflex -25 +KPX ydieresis odieresis -25 +KPX ydieresis ograve -25 +KPX ydieresis ohungarumlaut -25 +KPX ydieresis omacron -25 +KPX ydieresis oslash -25 +KPX ydieresis otilde -25 +KPX ydieresis period -80 +KPX z e 10 +KPX z eacute 10 +KPX z ecaron 10 +KPX z ecircumflex 10 +KPX z edieresis 10 +KPX z edotaccent 10 +KPX z egrave 10 +KPX z emacron 10 +KPX z eogonek 10 +KPX zacute e 10 +KPX zacute eacute 10 +KPX zacute ecaron 10 +KPX zacute ecircumflex 10 +KPX zacute edieresis 10 +KPX zacute edotaccent 10 +KPX zacute egrave 10 +KPX zacute emacron 10 +KPX zacute eogonek 10 +KPX zcaron e 10 +KPX zcaron eacute 10 +KPX zcaron ecaron 10 +KPX zcaron ecircumflex 10 +KPX zcaron edieresis 10 +KPX zcaron edotaccent 10 +KPX zcaron egrave 10 +KPX zcaron emacron 10 +KPX zcaron eogonek 10 +KPX zdotaccent e 10 +KPX zdotaccent eacute 10 +KPX zdotaccent ecaron 10 +KPX zdotaccent ecircumflex 10 +KPX zdotaccent edieresis 10 +KPX zdotaccent edotaccent 10 +KPX zdotaccent egrave 10 +KPX zdotaccent emacron 10 +KPX zdotaccent eogonek 10 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Helvetica-BoldOblique.afm b/internal/pdf/model/fonts/afms/Helvetica-BoldOblique.afm new file mode 100644 index 0000000..16845ae --- /dev/null +++ b/internal/pdf/model/fonts/afms/Helvetica-BoldOblique.afm @@ -0,0 +1,2827 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:45:12 1997 +Comment UniqueID 43053 +Comment VMusage 14482 68586 +FontName Helvetica-BoldOblique +FullName Helvetica Bold Oblique +FamilyName Helvetica +Weight Bold +ItalicAngle -12 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -174 -228 1114 962 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 532 +Ascender 718 +Descender -207 +StdHW 118 +StdVW 140 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 94 0 397 718 ; +C 34 ; WX 474 ; N quotedbl ; B 193 447 529 718 ; +C 35 ; WX 556 ; N numbersign ; B 60 0 644 698 ; +C 36 ; WX 556 ; N dollar ; B 67 -115 622 775 ; +C 37 ; WX 889 ; N percent ; B 136 -19 901 710 ; +C 38 ; WX 722 ; N ampersand ; B 89 -19 732 718 ; +C 39 ; WX 278 ; N quoteright ; B 167 445 362 718 ; +C 40 ; WX 333 ; N parenleft ; B 76 -208 470 734 ; +C 41 ; WX 333 ; N parenright ; B -25 -208 369 734 ; +C 42 ; WX 389 ; N asterisk ; B 146 387 481 718 ; +C 43 ; WX 584 ; N plus ; B 82 0 610 506 ; +C 44 ; WX 278 ; N comma ; B 28 -168 245 146 ; +C 45 ; WX 333 ; N hyphen ; B 73 215 379 345 ; +C 46 ; WX 278 ; N period ; B 64 0 245 146 ; +C 47 ; WX 278 ; N slash ; B -37 -19 468 737 ; +C 48 ; WX 556 ; N zero ; B 86 -19 617 710 ; +C 49 ; WX 556 ; N one ; B 173 0 529 710 ; +C 50 ; WX 556 ; N two ; B 26 0 619 710 ; +C 51 ; WX 556 ; N three ; B 65 -19 608 710 ; +C 52 ; WX 556 ; N four ; B 60 0 598 710 ; +C 53 ; WX 556 ; N five ; B 64 -19 636 698 ; +C 54 ; WX 556 ; N six ; B 85 -19 619 710 ; +C 55 ; WX 556 ; N seven ; B 125 0 676 698 ; +C 56 ; WX 556 ; N eight ; B 69 -19 616 710 ; +C 57 ; WX 556 ; N nine ; B 78 -19 615 710 ; +C 58 ; WX 333 ; N colon ; B 92 0 351 512 ; +C 59 ; WX 333 ; N semicolon ; B 56 -168 351 512 ; +C 60 ; WX 584 ; N less ; B 82 -8 655 514 ; +C 61 ; WX 584 ; N equal ; B 58 87 633 419 ; +C 62 ; WX 584 ; N greater ; B 36 -8 609 514 ; +C 63 ; WX 611 ; N question ; B 165 0 671 727 ; +C 64 ; WX 975 ; N at ; B 186 -19 954 737 ; +C 65 ; WX 722 ; N A ; B 20 0 702 718 ; +C 66 ; WX 722 ; N B ; B 76 0 764 718 ; +C 67 ; WX 722 ; N C ; B 107 -19 789 737 ; +C 68 ; WX 722 ; N D ; B 76 0 777 718 ; +C 69 ; WX 667 ; N E ; B 76 0 757 718 ; +C 70 ; WX 611 ; N F ; B 76 0 740 718 ; +C 71 ; WX 778 ; N G ; B 108 -19 817 737 ; +C 72 ; WX 722 ; N H ; B 71 0 804 718 ; +C 73 ; WX 278 ; N I ; B 64 0 367 718 ; +C 74 ; WX 556 ; N J ; B 60 -18 637 718 ; +C 75 ; WX 722 ; N K ; B 87 0 858 718 ; +C 76 ; WX 611 ; N L ; B 76 0 611 718 ; +C 77 ; WX 833 ; N M ; B 69 0 918 718 ; +C 78 ; WX 722 ; N N ; B 69 0 807 718 ; +C 79 ; WX 778 ; N O ; B 107 -19 823 737 ; +C 80 ; WX 667 ; N P ; B 76 0 738 718 ; +C 81 ; WX 778 ; N Q ; B 107 -52 823 737 ; +C 82 ; WX 722 ; N R ; B 76 0 778 718 ; +C 83 ; WX 667 ; N S ; B 81 -19 718 737 ; +C 84 ; WX 611 ; N T ; B 140 0 751 718 ; +C 85 ; WX 722 ; N U ; B 116 -19 804 718 ; +C 86 ; WX 667 ; N V ; B 172 0 801 718 ; +C 87 ; WX 944 ; N W ; B 169 0 1082 718 ; +C 88 ; WX 667 ; N X ; B 14 0 791 718 ; +C 89 ; WX 667 ; N Y ; B 168 0 806 718 ; +C 90 ; WX 611 ; N Z ; B 25 0 737 718 ; +C 91 ; WX 333 ; N bracketleft ; B 21 -196 462 722 ; +C 92 ; WX 278 ; N backslash ; B 124 -19 307 737 ; +C 93 ; WX 333 ; N bracketright ; B -18 -196 423 722 ; +C 94 ; WX 584 ; N asciicircum ; B 131 323 591 698 ; +C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; +C 96 ; WX 278 ; N quoteleft ; B 165 454 361 727 ; +C 97 ; WX 556 ; N a ; B 55 -14 583 546 ; +C 98 ; WX 611 ; N b ; B 61 -14 645 718 ; +C 99 ; WX 556 ; N c ; B 79 -14 599 546 ; +C 100 ; WX 611 ; N d ; B 82 -14 704 718 ; +C 101 ; WX 556 ; N e ; B 70 -14 593 546 ; +C 102 ; WX 333 ; N f ; B 87 0 469 727 ; L i fi ; L l fl ; +C 103 ; WX 611 ; N g ; B 38 -217 666 546 ; +C 104 ; WX 611 ; N h ; B 65 0 629 718 ; +C 105 ; WX 278 ; N i ; B 69 0 363 725 ; +C 106 ; WX 278 ; N j ; B -42 -214 363 725 ; +C 107 ; WX 556 ; N k ; B 69 0 670 718 ; +C 108 ; WX 278 ; N l ; B 69 0 362 718 ; +C 109 ; WX 889 ; N m ; B 64 0 909 546 ; +C 110 ; WX 611 ; N n ; B 65 0 629 546 ; +C 111 ; WX 611 ; N o ; B 82 -14 643 546 ; +C 112 ; WX 611 ; N p ; B 18 -207 645 546 ; +C 113 ; WX 611 ; N q ; B 80 -207 665 546 ; +C 114 ; WX 389 ; N r ; B 64 0 489 546 ; +C 115 ; WX 556 ; N s ; B 63 -14 584 546 ; +C 116 ; WX 333 ; N t ; B 100 -6 422 676 ; +C 117 ; WX 611 ; N u ; B 98 -14 658 532 ; +C 118 ; WX 556 ; N v ; B 126 0 656 532 ; +C 119 ; WX 778 ; N w ; B 123 0 882 532 ; +C 120 ; WX 556 ; N x ; B 15 0 648 532 ; +C 121 ; WX 556 ; N y ; B 42 -214 652 532 ; +C 122 ; WX 500 ; N z ; B 20 0 583 532 ; +C 123 ; WX 389 ; N braceleft ; B 94 -196 518 722 ; +C 124 ; WX 280 ; N bar ; B 36 -225 361 775 ; +C 125 ; WX 389 ; N braceright ; B -18 -196 407 722 ; +C 126 ; WX 584 ; N asciitilde ; B 115 163 577 343 ; +C 161 ; WX 333 ; N exclamdown ; B 50 -186 353 532 ; +C 162 ; WX 556 ; N cent ; B 79 -118 599 628 ; +C 163 ; WX 556 ; N sterling ; B 50 -16 635 718 ; +C 164 ; WX 167 ; N fraction ; B -174 -19 487 710 ; +C 165 ; WX 556 ; N yen ; B 60 0 713 698 ; +C 166 ; WX 556 ; N florin ; B -50 -210 669 737 ; +C 167 ; WX 556 ; N section ; B 61 -184 598 727 ; +C 168 ; WX 556 ; N currency ; B 27 76 680 636 ; +C 169 ; WX 238 ; N quotesingle ; B 165 447 321 718 ; +C 170 ; WX 500 ; N quotedblleft ; B 160 454 588 727 ; +C 171 ; WX 556 ; N guillemotleft ; B 135 76 571 484 ; +C 172 ; WX 333 ; N guilsinglleft ; B 130 76 353 484 ; +C 173 ; WX 333 ; N guilsinglright ; B 99 76 322 484 ; +C 174 ; WX 611 ; N fi ; B 87 0 696 727 ; +C 175 ; WX 611 ; N fl ; B 87 0 695 727 ; +C 177 ; WX 556 ; N endash ; B 48 227 627 333 ; +C 178 ; WX 556 ; N dagger ; B 118 -171 626 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 46 -171 628 718 ; +C 180 ; WX 278 ; N periodcentered ; B 110 172 276 334 ; +C 182 ; WX 556 ; N paragraph ; B 98 -191 688 700 ; +C 183 ; WX 350 ; N bullet ; B 83 194 420 524 ; +C 184 ; WX 278 ; N quotesinglbase ; B 41 -146 236 127 ; +C 185 ; WX 500 ; N quotedblbase ; B 36 -146 463 127 ; +C 186 ; WX 500 ; N quotedblright ; B 162 445 589 718 ; +C 187 ; WX 556 ; N guillemotright ; B 104 76 540 484 ; +C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; +C 189 ; WX 1000 ; N perthousand ; B 76 -19 1038 710 ; +C 191 ; WX 611 ; N questiondown ; B 53 -195 559 532 ; +C 193 ; WX 333 ; N grave ; B 136 604 353 750 ; +C 194 ; WX 333 ; N acute ; B 236 604 515 750 ; +C 195 ; WX 333 ; N circumflex ; B 118 604 471 750 ; +C 196 ; WX 333 ; N tilde ; B 113 610 507 737 ; +C 197 ; WX 333 ; N macron ; B 122 604 483 678 ; +C 198 ; WX 333 ; N breve ; B 156 604 494 750 ; +C 199 ; WX 333 ; N dotaccent ; B 235 614 385 729 ; +C 200 ; WX 333 ; N dieresis ; B 137 614 482 729 ; +C 202 ; WX 333 ; N ring ; B 200 568 420 776 ; +C 203 ; WX 333 ; N cedilla ; B -37 -228 220 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 137 604 645 750 ; +C 206 ; WX 333 ; N ogonek ; B 41 -228 264 0 ; +C 207 ; WX 333 ; N caron ; B 149 604 502 750 ; +C 208 ; WX 1000 ; N emdash ; B 48 227 1071 333 ; +C 225 ; WX 1000 ; N AE ; B 5 0 1100 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 125 401 465 737 ; +C 232 ; WX 611 ; N Lslash ; B 34 0 611 718 ; +C 233 ; WX 778 ; N Oslash ; B 35 -27 894 745 ; +C 234 ; WX 1000 ; N OE ; B 99 -19 1114 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 123 401 485 737 ; +C 241 ; WX 889 ; N ae ; B 56 -14 923 546 ; +C 245 ; WX 278 ; N dotlessi ; B 69 0 322 532 ; +C 248 ; WX 278 ; N lslash ; B 40 0 407 718 ; +C 249 ; WX 611 ; N oslash ; B 22 -29 701 560 ; +C 250 ; WX 944 ; N oe ; B 82 -14 977 546 ; +C 251 ; WX 611 ; N germandbls ; B 69 -14 657 731 ; +C -1 ; WX 278 ; N Idieresis ; B 64 0 494 915 ; +C -1 ; WX 556 ; N eacute ; B 70 -14 627 750 ; +C -1 ; WX 556 ; N abreve ; B 55 -14 606 750 ; +C -1 ; WX 611 ; N uhungarumlaut ; B 98 -14 784 750 ; +C -1 ; WX 556 ; N ecaron ; B 70 -14 614 750 ; +C -1 ; WX 667 ; N Ydieresis ; B 168 0 806 915 ; +C -1 ; WX 584 ; N divide ; B 82 -42 610 548 ; +C -1 ; WX 667 ; N Yacute ; B 168 0 806 936 ; +C -1 ; WX 722 ; N Acircumflex ; B 20 0 706 936 ; +C -1 ; WX 556 ; N aacute ; B 55 -14 627 750 ; +C -1 ; WX 722 ; N Ucircumflex ; B 116 -19 804 936 ; +C -1 ; WX 556 ; N yacute ; B 42 -214 652 750 ; +C -1 ; WX 556 ; N scommaaccent ; B 63 -228 584 546 ; +C -1 ; WX 556 ; N ecircumflex ; B 70 -14 593 750 ; +C -1 ; WX 722 ; N Uring ; B 116 -19 804 962 ; +C -1 ; WX 722 ; N Udieresis ; B 116 -19 804 915 ; +C -1 ; WX 556 ; N aogonek ; B 55 -224 583 546 ; +C -1 ; WX 722 ; N Uacute ; B 116 -19 804 936 ; +C -1 ; WX 611 ; N uogonek ; B 98 -228 658 532 ; +C -1 ; WX 667 ; N Edieresis ; B 76 0 757 915 ; +C -1 ; WX 722 ; N Dcroat ; B 62 0 777 718 ; +C -1 ; WX 250 ; N commaaccent ; B 16 -228 188 -50 ; +C -1 ; WX 737 ; N copyright ; B 56 -19 835 737 ; +C -1 ; WX 667 ; N Emacron ; B 76 0 757 864 ; +C -1 ; WX 556 ; N ccaron ; B 79 -14 614 750 ; +C -1 ; WX 556 ; N aring ; B 55 -14 583 776 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 69 -228 807 718 ; +C -1 ; WX 278 ; N lacute ; B 69 0 528 936 ; +C -1 ; WX 556 ; N agrave ; B 55 -14 583 750 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 140 -228 751 718 ; +C -1 ; WX 722 ; N Cacute ; B 107 -19 789 936 ; +C -1 ; WX 556 ; N atilde ; B 55 -14 619 737 ; +C -1 ; WX 667 ; N Edotaccent ; B 76 0 757 915 ; +C -1 ; WX 556 ; N scaron ; B 63 -14 614 750 ; +C -1 ; WX 556 ; N scedilla ; B 63 -228 584 546 ; +C -1 ; WX 278 ; N iacute ; B 69 0 488 750 ; +C -1 ; WX 494 ; N lozenge ; B 90 0 564 745 ; +C -1 ; WX 722 ; N Rcaron ; B 76 0 778 936 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 108 -228 817 737 ; +C -1 ; WX 611 ; N ucircumflex ; B 98 -14 658 750 ; +C -1 ; WX 556 ; N acircumflex ; B 55 -14 583 750 ; +C -1 ; WX 722 ; N Amacron ; B 20 0 718 864 ; +C -1 ; WX 389 ; N rcaron ; B 64 0 530 750 ; +C -1 ; WX 556 ; N ccedilla ; B 79 -228 599 546 ; +C -1 ; WX 611 ; N Zdotaccent ; B 25 0 737 915 ; +C -1 ; WX 667 ; N Thorn ; B 76 0 716 718 ; +C -1 ; WX 778 ; N Omacron ; B 107 -19 823 864 ; +C -1 ; WX 722 ; N Racute ; B 76 0 778 936 ; +C -1 ; WX 667 ; N Sacute ; B 81 -19 722 936 ; +C -1 ; WX 743 ; N dcaron ; B 82 -14 903 718 ; +C -1 ; WX 722 ; N Umacron ; B 116 -19 804 864 ; +C -1 ; WX 611 ; N uring ; B 98 -14 658 776 ; +C -1 ; WX 333 ; N threesuperior ; B 91 271 441 710 ; +C -1 ; WX 778 ; N Ograve ; B 107 -19 823 936 ; +C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; +C -1 ; WX 722 ; N Abreve ; B 20 0 729 936 ; +C -1 ; WX 584 ; N multiply ; B 57 1 635 505 ; +C -1 ; WX 611 ; N uacute ; B 98 -14 658 750 ; +C -1 ; WX 611 ; N Tcaron ; B 140 0 751 936 ; +C -1 ; WX 494 ; N partialdiff ; B 43 -21 585 750 ; +C -1 ; WX 556 ; N ydieresis ; B 42 -214 652 729 ; +C -1 ; WX 722 ; N Nacute ; B 69 0 807 936 ; +C -1 ; WX 278 ; N icircumflex ; B 69 0 444 750 ; +C -1 ; WX 667 ; N Ecircumflex ; B 76 0 757 936 ; +C -1 ; WX 556 ; N adieresis ; B 55 -14 594 729 ; +C -1 ; WX 556 ; N edieresis ; B 70 -14 594 729 ; +C -1 ; WX 556 ; N cacute ; B 79 -14 627 750 ; +C -1 ; WX 611 ; N nacute ; B 65 0 654 750 ; +C -1 ; WX 611 ; N umacron ; B 98 -14 658 678 ; +C -1 ; WX 722 ; N Ncaron ; B 69 0 807 936 ; +C -1 ; WX 278 ; N Iacute ; B 64 0 528 936 ; +C -1 ; WX 584 ; N plusminus ; B 40 0 625 506 ; +C -1 ; WX 280 ; N brokenbar ; B 52 -150 345 700 ; +C -1 ; WX 737 ; N registered ; B 55 -19 834 737 ; +C -1 ; WX 778 ; N Gbreve ; B 108 -19 817 936 ; +C -1 ; WX 278 ; N Idotaccent ; B 64 0 397 915 ; +C -1 ; WX 600 ; N summation ; B 14 -10 670 706 ; +C -1 ; WX 667 ; N Egrave ; B 76 0 757 936 ; +C -1 ; WX 389 ; N racute ; B 64 0 543 750 ; +C -1 ; WX 611 ; N omacron ; B 82 -14 643 678 ; +C -1 ; WX 611 ; N Zacute ; B 25 0 737 936 ; +C -1 ; WX 611 ; N Zcaron ; B 25 0 737 936 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 629 704 ; +C -1 ; WX 722 ; N Eth ; B 62 0 777 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 107 -228 789 737 ; +C -1 ; WX 278 ; N lcommaaccent ; B 30 -228 362 718 ; +C -1 ; WX 389 ; N tcaron ; B 100 -6 608 878 ; +C -1 ; WX 556 ; N eogonek ; B 70 -228 593 546 ; +C -1 ; WX 722 ; N Uogonek ; B 116 -228 804 718 ; +C -1 ; WX 722 ; N Aacute ; B 20 0 750 936 ; +C -1 ; WX 722 ; N Adieresis ; B 20 0 716 915 ; +C -1 ; WX 556 ; N egrave ; B 70 -14 593 750 ; +C -1 ; WX 500 ; N zacute ; B 20 0 599 750 ; +C -1 ; WX 278 ; N iogonek ; B -14 -224 363 725 ; +C -1 ; WX 778 ; N Oacute ; B 107 -19 823 936 ; +C -1 ; WX 611 ; N oacute ; B 82 -14 654 750 ; +C -1 ; WX 556 ; N amacron ; B 55 -14 595 678 ; +C -1 ; WX 556 ; N sacute ; B 63 -14 627 750 ; +C -1 ; WX 278 ; N idieresis ; B 69 0 455 729 ; +C -1 ; WX 778 ; N Ocircumflex ; B 107 -19 823 936 ; +C -1 ; WX 722 ; N Ugrave ; B 116 -19 804 936 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 611 ; N thorn ; B 18 -208 645 718 ; +C -1 ; WX 333 ; N twosuperior ; B 69 283 449 710 ; +C -1 ; WX 778 ; N Odieresis ; B 107 -19 823 915 ; +C -1 ; WX 611 ; N mu ; B 22 -207 658 532 ; +C -1 ; WX 278 ; N igrave ; B 69 0 326 750 ; +C -1 ; WX 611 ; N ohungarumlaut ; B 82 -14 784 750 ; +C -1 ; WX 667 ; N Eogonek ; B 76 -224 757 718 ; +C -1 ; WX 611 ; N dcroat ; B 82 -14 789 718 ; +C -1 ; WX 834 ; N threequarters ; B 99 -19 839 710 ; +C -1 ; WX 667 ; N Scedilla ; B 81 -228 718 737 ; +C -1 ; WX 400 ; N lcaron ; B 69 0 561 718 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 87 -228 858 718 ; +C -1 ; WX 611 ; N Lacute ; B 76 0 611 936 ; +C -1 ; WX 1000 ; N trademark ; B 179 306 1109 718 ; +C -1 ; WX 556 ; N edotaccent ; B 70 -14 593 729 ; +C -1 ; WX 278 ; N Igrave ; B 64 0 367 936 ; +C -1 ; WX 278 ; N Imacron ; B 64 0 496 864 ; +C -1 ; WX 611 ; N Lcaron ; B 76 0 643 718 ; +C -1 ; WX 834 ; N onehalf ; B 132 -19 858 710 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 676 704 ; +C -1 ; WX 611 ; N ocircumflex ; B 82 -14 643 750 ; +C -1 ; WX 611 ; N ntilde ; B 65 0 646 737 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 116 -19 880 936 ; +C -1 ; WX 667 ; N Eacute ; B 76 0 757 936 ; +C -1 ; WX 556 ; N emacron ; B 70 -14 595 678 ; +C -1 ; WX 611 ; N gbreve ; B 38 -217 666 750 ; +C -1 ; WX 834 ; N onequarter ; B 132 -19 806 710 ; +C -1 ; WX 667 ; N Scaron ; B 81 -19 718 936 ; +C -1 ; WX 667 ; N Scommaaccent ; B 81 -228 718 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 107 -19 908 936 ; +C -1 ; WX 400 ; N degree ; B 175 426 467 712 ; +C -1 ; WX 611 ; N ograve ; B 82 -14 643 750 ; +C -1 ; WX 722 ; N Ccaron ; B 107 -19 789 936 ; +C -1 ; WX 611 ; N ugrave ; B 98 -14 658 750 ; +C -1 ; WX 549 ; N radical ; B 112 -46 689 850 ; +C -1 ; WX 722 ; N Dcaron ; B 76 0 777 936 ; +C -1 ; WX 389 ; N rcommaaccent ; B 26 -228 489 546 ; +C -1 ; WX 722 ; N Ntilde ; B 69 0 807 923 ; +C -1 ; WX 611 ; N otilde ; B 82 -14 646 737 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 76 -228 778 718 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 76 -228 611 718 ; +C -1 ; WX 722 ; N Atilde ; B 20 0 741 923 ; +C -1 ; WX 722 ; N Aogonek ; B 20 -224 702 718 ; +C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; +C -1 ; WX 778 ; N Otilde ; B 107 -19 823 923 ; +C -1 ; WX 500 ; N zdotaccent ; B 20 0 583 729 ; +C -1 ; WX 667 ; N Ecaron ; B 76 0 757 936 ; +C -1 ; WX 278 ; N Iogonek ; B -41 -228 367 718 ; +C -1 ; WX 556 ; N kcommaaccent ; B 69 -228 670 718 ; +C -1 ; WX 584 ; N minus ; B 82 197 610 309 ; +C -1 ; WX 278 ; N Icircumflex ; B 64 0 484 936 ; +C -1 ; WX 611 ; N ncaron ; B 65 0 641 750 ; +C -1 ; WX 333 ; N tcommaaccent ; B 58 -228 422 676 ; +C -1 ; WX 584 ; N logicalnot ; B 105 108 633 419 ; +C -1 ; WX 611 ; N odieresis ; B 82 -14 643 729 ; +C -1 ; WX 611 ; N udieresis ; B 98 -14 658 729 ; +C -1 ; WX 549 ; N notequal ; B 32 -49 630 570 ; +C -1 ; WX 611 ; N gcommaaccent ; B 38 -217 666 850 ; +C -1 ; WX 611 ; N eth ; B 82 -14 670 737 ; +C -1 ; WX 500 ; N zcaron ; B 20 0 586 750 ; +C -1 ; WX 611 ; N ncommaaccent ; B 65 -228 629 546 ; +C -1 ; WX 333 ; N onesuperior ; B 148 283 388 710 ; +C -1 ; WX 278 ; N imacron ; B 69 0 429 678 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2481 +KPX A C -40 +KPX A Cacute -40 +KPX A Ccaron -40 +KPX A Ccedilla -40 +KPX A G -50 +KPX A Gbreve -50 +KPX A Gcommaaccent -50 +KPX A O -40 +KPX A Oacute -40 +KPX A Ocircumflex -40 +KPX A Odieresis -40 +KPX A Ograve -40 +KPX A Ohungarumlaut -40 +KPX A Omacron -40 +KPX A Oslash -40 +KPX A Otilde -40 +KPX A Q -40 +KPX A T -90 +KPX A Tcaron -90 +KPX A Tcommaaccent -90 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -80 +KPX A W -60 +KPX A Y -110 +KPX A Yacute -110 +KPX A Ydieresis -110 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -30 +KPX A y -30 +KPX A yacute -30 +KPX A ydieresis -30 +KPX Aacute C -40 +KPX Aacute Cacute -40 +KPX Aacute Ccaron -40 +KPX Aacute Ccedilla -40 +KPX Aacute G -50 +KPX Aacute Gbreve -50 +KPX Aacute Gcommaaccent -50 +KPX Aacute O -40 +KPX Aacute Oacute -40 +KPX Aacute Ocircumflex -40 +KPX Aacute Odieresis -40 +KPX Aacute Ograve -40 +KPX Aacute Ohungarumlaut -40 +KPX Aacute Omacron -40 +KPX Aacute Oslash -40 +KPX Aacute Otilde -40 +KPX Aacute Q -40 +KPX Aacute T -90 +KPX Aacute Tcaron -90 +KPX Aacute Tcommaaccent -90 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -80 +KPX Aacute W -60 +KPX Aacute Y -110 +KPX Aacute Yacute -110 +KPX Aacute Ydieresis -110 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -30 +KPX Aacute y -30 +KPX Aacute yacute -30 +KPX Aacute ydieresis -30 +KPX Abreve C -40 +KPX Abreve Cacute -40 +KPX Abreve Ccaron -40 +KPX Abreve Ccedilla -40 +KPX Abreve G -50 +KPX Abreve Gbreve -50 +KPX Abreve Gcommaaccent -50 +KPX Abreve O -40 +KPX Abreve Oacute -40 +KPX Abreve Ocircumflex -40 +KPX Abreve Odieresis -40 +KPX Abreve Ograve -40 +KPX Abreve Ohungarumlaut -40 +KPX Abreve Omacron -40 +KPX Abreve Oslash -40 +KPX Abreve Otilde -40 +KPX Abreve Q -40 +KPX Abreve T -90 +KPX Abreve Tcaron -90 +KPX Abreve Tcommaaccent -90 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -80 +KPX Abreve W -60 +KPX Abreve Y -110 +KPX Abreve Yacute -110 +KPX Abreve Ydieresis -110 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -30 +KPX Abreve y -30 +KPX Abreve yacute -30 +KPX Abreve ydieresis -30 +KPX Acircumflex C -40 +KPX Acircumflex Cacute -40 +KPX Acircumflex Ccaron -40 +KPX Acircumflex Ccedilla -40 +KPX Acircumflex G -50 +KPX Acircumflex Gbreve -50 +KPX Acircumflex Gcommaaccent -50 +KPX Acircumflex O -40 +KPX Acircumflex Oacute -40 +KPX Acircumflex Ocircumflex -40 +KPX Acircumflex Odieresis -40 +KPX Acircumflex Ograve -40 +KPX Acircumflex Ohungarumlaut -40 +KPX Acircumflex Omacron -40 +KPX Acircumflex Oslash -40 +KPX Acircumflex Otilde -40 +KPX Acircumflex Q -40 +KPX Acircumflex T -90 +KPX Acircumflex Tcaron -90 +KPX Acircumflex Tcommaaccent -90 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -80 +KPX Acircumflex W -60 +KPX Acircumflex Y -110 +KPX Acircumflex Yacute -110 +KPX Acircumflex Ydieresis -110 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -30 +KPX Acircumflex y -30 +KPX Acircumflex yacute -30 +KPX Acircumflex ydieresis -30 +KPX Adieresis C -40 +KPX Adieresis Cacute -40 +KPX Adieresis Ccaron -40 +KPX Adieresis Ccedilla -40 +KPX Adieresis G -50 +KPX Adieresis Gbreve -50 +KPX Adieresis Gcommaaccent -50 +KPX Adieresis O -40 +KPX Adieresis Oacute -40 +KPX Adieresis Ocircumflex -40 +KPX Adieresis Odieresis -40 +KPX Adieresis Ograve -40 +KPX Adieresis Ohungarumlaut -40 +KPX Adieresis Omacron -40 +KPX Adieresis Oslash -40 +KPX Adieresis Otilde -40 +KPX Adieresis Q -40 +KPX Adieresis T -90 +KPX Adieresis Tcaron -90 +KPX Adieresis Tcommaaccent -90 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -80 +KPX Adieresis W -60 +KPX Adieresis Y -110 +KPX Adieresis Yacute -110 +KPX Adieresis Ydieresis -110 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -30 +KPX Adieresis y -30 +KPX Adieresis yacute -30 +KPX Adieresis ydieresis -30 +KPX Agrave C -40 +KPX Agrave Cacute -40 +KPX Agrave Ccaron -40 +KPX Agrave Ccedilla -40 +KPX Agrave G -50 +KPX Agrave Gbreve -50 +KPX Agrave Gcommaaccent -50 +KPX Agrave O -40 +KPX Agrave Oacute -40 +KPX Agrave Ocircumflex -40 +KPX Agrave Odieresis -40 +KPX Agrave Ograve -40 +KPX Agrave Ohungarumlaut -40 +KPX Agrave Omacron -40 +KPX Agrave Oslash -40 +KPX Agrave Otilde -40 +KPX Agrave Q -40 +KPX Agrave T -90 +KPX Agrave Tcaron -90 +KPX Agrave Tcommaaccent -90 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -80 +KPX Agrave W -60 +KPX Agrave Y -110 +KPX Agrave Yacute -110 +KPX Agrave Ydieresis -110 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -30 +KPX Agrave y -30 +KPX Agrave yacute -30 +KPX Agrave ydieresis -30 +KPX Amacron C -40 +KPX Amacron Cacute -40 +KPX Amacron Ccaron -40 +KPX Amacron Ccedilla -40 +KPX Amacron G -50 +KPX Amacron Gbreve -50 +KPX Amacron Gcommaaccent -50 +KPX Amacron O -40 +KPX Amacron Oacute -40 +KPX Amacron Ocircumflex -40 +KPX Amacron Odieresis -40 +KPX Amacron Ograve -40 +KPX Amacron Ohungarumlaut -40 +KPX Amacron Omacron -40 +KPX Amacron Oslash -40 +KPX Amacron Otilde -40 +KPX Amacron Q -40 +KPX Amacron T -90 +KPX Amacron Tcaron -90 +KPX Amacron Tcommaaccent -90 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -80 +KPX Amacron W -60 +KPX Amacron Y -110 +KPX Amacron Yacute -110 +KPX Amacron Ydieresis -110 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -30 +KPX Amacron y -30 +KPX Amacron yacute -30 +KPX Amacron ydieresis -30 +KPX Aogonek C -40 +KPX Aogonek Cacute -40 +KPX Aogonek Ccaron -40 +KPX Aogonek Ccedilla -40 +KPX Aogonek G -50 +KPX Aogonek Gbreve -50 +KPX Aogonek Gcommaaccent -50 +KPX Aogonek O -40 +KPX Aogonek Oacute -40 +KPX Aogonek Ocircumflex -40 +KPX Aogonek Odieresis -40 +KPX Aogonek Ograve -40 +KPX Aogonek Ohungarumlaut -40 +KPX Aogonek Omacron -40 +KPX Aogonek Oslash -40 +KPX Aogonek Otilde -40 +KPX Aogonek Q -40 +KPX Aogonek T -90 +KPX Aogonek Tcaron -90 +KPX Aogonek Tcommaaccent -90 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -80 +KPX Aogonek W -60 +KPX Aogonek Y -110 +KPX Aogonek Yacute -110 +KPX Aogonek Ydieresis -110 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -30 +KPX Aogonek y -30 +KPX Aogonek yacute -30 +KPX Aogonek ydieresis -30 +KPX Aring C -40 +KPX Aring Cacute -40 +KPX Aring Ccaron -40 +KPX Aring Ccedilla -40 +KPX Aring G -50 +KPX Aring Gbreve -50 +KPX Aring Gcommaaccent -50 +KPX Aring O -40 +KPX Aring Oacute -40 +KPX Aring Ocircumflex -40 +KPX Aring Odieresis -40 +KPX Aring Ograve -40 +KPX Aring Ohungarumlaut -40 +KPX Aring Omacron -40 +KPX Aring Oslash -40 +KPX Aring Otilde -40 +KPX Aring Q -40 +KPX Aring T -90 +KPX Aring Tcaron -90 +KPX Aring Tcommaaccent -90 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -80 +KPX Aring W -60 +KPX Aring Y -110 +KPX Aring Yacute -110 +KPX Aring Ydieresis -110 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -30 +KPX Aring y -30 +KPX Aring yacute -30 +KPX Aring ydieresis -30 +KPX Atilde C -40 +KPX Atilde Cacute -40 +KPX Atilde Ccaron -40 +KPX Atilde Ccedilla -40 +KPX Atilde G -50 +KPX Atilde Gbreve -50 +KPX Atilde Gcommaaccent -50 +KPX Atilde O -40 +KPX Atilde Oacute -40 +KPX Atilde Ocircumflex -40 +KPX Atilde Odieresis -40 +KPX Atilde Ograve -40 +KPX Atilde Ohungarumlaut -40 +KPX Atilde Omacron -40 +KPX Atilde Oslash -40 +KPX Atilde Otilde -40 +KPX Atilde Q -40 +KPX Atilde T -90 +KPX Atilde Tcaron -90 +KPX Atilde Tcommaaccent -90 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -80 +KPX Atilde W -60 +KPX Atilde Y -110 +KPX Atilde Yacute -110 +KPX Atilde Ydieresis -110 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -30 +KPX Atilde y -30 +KPX Atilde yacute -30 +KPX Atilde ydieresis -30 +KPX B A -30 +KPX B Aacute -30 +KPX B Abreve -30 +KPX B Acircumflex -30 +KPX B Adieresis -30 +KPX B Agrave -30 +KPX B Amacron -30 +KPX B Aogonek -30 +KPX B Aring -30 +KPX B Atilde -30 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -40 +KPX D W -40 +KPX D Y -70 +KPX D Yacute -70 +KPX D Ydieresis -70 +KPX D comma -30 +KPX D period -30 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -70 +KPX Dcaron Yacute -70 +KPX Dcaron Ydieresis -70 +KPX Dcaron comma -30 +KPX Dcaron period -30 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -70 +KPX Dcroat Yacute -70 +KPX Dcroat Ydieresis -70 +KPX Dcroat comma -30 +KPX Dcroat period -30 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -20 +KPX F aacute -20 +KPX F abreve -20 +KPX F acircumflex -20 +KPX F adieresis -20 +KPX F agrave -20 +KPX F amacron -20 +KPX F aogonek -20 +KPX F aring -20 +KPX F atilde -20 +KPX F comma -100 +KPX F period -100 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J comma -20 +KPX J period -20 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -15 +KPX K eacute -15 +KPX K ecaron -15 +KPX K ecircumflex -15 +KPX K edieresis -15 +KPX K edotaccent -15 +KPX K egrave -15 +KPX K emacron -15 +KPX K eogonek -15 +KPX K o -35 +KPX K oacute -35 +KPX K ocircumflex -35 +KPX K odieresis -35 +KPX K ograve -35 +KPX K ohungarumlaut -35 +KPX K omacron -35 +KPX K oslash -35 +KPX K otilde -35 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -40 +KPX K yacute -40 +KPX K ydieresis -40 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -15 +KPX Kcommaaccent eacute -15 +KPX Kcommaaccent ecaron -15 +KPX Kcommaaccent ecircumflex -15 +KPX Kcommaaccent edieresis -15 +KPX Kcommaaccent edotaccent -15 +KPX Kcommaaccent egrave -15 +KPX Kcommaaccent emacron -15 +KPX Kcommaaccent eogonek -15 +KPX Kcommaaccent o -35 +KPX Kcommaaccent oacute -35 +KPX Kcommaaccent ocircumflex -35 +KPX Kcommaaccent odieresis -35 +KPX Kcommaaccent ograve -35 +KPX Kcommaaccent ohungarumlaut -35 +KPX Kcommaaccent omacron -35 +KPX Kcommaaccent oslash -35 +KPX Kcommaaccent otilde -35 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -40 +KPX Kcommaaccent yacute -40 +KPX Kcommaaccent ydieresis -40 +KPX L T -90 +KPX L Tcaron -90 +KPX L Tcommaaccent -90 +KPX L V -110 +KPX L W -80 +KPX L Y -120 +KPX L Yacute -120 +KPX L Ydieresis -120 +KPX L quotedblright -140 +KPX L quoteright -140 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -90 +KPX Lacute Tcaron -90 +KPX Lacute Tcommaaccent -90 +KPX Lacute V -110 +KPX Lacute W -80 +KPX Lacute Y -120 +KPX Lacute Yacute -120 +KPX Lacute Ydieresis -120 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -140 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcommaaccent T -90 +KPX Lcommaaccent Tcaron -90 +KPX Lcommaaccent Tcommaaccent -90 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -80 +KPX Lcommaaccent Y -120 +KPX Lcommaaccent Yacute -120 +KPX Lcommaaccent Ydieresis -120 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -140 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -90 +KPX Lslash Tcaron -90 +KPX Lslash Tcommaaccent -90 +KPX Lslash V -110 +KPX Lslash W -80 +KPX Lslash Y -120 +KPX Lslash Yacute -120 +KPX Lslash Ydieresis -120 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -140 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -50 +KPX O Aacute -50 +KPX O Abreve -50 +KPX O Acircumflex -50 +KPX O Adieresis -50 +KPX O Agrave -50 +KPX O Amacron -50 +KPX O Aogonek -50 +KPX O Aring -50 +KPX O Atilde -50 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -50 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -50 +KPX Oacute Aacute -50 +KPX Oacute Abreve -50 +KPX Oacute Acircumflex -50 +KPX Oacute Adieresis -50 +KPX Oacute Agrave -50 +KPX Oacute Amacron -50 +KPX Oacute Aogonek -50 +KPX Oacute Aring -50 +KPX Oacute Atilde -50 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -50 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -50 +KPX Ocircumflex Aacute -50 +KPX Ocircumflex Abreve -50 +KPX Ocircumflex Acircumflex -50 +KPX Ocircumflex Adieresis -50 +KPX Ocircumflex Agrave -50 +KPX Ocircumflex Amacron -50 +KPX Ocircumflex Aogonek -50 +KPX Ocircumflex Aring -50 +KPX Ocircumflex Atilde -50 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -50 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -50 +KPX Odieresis Aacute -50 +KPX Odieresis Abreve -50 +KPX Odieresis Acircumflex -50 +KPX Odieresis Adieresis -50 +KPX Odieresis Agrave -50 +KPX Odieresis Amacron -50 +KPX Odieresis Aogonek -50 +KPX Odieresis Aring -50 +KPX Odieresis Atilde -50 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -50 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -50 +KPX Ograve Aacute -50 +KPX Ograve Abreve -50 +KPX Ograve Acircumflex -50 +KPX Ograve Adieresis -50 +KPX Ograve Agrave -50 +KPX Ograve Amacron -50 +KPX Ograve Aogonek -50 +KPX Ograve Aring -50 +KPX Ograve Atilde -50 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -50 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -50 +KPX Ohungarumlaut Aacute -50 +KPX Ohungarumlaut Abreve -50 +KPX Ohungarumlaut Acircumflex -50 +KPX Ohungarumlaut Adieresis -50 +KPX Ohungarumlaut Agrave -50 +KPX Ohungarumlaut Amacron -50 +KPX Ohungarumlaut Aogonek -50 +KPX Ohungarumlaut Aring -50 +KPX Ohungarumlaut Atilde -50 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -50 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -50 +KPX Omacron Aacute -50 +KPX Omacron Abreve -50 +KPX Omacron Acircumflex -50 +KPX Omacron Adieresis -50 +KPX Omacron Agrave -50 +KPX Omacron Amacron -50 +KPX Omacron Aogonek -50 +KPX Omacron Aring -50 +KPX Omacron Atilde -50 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -50 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -50 +KPX Oslash Aacute -50 +KPX Oslash Abreve -50 +KPX Oslash Acircumflex -50 +KPX Oslash Adieresis -50 +KPX Oslash Agrave -50 +KPX Oslash Amacron -50 +KPX Oslash Aogonek -50 +KPX Oslash Aring -50 +KPX Oslash Atilde -50 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -50 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -50 +KPX Otilde Aacute -50 +KPX Otilde Abreve -50 +KPX Otilde Acircumflex -50 +KPX Otilde Adieresis -50 +KPX Otilde Agrave -50 +KPX Otilde Amacron -50 +KPX Otilde Aogonek -50 +KPX Otilde Aring -50 +KPX Otilde Atilde -50 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -50 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -100 +KPX P Aacute -100 +KPX P Abreve -100 +KPX P Acircumflex -100 +KPX P Adieresis -100 +KPX P Agrave -100 +KPX P Amacron -100 +KPX P Aogonek -100 +KPX P Aring -100 +KPX P Atilde -100 +KPX P a -30 +KPX P aacute -30 +KPX P abreve -30 +KPX P acircumflex -30 +KPX P adieresis -30 +KPX P agrave -30 +KPX P amacron -30 +KPX P aogonek -30 +KPX P aring -30 +KPX P atilde -30 +KPX P comma -120 +KPX P e -30 +KPX P eacute -30 +KPX P ecaron -30 +KPX P ecircumflex -30 +KPX P edieresis -30 +KPX P edotaccent -30 +KPX P egrave -30 +KPX P emacron -30 +KPX P eogonek -30 +KPX P o -40 +KPX P oacute -40 +KPX P ocircumflex -40 +KPX P odieresis -40 +KPX P ograve -40 +KPX P ohungarumlaut -40 +KPX P omacron -40 +KPX P oslash -40 +KPX P otilde -40 +KPX P period -120 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX Q comma 20 +KPX Q period 20 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -20 +KPX R Tcaron -20 +KPX R Tcommaaccent -20 +KPX R U -20 +KPX R Uacute -20 +KPX R Ucircumflex -20 +KPX R Udieresis -20 +KPX R Ugrave -20 +KPX R Uhungarumlaut -20 +KPX R Umacron -20 +KPX R Uogonek -20 +KPX R Uring -20 +KPX R V -50 +KPX R W -40 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -20 +KPX Racute Tcaron -20 +KPX Racute Tcommaaccent -20 +KPX Racute U -20 +KPX Racute Uacute -20 +KPX Racute Ucircumflex -20 +KPX Racute Udieresis -20 +KPX Racute Ugrave -20 +KPX Racute Uhungarumlaut -20 +KPX Racute Umacron -20 +KPX Racute Uogonek -20 +KPX Racute Uring -20 +KPX Racute V -50 +KPX Racute W -40 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -20 +KPX Rcaron Tcaron -20 +KPX Rcaron Tcommaaccent -20 +KPX Rcaron U -20 +KPX Rcaron Uacute -20 +KPX Rcaron Ucircumflex -20 +KPX Rcaron Udieresis -20 +KPX Rcaron Ugrave -20 +KPX Rcaron Uhungarumlaut -20 +KPX Rcaron Umacron -20 +KPX Rcaron Uogonek -20 +KPX Rcaron Uring -20 +KPX Rcaron V -50 +KPX Rcaron W -40 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -20 +KPX Rcommaaccent Tcaron -20 +KPX Rcommaaccent Tcommaaccent -20 +KPX Rcommaaccent U -20 +KPX Rcommaaccent Uacute -20 +KPX Rcommaaccent Ucircumflex -20 +KPX Rcommaaccent Udieresis -20 +KPX Rcommaaccent Ugrave -20 +KPX Rcommaaccent Uhungarumlaut -20 +KPX Rcommaaccent Umacron -20 +KPX Rcommaaccent Uogonek -20 +KPX Rcommaaccent Uring -20 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -40 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX T A -90 +KPX T Aacute -90 +KPX T Abreve -90 +KPX T Acircumflex -90 +KPX T Adieresis -90 +KPX T Agrave -90 +KPX T Amacron -90 +KPX T Aogonek -90 +KPX T Aring -90 +KPX T Atilde -90 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -80 +KPX T aacute -80 +KPX T abreve -80 +KPX T acircumflex -80 +KPX T adieresis -80 +KPX T agrave -80 +KPX T amacron -80 +KPX T aogonek -80 +KPX T aring -80 +KPX T atilde -80 +KPX T colon -40 +KPX T comma -80 +KPX T e -60 +KPX T eacute -60 +KPX T ecaron -60 +KPX T ecircumflex -60 +KPX T edieresis -60 +KPX T edotaccent -60 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -60 +KPX T hyphen -120 +KPX T o -80 +KPX T oacute -80 +KPX T ocircumflex -80 +KPX T odieresis -80 +KPX T ograve -80 +KPX T ohungarumlaut -80 +KPX T omacron -80 +KPX T oslash -80 +KPX T otilde -80 +KPX T period -80 +KPX T r -80 +KPX T racute -80 +KPX T rcommaaccent -80 +KPX T semicolon -40 +KPX T u -90 +KPX T uacute -90 +KPX T ucircumflex -90 +KPX T udieresis -90 +KPX T ugrave -90 +KPX T uhungarumlaut -90 +KPX T umacron -90 +KPX T uogonek -90 +KPX T uring -90 +KPX T w -60 +KPX T y -60 +KPX T yacute -60 +KPX T ydieresis -60 +KPX Tcaron A -90 +KPX Tcaron Aacute -90 +KPX Tcaron Abreve -90 +KPX Tcaron Acircumflex -90 +KPX Tcaron Adieresis -90 +KPX Tcaron Agrave -90 +KPX Tcaron Amacron -90 +KPX Tcaron Aogonek -90 +KPX Tcaron Aring -90 +KPX Tcaron Atilde -90 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -80 +KPX Tcaron aacute -80 +KPX Tcaron abreve -80 +KPX Tcaron acircumflex -80 +KPX Tcaron adieresis -80 +KPX Tcaron agrave -80 +KPX Tcaron amacron -80 +KPX Tcaron aogonek -80 +KPX Tcaron aring -80 +KPX Tcaron atilde -80 +KPX Tcaron colon -40 +KPX Tcaron comma -80 +KPX Tcaron e -60 +KPX Tcaron eacute -60 +KPX Tcaron ecaron -60 +KPX Tcaron ecircumflex -60 +KPX Tcaron edieresis -60 +KPX Tcaron edotaccent -60 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -60 +KPX Tcaron hyphen -120 +KPX Tcaron o -80 +KPX Tcaron oacute -80 +KPX Tcaron ocircumflex -80 +KPX Tcaron odieresis -80 +KPX Tcaron ograve -80 +KPX Tcaron ohungarumlaut -80 +KPX Tcaron omacron -80 +KPX Tcaron oslash -80 +KPX Tcaron otilde -80 +KPX Tcaron period -80 +KPX Tcaron r -80 +KPX Tcaron racute -80 +KPX Tcaron rcommaaccent -80 +KPX Tcaron semicolon -40 +KPX Tcaron u -90 +KPX Tcaron uacute -90 +KPX Tcaron ucircumflex -90 +KPX Tcaron udieresis -90 +KPX Tcaron ugrave -90 +KPX Tcaron uhungarumlaut -90 +KPX Tcaron umacron -90 +KPX Tcaron uogonek -90 +KPX Tcaron uring -90 +KPX Tcaron w -60 +KPX Tcaron y -60 +KPX Tcaron yacute -60 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -90 +KPX Tcommaaccent Aacute -90 +KPX Tcommaaccent Abreve -90 +KPX Tcommaaccent Acircumflex -90 +KPX Tcommaaccent Adieresis -90 +KPX Tcommaaccent Agrave -90 +KPX Tcommaaccent Amacron -90 +KPX Tcommaaccent Aogonek -90 +KPX Tcommaaccent Aring -90 +KPX Tcommaaccent Atilde -90 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -80 +KPX Tcommaaccent aacute -80 +KPX Tcommaaccent abreve -80 +KPX Tcommaaccent acircumflex -80 +KPX Tcommaaccent adieresis -80 +KPX Tcommaaccent agrave -80 +KPX Tcommaaccent amacron -80 +KPX Tcommaaccent aogonek -80 +KPX Tcommaaccent aring -80 +KPX Tcommaaccent atilde -80 +KPX Tcommaaccent colon -40 +KPX Tcommaaccent comma -80 +KPX Tcommaaccent e -60 +KPX Tcommaaccent eacute -60 +KPX Tcommaaccent ecaron -60 +KPX Tcommaaccent ecircumflex -60 +KPX Tcommaaccent edieresis -60 +KPX Tcommaaccent edotaccent -60 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -60 +KPX Tcommaaccent hyphen -120 +KPX Tcommaaccent o -80 +KPX Tcommaaccent oacute -80 +KPX Tcommaaccent ocircumflex -80 +KPX Tcommaaccent odieresis -80 +KPX Tcommaaccent ograve -80 +KPX Tcommaaccent ohungarumlaut -80 +KPX Tcommaaccent omacron -80 +KPX Tcommaaccent oslash -80 +KPX Tcommaaccent otilde -80 +KPX Tcommaaccent period -80 +KPX Tcommaaccent r -80 +KPX Tcommaaccent racute -80 +KPX Tcommaaccent rcommaaccent -80 +KPX Tcommaaccent semicolon -40 +KPX Tcommaaccent u -90 +KPX Tcommaaccent uacute -90 +KPX Tcommaaccent ucircumflex -90 +KPX Tcommaaccent udieresis -90 +KPX Tcommaaccent ugrave -90 +KPX Tcommaaccent uhungarumlaut -90 +KPX Tcommaaccent umacron -90 +KPX Tcommaaccent uogonek -90 +KPX Tcommaaccent uring -90 +KPX Tcommaaccent w -60 +KPX Tcommaaccent y -60 +KPX Tcommaaccent yacute -60 +KPX Tcommaaccent ydieresis -60 +KPX U A -50 +KPX U Aacute -50 +KPX U Abreve -50 +KPX U Acircumflex -50 +KPX U Adieresis -50 +KPX U Agrave -50 +KPX U Amacron -50 +KPX U Aogonek -50 +KPX U Aring -50 +KPX U Atilde -50 +KPX U comma -30 +KPX U period -30 +KPX Uacute A -50 +KPX Uacute Aacute -50 +KPX Uacute Abreve -50 +KPX Uacute Acircumflex -50 +KPX Uacute Adieresis -50 +KPX Uacute Agrave -50 +KPX Uacute Amacron -50 +KPX Uacute Aogonek -50 +KPX Uacute Aring -50 +KPX Uacute Atilde -50 +KPX Uacute comma -30 +KPX Uacute period -30 +KPX Ucircumflex A -50 +KPX Ucircumflex Aacute -50 +KPX Ucircumflex Abreve -50 +KPX Ucircumflex Acircumflex -50 +KPX Ucircumflex Adieresis -50 +KPX Ucircumflex Agrave -50 +KPX Ucircumflex Amacron -50 +KPX Ucircumflex Aogonek -50 +KPX Ucircumflex Aring -50 +KPX Ucircumflex Atilde -50 +KPX Ucircumflex comma -30 +KPX Ucircumflex period -30 +KPX Udieresis A -50 +KPX Udieresis Aacute -50 +KPX Udieresis Abreve -50 +KPX Udieresis Acircumflex -50 +KPX Udieresis Adieresis -50 +KPX Udieresis Agrave -50 +KPX Udieresis Amacron -50 +KPX Udieresis Aogonek -50 +KPX Udieresis Aring -50 +KPX Udieresis Atilde -50 +KPX Udieresis comma -30 +KPX Udieresis period -30 +KPX Ugrave A -50 +KPX Ugrave Aacute -50 +KPX Ugrave Abreve -50 +KPX Ugrave Acircumflex -50 +KPX Ugrave Adieresis -50 +KPX Ugrave Agrave -50 +KPX Ugrave Amacron -50 +KPX Ugrave Aogonek -50 +KPX Ugrave Aring -50 +KPX Ugrave Atilde -50 +KPX Ugrave comma -30 +KPX Ugrave period -30 +KPX Uhungarumlaut A -50 +KPX Uhungarumlaut Aacute -50 +KPX Uhungarumlaut Abreve -50 +KPX Uhungarumlaut Acircumflex -50 +KPX Uhungarumlaut Adieresis -50 +KPX Uhungarumlaut Agrave -50 +KPX Uhungarumlaut Amacron -50 +KPX Uhungarumlaut Aogonek -50 +KPX Uhungarumlaut Aring -50 +KPX Uhungarumlaut Atilde -50 +KPX Uhungarumlaut comma -30 +KPX Uhungarumlaut period -30 +KPX Umacron A -50 +KPX Umacron Aacute -50 +KPX Umacron Abreve -50 +KPX Umacron Acircumflex -50 +KPX Umacron Adieresis -50 +KPX Umacron Agrave -50 +KPX Umacron Amacron -50 +KPX Umacron Aogonek -50 +KPX Umacron Aring -50 +KPX Umacron Atilde -50 +KPX Umacron comma -30 +KPX Umacron period -30 +KPX Uogonek A -50 +KPX Uogonek Aacute -50 +KPX Uogonek Abreve -50 +KPX Uogonek Acircumflex -50 +KPX Uogonek Adieresis -50 +KPX Uogonek Agrave -50 +KPX Uogonek Amacron -50 +KPX Uogonek Aogonek -50 +KPX Uogonek Aring -50 +KPX Uogonek Atilde -50 +KPX Uogonek comma -30 +KPX Uogonek period -30 +KPX Uring A -50 +KPX Uring Aacute -50 +KPX Uring Abreve -50 +KPX Uring Acircumflex -50 +KPX Uring Adieresis -50 +KPX Uring Agrave -50 +KPX Uring Amacron -50 +KPX Uring Aogonek -50 +KPX Uring Aring -50 +KPX Uring Atilde -50 +KPX Uring comma -30 +KPX Uring period -30 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -50 +KPX V Gbreve -50 +KPX V Gcommaaccent -50 +KPX V O -50 +KPX V Oacute -50 +KPX V Ocircumflex -50 +KPX V Odieresis -50 +KPX V Ograve -50 +KPX V Ohungarumlaut -50 +KPX V Omacron -50 +KPX V Oslash -50 +KPX V Otilde -50 +KPX V a -60 +KPX V aacute -60 +KPX V abreve -60 +KPX V acircumflex -60 +KPX V adieresis -60 +KPX V agrave -60 +KPX V amacron -60 +KPX V aogonek -60 +KPX V aring -60 +KPX V atilde -60 +KPX V colon -40 +KPX V comma -120 +KPX V e -50 +KPX V eacute -50 +KPX V ecaron -50 +KPX V ecircumflex -50 +KPX V edieresis -50 +KPX V edotaccent -50 +KPX V egrave -50 +KPX V emacron -50 +KPX V eogonek -50 +KPX V hyphen -80 +KPX V o -90 +KPX V oacute -90 +KPX V ocircumflex -90 +KPX V odieresis -90 +KPX V ograve -90 +KPX V ohungarumlaut -90 +KPX V omacron -90 +KPX V oslash -90 +KPX V otilde -90 +KPX V period -120 +KPX V semicolon -40 +KPX V u -60 +KPX V uacute -60 +KPX V ucircumflex -60 +KPX V udieresis -60 +KPX V ugrave -60 +KPX V uhungarumlaut -60 +KPX V umacron -60 +KPX V uogonek -60 +KPX V uring -60 +KPX W A -60 +KPX W Aacute -60 +KPX W Abreve -60 +KPX W Acircumflex -60 +KPX W Adieresis -60 +KPX W Agrave -60 +KPX W Amacron -60 +KPX W Aogonek -60 +KPX W Aring -60 +KPX W Atilde -60 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W colon -10 +KPX W comma -80 +KPX W e -35 +KPX W eacute -35 +KPX W ecaron -35 +KPX W ecircumflex -35 +KPX W edieresis -35 +KPX W edotaccent -35 +KPX W egrave -35 +KPX W emacron -35 +KPX W eogonek -35 +KPX W hyphen -40 +KPX W o -60 +KPX W oacute -60 +KPX W ocircumflex -60 +KPX W odieresis -60 +KPX W ograve -60 +KPX W ohungarumlaut -60 +KPX W omacron -60 +KPX W oslash -60 +KPX W otilde -60 +KPX W period -80 +KPX W semicolon -10 +KPX W u -45 +KPX W uacute -45 +KPX W ucircumflex -45 +KPX W udieresis -45 +KPX W ugrave -45 +KPX W uhungarumlaut -45 +KPX W umacron -45 +KPX W uogonek -45 +KPX W uring -45 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -70 +KPX Y Oacute -70 +KPX Y Ocircumflex -70 +KPX Y Odieresis -70 +KPX Y Ograve -70 +KPX Y Ohungarumlaut -70 +KPX Y Omacron -70 +KPX Y Oslash -70 +KPX Y Otilde -70 +KPX Y a -90 +KPX Y aacute -90 +KPX Y abreve -90 +KPX Y acircumflex -90 +KPX Y adieresis -90 +KPX Y agrave -90 +KPX Y amacron -90 +KPX Y aogonek -90 +KPX Y aring -90 +KPX Y atilde -90 +KPX Y colon -50 +KPX Y comma -100 +KPX Y e -80 +KPX Y eacute -80 +KPX Y ecaron -80 +KPX Y ecircumflex -80 +KPX Y edieresis -80 +KPX Y edotaccent -80 +KPX Y egrave -80 +KPX Y emacron -80 +KPX Y eogonek -80 +KPX Y o -100 +KPX Y oacute -100 +KPX Y ocircumflex -100 +KPX Y odieresis -100 +KPX Y ograve -100 +KPX Y ohungarumlaut -100 +KPX Y omacron -100 +KPX Y oslash -100 +KPX Y otilde -100 +KPX Y period -100 +KPX Y semicolon -50 +KPX Y u -100 +KPX Y uacute -100 +KPX Y ucircumflex -100 +KPX Y udieresis -100 +KPX Y ugrave -100 +KPX Y uhungarumlaut -100 +KPX Y umacron -100 +KPX Y uogonek -100 +KPX Y uring -100 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -70 +KPX Yacute Oacute -70 +KPX Yacute Ocircumflex -70 +KPX Yacute Odieresis -70 +KPX Yacute Ograve -70 +KPX Yacute Ohungarumlaut -70 +KPX Yacute Omacron -70 +KPX Yacute Oslash -70 +KPX Yacute Otilde -70 +KPX Yacute a -90 +KPX Yacute aacute -90 +KPX Yacute abreve -90 +KPX Yacute acircumflex -90 +KPX Yacute adieresis -90 +KPX Yacute agrave -90 +KPX Yacute amacron -90 +KPX Yacute aogonek -90 +KPX Yacute aring -90 +KPX Yacute atilde -90 +KPX Yacute colon -50 +KPX Yacute comma -100 +KPX Yacute e -80 +KPX Yacute eacute -80 +KPX Yacute ecaron -80 +KPX Yacute ecircumflex -80 +KPX Yacute edieresis -80 +KPX Yacute edotaccent -80 +KPX Yacute egrave -80 +KPX Yacute emacron -80 +KPX Yacute eogonek -80 +KPX Yacute o -100 +KPX Yacute oacute -100 +KPX Yacute ocircumflex -100 +KPX Yacute odieresis -100 +KPX Yacute ograve -100 +KPX Yacute ohungarumlaut -100 +KPX Yacute omacron -100 +KPX Yacute oslash -100 +KPX Yacute otilde -100 +KPX Yacute period -100 +KPX Yacute semicolon -50 +KPX Yacute u -100 +KPX Yacute uacute -100 +KPX Yacute ucircumflex -100 +KPX Yacute udieresis -100 +KPX Yacute ugrave -100 +KPX Yacute uhungarumlaut -100 +KPX Yacute umacron -100 +KPX Yacute uogonek -100 +KPX Yacute uring -100 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -70 +KPX Ydieresis Oacute -70 +KPX Ydieresis Ocircumflex -70 +KPX Ydieresis Odieresis -70 +KPX Ydieresis Ograve -70 +KPX Ydieresis Ohungarumlaut -70 +KPX Ydieresis Omacron -70 +KPX Ydieresis Oslash -70 +KPX Ydieresis Otilde -70 +KPX Ydieresis a -90 +KPX Ydieresis aacute -90 +KPX Ydieresis abreve -90 +KPX Ydieresis acircumflex -90 +KPX Ydieresis adieresis -90 +KPX Ydieresis agrave -90 +KPX Ydieresis amacron -90 +KPX Ydieresis aogonek -90 +KPX Ydieresis aring -90 +KPX Ydieresis atilde -90 +KPX Ydieresis colon -50 +KPX Ydieresis comma -100 +KPX Ydieresis e -80 +KPX Ydieresis eacute -80 +KPX Ydieresis ecaron -80 +KPX Ydieresis ecircumflex -80 +KPX Ydieresis edieresis -80 +KPX Ydieresis edotaccent -80 +KPX Ydieresis egrave -80 +KPX Ydieresis emacron -80 +KPX Ydieresis eogonek -80 +KPX Ydieresis o -100 +KPX Ydieresis oacute -100 +KPX Ydieresis ocircumflex -100 +KPX Ydieresis odieresis -100 +KPX Ydieresis ograve -100 +KPX Ydieresis ohungarumlaut -100 +KPX Ydieresis omacron -100 +KPX Ydieresis oslash -100 +KPX Ydieresis otilde -100 +KPX Ydieresis period -100 +KPX Ydieresis semicolon -50 +KPX Ydieresis u -100 +KPX Ydieresis uacute -100 +KPX Ydieresis ucircumflex -100 +KPX Ydieresis udieresis -100 +KPX Ydieresis ugrave -100 +KPX Ydieresis uhungarumlaut -100 +KPX Ydieresis umacron -100 +KPX Ydieresis uogonek -100 +KPX Ydieresis uring -100 +KPX a g -10 +KPX a gbreve -10 +KPX a gcommaaccent -10 +KPX a v -15 +KPX a w -15 +KPX a y -20 +KPX a yacute -20 +KPX a ydieresis -20 +KPX aacute g -10 +KPX aacute gbreve -10 +KPX aacute gcommaaccent -10 +KPX aacute v -15 +KPX aacute w -15 +KPX aacute y -20 +KPX aacute yacute -20 +KPX aacute ydieresis -20 +KPX abreve g -10 +KPX abreve gbreve -10 +KPX abreve gcommaaccent -10 +KPX abreve v -15 +KPX abreve w -15 +KPX abreve y -20 +KPX abreve yacute -20 +KPX abreve ydieresis -20 +KPX acircumflex g -10 +KPX acircumflex gbreve -10 +KPX acircumflex gcommaaccent -10 +KPX acircumflex v -15 +KPX acircumflex w -15 +KPX acircumflex y -20 +KPX acircumflex yacute -20 +KPX acircumflex ydieresis -20 +KPX adieresis g -10 +KPX adieresis gbreve -10 +KPX adieresis gcommaaccent -10 +KPX adieresis v -15 +KPX adieresis w -15 +KPX adieresis y -20 +KPX adieresis yacute -20 +KPX adieresis ydieresis -20 +KPX agrave g -10 +KPX agrave gbreve -10 +KPX agrave gcommaaccent -10 +KPX agrave v -15 +KPX agrave w -15 +KPX agrave y -20 +KPX agrave yacute -20 +KPX agrave ydieresis -20 +KPX amacron g -10 +KPX amacron gbreve -10 +KPX amacron gcommaaccent -10 +KPX amacron v -15 +KPX amacron w -15 +KPX amacron y -20 +KPX amacron yacute -20 +KPX amacron ydieresis -20 +KPX aogonek g -10 +KPX aogonek gbreve -10 +KPX aogonek gcommaaccent -10 +KPX aogonek v -15 +KPX aogonek w -15 +KPX aogonek y -20 +KPX aogonek yacute -20 +KPX aogonek ydieresis -20 +KPX aring g -10 +KPX aring gbreve -10 +KPX aring gcommaaccent -10 +KPX aring v -15 +KPX aring w -15 +KPX aring y -20 +KPX aring yacute -20 +KPX aring ydieresis -20 +KPX atilde g -10 +KPX atilde gbreve -10 +KPX atilde gcommaaccent -10 +KPX atilde v -15 +KPX atilde w -15 +KPX atilde y -20 +KPX atilde yacute -20 +KPX atilde ydieresis -20 +KPX b l -10 +KPX b lacute -10 +KPX b lcommaaccent -10 +KPX b lslash -10 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c h -10 +KPX c k -20 +KPX c kcommaaccent -20 +KPX c l -20 +KPX c lacute -20 +KPX c lcommaaccent -20 +KPX c lslash -20 +KPX c y -10 +KPX c yacute -10 +KPX c ydieresis -10 +KPX cacute h -10 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX cacute l -20 +KPX cacute lacute -20 +KPX cacute lcommaaccent -20 +KPX cacute lslash -20 +KPX cacute y -10 +KPX cacute yacute -10 +KPX cacute ydieresis -10 +KPX ccaron h -10 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccaron l -20 +KPX ccaron lacute -20 +KPX ccaron lcommaaccent -20 +KPX ccaron lslash -20 +KPX ccaron y -10 +KPX ccaron yacute -10 +KPX ccaron ydieresis -10 +KPX ccedilla h -10 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX ccedilla l -20 +KPX ccedilla lacute -20 +KPX ccedilla lcommaaccent -20 +KPX ccedilla lslash -20 +KPX ccedilla y -10 +KPX ccedilla yacute -10 +KPX ccedilla ydieresis -10 +KPX colon space -40 +KPX comma quotedblright -120 +KPX comma quoteright -120 +KPX comma space -40 +KPX d d -10 +KPX d dcroat -10 +KPX d v -15 +KPX d w -15 +KPX d y -15 +KPX d yacute -15 +KPX d ydieresis -15 +KPX dcroat d -10 +KPX dcroat dcroat -10 +KPX dcroat v -15 +KPX dcroat w -15 +KPX dcroat y -15 +KPX dcroat yacute -15 +KPX dcroat ydieresis -15 +KPX e comma 10 +KPX e period 20 +KPX e v -15 +KPX e w -15 +KPX e x -15 +KPX e y -15 +KPX e yacute -15 +KPX e ydieresis -15 +KPX eacute comma 10 +KPX eacute period 20 +KPX eacute v -15 +KPX eacute w -15 +KPX eacute x -15 +KPX eacute y -15 +KPX eacute yacute -15 +KPX eacute ydieresis -15 +KPX ecaron comma 10 +KPX ecaron period 20 +KPX ecaron v -15 +KPX ecaron w -15 +KPX ecaron x -15 +KPX ecaron y -15 +KPX ecaron yacute -15 +KPX ecaron ydieresis -15 +KPX ecircumflex comma 10 +KPX ecircumflex period 20 +KPX ecircumflex v -15 +KPX ecircumflex w -15 +KPX ecircumflex x -15 +KPX ecircumflex y -15 +KPX ecircumflex yacute -15 +KPX ecircumflex ydieresis -15 +KPX edieresis comma 10 +KPX edieresis period 20 +KPX edieresis v -15 +KPX edieresis w -15 +KPX edieresis x -15 +KPX edieresis y -15 +KPX edieresis yacute -15 +KPX edieresis ydieresis -15 +KPX edotaccent comma 10 +KPX edotaccent period 20 +KPX edotaccent v -15 +KPX edotaccent w -15 +KPX edotaccent x -15 +KPX edotaccent y -15 +KPX edotaccent yacute -15 +KPX edotaccent ydieresis -15 +KPX egrave comma 10 +KPX egrave period 20 +KPX egrave v -15 +KPX egrave w -15 +KPX egrave x -15 +KPX egrave y -15 +KPX egrave yacute -15 +KPX egrave ydieresis -15 +KPX emacron comma 10 +KPX emacron period 20 +KPX emacron v -15 +KPX emacron w -15 +KPX emacron x -15 +KPX emacron y -15 +KPX emacron yacute -15 +KPX emacron ydieresis -15 +KPX eogonek comma 10 +KPX eogonek period 20 +KPX eogonek v -15 +KPX eogonek w -15 +KPX eogonek x -15 +KPX eogonek y -15 +KPX eogonek yacute -15 +KPX eogonek ydieresis -15 +KPX f comma -10 +KPX f e -10 +KPX f eacute -10 +KPX f ecaron -10 +KPX f ecircumflex -10 +KPX f edieresis -10 +KPX f edotaccent -10 +KPX f egrave -10 +KPX f emacron -10 +KPX f eogonek -10 +KPX f o -20 +KPX f oacute -20 +KPX f ocircumflex -20 +KPX f odieresis -20 +KPX f ograve -20 +KPX f ohungarumlaut -20 +KPX f omacron -20 +KPX f oslash -20 +KPX f otilde -20 +KPX f period -10 +KPX f quotedblright 30 +KPX f quoteright 30 +KPX g e 10 +KPX g eacute 10 +KPX g ecaron 10 +KPX g ecircumflex 10 +KPX g edieresis 10 +KPX g edotaccent 10 +KPX g egrave 10 +KPX g emacron 10 +KPX g eogonek 10 +KPX g g -10 +KPX g gbreve -10 +KPX g gcommaaccent -10 +KPX gbreve e 10 +KPX gbreve eacute 10 +KPX gbreve ecaron 10 +KPX gbreve ecircumflex 10 +KPX gbreve edieresis 10 +KPX gbreve edotaccent 10 +KPX gbreve egrave 10 +KPX gbreve emacron 10 +KPX gbreve eogonek 10 +KPX gbreve g -10 +KPX gbreve gbreve -10 +KPX gbreve gcommaaccent -10 +KPX gcommaaccent e 10 +KPX gcommaaccent eacute 10 +KPX gcommaaccent ecaron 10 +KPX gcommaaccent ecircumflex 10 +KPX gcommaaccent edieresis 10 +KPX gcommaaccent edotaccent 10 +KPX gcommaaccent egrave 10 +KPX gcommaaccent emacron 10 +KPX gcommaaccent eogonek 10 +KPX gcommaaccent g -10 +KPX gcommaaccent gbreve -10 +KPX gcommaaccent gcommaaccent -10 +KPX h y -20 +KPX h yacute -20 +KPX h ydieresis -20 +KPX k o -15 +KPX k oacute -15 +KPX k ocircumflex -15 +KPX k odieresis -15 +KPX k ograve -15 +KPX k ohungarumlaut -15 +KPX k omacron -15 +KPX k oslash -15 +KPX k otilde -15 +KPX kcommaaccent o -15 +KPX kcommaaccent oacute -15 +KPX kcommaaccent ocircumflex -15 +KPX kcommaaccent odieresis -15 +KPX kcommaaccent ograve -15 +KPX kcommaaccent ohungarumlaut -15 +KPX kcommaaccent omacron -15 +KPX kcommaaccent oslash -15 +KPX kcommaaccent otilde -15 +KPX l w -15 +KPX l y -15 +KPX l yacute -15 +KPX l ydieresis -15 +KPX lacute w -15 +KPX lacute y -15 +KPX lacute yacute -15 +KPX lacute ydieresis -15 +KPX lcommaaccent w -15 +KPX lcommaaccent y -15 +KPX lcommaaccent yacute -15 +KPX lcommaaccent ydieresis -15 +KPX lslash w -15 +KPX lslash y -15 +KPX lslash yacute -15 +KPX lslash ydieresis -15 +KPX m u -20 +KPX m uacute -20 +KPX m ucircumflex -20 +KPX m udieresis -20 +KPX m ugrave -20 +KPX m uhungarumlaut -20 +KPX m umacron -20 +KPX m uogonek -20 +KPX m uring -20 +KPX m y -30 +KPX m yacute -30 +KPX m ydieresis -30 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -40 +KPX n y -20 +KPX n yacute -20 +KPX n ydieresis -20 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -40 +KPX nacute y -20 +KPX nacute yacute -20 +KPX nacute ydieresis -20 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -40 +KPX ncaron y -20 +KPX ncaron yacute -20 +KPX ncaron ydieresis -20 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -40 +KPX ncommaaccent y -20 +KPX ncommaaccent yacute -20 +KPX ncommaaccent ydieresis -20 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -40 +KPX ntilde y -20 +KPX ntilde yacute -20 +KPX ntilde ydieresis -20 +KPX o v -20 +KPX o w -15 +KPX o x -30 +KPX o y -20 +KPX o yacute -20 +KPX o ydieresis -20 +KPX oacute v -20 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -20 +KPX oacute yacute -20 +KPX oacute ydieresis -20 +KPX ocircumflex v -20 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -20 +KPX ocircumflex yacute -20 +KPX ocircumflex ydieresis -20 +KPX odieresis v -20 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -20 +KPX odieresis yacute -20 +KPX odieresis ydieresis -20 +KPX ograve v -20 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -20 +KPX ograve yacute -20 +KPX ograve ydieresis -20 +KPX ohungarumlaut v -20 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -20 +KPX ohungarumlaut yacute -20 +KPX ohungarumlaut ydieresis -20 +KPX omacron v -20 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -20 +KPX omacron yacute -20 +KPX omacron ydieresis -20 +KPX oslash v -20 +KPX oslash w -15 +KPX oslash x -30 +KPX oslash y -20 +KPX oslash yacute -20 +KPX oslash ydieresis -20 +KPX otilde v -20 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -20 +KPX otilde yacute -20 +KPX otilde ydieresis -20 +KPX p y -15 +KPX p yacute -15 +KPX p ydieresis -15 +KPX period quotedblright -120 +KPX period quoteright -120 +KPX period space -40 +KPX quotedblright space -80 +KPX quoteleft quoteleft -46 +KPX quoteright d -80 +KPX quoteright dcroat -80 +KPX quoteright l -20 +KPX quoteright lacute -20 +KPX quoteright lcommaaccent -20 +KPX quoteright lslash -20 +KPX quoteright quoteright -46 +KPX quoteright r -40 +KPX quoteright racute -40 +KPX quoteright rcaron -40 +KPX quoteright rcommaaccent -40 +KPX quoteright s -60 +KPX quoteright sacute -60 +KPX quoteright scaron -60 +KPX quoteright scedilla -60 +KPX quoteright scommaaccent -60 +KPX quoteright space -80 +KPX quoteright v -20 +KPX r c -20 +KPX r cacute -20 +KPX r ccaron -20 +KPX r ccedilla -20 +KPX r comma -60 +KPX r d -20 +KPX r dcroat -20 +KPX r g -15 +KPX r gbreve -15 +KPX r gcommaaccent -15 +KPX r hyphen -20 +KPX r o -20 +KPX r oacute -20 +KPX r ocircumflex -20 +KPX r odieresis -20 +KPX r ograve -20 +KPX r ohungarumlaut -20 +KPX r omacron -20 +KPX r oslash -20 +KPX r otilde -20 +KPX r period -60 +KPX r q -20 +KPX r s -15 +KPX r sacute -15 +KPX r scaron -15 +KPX r scedilla -15 +KPX r scommaaccent -15 +KPX r t 20 +KPX r tcommaaccent 20 +KPX r v 10 +KPX r y 10 +KPX r yacute 10 +KPX r ydieresis 10 +KPX racute c -20 +KPX racute cacute -20 +KPX racute ccaron -20 +KPX racute ccedilla -20 +KPX racute comma -60 +KPX racute d -20 +KPX racute dcroat -20 +KPX racute g -15 +KPX racute gbreve -15 +KPX racute gcommaaccent -15 +KPX racute hyphen -20 +KPX racute o -20 +KPX racute oacute -20 +KPX racute ocircumflex -20 +KPX racute odieresis -20 +KPX racute ograve -20 +KPX racute ohungarumlaut -20 +KPX racute omacron -20 +KPX racute oslash -20 +KPX racute otilde -20 +KPX racute period -60 +KPX racute q -20 +KPX racute s -15 +KPX racute sacute -15 +KPX racute scaron -15 +KPX racute scedilla -15 +KPX racute scommaaccent -15 +KPX racute t 20 +KPX racute tcommaaccent 20 +KPX racute v 10 +KPX racute y 10 +KPX racute yacute 10 +KPX racute ydieresis 10 +KPX rcaron c -20 +KPX rcaron cacute -20 +KPX rcaron ccaron -20 +KPX rcaron ccedilla -20 +KPX rcaron comma -60 +KPX rcaron d -20 +KPX rcaron dcroat -20 +KPX rcaron g -15 +KPX rcaron gbreve -15 +KPX rcaron gcommaaccent -15 +KPX rcaron hyphen -20 +KPX rcaron o -20 +KPX rcaron oacute -20 +KPX rcaron ocircumflex -20 +KPX rcaron odieresis -20 +KPX rcaron ograve -20 +KPX rcaron ohungarumlaut -20 +KPX rcaron omacron -20 +KPX rcaron oslash -20 +KPX rcaron otilde -20 +KPX rcaron period -60 +KPX rcaron q -20 +KPX rcaron s -15 +KPX rcaron sacute -15 +KPX rcaron scaron -15 +KPX rcaron scedilla -15 +KPX rcaron scommaaccent -15 +KPX rcaron t 20 +KPX rcaron tcommaaccent 20 +KPX rcaron v 10 +KPX rcaron y 10 +KPX rcaron yacute 10 +KPX rcaron ydieresis 10 +KPX rcommaaccent c -20 +KPX rcommaaccent cacute -20 +KPX rcommaaccent ccaron -20 +KPX rcommaaccent ccedilla -20 +KPX rcommaaccent comma -60 +KPX rcommaaccent d -20 +KPX rcommaaccent dcroat -20 +KPX rcommaaccent g -15 +KPX rcommaaccent gbreve -15 +KPX rcommaaccent gcommaaccent -15 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent o -20 +KPX rcommaaccent oacute -20 +KPX rcommaaccent ocircumflex -20 +KPX rcommaaccent odieresis -20 +KPX rcommaaccent ograve -20 +KPX rcommaaccent ohungarumlaut -20 +KPX rcommaaccent omacron -20 +KPX rcommaaccent oslash -20 +KPX rcommaaccent otilde -20 +KPX rcommaaccent period -60 +KPX rcommaaccent q -20 +KPX rcommaaccent s -15 +KPX rcommaaccent sacute -15 +KPX rcommaaccent scaron -15 +KPX rcommaaccent scedilla -15 +KPX rcommaaccent scommaaccent -15 +KPX rcommaaccent t 20 +KPX rcommaaccent tcommaaccent 20 +KPX rcommaaccent v 10 +KPX rcommaaccent y 10 +KPX rcommaaccent yacute 10 +KPX rcommaaccent ydieresis 10 +KPX s w -15 +KPX sacute w -15 +KPX scaron w -15 +KPX scedilla w -15 +KPX scommaaccent w -15 +KPX semicolon space -40 +KPX space T -100 +KPX space Tcaron -100 +KPX space Tcommaaccent -100 +KPX space V -80 +KPX space W -80 +KPX space Y -120 +KPX space Yacute -120 +KPX space Ydieresis -120 +KPX space quotedblleft -80 +KPX space quoteleft -60 +KPX v a -20 +KPX v aacute -20 +KPX v abreve -20 +KPX v acircumflex -20 +KPX v adieresis -20 +KPX v agrave -20 +KPX v amacron -20 +KPX v aogonek -20 +KPX v aring -20 +KPX v atilde -20 +KPX v comma -80 +KPX v o -30 +KPX v oacute -30 +KPX v ocircumflex -30 +KPX v odieresis -30 +KPX v ograve -30 +KPX v ohungarumlaut -30 +KPX v omacron -30 +KPX v oslash -30 +KPX v otilde -30 +KPX v period -80 +KPX w comma -40 +KPX w o -20 +KPX w oacute -20 +KPX w ocircumflex -20 +KPX w odieresis -20 +KPX w ograve -20 +KPX w ohungarumlaut -20 +KPX w omacron -20 +KPX w oslash -20 +KPX w otilde -20 +KPX w period -40 +KPX x e -10 +KPX x eacute -10 +KPX x ecaron -10 +KPX x ecircumflex -10 +KPX x edieresis -10 +KPX x edotaccent -10 +KPX x egrave -10 +KPX x emacron -10 +KPX x eogonek -10 +KPX y a -30 +KPX y aacute -30 +KPX y abreve -30 +KPX y acircumflex -30 +KPX y adieresis -30 +KPX y agrave -30 +KPX y amacron -30 +KPX y aogonek -30 +KPX y aring -30 +KPX y atilde -30 +KPX y comma -80 +KPX y e -10 +KPX y eacute -10 +KPX y ecaron -10 +KPX y ecircumflex -10 +KPX y edieresis -10 +KPX y edotaccent -10 +KPX y egrave -10 +KPX y emacron -10 +KPX y eogonek -10 +KPX y o -25 +KPX y oacute -25 +KPX y ocircumflex -25 +KPX y odieresis -25 +KPX y ograve -25 +KPX y ohungarumlaut -25 +KPX y omacron -25 +KPX y oslash -25 +KPX y otilde -25 +KPX y period -80 +KPX yacute a -30 +KPX yacute aacute -30 +KPX yacute abreve -30 +KPX yacute acircumflex -30 +KPX yacute adieresis -30 +KPX yacute agrave -30 +KPX yacute amacron -30 +KPX yacute aogonek -30 +KPX yacute aring -30 +KPX yacute atilde -30 +KPX yacute comma -80 +KPX yacute e -10 +KPX yacute eacute -10 +KPX yacute ecaron -10 +KPX yacute ecircumflex -10 +KPX yacute edieresis -10 +KPX yacute edotaccent -10 +KPX yacute egrave -10 +KPX yacute emacron -10 +KPX yacute eogonek -10 +KPX yacute o -25 +KPX yacute oacute -25 +KPX yacute ocircumflex -25 +KPX yacute odieresis -25 +KPX yacute ograve -25 +KPX yacute ohungarumlaut -25 +KPX yacute omacron -25 +KPX yacute oslash -25 +KPX yacute otilde -25 +KPX yacute period -80 +KPX ydieresis a -30 +KPX ydieresis aacute -30 +KPX ydieresis abreve -30 +KPX ydieresis acircumflex -30 +KPX ydieresis adieresis -30 +KPX ydieresis agrave -30 +KPX ydieresis amacron -30 +KPX ydieresis aogonek -30 +KPX ydieresis aring -30 +KPX ydieresis atilde -30 +KPX ydieresis comma -80 +KPX ydieresis e -10 +KPX ydieresis eacute -10 +KPX ydieresis ecaron -10 +KPX ydieresis ecircumflex -10 +KPX ydieresis edieresis -10 +KPX ydieresis edotaccent -10 +KPX ydieresis egrave -10 +KPX ydieresis emacron -10 +KPX ydieresis eogonek -10 +KPX ydieresis o -25 +KPX ydieresis oacute -25 +KPX ydieresis ocircumflex -25 +KPX ydieresis odieresis -25 +KPX ydieresis ograve -25 +KPX ydieresis ohungarumlaut -25 +KPX ydieresis omacron -25 +KPX ydieresis oslash -25 +KPX ydieresis otilde -25 +KPX ydieresis period -80 +KPX z e 10 +KPX z eacute 10 +KPX z ecaron 10 +KPX z ecircumflex 10 +KPX z edieresis 10 +KPX z edotaccent 10 +KPX z egrave 10 +KPX z emacron 10 +KPX z eogonek 10 +KPX zacute e 10 +KPX zacute eacute 10 +KPX zacute ecaron 10 +KPX zacute ecircumflex 10 +KPX zacute edieresis 10 +KPX zacute edotaccent 10 +KPX zacute egrave 10 +KPX zacute emacron 10 +KPX zacute eogonek 10 +KPX zcaron e 10 +KPX zcaron eacute 10 +KPX zcaron ecaron 10 +KPX zcaron ecircumflex 10 +KPX zcaron edieresis 10 +KPX zcaron edotaccent 10 +KPX zcaron egrave 10 +KPX zcaron emacron 10 +KPX zcaron eogonek 10 +KPX zdotaccent e 10 +KPX zdotaccent eacute 10 +KPX zdotaccent ecaron 10 +KPX zdotaccent ecircumflex 10 +KPX zdotaccent edieresis 10 +KPX zdotaccent edotaccent 10 +KPX zdotaccent egrave 10 +KPX zdotaccent emacron 10 +KPX zdotaccent eogonek 10 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Helvetica-Oblique.afm b/internal/pdf/model/fonts/afms/Helvetica-Oblique.afm new file mode 100644 index 0000000..57bf472 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Helvetica-Oblique.afm @@ -0,0 +1,3051 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:44:31 1997 +Comment UniqueID 43055 +Comment VMusage 14960 69346 +FontName Helvetica-Oblique +FullName Helvetica Oblique +FamilyName Helvetica +Weight Medium +ItalicAngle -12 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -170 -225 1116 931 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 523 +Ascender 718 +Descender -207 +StdHW 76 +StdVW 88 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 278 ; N exclam ; B 90 0 340 718 ; +C 34 ; WX 355 ; N quotedbl ; B 168 463 438 718 ; +C 35 ; WX 556 ; N numbersign ; B 73 0 631 688 ; +C 36 ; WX 556 ; N dollar ; B 69 -115 617 775 ; +C 37 ; WX 889 ; N percent ; B 147 -19 889 703 ; +C 38 ; WX 667 ; N ampersand ; B 77 -15 647 718 ; +C 39 ; WX 222 ; N quoteright ; B 151 463 310 718 ; +C 40 ; WX 333 ; N parenleft ; B 108 -207 454 733 ; +C 41 ; WX 333 ; N parenright ; B -9 -207 337 733 ; +C 42 ; WX 389 ; N asterisk ; B 165 431 475 718 ; +C 43 ; WX 584 ; N plus ; B 85 0 606 505 ; +C 44 ; WX 278 ; N comma ; B 56 -147 214 106 ; +C 45 ; WX 333 ; N hyphen ; B 93 232 357 322 ; +C 46 ; WX 278 ; N period ; B 87 0 214 106 ; +C 47 ; WX 278 ; N slash ; B -21 -19 452 737 ; +C 48 ; WX 556 ; N zero ; B 93 -19 608 703 ; +C 49 ; WX 556 ; N one ; B 207 0 508 703 ; +C 50 ; WX 556 ; N two ; B 26 0 617 703 ; +C 51 ; WX 556 ; N three ; B 75 -19 610 703 ; +C 52 ; WX 556 ; N four ; B 61 0 576 703 ; +C 53 ; WX 556 ; N five ; B 68 -19 621 688 ; +C 54 ; WX 556 ; N six ; B 91 -19 615 703 ; +C 55 ; WX 556 ; N seven ; B 137 0 669 688 ; +C 56 ; WX 556 ; N eight ; B 74 -19 607 703 ; +C 57 ; WX 556 ; N nine ; B 82 -19 609 703 ; +C 58 ; WX 278 ; N colon ; B 87 0 301 516 ; +C 59 ; WX 278 ; N semicolon ; B 56 -147 301 516 ; +C 60 ; WX 584 ; N less ; B 94 11 641 495 ; +C 61 ; WX 584 ; N equal ; B 63 115 628 390 ; +C 62 ; WX 584 ; N greater ; B 50 11 597 495 ; +C 63 ; WX 556 ; N question ; B 161 0 610 727 ; +C 64 ; WX 1015 ; N at ; B 215 -19 965 737 ; +C 65 ; WX 667 ; N A ; B 14 0 654 718 ; +C 66 ; WX 667 ; N B ; B 74 0 712 718 ; +C 67 ; WX 722 ; N C ; B 108 -19 782 737 ; +C 68 ; WX 722 ; N D ; B 81 0 764 718 ; +C 69 ; WX 667 ; N E ; B 86 0 762 718 ; +C 70 ; WX 611 ; N F ; B 86 0 736 718 ; +C 71 ; WX 778 ; N G ; B 111 -19 799 737 ; +C 72 ; WX 722 ; N H ; B 77 0 799 718 ; +C 73 ; WX 278 ; N I ; B 91 0 341 718 ; +C 74 ; WX 500 ; N J ; B 47 -19 581 718 ; +C 75 ; WX 667 ; N K ; B 76 0 808 718 ; +C 76 ; WX 556 ; N L ; B 76 0 555 718 ; +C 77 ; WX 833 ; N M ; B 73 0 914 718 ; +C 78 ; WX 722 ; N N ; B 76 0 799 718 ; +C 79 ; WX 778 ; N O ; B 105 -19 826 737 ; +C 80 ; WX 667 ; N P ; B 86 0 737 718 ; +C 81 ; WX 778 ; N Q ; B 105 -56 826 737 ; +C 82 ; WX 722 ; N R ; B 88 0 773 718 ; +C 83 ; WX 667 ; N S ; B 90 -19 713 737 ; +C 84 ; WX 611 ; N T ; B 148 0 750 718 ; +C 85 ; WX 722 ; N U ; B 123 -19 797 718 ; +C 86 ; WX 667 ; N V ; B 173 0 800 718 ; +C 87 ; WX 944 ; N W ; B 169 0 1081 718 ; +C 88 ; WX 667 ; N X ; B 19 0 790 718 ; +C 89 ; WX 667 ; N Y ; B 167 0 806 718 ; +C 90 ; WX 611 ; N Z ; B 23 0 741 718 ; +C 91 ; WX 278 ; N bracketleft ; B 21 -196 403 722 ; +C 92 ; WX 278 ; N backslash ; B 140 -19 291 737 ; +C 93 ; WX 278 ; N bracketright ; B -14 -196 368 722 ; +C 94 ; WX 469 ; N asciicircum ; B 42 264 539 688 ; +C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; +C 96 ; WX 222 ; N quoteleft ; B 165 470 323 725 ; +C 97 ; WX 556 ; N a ; B 61 -15 559 538 ; +C 98 ; WX 556 ; N b ; B 58 -15 584 718 ; +C 99 ; WX 500 ; N c ; B 74 -15 553 538 ; +C 100 ; WX 556 ; N d ; B 84 -15 652 718 ; +C 101 ; WX 556 ; N e ; B 84 -15 578 538 ; +C 102 ; WX 278 ; N f ; B 86 0 416 728 ; L i fi ; L l fl ; +C 103 ; WX 556 ; N g ; B 42 -220 610 538 ; +C 104 ; WX 556 ; N h ; B 65 0 573 718 ; +C 105 ; WX 222 ; N i ; B 67 0 308 718 ; +C 106 ; WX 222 ; N j ; B -60 -210 308 718 ; +C 107 ; WX 500 ; N k ; B 67 0 600 718 ; +C 108 ; WX 222 ; N l ; B 67 0 308 718 ; +C 109 ; WX 833 ; N m ; B 65 0 852 538 ; +C 110 ; WX 556 ; N n ; B 65 0 573 538 ; +C 111 ; WX 556 ; N o ; B 83 -14 585 538 ; +C 112 ; WX 556 ; N p ; B 14 -207 584 538 ; +C 113 ; WX 556 ; N q ; B 84 -207 605 538 ; +C 114 ; WX 333 ; N r ; B 77 0 446 538 ; +C 115 ; WX 500 ; N s ; B 63 -15 529 538 ; +C 116 ; WX 278 ; N t ; B 102 -7 368 669 ; +C 117 ; WX 556 ; N u ; B 94 -15 600 523 ; +C 118 ; WX 500 ; N v ; B 119 0 603 523 ; +C 119 ; WX 722 ; N w ; B 125 0 820 523 ; +C 120 ; WX 500 ; N x ; B 11 0 594 523 ; +C 121 ; WX 500 ; N y ; B 15 -214 600 523 ; +C 122 ; WX 500 ; N z ; B 31 0 571 523 ; +C 123 ; WX 334 ; N braceleft ; B 92 -196 445 722 ; +C 124 ; WX 260 ; N bar ; B 46 -225 332 775 ; +C 125 ; WX 334 ; N braceright ; B 0 -196 354 722 ; +C 126 ; WX 584 ; N asciitilde ; B 111 180 580 326 ; +C 161 ; WX 333 ; N exclamdown ; B 77 -195 326 523 ; +C 162 ; WX 556 ; N cent ; B 95 -115 584 623 ; +C 163 ; WX 556 ; N sterling ; B 49 -16 634 718 ; +C 164 ; WX 167 ; N fraction ; B -170 -19 482 703 ; +C 165 ; WX 556 ; N yen ; B 81 0 699 688 ; +C 166 ; WX 556 ; N florin ; B -52 -207 654 737 ; +C 167 ; WX 556 ; N section ; B 76 -191 584 737 ; +C 168 ; WX 556 ; N currency ; B 60 99 646 603 ; +C 169 ; WX 191 ; N quotesingle ; B 157 463 285 718 ; +C 170 ; WX 333 ; N quotedblleft ; B 138 470 461 725 ; +C 171 ; WX 556 ; N guillemotleft ; B 146 108 554 446 ; +C 172 ; WX 333 ; N guilsinglleft ; B 137 108 340 446 ; +C 173 ; WX 333 ; N guilsinglright ; B 111 108 314 446 ; +C 174 ; WX 500 ; N fi ; B 86 0 587 728 ; +C 175 ; WX 500 ; N fl ; B 86 0 585 728 ; +C 177 ; WX 556 ; N endash ; B 51 240 623 313 ; +C 178 ; WX 556 ; N dagger ; B 135 -159 622 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 52 -159 623 718 ; +C 180 ; WX 278 ; N periodcentered ; B 129 190 257 315 ; +C 182 ; WX 537 ; N paragraph ; B 126 -173 650 718 ; +C 183 ; WX 350 ; N bullet ; B 91 202 413 517 ; +C 184 ; WX 222 ; N quotesinglbase ; B 21 -149 180 106 ; +C 185 ; WX 333 ; N quotedblbase ; B -6 -149 318 106 ; +C 186 ; WX 333 ; N quotedblright ; B 124 463 448 718 ; +C 187 ; WX 556 ; N guillemotright ; B 120 108 528 446 ; +C 188 ; WX 1000 ; N ellipsis ; B 115 0 908 106 ; +C 189 ; WX 1000 ; N perthousand ; B 88 -19 1029 703 ; +C 191 ; WX 611 ; N questiondown ; B 85 -201 534 525 ; +C 193 ; WX 333 ; N grave ; B 170 593 337 734 ; +C 194 ; WX 333 ; N acute ; B 248 593 475 734 ; +C 195 ; WX 333 ; N circumflex ; B 147 593 438 734 ; +C 196 ; WX 333 ; N tilde ; B 125 606 490 722 ; +C 197 ; WX 333 ; N macron ; B 143 627 468 684 ; +C 198 ; WX 333 ; N breve ; B 167 595 476 731 ; +C 199 ; WX 333 ; N dotaccent ; B 249 604 362 706 ; +C 200 ; WX 333 ; N dieresis ; B 168 604 443 706 ; +C 202 ; WX 333 ; N ring ; B 214 572 402 756 ; +C 203 ; WX 333 ; N cedilla ; B 2 -225 232 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 157 593 565 734 ; +C 206 ; WX 333 ; N ogonek ; B 43 -225 249 0 ; +C 207 ; WX 333 ; N caron ; B 177 593 468 734 ; +C 208 ; WX 1000 ; N emdash ; B 51 240 1067 313 ; +C 225 ; WX 1000 ; N AE ; B 8 0 1097 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 127 405 449 737 ; +C 232 ; WX 556 ; N Lslash ; B 41 0 555 718 ; +C 233 ; WX 778 ; N Oslash ; B 43 -19 890 737 ; +C 234 ; WX 1000 ; N OE ; B 98 -19 1116 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 141 405 468 737 ; +C 241 ; WX 889 ; N ae ; B 61 -15 909 538 ; +C 245 ; WX 278 ; N dotlessi ; B 95 0 294 523 ; +C 248 ; WX 222 ; N lslash ; B 41 0 347 718 ; +C 249 ; WX 611 ; N oslash ; B 29 -22 647 545 ; +C 250 ; WX 944 ; N oe ; B 83 -15 964 538 ; +C 251 ; WX 611 ; N germandbls ; B 67 -15 658 728 ; +C -1 ; WX 278 ; N Idieresis ; B 91 0 458 901 ; +C -1 ; WX 556 ; N eacute ; B 84 -15 587 734 ; +C -1 ; WX 556 ; N abreve ; B 61 -15 578 731 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 94 -15 677 734 ; +C -1 ; WX 556 ; N ecaron ; B 84 -15 580 734 ; +C -1 ; WX 667 ; N Ydieresis ; B 167 0 806 901 ; +C -1 ; WX 584 ; N divide ; B 85 -19 606 524 ; +C -1 ; WX 667 ; N Yacute ; B 167 0 806 929 ; +C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; +C -1 ; WX 556 ; N aacute ; B 61 -15 587 734 ; +C -1 ; WX 722 ; N Ucircumflex ; B 123 -19 797 929 ; +C -1 ; WX 500 ; N yacute ; B 15 -214 600 734 ; +C -1 ; WX 500 ; N scommaaccent ; B 63 -225 529 538 ; +C -1 ; WX 556 ; N ecircumflex ; B 84 -15 578 734 ; +C -1 ; WX 722 ; N Uring ; B 123 -19 797 931 ; +C -1 ; WX 722 ; N Udieresis ; B 123 -19 797 901 ; +C -1 ; WX 556 ; N aogonek ; B 61 -220 559 538 ; +C -1 ; WX 722 ; N Uacute ; B 123 -19 797 929 ; +C -1 ; WX 556 ; N uogonek ; B 94 -225 600 523 ; +C -1 ; WX 667 ; N Edieresis ; B 86 0 762 901 ; +C -1 ; WX 722 ; N Dcroat ; B 69 0 764 718 ; +C -1 ; WX 250 ; N commaaccent ; B 39 -225 172 -40 ; +C -1 ; WX 737 ; N copyright ; B 54 -19 837 737 ; +C -1 ; WX 667 ; N Emacron ; B 86 0 762 879 ; +C -1 ; WX 500 ; N ccaron ; B 74 -15 553 734 ; +C -1 ; WX 556 ; N aring ; B 61 -15 559 756 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 76 -225 799 718 ; +C -1 ; WX 222 ; N lacute ; B 67 0 461 929 ; +C -1 ; WX 556 ; N agrave ; B 61 -15 559 734 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 148 -225 750 718 ; +C -1 ; WX 722 ; N Cacute ; B 108 -19 782 929 ; +C -1 ; WX 556 ; N atilde ; B 61 -15 592 722 ; +C -1 ; WX 667 ; N Edotaccent ; B 86 0 762 901 ; +C -1 ; WX 500 ; N scaron ; B 63 -15 552 734 ; +C -1 ; WX 500 ; N scedilla ; B 63 -225 529 538 ; +C -1 ; WX 278 ; N iacute ; B 95 0 448 734 ; +C -1 ; WX 471 ; N lozenge ; B 88 0 540 728 ; +C -1 ; WX 722 ; N Rcaron ; B 88 0 773 929 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 111 -225 799 737 ; +C -1 ; WX 556 ; N ucircumflex ; B 94 -15 600 734 ; +C -1 ; WX 556 ; N acircumflex ; B 61 -15 559 734 ; +C -1 ; WX 667 ; N Amacron ; B 14 0 677 879 ; +C -1 ; WX 333 ; N rcaron ; B 77 0 508 734 ; +C -1 ; WX 500 ; N ccedilla ; B 74 -225 553 538 ; +C -1 ; WX 611 ; N Zdotaccent ; B 23 0 741 901 ; +C -1 ; WX 667 ; N Thorn ; B 86 0 712 718 ; +C -1 ; WX 778 ; N Omacron ; B 105 -19 826 879 ; +C -1 ; WX 722 ; N Racute ; B 88 0 773 929 ; +C -1 ; WX 667 ; N Sacute ; B 90 -19 713 929 ; +C -1 ; WX 643 ; N dcaron ; B 84 -15 808 718 ; +C -1 ; WX 722 ; N Umacron ; B 123 -19 797 879 ; +C -1 ; WX 556 ; N uring ; B 94 -15 600 756 ; +C -1 ; WX 333 ; N threesuperior ; B 90 270 436 703 ; +C -1 ; WX 778 ; N Ograve ; B 105 -19 826 929 ; +C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; +C -1 ; WX 667 ; N Abreve ; B 14 0 685 926 ; +C -1 ; WX 584 ; N multiply ; B 50 0 642 506 ; +C -1 ; WX 556 ; N uacute ; B 94 -15 600 734 ; +C -1 ; WX 611 ; N Tcaron ; B 148 0 750 929 ; +C -1 ; WX 476 ; N partialdiff ; B 41 -38 550 714 ; +C -1 ; WX 500 ; N ydieresis ; B 15 -214 600 706 ; +C -1 ; WX 722 ; N Nacute ; B 76 0 799 929 ; +C -1 ; WX 278 ; N icircumflex ; B 95 0 411 734 ; +C -1 ; WX 667 ; N Ecircumflex ; B 86 0 762 929 ; +C -1 ; WX 556 ; N adieresis ; B 61 -15 559 706 ; +C -1 ; WX 556 ; N edieresis ; B 84 -15 578 706 ; +C -1 ; WX 500 ; N cacute ; B 74 -15 559 734 ; +C -1 ; WX 556 ; N nacute ; B 65 0 587 734 ; +C -1 ; WX 556 ; N umacron ; B 94 -15 600 684 ; +C -1 ; WX 722 ; N Ncaron ; B 76 0 799 929 ; +C -1 ; WX 278 ; N Iacute ; B 91 0 489 929 ; +C -1 ; WX 584 ; N plusminus ; B 39 0 618 506 ; +C -1 ; WX 260 ; N brokenbar ; B 62 -150 316 700 ; +C -1 ; WX 737 ; N registered ; B 54 -19 837 737 ; +C -1 ; WX 778 ; N Gbreve ; B 111 -19 799 926 ; +C -1 ; WX 278 ; N Idotaccent ; B 91 0 377 901 ; +C -1 ; WX 600 ; N summation ; B 15 -10 671 706 ; +C -1 ; WX 667 ; N Egrave ; B 86 0 762 929 ; +C -1 ; WX 333 ; N racute ; B 77 0 475 734 ; +C -1 ; WX 556 ; N omacron ; B 83 -14 585 684 ; +C -1 ; WX 611 ; N Zacute ; B 23 0 741 929 ; +C -1 ; WX 611 ; N Zcaron ; B 23 0 741 929 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 620 674 ; +C -1 ; WX 722 ; N Eth ; B 69 0 764 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 108 -225 782 737 ; +C -1 ; WX 222 ; N lcommaaccent ; B 25 -225 308 718 ; +C -1 ; WX 317 ; N tcaron ; B 102 -7 501 808 ; +C -1 ; WX 556 ; N eogonek ; B 84 -225 578 538 ; +C -1 ; WX 722 ; N Uogonek ; B 123 -225 797 718 ; +C -1 ; WX 667 ; N Aacute ; B 14 0 683 929 ; +C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; +C -1 ; WX 556 ; N egrave ; B 84 -15 578 734 ; +C -1 ; WX 500 ; N zacute ; B 31 0 571 734 ; +C -1 ; WX 222 ; N iogonek ; B -61 -225 308 718 ; +C -1 ; WX 778 ; N Oacute ; B 105 -19 826 929 ; +C -1 ; WX 556 ; N oacute ; B 83 -14 587 734 ; +C -1 ; WX 556 ; N amacron ; B 61 -15 580 684 ; +C -1 ; WX 500 ; N sacute ; B 63 -15 559 734 ; +C -1 ; WX 278 ; N idieresis ; B 95 0 416 706 ; +C -1 ; WX 778 ; N Ocircumflex ; B 105 -19 826 929 ; +C -1 ; WX 722 ; N Ugrave ; B 123 -19 797 929 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 556 ; N thorn ; B 14 -207 584 718 ; +C -1 ; WX 333 ; N twosuperior ; B 64 281 449 703 ; +C -1 ; WX 778 ; N Odieresis ; B 105 -19 826 901 ; +C -1 ; WX 556 ; N mu ; B 24 -207 600 523 ; +C -1 ; WX 278 ; N igrave ; B 95 0 310 734 ; +C -1 ; WX 556 ; N ohungarumlaut ; B 83 -14 677 734 ; +C -1 ; WX 667 ; N Eogonek ; B 86 -220 762 718 ; +C -1 ; WX 556 ; N dcroat ; B 84 -15 689 718 ; +C -1 ; WX 834 ; N threequarters ; B 130 -19 861 703 ; +C -1 ; WX 667 ; N Scedilla ; B 90 -225 713 737 ; +C -1 ; WX 299 ; N lcaron ; B 67 0 464 718 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 76 -225 808 718 ; +C -1 ; WX 556 ; N Lacute ; B 76 0 555 929 ; +C -1 ; WX 1000 ; N trademark ; B 186 306 1056 718 ; +C -1 ; WX 556 ; N edotaccent ; B 84 -15 578 706 ; +C -1 ; WX 278 ; N Igrave ; B 91 0 351 929 ; +C -1 ; WX 278 ; N Imacron ; B 91 0 483 879 ; +C -1 ; WX 556 ; N Lcaron ; B 76 0 570 718 ; +C -1 ; WX 834 ; N onehalf ; B 114 -19 839 703 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 666 674 ; +C -1 ; WX 556 ; N ocircumflex ; B 83 -14 585 734 ; +C -1 ; WX 556 ; N ntilde ; B 65 0 592 722 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 123 -19 801 929 ; +C -1 ; WX 667 ; N Eacute ; B 86 0 762 929 ; +C -1 ; WX 556 ; N emacron ; B 84 -15 580 684 ; +C -1 ; WX 556 ; N gbreve ; B 42 -220 610 731 ; +C -1 ; WX 834 ; N onequarter ; B 150 -19 802 703 ; +C -1 ; WX 667 ; N Scaron ; B 90 -19 713 929 ; +C -1 ; WX 667 ; N Scommaaccent ; B 90 -225 713 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 105 -19 829 929 ; +C -1 ; WX 400 ; N degree ; B 169 411 468 703 ; +C -1 ; WX 556 ; N ograve ; B 83 -14 585 734 ; +C -1 ; WX 722 ; N Ccaron ; B 108 -19 782 929 ; +C -1 ; WX 556 ; N ugrave ; B 94 -15 600 734 ; +C -1 ; WX 453 ; N radical ; B 79 -80 617 762 ; +C -1 ; WX 722 ; N Dcaron ; B 81 0 764 929 ; +C -1 ; WX 333 ; N rcommaaccent ; B 30 -225 446 538 ; +C -1 ; WX 722 ; N Ntilde ; B 76 0 799 917 ; +C -1 ; WX 556 ; N otilde ; B 83 -14 602 722 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 88 -225 773 718 ; +C -1 ; WX 556 ; N Lcommaaccent ; B 76 -225 555 718 ; +C -1 ; WX 667 ; N Atilde ; B 14 0 699 917 ; +C -1 ; WX 667 ; N Aogonek ; B 14 -225 654 718 ; +C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; +C -1 ; WX 778 ; N Otilde ; B 105 -19 826 917 ; +C -1 ; WX 500 ; N zdotaccent ; B 31 0 571 706 ; +C -1 ; WX 667 ; N Ecaron ; B 86 0 762 929 ; +C -1 ; WX 278 ; N Iogonek ; B -33 -225 341 718 ; +C -1 ; WX 500 ; N kcommaaccent ; B 67 -225 600 718 ; +C -1 ; WX 584 ; N minus ; B 85 216 606 289 ; +C -1 ; WX 278 ; N Icircumflex ; B 91 0 452 929 ; +C -1 ; WX 556 ; N ncaron ; B 65 0 580 734 ; +C -1 ; WX 278 ; N tcommaaccent ; B 63 -225 368 669 ; +C -1 ; WX 584 ; N logicalnot ; B 106 108 628 390 ; +C -1 ; WX 556 ; N odieresis ; B 83 -14 585 706 ; +C -1 ; WX 556 ; N udieresis ; B 94 -15 600 706 ; +C -1 ; WX 549 ; N notequal ; B 34 -35 623 551 ; +C -1 ; WX 556 ; N gcommaaccent ; B 42 -220 610 822 ; +C -1 ; WX 556 ; N eth ; B 81 -15 617 737 ; +C -1 ; WX 500 ; N zcaron ; B 31 0 571 734 ; +C -1 ; WX 556 ; N ncommaaccent ; B 65 -225 573 538 ; +C -1 ; WX 333 ; N onesuperior ; B 166 281 371 703 ; +C -1 ; WX 278 ; N imacron ; B 95 0 417 684 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2705 +KPX A C -30 +KPX A Cacute -30 +KPX A Ccaron -30 +KPX A Ccedilla -30 +KPX A G -30 +KPX A Gbreve -30 +KPX A Gcommaaccent -30 +KPX A O -30 +KPX A Oacute -30 +KPX A Ocircumflex -30 +KPX A Odieresis -30 +KPX A Ograve -30 +KPX A Ohungarumlaut -30 +KPX A Omacron -30 +KPX A Oslash -30 +KPX A Otilde -30 +KPX A Q -30 +KPX A T -120 +KPX A Tcaron -120 +KPX A Tcommaaccent -120 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -70 +KPX A W -50 +KPX A Y -100 +KPX A Yacute -100 +KPX A Ydieresis -100 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -40 +KPX A y -40 +KPX A yacute -40 +KPX A ydieresis -40 +KPX Aacute C -30 +KPX Aacute Cacute -30 +KPX Aacute Ccaron -30 +KPX Aacute Ccedilla -30 +KPX Aacute G -30 +KPX Aacute Gbreve -30 +KPX Aacute Gcommaaccent -30 +KPX Aacute O -30 +KPX Aacute Oacute -30 +KPX Aacute Ocircumflex -30 +KPX Aacute Odieresis -30 +KPX Aacute Ograve -30 +KPX Aacute Ohungarumlaut -30 +KPX Aacute Omacron -30 +KPX Aacute Oslash -30 +KPX Aacute Otilde -30 +KPX Aacute Q -30 +KPX Aacute T -120 +KPX Aacute Tcaron -120 +KPX Aacute Tcommaaccent -120 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -70 +KPX Aacute W -50 +KPX Aacute Y -100 +KPX Aacute Yacute -100 +KPX Aacute Ydieresis -100 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -40 +KPX Aacute y -40 +KPX Aacute yacute -40 +KPX Aacute ydieresis -40 +KPX Abreve C -30 +KPX Abreve Cacute -30 +KPX Abreve Ccaron -30 +KPX Abreve Ccedilla -30 +KPX Abreve G -30 +KPX Abreve Gbreve -30 +KPX Abreve Gcommaaccent -30 +KPX Abreve O -30 +KPX Abreve Oacute -30 +KPX Abreve Ocircumflex -30 +KPX Abreve Odieresis -30 +KPX Abreve Ograve -30 +KPX Abreve Ohungarumlaut -30 +KPX Abreve Omacron -30 +KPX Abreve Oslash -30 +KPX Abreve Otilde -30 +KPX Abreve Q -30 +KPX Abreve T -120 +KPX Abreve Tcaron -120 +KPX Abreve Tcommaaccent -120 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -70 +KPX Abreve W -50 +KPX Abreve Y -100 +KPX Abreve Yacute -100 +KPX Abreve Ydieresis -100 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -40 +KPX Abreve y -40 +KPX Abreve yacute -40 +KPX Abreve ydieresis -40 +KPX Acircumflex C -30 +KPX Acircumflex Cacute -30 +KPX Acircumflex Ccaron -30 +KPX Acircumflex Ccedilla -30 +KPX Acircumflex G -30 +KPX Acircumflex Gbreve -30 +KPX Acircumflex Gcommaaccent -30 +KPX Acircumflex O -30 +KPX Acircumflex Oacute -30 +KPX Acircumflex Ocircumflex -30 +KPX Acircumflex Odieresis -30 +KPX Acircumflex Ograve -30 +KPX Acircumflex Ohungarumlaut -30 +KPX Acircumflex Omacron -30 +KPX Acircumflex Oslash -30 +KPX Acircumflex Otilde -30 +KPX Acircumflex Q -30 +KPX Acircumflex T -120 +KPX Acircumflex Tcaron -120 +KPX Acircumflex Tcommaaccent -120 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -70 +KPX Acircumflex W -50 +KPX Acircumflex Y -100 +KPX Acircumflex Yacute -100 +KPX Acircumflex Ydieresis -100 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -40 +KPX Acircumflex y -40 +KPX Acircumflex yacute -40 +KPX Acircumflex ydieresis -40 +KPX Adieresis C -30 +KPX Adieresis Cacute -30 +KPX Adieresis Ccaron -30 +KPX Adieresis Ccedilla -30 +KPX Adieresis G -30 +KPX Adieresis Gbreve -30 +KPX Adieresis Gcommaaccent -30 +KPX Adieresis O -30 +KPX Adieresis Oacute -30 +KPX Adieresis Ocircumflex -30 +KPX Adieresis Odieresis -30 +KPX Adieresis Ograve -30 +KPX Adieresis Ohungarumlaut -30 +KPX Adieresis Omacron -30 +KPX Adieresis Oslash -30 +KPX Adieresis Otilde -30 +KPX Adieresis Q -30 +KPX Adieresis T -120 +KPX Adieresis Tcaron -120 +KPX Adieresis Tcommaaccent -120 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -70 +KPX Adieresis W -50 +KPX Adieresis Y -100 +KPX Adieresis Yacute -100 +KPX Adieresis Ydieresis -100 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -40 +KPX Adieresis y -40 +KPX Adieresis yacute -40 +KPX Adieresis ydieresis -40 +KPX Agrave C -30 +KPX Agrave Cacute -30 +KPX Agrave Ccaron -30 +KPX Agrave Ccedilla -30 +KPX Agrave G -30 +KPX Agrave Gbreve -30 +KPX Agrave Gcommaaccent -30 +KPX Agrave O -30 +KPX Agrave Oacute -30 +KPX Agrave Ocircumflex -30 +KPX Agrave Odieresis -30 +KPX Agrave Ograve -30 +KPX Agrave Ohungarumlaut -30 +KPX Agrave Omacron -30 +KPX Agrave Oslash -30 +KPX Agrave Otilde -30 +KPX Agrave Q -30 +KPX Agrave T -120 +KPX Agrave Tcaron -120 +KPX Agrave Tcommaaccent -120 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -70 +KPX Agrave W -50 +KPX Agrave Y -100 +KPX Agrave Yacute -100 +KPX Agrave Ydieresis -100 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -40 +KPX Agrave y -40 +KPX Agrave yacute -40 +KPX Agrave ydieresis -40 +KPX Amacron C -30 +KPX Amacron Cacute -30 +KPX Amacron Ccaron -30 +KPX Amacron Ccedilla -30 +KPX Amacron G -30 +KPX Amacron Gbreve -30 +KPX Amacron Gcommaaccent -30 +KPX Amacron O -30 +KPX Amacron Oacute -30 +KPX Amacron Ocircumflex -30 +KPX Amacron Odieresis -30 +KPX Amacron Ograve -30 +KPX Amacron Ohungarumlaut -30 +KPX Amacron Omacron -30 +KPX Amacron Oslash -30 +KPX Amacron Otilde -30 +KPX Amacron Q -30 +KPX Amacron T -120 +KPX Amacron Tcaron -120 +KPX Amacron Tcommaaccent -120 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -70 +KPX Amacron W -50 +KPX Amacron Y -100 +KPX Amacron Yacute -100 +KPX Amacron Ydieresis -100 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -40 +KPX Amacron y -40 +KPX Amacron yacute -40 +KPX Amacron ydieresis -40 +KPX Aogonek C -30 +KPX Aogonek Cacute -30 +KPX Aogonek Ccaron -30 +KPX Aogonek Ccedilla -30 +KPX Aogonek G -30 +KPX Aogonek Gbreve -30 +KPX Aogonek Gcommaaccent -30 +KPX Aogonek O -30 +KPX Aogonek Oacute -30 +KPX Aogonek Ocircumflex -30 +KPX Aogonek Odieresis -30 +KPX Aogonek Ograve -30 +KPX Aogonek Ohungarumlaut -30 +KPX Aogonek Omacron -30 +KPX Aogonek Oslash -30 +KPX Aogonek Otilde -30 +KPX Aogonek Q -30 +KPX Aogonek T -120 +KPX Aogonek Tcaron -120 +KPX Aogonek Tcommaaccent -120 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -70 +KPX Aogonek W -50 +KPX Aogonek Y -100 +KPX Aogonek Yacute -100 +KPX Aogonek Ydieresis -100 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -40 +KPX Aogonek y -40 +KPX Aogonek yacute -40 +KPX Aogonek ydieresis -40 +KPX Aring C -30 +KPX Aring Cacute -30 +KPX Aring Ccaron -30 +KPX Aring Ccedilla -30 +KPX Aring G -30 +KPX Aring Gbreve -30 +KPX Aring Gcommaaccent -30 +KPX Aring O -30 +KPX Aring Oacute -30 +KPX Aring Ocircumflex -30 +KPX Aring Odieresis -30 +KPX Aring Ograve -30 +KPX Aring Ohungarumlaut -30 +KPX Aring Omacron -30 +KPX Aring Oslash -30 +KPX Aring Otilde -30 +KPX Aring Q -30 +KPX Aring T -120 +KPX Aring Tcaron -120 +KPX Aring Tcommaaccent -120 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -70 +KPX Aring W -50 +KPX Aring Y -100 +KPX Aring Yacute -100 +KPX Aring Ydieresis -100 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -40 +KPX Aring y -40 +KPX Aring yacute -40 +KPX Aring ydieresis -40 +KPX Atilde C -30 +KPX Atilde Cacute -30 +KPX Atilde Ccaron -30 +KPX Atilde Ccedilla -30 +KPX Atilde G -30 +KPX Atilde Gbreve -30 +KPX Atilde Gcommaaccent -30 +KPX Atilde O -30 +KPX Atilde Oacute -30 +KPX Atilde Ocircumflex -30 +KPX Atilde Odieresis -30 +KPX Atilde Ograve -30 +KPX Atilde Ohungarumlaut -30 +KPX Atilde Omacron -30 +KPX Atilde Oslash -30 +KPX Atilde Otilde -30 +KPX Atilde Q -30 +KPX Atilde T -120 +KPX Atilde Tcaron -120 +KPX Atilde Tcommaaccent -120 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -70 +KPX Atilde W -50 +KPX Atilde Y -100 +KPX Atilde Yacute -100 +KPX Atilde Ydieresis -100 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -40 +KPX Atilde y -40 +KPX Atilde yacute -40 +KPX Atilde ydieresis -40 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX B comma -20 +KPX B period -20 +KPX C comma -30 +KPX C period -30 +KPX Cacute comma -30 +KPX Cacute period -30 +KPX Ccaron comma -30 +KPX Ccaron period -30 +KPX Ccedilla comma -30 +KPX Ccedilla period -30 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -70 +KPX D W -40 +KPX D Y -90 +KPX D Yacute -90 +KPX D Ydieresis -90 +KPX D comma -70 +KPX D period -70 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -70 +KPX Dcaron W -40 +KPX Dcaron Y -90 +KPX Dcaron Yacute -90 +KPX Dcaron Ydieresis -90 +KPX Dcaron comma -70 +KPX Dcaron period -70 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -70 +KPX Dcroat W -40 +KPX Dcroat Y -90 +KPX Dcroat Yacute -90 +KPX Dcroat Ydieresis -90 +KPX Dcroat comma -70 +KPX Dcroat period -70 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -50 +KPX F aacute -50 +KPX F abreve -50 +KPX F acircumflex -50 +KPX F adieresis -50 +KPX F agrave -50 +KPX F amacron -50 +KPX F aogonek -50 +KPX F aring -50 +KPX F atilde -50 +KPX F comma -150 +KPX F e -30 +KPX F eacute -30 +KPX F ecaron -30 +KPX F ecircumflex -30 +KPX F edieresis -30 +KPX F edotaccent -30 +KPX F egrave -30 +KPX F emacron -30 +KPX F eogonek -30 +KPX F o -30 +KPX F oacute -30 +KPX F ocircumflex -30 +KPX F odieresis -30 +KPX F ograve -30 +KPX F ohungarumlaut -30 +KPX F omacron -30 +KPX F oslash -30 +KPX F otilde -30 +KPX F period -150 +KPX F r -45 +KPX F racute -45 +KPX F rcaron -45 +KPX F rcommaaccent -45 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J a -20 +KPX J aacute -20 +KPX J abreve -20 +KPX J acircumflex -20 +KPX J adieresis -20 +KPX J agrave -20 +KPX J amacron -20 +KPX J aogonek -20 +KPX J aring -20 +KPX J atilde -20 +KPX J comma -30 +KPX J period -30 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -50 +KPX K Oacute -50 +KPX K Ocircumflex -50 +KPX K Odieresis -50 +KPX K Ograve -50 +KPX K Ohungarumlaut -50 +KPX K Omacron -50 +KPX K Oslash -50 +KPX K Otilde -50 +KPX K e -40 +KPX K eacute -40 +KPX K ecaron -40 +KPX K ecircumflex -40 +KPX K edieresis -40 +KPX K edotaccent -40 +KPX K egrave -40 +KPX K emacron -40 +KPX K eogonek -40 +KPX K o -40 +KPX K oacute -40 +KPX K ocircumflex -40 +KPX K odieresis -40 +KPX K ograve -40 +KPX K ohungarumlaut -40 +KPX K omacron -40 +KPX K oslash -40 +KPX K otilde -40 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -50 +KPX K yacute -50 +KPX K ydieresis -50 +KPX Kcommaaccent O -50 +KPX Kcommaaccent Oacute -50 +KPX Kcommaaccent Ocircumflex -50 +KPX Kcommaaccent Odieresis -50 +KPX Kcommaaccent Ograve -50 +KPX Kcommaaccent Ohungarumlaut -50 +KPX Kcommaaccent Omacron -50 +KPX Kcommaaccent Oslash -50 +KPX Kcommaaccent Otilde -50 +KPX Kcommaaccent e -40 +KPX Kcommaaccent eacute -40 +KPX Kcommaaccent ecaron -40 +KPX Kcommaaccent ecircumflex -40 +KPX Kcommaaccent edieresis -40 +KPX Kcommaaccent edotaccent -40 +KPX Kcommaaccent egrave -40 +KPX Kcommaaccent emacron -40 +KPX Kcommaaccent eogonek -40 +KPX Kcommaaccent o -40 +KPX Kcommaaccent oacute -40 +KPX Kcommaaccent ocircumflex -40 +KPX Kcommaaccent odieresis -40 +KPX Kcommaaccent ograve -40 +KPX Kcommaaccent ohungarumlaut -40 +KPX Kcommaaccent omacron -40 +KPX Kcommaaccent oslash -40 +KPX Kcommaaccent otilde -40 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -50 +KPX Kcommaaccent yacute -50 +KPX Kcommaaccent ydieresis -50 +KPX L T -110 +KPX L Tcaron -110 +KPX L Tcommaaccent -110 +KPX L V -110 +KPX L W -70 +KPX L Y -140 +KPX L Yacute -140 +KPX L Ydieresis -140 +KPX L quotedblright -140 +KPX L quoteright -160 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -110 +KPX Lacute Tcaron -110 +KPX Lacute Tcommaaccent -110 +KPX Lacute V -110 +KPX Lacute W -70 +KPX Lacute Y -140 +KPX Lacute Yacute -140 +KPX Lacute Ydieresis -140 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -160 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcaron T -110 +KPX Lcaron Tcaron -110 +KPX Lcaron Tcommaaccent -110 +KPX Lcaron V -110 +KPX Lcaron W -70 +KPX Lcaron Y -140 +KPX Lcaron Yacute -140 +KPX Lcaron Ydieresis -140 +KPX Lcaron quotedblright -140 +KPX Lcaron quoteright -160 +KPX Lcaron y -30 +KPX Lcaron yacute -30 +KPX Lcaron ydieresis -30 +KPX Lcommaaccent T -110 +KPX Lcommaaccent Tcaron -110 +KPX Lcommaaccent Tcommaaccent -110 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -70 +KPX Lcommaaccent Y -140 +KPX Lcommaaccent Yacute -140 +KPX Lcommaaccent Ydieresis -140 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -160 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -110 +KPX Lslash Tcaron -110 +KPX Lslash Tcommaaccent -110 +KPX Lslash V -110 +KPX Lslash W -70 +KPX Lslash Y -140 +KPX Lslash Yacute -140 +KPX Lslash Ydieresis -140 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -160 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -20 +KPX O Aacute -20 +KPX O Abreve -20 +KPX O Acircumflex -20 +KPX O Adieresis -20 +KPX O Agrave -20 +KPX O Amacron -20 +KPX O Aogonek -20 +KPX O Aring -20 +KPX O Atilde -20 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -30 +KPX O X -60 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -20 +KPX Oacute Aacute -20 +KPX Oacute Abreve -20 +KPX Oacute Acircumflex -20 +KPX Oacute Adieresis -20 +KPX Oacute Agrave -20 +KPX Oacute Amacron -20 +KPX Oacute Aogonek -20 +KPX Oacute Aring -20 +KPX Oacute Atilde -20 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -30 +KPX Oacute X -60 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -20 +KPX Ocircumflex Aacute -20 +KPX Ocircumflex Abreve -20 +KPX Ocircumflex Acircumflex -20 +KPX Ocircumflex Adieresis -20 +KPX Ocircumflex Agrave -20 +KPX Ocircumflex Amacron -20 +KPX Ocircumflex Aogonek -20 +KPX Ocircumflex Aring -20 +KPX Ocircumflex Atilde -20 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -30 +KPX Ocircumflex X -60 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -20 +KPX Odieresis Aacute -20 +KPX Odieresis Abreve -20 +KPX Odieresis Acircumflex -20 +KPX Odieresis Adieresis -20 +KPX Odieresis Agrave -20 +KPX Odieresis Amacron -20 +KPX Odieresis Aogonek -20 +KPX Odieresis Aring -20 +KPX Odieresis Atilde -20 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -30 +KPX Odieresis X -60 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -20 +KPX Ograve Aacute -20 +KPX Ograve Abreve -20 +KPX Ograve Acircumflex -20 +KPX Ograve Adieresis -20 +KPX Ograve Agrave -20 +KPX Ograve Amacron -20 +KPX Ograve Aogonek -20 +KPX Ograve Aring -20 +KPX Ograve Atilde -20 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -30 +KPX Ograve X -60 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -20 +KPX Ohungarumlaut Aacute -20 +KPX Ohungarumlaut Abreve -20 +KPX Ohungarumlaut Acircumflex -20 +KPX Ohungarumlaut Adieresis -20 +KPX Ohungarumlaut Agrave -20 +KPX Ohungarumlaut Amacron -20 +KPX Ohungarumlaut Aogonek -20 +KPX Ohungarumlaut Aring -20 +KPX Ohungarumlaut Atilde -20 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -30 +KPX Ohungarumlaut X -60 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -20 +KPX Omacron Aacute -20 +KPX Omacron Abreve -20 +KPX Omacron Acircumflex -20 +KPX Omacron Adieresis -20 +KPX Omacron Agrave -20 +KPX Omacron Amacron -20 +KPX Omacron Aogonek -20 +KPX Omacron Aring -20 +KPX Omacron Atilde -20 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -30 +KPX Omacron X -60 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -20 +KPX Oslash Aacute -20 +KPX Oslash Abreve -20 +KPX Oslash Acircumflex -20 +KPX Oslash Adieresis -20 +KPX Oslash Agrave -20 +KPX Oslash Amacron -20 +KPX Oslash Aogonek -20 +KPX Oslash Aring -20 +KPX Oslash Atilde -20 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -30 +KPX Oslash X -60 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -20 +KPX Otilde Aacute -20 +KPX Otilde Abreve -20 +KPX Otilde Acircumflex -20 +KPX Otilde Adieresis -20 +KPX Otilde Agrave -20 +KPX Otilde Amacron -20 +KPX Otilde Aogonek -20 +KPX Otilde Aring -20 +KPX Otilde Atilde -20 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -30 +KPX Otilde X -60 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -120 +KPX P Aacute -120 +KPX P Abreve -120 +KPX P Acircumflex -120 +KPX P Adieresis -120 +KPX P Agrave -120 +KPX P Amacron -120 +KPX P Aogonek -120 +KPX P Aring -120 +KPX P Atilde -120 +KPX P a -40 +KPX P aacute -40 +KPX P abreve -40 +KPX P acircumflex -40 +KPX P adieresis -40 +KPX P agrave -40 +KPX P amacron -40 +KPX P aogonek -40 +KPX P aring -40 +KPX P atilde -40 +KPX P comma -180 +KPX P e -50 +KPX P eacute -50 +KPX P ecaron -50 +KPX P ecircumflex -50 +KPX P edieresis -50 +KPX P edotaccent -50 +KPX P egrave -50 +KPX P emacron -50 +KPX P eogonek -50 +KPX P o -50 +KPX P oacute -50 +KPX P ocircumflex -50 +KPX P odieresis -50 +KPX P ograve -50 +KPX P ohungarumlaut -50 +KPX P omacron -50 +KPX P oslash -50 +KPX P otilde -50 +KPX P period -180 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -30 +KPX R Tcaron -30 +KPX R Tcommaaccent -30 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -50 +KPX R W -30 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -30 +KPX Racute Tcaron -30 +KPX Racute Tcommaaccent -30 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -50 +KPX Racute W -30 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -30 +KPX Rcaron Tcaron -30 +KPX Rcaron Tcommaaccent -30 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -50 +KPX Rcaron W -30 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -30 +KPX Rcommaaccent Tcaron -30 +KPX Rcommaaccent Tcommaaccent -30 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -30 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX S comma -20 +KPX S period -20 +KPX Sacute comma -20 +KPX Sacute period -20 +KPX Scaron comma -20 +KPX Scaron period -20 +KPX Scedilla comma -20 +KPX Scedilla period -20 +KPX Scommaaccent comma -20 +KPX Scommaaccent period -20 +KPX T A -120 +KPX T Aacute -120 +KPX T Abreve -120 +KPX T Acircumflex -120 +KPX T Adieresis -120 +KPX T Agrave -120 +KPX T Amacron -120 +KPX T Aogonek -120 +KPX T Aring -120 +KPX T Atilde -120 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -120 +KPX T aacute -120 +KPX T abreve -60 +KPX T acircumflex -120 +KPX T adieresis -120 +KPX T agrave -120 +KPX T amacron -60 +KPX T aogonek -120 +KPX T aring -120 +KPX T atilde -60 +KPX T colon -20 +KPX T comma -120 +KPX T e -120 +KPX T eacute -120 +KPX T ecaron -120 +KPX T ecircumflex -120 +KPX T edieresis -120 +KPX T edotaccent -120 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -120 +KPX T hyphen -140 +KPX T o -120 +KPX T oacute -120 +KPX T ocircumflex -120 +KPX T odieresis -120 +KPX T ograve -120 +KPX T ohungarumlaut -120 +KPX T omacron -60 +KPX T oslash -120 +KPX T otilde -60 +KPX T period -120 +KPX T r -120 +KPX T racute -120 +KPX T rcaron -120 +KPX T rcommaaccent -120 +KPX T semicolon -20 +KPX T u -120 +KPX T uacute -120 +KPX T ucircumflex -120 +KPX T udieresis -120 +KPX T ugrave -120 +KPX T uhungarumlaut -120 +KPX T umacron -60 +KPX T uogonek -120 +KPX T uring -120 +KPX T w -120 +KPX T y -120 +KPX T yacute -120 +KPX T ydieresis -60 +KPX Tcaron A -120 +KPX Tcaron Aacute -120 +KPX Tcaron Abreve -120 +KPX Tcaron Acircumflex -120 +KPX Tcaron Adieresis -120 +KPX Tcaron Agrave -120 +KPX Tcaron Amacron -120 +KPX Tcaron Aogonek -120 +KPX Tcaron Aring -120 +KPX Tcaron Atilde -120 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -120 +KPX Tcaron aacute -120 +KPX Tcaron abreve -60 +KPX Tcaron acircumflex -120 +KPX Tcaron adieresis -120 +KPX Tcaron agrave -120 +KPX Tcaron amacron -60 +KPX Tcaron aogonek -120 +KPX Tcaron aring -120 +KPX Tcaron atilde -60 +KPX Tcaron colon -20 +KPX Tcaron comma -120 +KPX Tcaron e -120 +KPX Tcaron eacute -120 +KPX Tcaron ecaron -120 +KPX Tcaron ecircumflex -120 +KPX Tcaron edieresis -120 +KPX Tcaron edotaccent -120 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -120 +KPX Tcaron hyphen -140 +KPX Tcaron o -120 +KPX Tcaron oacute -120 +KPX Tcaron ocircumflex -120 +KPX Tcaron odieresis -120 +KPX Tcaron ograve -120 +KPX Tcaron ohungarumlaut -120 +KPX Tcaron omacron -60 +KPX Tcaron oslash -120 +KPX Tcaron otilde -60 +KPX Tcaron period -120 +KPX Tcaron r -120 +KPX Tcaron racute -120 +KPX Tcaron rcaron -120 +KPX Tcaron rcommaaccent -120 +KPX Tcaron semicolon -20 +KPX Tcaron u -120 +KPX Tcaron uacute -120 +KPX Tcaron ucircumflex -120 +KPX Tcaron udieresis -120 +KPX Tcaron ugrave -120 +KPX Tcaron uhungarumlaut -120 +KPX Tcaron umacron -60 +KPX Tcaron uogonek -120 +KPX Tcaron uring -120 +KPX Tcaron w -120 +KPX Tcaron y -120 +KPX Tcaron yacute -120 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -120 +KPX Tcommaaccent Aacute -120 +KPX Tcommaaccent Abreve -120 +KPX Tcommaaccent Acircumflex -120 +KPX Tcommaaccent Adieresis -120 +KPX Tcommaaccent Agrave -120 +KPX Tcommaaccent Amacron -120 +KPX Tcommaaccent Aogonek -120 +KPX Tcommaaccent Aring -120 +KPX Tcommaaccent Atilde -120 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -120 +KPX Tcommaaccent aacute -120 +KPX Tcommaaccent abreve -60 +KPX Tcommaaccent acircumflex -120 +KPX Tcommaaccent adieresis -120 +KPX Tcommaaccent agrave -120 +KPX Tcommaaccent amacron -60 +KPX Tcommaaccent aogonek -120 +KPX Tcommaaccent aring -120 +KPX Tcommaaccent atilde -60 +KPX Tcommaaccent colon -20 +KPX Tcommaaccent comma -120 +KPX Tcommaaccent e -120 +KPX Tcommaaccent eacute -120 +KPX Tcommaaccent ecaron -120 +KPX Tcommaaccent ecircumflex -120 +KPX Tcommaaccent edieresis -120 +KPX Tcommaaccent edotaccent -120 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -120 +KPX Tcommaaccent hyphen -140 +KPX Tcommaaccent o -120 +KPX Tcommaaccent oacute -120 +KPX Tcommaaccent ocircumflex -120 +KPX Tcommaaccent odieresis -120 +KPX Tcommaaccent ograve -120 +KPX Tcommaaccent ohungarumlaut -120 +KPX Tcommaaccent omacron -60 +KPX Tcommaaccent oslash -120 +KPX Tcommaaccent otilde -60 +KPX Tcommaaccent period -120 +KPX Tcommaaccent r -120 +KPX Tcommaaccent racute -120 +KPX Tcommaaccent rcaron -120 +KPX Tcommaaccent rcommaaccent -120 +KPX Tcommaaccent semicolon -20 +KPX Tcommaaccent u -120 +KPX Tcommaaccent uacute -120 +KPX Tcommaaccent ucircumflex -120 +KPX Tcommaaccent udieresis -120 +KPX Tcommaaccent ugrave -120 +KPX Tcommaaccent uhungarumlaut -120 +KPX Tcommaaccent umacron -60 +KPX Tcommaaccent uogonek -120 +KPX Tcommaaccent uring -120 +KPX Tcommaaccent w -120 +KPX Tcommaaccent y -120 +KPX Tcommaaccent yacute -120 +KPX Tcommaaccent ydieresis -60 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -40 +KPX U period -40 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Uacute comma -40 +KPX Uacute period -40 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Ucircumflex comma -40 +KPX Ucircumflex period -40 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Udieresis comma -40 +KPX Udieresis period -40 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Ugrave comma -40 +KPX Ugrave period -40 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Uhungarumlaut comma -40 +KPX Uhungarumlaut period -40 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Umacron comma -40 +KPX Umacron period -40 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uogonek comma -40 +KPX Uogonek period -40 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX Uring comma -40 +KPX Uring period -40 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -40 +KPX V Gbreve -40 +KPX V Gcommaaccent -40 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Ohungarumlaut -40 +KPX V Omacron -40 +KPX V Oslash -40 +KPX V Otilde -40 +KPX V a -70 +KPX V aacute -70 +KPX V abreve -70 +KPX V acircumflex -70 +KPX V adieresis -70 +KPX V agrave -70 +KPX V amacron -70 +KPX V aogonek -70 +KPX V aring -70 +KPX V atilde -70 +KPX V colon -40 +KPX V comma -125 +KPX V e -80 +KPX V eacute -80 +KPX V ecaron -80 +KPX V ecircumflex -80 +KPX V edieresis -80 +KPX V edotaccent -80 +KPX V egrave -80 +KPX V emacron -80 +KPX V eogonek -80 +KPX V hyphen -80 +KPX V o -80 +KPX V oacute -80 +KPX V ocircumflex -80 +KPX V odieresis -80 +KPX V ograve -80 +KPX V ohungarumlaut -80 +KPX V omacron -80 +KPX V oslash -80 +KPX V otilde -80 +KPX V period -125 +KPX V semicolon -40 +KPX V u -70 +KPX V uacute -70 +KPX V ucircumflex -70 +KPX V udieresis -70 +KPX V ugrave -70 +KPX V uhungarumlaut -70 +KPX V umacron -70 +KPX V uogonek -70 +KPX V uring -70 +KPX W A -50 +KPX W Aacute -50 +KPX W Abreve -50 +KPX W Acircumflex -50 +KPX W Adieresis -50 +KPX W Agrave -50 +KPX W Amacron -50 +KPX W Aogonek -50 +KPX W Aring -50 +KPX W Atilde -50 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W comma -80 +KPX W e -30 +KPX W eacute -30 +KPX W ecaron -30 +KPX W ecircumflex -30 +KPX W edieresis -30 +KPX W edotaccent -30 +KPX W egrave -30 +KPX W emacron -30 +KPX W eogonek -30 +KPX W hyphen -40 +KPX W o -30 +KPX W oacute -30 +KPX W ocircumflex -30 +KPX W odieresis -30 +KPX W ograve -30 +KPX W ohungarumlaut -30 +KPX W omacron -30 +KPX W oslash -30 +KPX W otilde -30 +KPX W period -80 +KPX W u -30 +KPX W uacute -30 +KPX W ucircumflex -30 +KPX W udieresis -30 +KPX W ugrave -30 +KPX W uhungarumlaut -30 +KPX W umacron -30 +KPX W uogonek -30 +KPX W uring -30 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -85 +KPX Y Oacute -85 +KPX Y Ocircumflex -85 +KPX Y Odieresis -85 +KPX Y Ograve -85 +KPX Y Ohungarumlaut -85 +KPX Y Omacron -85 +KPX Y Oslash -85 +KPX Y Otilde -85 +KPX Y a -140 +KPX Y aacute -140 +KPX Y abreve -70 +KPX Y acircumflex -140 +KPX Y adieresis -140 +KPX Y agrave -140 +KPX Y amacron -70 +KPX Y aogonek -140 +KPX Y aring -140 +KPX Y atilde -140 +KPX Y colon -60 +KPX Y comma -140 +KPX Y e -140 +KPX Y eacute -140 +KPX Y ecaron -140 +KPX Y ecircumflex -140 +KPX Y edieresis -140 +KPX Y edotaccent -140 +KPX Y egrave -140 +KPX Y emacron -70 +KPX Y eogonek -140 +KPX Y hyphen -140 +KPX Y i -20 +KPX Y iacute -20 +KPX Y iogonek -20 +KPX Y o -140 +KPX Y oacute -140 +KPX Y ocircumflex -140 +KPX Y odieresis -140 +KPX Y ograve -140 +KPX Y ohungarumlaut -140 +KPX Y omacron -140 +KPX Y oslash -140 +KPX Y otilde -140 +KPX Y period -140 +KPX Y semicolon -60 +KPX Y u -110 +KPX Y uacute -110 +KPX Y ucircumflex -110 +KPX Y udieresis -110 +KPX Y ugrave -110 +KPX Y uhungarumlaut -110 +KPX Y umacron -110 +KPX Y uogonek -110 +KPX Y uring -110 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -85 +KPX Yacute Oacute -85 +KPX Yacute Ocircumflex -85 +KPX Yacute Odieresis -85 +KPX Yacute Ograve -85 +KPX Yacute Ohungarumlaut -85 +KPX Yacute Omacron -85 +KPX Yacute Oslash -85 +KPX Yacute Otilde -85 +KPX Yacute a -140 +KPX Yacute aacute -140 +KPX Yacute abreve -70 +KPX Yacute acircumflex -140 +KPX Yacute adieresis -140 +KPX Yacute agrave -140 +KPX Yacute amacron -70 +KPX Yacute aogonek -140 +KPX Yacute aring -140 +KPX Yacute atilde -70 +KPX Yacute colon -60 +KPX Yacute comma -140 +KPX Yacute e -140 +KPX Yacute eacute -140 +KPX Yacute ecaron -140 +KPX Yacute ecircumflex -140 +KPX Yacute edieresis -140 +KPX Yacute edotaccent -140 +KPX Yacute egrave -140 +KPX Yacute emacron -70 +KPX Yacute eogonek -140 +KPX Yacute hyphen -140 +KPX Yacute i -20 +KPX Yacute iacute -20 +KPX Yacute iogonek -20 +KPX Yacute o -140 +KPX Yacute oacute -140 +KPX Yacute ocircumflex -140 +KPX Yacute odieresis -140 +KPX Yacute ograve -140 +KPX Yacute ohungarumlaut -140 +KPX Yacute omacron -70 +KPX Yacute oslash -140 +KPX Yacute otilde -140 +KPX Yacute period -140 +KPX Yacute semicolon -60 +KPX Yacute u -110 +KPX Yacute uacute -110 +KPX Yacute ucircumflex -110 +KPX Yacute udieresis -110 +KPX Yacute ugrave -110 +KPX Yacute uhungarumlaut -110 +KPX Yacute umacron -110 +KPX Yacute uogonek -110 +KPX Yacute uring -110 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -85 +KPX Ydieresis Oacute -85 +KPX Ydieresis Ocircumflex -85 +KPX Ydieresis Odieresis -85 +KPX Ydieresis Ograve -85 +KPX Ydieresis Ohungarumlaut -85 +KPX Ydieresis Omacron -85 +KPX Ydieresis Oslash -85 +KPX Ydieresis Otilde -85 +KPX Ydieresis a -140 +KPX Ydieresis aacute -140 +KPX Ydieresis abreve -70 +KPX Ydieresis acircumflex -140 +KPX Ydieresis adieresis -140 +KPX Ydieresis agrave -140 +KPX Ydieresis amacron -70 +KPX Ydieresis aogonek -140 +KPX Ydieresis aring -140 +KPX Ydieresis atilde -70 +KPX Ydieresis colon -60 +KPX Ydieresis comma -140 +KPX Ydieresis e -140 +KPX Ydieresis eacute -140 +KPX Ydieresis ecaron -140 +KPX Ydieresis ecircumflex -140 +KPX Ydieresis edieresis -140 +KPX Ydieresis edotaccent -140 +KPX Ydieresis egrave -140 +KPX Ydieresis emacron -70 +KPX Ydieresis eogonek -140 +KPX Ydieresis hyphen -140 +KPX Ydieresis i -20 +KPX Ydieresis iacute -20 +KPX Ydieresis iogonek -20 +KPX Ydieresis o -140 +KPX Ydieresis oacute -140 +KPX Ydieresis ocircumflex -140 +KPX Ydieresis odieresis -140 +KPX Ydieresis ograve -140 +KPX Ydieresis ohungarumlaut -140 +KPX Ydieresis omacron -140 +KPX Ydieresis oslash -140 +KPX Ydieresis otilde -140 +KPX Ydieresis period -140 +KPX Ydieresis semicolon -60 +KPX Ydieresis u -110 +KPX Ydieresis uacute -110 +KPX Ydieresis ucircumflex -110 +KPX Ydieresis udieresis -110 +KPX Ydieresis ugrave -110 +KPX Ydieresis uhungarumlaut -110 +KPX Ydieresis umacron -110 +KPX Ydieresis uogonek -110 +KPX Ydieresis uring -110 +KPX a v -20 +KPX a w -20 +KPX a y -30 +KPX a yacute -30 +KPX a ydieresis -30 +KPX aacute v -20 +KPX aacute w -20 +KPX aacute y -30 +KPX aacute yacute -30 +KPX aacute ydieresis -30 +KPX abreve v -20 +KPX abreve w -20 +KPX abreve y -30 +KPX abreve yacute -30 +KPX abreve ydieresis -30 +KPX acircumflex v -20 +KPX acircumflex w -20 +KPX acircumflex y -30 +KPX acircumflex yacute -30 +KPX acircumflex ydieresis -30 +KPX adieresis v -20 +KPX adieresis w -20 +KPX adieresis y -30 +KPX adieresis yacute -30 +KPX adieresis ydieresis -30 +KPX agrave v -20 +KPX agrave w -20 +KPX agrave y -30 +KPX agrave yacute -30 +KPX agrave ydieresis -30 +KPX amacron v -20 +KPX amacron w -20 +KPX amacron y -30 +KPX amacron yacute -30 +KPX amacron ydieresis -30 +KPX aogonek v -20 +KPX aogonek w -20 +KPX aogonek y -30 +KPX aogonek yacute -30 +KPX aogonek ydieresis -30 +KPX aring v -20 +KPX aring w -20 +KPX aring y -30 +KPX aring yacute -30 +KPX aring ydieresis -30 +KPX atilde v -20 +KPX atilde w -20 +KPX atilde y -30 +KPX atilde yacute -30 +KPX atilde ydieresis -30 +KPX b b -10 +KPX b comma -40 +KPX b l -20 +KPX b lacute -20 +KPX b lcommaaccent -20 +KPX b lslash -20 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c comma -15 +KPX c k -20 +KPX c kcommaaccent -20 +KPX cacute comma -15 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX ccaron comma -15 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccedilla comma -15 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX colon space -50 +KPX comma quotedblright -100 +KPX comma quoteright -100 +KPX e comma -15 +KPX e period -15 +KPX e v -30 +KPX e w -20 +KPX e x -30 +KPX e y -20 +KPX e yacute -20 +KPX e ydieresis -20 +KPX eacute comma -15 +KPX eacute period -15 +KPX eacute v -30 +KPX eacute w -20 +KPX eacute x -30 +KPX eacute y -20 +KPX eacute yacute -20 +KPX eacute ydieresis -20 +KPX ecaron comma -15 +KPX ecaron period -15 +KPX ecaron v -30 +KPX ecaron w -20 +KPX ecaron x -30 +KPX ecaron y -20 +KPX ecaron yacute -20 +KPX ecaron ydieresis -20 +KPX ecircumflex comma -15 +KPX ecircumflex period -15 +KPX ecircumflex v -30 +KPX ecircumflex w -20 +KPX ecircumflex x -30 +KPX ecircumflex y -20 +KPX ecircumflex yacute -20 +KPX ecircumflex ydieresis -20 +KPX edieresis comma -15 +KPX edieresis period -15 +KPX edieresis v -30 +KPX edieresis w -20 +KPX edieresis x -30 +KPX edieresis y -20 +KPX edieresis yacute -20 +KPX edieresis ydieresis -20 +KPX edotaccent comma -15 +KPX edotaccent period -15 +KPX edotaccent v -30 +KPX edotaccent w -20 +KPX edotaccent x -30 +KPX edotaccent y -20 +KPX edotaccent yacute -20 +KPX edotaccent ydieresis -20 +KPX egrave comma -15 +KPX egrave period -15 +KPX egrave v -30 +KPX egrave w -20 +KPX egrave x -30 +KPX egrave y -20 +KPX egrave yacute -20 +KPX egrave ydieresis -20 +KPX emacron comma -15 +KPX emacron period -15 +KPX emacron v -30 +KPX emacron w -20 +KPX emacron x -30 +KPX emacron y -20 +KPX emacron yacute -20 +KPX emacron ydieresis -20 +KPX eogonek comma -15 +KPX eogonek period -15 +KPX eogonek v -30 +KPX eogonek w -20 +KPX eogonek x -30 +KPX eogonek y -20 +KPX eogonek yacute -20 +KPX eogonek ydieresis -20 +KPX f a -30 +KPX f aacute -30 +KPX f abreve -30 +KPX f acircumflex -30 +KPX f adieresis -30 +KPX f agrave -30 +KPX f amacron -30 +KPX f aogonek -30 +KPX f aring -30 +KPX f atilde -30 +KPX f comma -30 +KPX f dotlessi -28 +KPX f e -30 +KPX f eacute -30 +KPX f ecaron -30 +KPX f ecircumflex -30 +KPX f edieresis -30 +KPX f edotaccent -30 +KPX f egrave -30 +KPX f emacron -30 +KPX f eogonek -30 +KPX f o -30 +KPX f oacute -30 +KPX f ocircumflex -30 +KPX f odieresis -30 +KPX f ograve -30 +KPX f ohungarumlaut -30 +KPX f omacron -30 +KPX f oslash -30 +KPX f otilde -30 +KPX f period -30 +KPX f quotedblright 60 +KPX f quoteright 50 +KPX g r -10 +KPX g racute -10 +KPX g rcaron -10 +KPX g rcommaaccent -10 +KPX gbreve r -10 +KPX gbreve racute -10 +KPX gbreve rcaron -10 +KPX gbreve rcommaaccent -10 +KPX gcommaaccent r -10 +KPX gcommaaccent racute -10 +KPX gcommaaccent rcaron -10 +KPX gcommaaccent rcommaaccent -10 +KPX h y -30 +KPX h yacute -30 +KPX h ydieresis -30 +KPX k e -20 +KPX k eacute -20 +KPX k ecaron -20 +KPX k ecircumflex -20 +KPX k edieresis -20 +KPX k edotaccent -20 +KPX k egrave -20 +KPX k emacron -20 +KPX k eogonek -20 +KPX k o -20 +KPX k oacute -20 +KPX k ocircumflex -20 +KPX k odieresis -20 +KPX k ograve -20 +KPX k ohungarumlaut -20 +KPX k omacron -20 +KPX k oslash -20 +KPX k otilde -20 +KPX kcommaaccent e -20 +KPX kcommaaccent eacute -20 +KPX kcommaaccent ecaron -20 +KPX kcommaaccent ecircumflex -20 +KPX kcommaaccent edieresis -20 +KPX kcommaaccent edotaccent -20 +KPX kcommaaccent egrave -20 +KPX kcommaaccent emacron -20 +KPX kcommaaccent eogonek -20 +KPX kcommaaccent o -20 +KPX kcommaaccent oacute -20 +KPX kcommaaccent ocircumflex -20 +KPX kcommaaccent odieresis -20 +KPX kcommaaccent ograve -20 +KPX kcommaaccent ohungarumlaut -20 +KPX kcommaaccent omacron -20 +KPX kcommaaccent oslash -20 +KPX kcommaaccent otilde -20 +KPX m u -10 +KPX m uacute -10 +KPX m ucircumflex -10 +KPX m udieresis -10 +KPX m ugrave -10 +KPX m uhungarumlaut -10 +KPX m umacron -10 +KPX m uogonek -10 +KPX m uring -10 +KPX m y -15 +KPX m yacute -15 +KPX m ydieresis -15 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -20 +KPX n y -15 +KPX n yacute -15 +KPX n ydieresis -15 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -20 +KPX nacute y -15 +KPX nacute yacute -15 +KPX nacute ydieresis -15 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -20 +KPX ncaron y -15 +KPX ncaron yacute -15 +KPX ncaron ydieresis -15 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -20 +KPX ncommaaccent y -15 +KPX ncommaaccent yacute -15 +KPX ncommaaccent ydieresis -15 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -20 +KPX ntilde y -15 +KPX ntilde yacute -15 +KPX ntilde ydieresis -15 +KPX o comma -40 +KPX o period -40 +KPX o v -15 +KPX o w -15 +KPX o x -30 +KPX o y -30 +KPX o yacute -30 +KPX o ydieresis -30 +KPX oacute comma -40 +KPX oacute period -40 +KPX oacute v -15 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -30 +KPX oacute yacute -30 +KPX oacute ydieresis -30 +KPX ocircumflex comma -40 +KPX ocircumflex period -40 +KPX ocircumflex v -15 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -30 +KPX ocircumflex yacute -30 +KPX ocircumflex ydieresis -30 +KPX odieresis comma -40 +KPX odieresis period -40 +KPX odieresis v -15 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -30 +KPX odieresis yacute -30 +KPX odieresis ydieresis -30 +KPX ograve comma -40 +KPX ograve period -40 +KPX ograve v -15 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -30 +KPX ograve yacute -30 +KPX ograve ydieresis -30 +KPX ohungarumlaut comma -40 +KPX ohungarumlaut period -40 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -30 +KPX ohungarumlaut yacute -30 +KPX ohungarumlaut ydieresis -30 +KPX omacron comma -40 +KPX omacron period -40 +KPX omacron v -15 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -30 +KPX omacron yacute -30 +KPX omacron ydieresis -30 +KPX oslash a -55 +KPX oslash aacute -55 +KPX oslash abreve -55 +KPX oslash acircumflex -55 +KPX oslash adieresis -55 +KPX oslash agrave -55 +KPX oslash amacron -55 +KPX oslash aogonek -55 +KPX oslash aring -55 +KPX oslash atilde -55 +KPX oslash b -55 +KPX oslash c -55 +KPX oslash cacute -55 +KPX oslash ccaron -55 +KPX oslash ccedilla -55 +KPX oslash comma -95 +KPX oslash d -55 +KPX oslash dcroat -55 +KPX oslash e -55 +KPX oslash eacute -55 +KPX oslash ecaron -55 +KPX oslash ecircumflex -55 +KPX oslash edieresis -55 +KPX oslash edotaccent -55 +KPX oslash egrave -55 +KPX oslash emacron -55 +KPX oslash eogonek -55 +KPX oslash f -55 +KPX oslash g -55 +KPX oslash gbreve -55 +KPX oslash gcommaaccent -55 +KPX oslash h -55 +KPX oslash i -55 +KPX oslash iacute -55 +KPX oslash icircumflex -55 +KPX oslash idieresis -55 +KPX oslash igrave -55 +KPX oslash imacron -55 +KPX oslash iogonek -55 +KPX oslash j -55 +KPX oslash k -55 +KPX oslash kcommaaccent -55 +KPX oslash l -55 +KPX oslash lacute -55 +KPX oslash lcommaaccent -55 +KPX oslash lslash -55 +KPX oslash m -55 +KPX oslash n -55 +KPX oslash nacute -55 +KPX oslash ncaron -55 +KPX oslash ncommaaccent -55 +KPX oslash ntilde -55 +KPX oslash o -55 +KPX oslash oacute -55 +KPX oslash ocircumflex -55 +KPX oslash odieresis -55 +KPX oslash ograve -55 +KPX oslash ohungarumlaut -55 +KPX oslash omacron -55 +KPX oslash oslash -55 +KPX oslash otilde -55 +KPX oslash p -55 +KPX oslash period -95 +KPX oslash q -55 +KPX oslash r -55 +KPX oslash racute -55 +KPX oslash rcaron -55 +KPX oslash rcommaaccent -55 +KPX oslash s -55 +KPX oslash sacute -55 +KPX oslash scaron -55 +KPX oslash scedilla -55 +KPX oslash scommaaccent -55 +KPX oslash t -55 +KPX oslash tcommaaccent -55 +KPX oslash u -55 +KPX oslash uacute -55 +KPX oslash ucircumflex -55 +KPX oslash udieresis -55 +KPX oslash ugrave -55 +KPX oslash uhungarumlaut -55 +KPX oslash umacron -55 +KPX oslash uogonek -55 +KPX oslash uring -55 +KPX oslash v -70 +KPX oslash w -70 +KPX oslash x -85 +KPX oslash y -70 +KPX oslash yacute -70 +KPX oslash ydieresis -70 +KPX oslash z -55 +KPX oslash zacute -55 +KPX oslash zcaron -55 +KPX oslash zdotaccent -55 +KPX otilde comma -40 +KPX otilde period -40 +KPX otilde v -15 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -30 +KPX otilde yacute -30 +KPX otilde ydieresis -30 +KPX p comma -35 +KPX p period -35 +KPX p y -30 +KPX p yacute -30 +KPX p ydieresis -30 +KPX period quotedblright -100 +KPX period quoteright -100 +KPX period space -60 +KPX quotedblright space -40 +KPX quoteleft quoteleft -57 +KPX quoteright d -50 +KPX quoteright dcroat -50 +KPX quoteright quoteright -57 +KPX quoteright r -50 +KPX quoteright racute -50 +KPX quoteright rcaron -50 +KPX quoteright rcommaaccent -50 +KPX quoteright s -50 +KPX quoteright sacute -50 +KPX quoteright scaron -50 +KPX quoteright scedilla -50 +KPX quoteright scommaaccent -50 +KPX quoteright space -70 +KPX r a -10 +KPX r aacute -10 +KPX r abreve -10 +KPX r acircumflex -10 +KPX r adieresis -10 +KPX r agrave -10 +KPX r amacron -10 +KPX r aogonek -10 +KPX r aring -10 +KPX r atilde -10 +KPX r colon 30 +KPX r comma -50 +KPX r i 15 +KPX r iacute 15 +KPX r icircumflex 15 +KPX r idieresis 15 +KPX r igrave 15 +KPX r imacron 15 +KPX r iogonek 15 +KPX r k 15 +KPX r kcommaaccent 15 +KPX r l 15 +KPX r lacute 15 +KPX r lcommaaccent 15 +KPX r lslash 15 +KPX r m 25 +KPX r n 25 +KPX r nacute 25 +KPX r ncaron 25 +KPX r ncommaaccent 25 +KPX r ntilde 25 +KPX r p 30 +KPX r period -50 +KPX r semicolon 30 +KPX r t 40 +KPX r tcommaaccent 40 +KPX r u 15 +KPX r uacute 15 +KPX r ucircumflex 15 +KPX r udieresis 15 +KPX r ugrave 15 +KPX r uhungarumlaut 15 +KPX r umacron 15 +KPX r uogonek 15 +KPX r uring 15 +KPX r v 30 +KPX r y 30 +KPX r yacute 30 +KPX r ydieresis 30 +KPX racute a -10 +KPX racute aacute -10 +KPX racute abreve -10 +KPX racute acircumflex -10 +KPX racute adieresis -10 +KPX racute agrave -10 +KPX racute amacron -10 +KPX racute aogonek -10 +KPX racute aring -10 +KPX racute atilde -10 +KPX racute colon 30 +KPX racute comma -50 +KPX racute i 15 +KPX racute iacute 15 +KPX racute icircumflex 15 +KPX racute idieresis 15 +KPX racute igrave 15 +KPX racute imacron 15 +KPX racute iogonek 15 +KPX racute k 15 +KPX racute kcommaaccent 15 +KPX racute l 15 +KPX racute lacute 15 +KPX racute lcommaaccent 15 +KPX racute lslash 15 +KPX racute m 25 +KPX racute n 25 +KPX racute nacute 25 +KPX racute ncaron 25 +KPX racute ncommaaccent 25 +KPX racute ntilde 25 +KPX racute p 30 +KPX racute period -50 +KPX racute semicolon 30 +KPX racute t 40 +KPX racute tcommaaccent 40 +KPX racute u 15 +KPX racute uacute 15 +KPX racute ucircumflex 15 +KPX racute udieresis 15 +KPX racute ugrave 15 +KPX racute uhungarumlaut 15 +KPX racute umacron 15 +KPX racute uogonek 15 +KPX racute uring 15 +KPX racute v 30 +KPX racute y 30 +KPX racute yacute 30 +KPX racute ydieresis 30 +KPX rcaron a -10 +KPX rcaron aacute -10 +KPX rcaron abreve -10 +KPX rcaron acircumflex -10 +KPX rcaron adieresis -10 +KPX rcaron agrave -10 +KPX rcaron amacron -10 +KPX rcaron aogonek -10 +KPX rcaron aring -10 +KPX rcaron atilde -10 +KPX rcaron colon 30 +KPX rcaron comma -50 +KPX rcaron i 15 +KPX rcaron iacute 15 +KPX rcaron icircumflex 15 +KPX rcaron idieresis 15 +KPX rcaron igrave 15 +KPX rcaron imacron 15 +KPX rcaron iogonek 15 +KPX rcaron k 15 +KPX rcaron kcommaaccent 15 +KPX rcaron l 15 +KPX rcaron lacute 15 +KPX rcaron lcommaaccent 15 +KPX rcaron lslash 15 +KPX rcaron m 25 +KPX rcaron n 25 +KPX rcaron nacute 25 +KPX rcaron ncaron 25 +KPX rcaron ncommaaccent 25 +KPX rcaron ntilde 25 +KPX rcaron p 30 +KPX rcaron period -50 +KPX rcaron semicolon 30 +KPX rcaron t 40 +KPX rcaron tcommaaccent 40 +KPX rcaron u 15 +KPX rcaron uacute 15 +KPX rcaron ucircumflex 15 +KPX rcaron udieresis 15 +KPX rcaron ugrave 15 +KPX rcaron uhungarumlaut 15 +KPX rcaron umacron 15 +KPX rcaron uogonek 15 +KPX rcaron uring 15 +KPX rcaron v 30 +KPX rcaron y 30 +KPX rcaron yacute 30 +KPX rcaron ydieresis 30 +KPX rcommaaccent a -10 +KPX rcommaaccent aacute -10 +KPX rcommaaccent abreve -10 +KPX rcommaaccent acircumflex -10 +KPX rcommaaccent adieresis -10 +KPX rcommaaccent agrave -10 +KPX rcommaaccent amacron -10 +KPX rcommaaccent aogonek -10 +KPX rcommaaccent aring -10 +KPX rcommaaccent atilde -10 +KPX rcommaaccent colon 30 +KPX rcommaaccent comma -50 +KPX rcommaaccent i 15 +KPX rcommaaccent iacute 15 +KPX rcommaaccent icircumflex 15 +KPX rcommaaccent idieresis 15 +KPX rcommaaccent igrave 15 +KPX rcommaaccent imacron 15 +KPX rcommaaccent iogonek 15 +KPX rcommaaccent k 15 +KPX rcommaaccent kcommaaccent 15 +KPX rcommaaccent l 15 +KPX rcommaaccent lacute 15 +KPX rcommaaccent lcommaaccent 15 +KPX rcommaaccent lslash 15 +KPX rcommaaccent m 25 +KPX rcommaaccent n 25 +KPX rcommaaccent nacute 25 +KPX rcommaaccent ncaron 25 +KPX rcommaaccent ncommaaccent 25 +KPX rcommaaccent ntilde 25 +KPX rcommaaccent p 30 +KPX rcommaaccent period -50 +KPX rcommaaccent semicolon 30 +KPX rcommaaccent t 40 +KPX rcommaaccent tcommaaccent 40 +KPX rcommaaccent u 15 +KPX rcommaaccent uacute 15 +KPX rcommaaccent ucircumflex 15 +KPX rcommaaccent udieresis 15 +KPX rcommaaccent ugrave 15 +KPX rcommaaccent uhungarumlaut 15 +KPX rcommaaccent umacron 15 +KPX rcommaaccent uogonek 15 +KPX rcommaaccent uring 15 +KPX rcommaaccent v 30 +KPX rcommaaccent y 30 +KPX rcommaaccent yacute 30 +KPX rcommaaccent ydieresis 30 +KPX s comma -15 +KPX s period -15 +KPX s w -30 +KPX sacute comma -15 +KPX sacute period -15 +KPX sacute w -30 +KPX scaron comma -15 +KPX scaron period -15 +KPX scaron w -30 +KPX scedilla comma -15 +KPX scedilla period -15 +KPX scedilla w -30 +KPX scommaaccent comma -15 +KPX scommaaccent period -15 +KPX scommaaccent w -30 +KPX semicolon space -50 +KPX space T -50 +KPX space Tcaron -50 +KPX space Tcommaaccent -50 +KPX space V -50 +KPX space W -40 +KPX space Y -90 +KPX space Yacute -90 +KPX space Ydieresis -90 +KPX space quotedblleft -30 +KPX space quoteleft -60 +KPX v a -25 +KPX v aacute -25 +KPX v abreve -25 +KPX v acircumflex -25 +KPX v adieresis -25 +KPX v agrave -25 +KPX v amacron -25 +KPX v aogonek -25 +KPX v aring -25 +KPX v atilde -25 +KPX v comma -80 +KPX v e -25 +KPX v eacute -25 +KPX v ecaron -25 +KPX v ecircumflex -25 +KPX v edieresis -25 +KPX v edotaccent -25 +KPX v egrave -25 +KPX v emacron -25 +KPX v eogonek -25 +KPX v o -25 +KPX v oacute -25 +KPX v ocircumflex -25 +KPX v odieresis -25 +KPX v ograve -25 +KPX v ohungarumlaut -25 +KPX v omacron -25 +KPX v oslash -25 +KPX v otilde -25 +KPX v period -80 +KPX w a -15 +KPX w aacute -15 +KPX w abreve -15 +KPX w acircumflex -15 +KPX w adieresis -15 +KPX w agrave -15 +KPX w amacron -15 +KPX w aogonek -15 +KPX w aring -15 +KPX w atilde -15 +KPX w comma -60 +KPX w e -10 +KPX w eacute -10 +KPX w ecaron -10 +KPX w ecircumflex -10 +KPX w edieresis -10 +KPX w edotaccent -10 +KPX w egrave -10 +KPX w emacron -10 +KPX w eogonek -10 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -60 +KPX x e -30 +KPX x eacute -30 +KPX x ecaron -30 +KPX x ecircumflex -30 +KPX x edieresis -30 +KPX x edotaccent -30 +KPX x egrave -30 +KPX x emacron -30 +KPX x eogonek -30 +KPX y a -20 +KPX y aacute -20 +KPX y abreve -20 +KPX y acircumflex -20 +KPX y adieresis -20 +KPX y agrave -20 +KPX y amacron -20 +KPX y aogonek -20 +KPX y aring -20 +KPX y atilde -20 +KPX y comma -100 +KPX y e -20 +KPX y eacute -20 +KPX y ecaron -20 +KPX y ecircumflex -20 +KPX y edieresis -20 +KPX y edotaccent -20 +KPX y egrave -20 +KPX y emacron -20 +KPX y eogonek -20 +KPX y o -20 +KPX y oacute -20 +KPX y ocircumflex -20 +KPX y odieresis -20 +KPX y ograve -20 +KPX y ohungarumlaut -20 +KPX y omacron -20 +KPX y oslash -20 +KPX y otilde -20 +KPX y period -100 +KPX yacute a -20 +KPX yacute aacute -20 +KPX yacute abreve -20 +KPX yacute acircumflex -20 +KPX yacute adieresis -20 +KPX yacute agrave -20 +KPX yacute amacron -20 +KPX yacute aogonek -20 +KPX yacute aring -20 +KPX yacute atilde -20 +KPX yacute comma -100 +KPX yacute e -20 +KPX yacute eacute -20 +KPX yacute ecaron -20 +KPX yacute ecircumflex -20 +KPX yacute edieresis -20 +KPX yacute edotaccent -20 +KPX yacute egrave -20 +KPX yacute emacron -20 +KPX yacute eogonek -20 +KPX yacute o -20 +KPX yacute oacute -20 +KPX yacute ocircumflex -20 +KPX yacute odieresis -20 +KPX yacute ograve -20 +KPX yacute ohungarumlaut -20 +KPX yacute omacron -20 +KPX yacute oslash -20 +KPX yacute otilde -20 +KPX yacute period -100 +KPX ydieresis a -20 +KPX ydieresis aacute -20 +KPX ydieresis abreve -20 +KPX ydieresis acircumflex -20 +KPX ydieresis adieresis -20 +KPX ydieresis agrave -20 +KPX ydieresis amacron -20 +KPX ydieresis aogonek -20 +KPX ydieresis aring -20 +KPX ydieresis atilde -20 +KPX ydieresis comma -100 +KPX ydieresis e -20 +KPX ydieresis eacute -20 +KPX ydieresis ecaron -20 +KPX ydieresis ecircumflex -20 +KPX ydieresis edieresis -20 +KPX ydieresis edotaccent -20 +KPX ydieresis egrave -20 +KPX ydieresis emacron -20 +KPX ydieresis eogonek -20 +KPX ydieresis o -20 +KPX ydieresis oacute -20 +KPX ydieresis ocircumflex -20 +KPX ydieresis odieresis -20 +KPX ydieresis ograve -20 +KPX ydieresis ohungarumlaut -20 +KPX ydieresis omacron -20 +KPX ydieresis oslash -20 +KPX ydieresis otilde -20 +KPX ydieresis period -100 +KPX z e -15 +KPX z eacute -15 +KPX z ecaron -15 +KPX z ecircumflex -15 +KPX z edieresis -15 +KPX z edotaccent -15 +KPX z egrave -15 +KPX z emacron -15 +KPX z eogonek -15 +KPX z o -15 +KPX z oacute -15 +KPX z ocircumflex -15 +KPX z odieresis -15 +KPX z ograve -15 +KPX z ohungarumlaut -15 +KPX z omacron -15 +KPX z oslash -15 +KPX z otilde -15 +KPX zacute e -15 +KPX zacute eacute -15 +KPX zacute ecaron -15 +KPX zacute ecircumflex -15 +KPX zacute edieresis -15 +KPX zacute edotaccent -15 +KPX zacute egrave -15 +KPX zacute emacron -15 +KPX zacute eogonek -15 +KPX zacute o -15 +KPX zacute oacute -15 +KPX zacute ocircumflex -15 +KPX zacute odieresis -15 +KPX zacute ograve -15 +KPX zacute ohungarumlaut -15 +KPX zacute omacron -15 +KPX zacute oslash -15 +KPX zacute otilde -15 +KPX zcaron e -15 +KPX zcaron eacute -15 +KPX zcaron ecaron -15 +KPX zcaron ecircumflex -15 +KPX zcaron edieresis -15 +KPX zcaron edotaccent -15 +KPX zcaron egrave -15 +KPX zcaron emacron -15 +KPX zcaron eogonek -15 +KPX zcaron o -15 +KPX zcaron oacute -15 +KPX zcaron ocircumflex -15 +KPX zcaron odieresis -15 +KPX zcaron ograve -15 +KPX zcaron ohungarumlaut -15 +KPX zcaron omacron -15 +KPX zcaron oslash -15 +KPX zcaron otilde -15 +KPX zdotaccent e -15 +KPX zdotaccent eacute -15 +KPX zdotaccent ecaron -15 +KPX zdotaccent ecircumflex -15 +KPX zdotaccent edieresis -15 +KPX zdotaccent edotaccent -15 +KPX zdotaccent egrave -15 +KPX zdotaccent emacron -15 +KPX zdotaccent eogonek -15 +KPX zdotaccent o -15 +KPX zdotaccent oacute -15 +KPX zdotaccent ocircumflex -15 +KPX zdotaccent odieresis -15 +KPX zdotaccent ograve -15 +KPX zdotaccent ohungarumlaut -15 +KPX zdotaccent omacron -15 +KPX zdotaccent oslash -15 +KPX zdotaccent otilde -15 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Helvetica.afm b/internal/pdf/model/fonts/afms/Helvetica.afm new file mode 100644 index 0000000..9492d8f --- /dev/null +++ b/internal/pdf/model/fonts/afms/Helvetica.afm @@ -0,0 +1,3051 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:38:23 1997 +Comment UniqueID 43054 +Comment VMusage 37069 48094 +FontName Helvetica +FullName Helvetica +FamilyName Helvetica +Weight Medium +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -166 -225 1000 931 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 523 +Ascender 718 +Descender -207 +StdHW 76 +StdVW 88 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 278 ; N exclam ; B 90 0 187 718 ; +C 34 ; WX 355 ; N quotedbl ; B 70 463 285 718 ; +C 35 ; WX 556 ; N numbersign ; B 28 0 529 688 ; +C 36 ; WX 556 ; N dollar ; B 32 -115 520 775 ; +C 37 ; WX 889 ; N percent ; B 39 -19 850 703 ; +C 38 ; WX 667 ; N ampersand ; B 44 -15 645 718 ; +C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ; +C 40 ; WX 333 ; N parenleft ; B 68 -207 299 733 ; +C 41 ; WX 333 ; N parenright ; B 34 -207 265 733 ; +C 42 ; WX 389 ; N asterisk ; B 39 431 349 718 ; +C 43 ; WX 584 ; N plus ; B 39 0 545 505 ; +C 44 ; WX 278 ; N comma ; B 87 -147 191 106 ; +C 45 ; WX 333 ; N hyphen ; B 44 232 289 322 ; +C 46 ; WX 278 ; N period ; B 87 0 191 106 ; +C 47 ; WX 278 ; N slash ; B -17 -19 295 737 ; +C 48 ; WX 556 ; N zero ; B 37 -19 519 703 ; +C 49 ; WX 556 ; N one ; B 101 0 359 703 ; +C 50 ; WX 556 ; N two ; B 26 0 507 703 ; +C 51 ; WX 556 ; N three ; B 34 -19 522 703 ; +C 52 ; WX 556 ; N four ; B 25 0 523 703 ; +C 53 ; WX 556 ; N five ; B 32 -19 514 688 ; +C 54 ; WX 556 ; N six ; B 38 -19 518 703 ; +C 55 ; WX 556 ; N seven ; B 37 0 523 688 ; +C 56 ; WX 556 ; N eight ; B 38 -19 517 703 ; +C 57 ; WX 556 ; N nine ; B 42 -19 514 703 ; +C 58 ; WX 278 ; N colon ; B 87 0 191 516 ; +C 59 ; WX 278 ; N semicolon ; B 87 -147 191 516 ; +C 60 ; WX 584 ; N less ; B 48 11 536 495 ; +C 61 ; WX 584 ; N equal ; B 39 115 545 390 ; +C 62 ; WX 584 ; N greater ; B 48 11 536 495 ; +C 63 ; WX 556 ; N question ; B 56 0 492 727 ; +C 64 ; WX 1015 ; N at ; B 147 -19 868 737 ; +C 65 ; WX 667 ; N A ; B 14 0 654 718 ; +C 66 ; WX 667 ; N B ; B 74 0 627 718 ; +C 67 ; WX 722 ; N C ; B 44 -19 681 737 ; +C 68 ; WX 722 ; N D ; B 81 0 674 718 ; +C 69 ; WX 667 ; N E ; B 86 0 616 718 ; +C 70 ; WX 611 ; N F ; B 86 0 583 718 ; +C 71 ; WX 778 ; N G ; B 48 -19 704 737 ; +C 72 ; WX 722 ; N H ; B 77 0 646 718 ; +C 73 ; WX 278 ; N I ; B 91 0 188 718 ; +C 74 ; WX 500 ; N J ; B 17 -19 428 718 ; +C 75 ; WX 667 ; N K ; B 76 0 663 718 ; +C 76 ; WX 556 ; N L ; B 76 0 537 718 ; +C 77 ; WX 833 ; N M ; B 73 0 761 718 ; +C 78 ; WX 722 ; N N ; B 76 0 646 718 ; +C 79 ; WX 778 ; N O ; B 39 -19 739 737 ; +C 80 ; WX 667 ; N P ; B 86 0 622 718 ; +C 81 ; WX 778 ; N Q ; B 39 -56 739 737 ; +C 82 ; WX 722 ; N R ; B 88 0 684 718 ; +C 83 ; WX 667 ; N S ; B 49 -19 620 737 ; +C 84 ; WX 611 ; N T ; B 14 0 597 718 ; +C 85 ; WX 722 ; N U ; B 79 -19 644 718 ; +C 86 ; WX 667 ; N V ; B 20 0 647 718 ; +C 87 ; WX 944 ; N W ; B 16 0 928 718 ; +C 88 ; WX 667 ; N X ; B 19 0 648 718 ; +C 89 ; WX 667 ; N Y ; B 14 0 653 718 ; +C 90 ; WX 611 ; N Z ; B 23 0 588 718 ; +C 91 ; WX 278 ; N bracketleft ; B 63 -196 250 722 ; +C 92 ; WX 278 ; N backslash ; B -17 -19 295 737 ; +C 93 ; WX 278 ; N bracketright ; B 28 -196 215 722 ; +C 94 ; WX 469 ; N asciicircum ; B -14 264 483 688 ; +C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; +C 96 ; WX 222 ; N quoteleft ; B 65 470 169 725 ; +C 97 ; WX 556 ; N a ; B 36 -15 530 538 ; +C 98 ; WX 556 ; N b ; B 58 -15 517 718 ; +C 99 ; WX 500 ; N c ; B 30 -15 477 538 ; +C 100 ; WX 556 ; N d ; B 35 -15 499 718 ; +C 101 ; WX 556 ; N e ; B 40 -15 516 538 ; +C 102 ; WX 278 ; N f ; B 14 0 262 728 ; L i fi ; L l fl ; +C 103 ; WX 556 ; N g ; B 40 -220 499 538 ; +C 104 ; WX 556 ; N h ; B 65 0 491 718 ; +C 105 ; WX 222 ; N i ; B 67 0 155 718 ; +C 106 ; WX 222 ; N j ; B -16 -210 155 718 ; +C 107 ; WX 500 ; N k ; B 67 0 501 718 ; +C 108 ; WX 222 ; N l ; B 67 0 155 718 ; +C 109 ; WX 833 ; N m ; B 65 0 769 538 ; +C 110 ; WX 556 ; N n ; B 65 0 491 538 ; +C 111 ; WX 556 ; N o ; B 35 -14 521 538 ; +C 112 ; WX 556 ; N p ; B 58 -207 517 538 ; +C 113 ; WX 556 ; N q ; B 35 -207 494 538 ; +C 114 ; WX 333 ; N r ; B 77 0 332 538 ; +C 115 ; WX 500 ; N s ; B 32 -15 464 538 ; +C 116 ; WX 278 ; N t ; B 14 -7 257 669 ; +C 117 ; WX 556 ; N u ; B 68 -15 489 523 ; +C 118 ; WX 500 ; N v ; B 8 0 492 523 ; +C 119 ; WX 722 ; N w ; B 14 0 709 523 ; +C 120 ; WX 500 ; N x ; B 11 0 490 523 ; +C 121 ; WX 500 ; N y ; B 11 -214 489 523 ; +C 122 ; WX 500 ; N z ; B 31 0 469 523 ; +C 123 ; WX 334 ; N braceleft ; B 42 -196 292 722 ; +C 124 ; WX 260 ; N bar ; B 94 -225 167 775 ; +C 125 ; WX 334 ; N braceright ; B 42 -196 292 722 ; +C 126 ; WX 584 ; N asciitilde ; B 61 180 523 326 ; +C 161 ; WX 333 ; N exclamdown ; B 118 -195 215 523 ; +C 162 ; WX 556 ; N cent ; B 51 -115 513 623 ; +C 163 ; WX 556 ; N sterling ; B 33 -16 539 718 ; +C 164 ; WX 167 ; N fraction ; B -166 -19 333 703 ; +C 165 ; WX 556 ; N yen ; B 3 0 553 688 ; +C 166 ; WX 556 ; N florin ; B -11 -207 501 737 ; +C 167 ; WX 556 ; N section ; B 43 -191 512 737 ; +C 168 ; WX 556 ; N currency ; B 28 99 528 603 ; +C 169 ; WX 191 ; N quotesingle ; B 59 463 132 718 ; +C 170 ; WX 333 ; N quotedblleft ; B 38 470 307 725 ; +C 171 ; WX 556 ; N guillemotleft ; B 97 108 459 446 ; +C 172 ; WX 333 ; N guilsinglleft ; B 88 108 245 446 ; +C 173 ; WX 333 ; N guilsinglright ; B 88 108 245 446 ; +C 174 ; WX 500 ; N fi ; B 14 0 434 728 ; +C 175 ; WX 500 ; N fl ; B 14 0 432 728 ; +C 177 ; WX 556 ; N endash ; B 0 240 556 313 ; +C 178 ; WX 556 ; N dagger ; B 43 -159 514 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 43 -159 514 718 ; +C 180 ; WX 278 ; N periodcentered ; B 77 190 202 315 ; +C 182 ; WX 537 ; N paragraph ; B 18 -173 497 718 ; +C 183 ; WX 350 ; N bullet ; B 18 202 333 517 ; +C 184 ; WX 222 ; N quotesinglbase ; B 53 -149 157 106 ; +C 185 ; WX 333 ; N quotedblbase ; B 26 -149 295 106 ; +C 186 ; WX 333 ; N quotedblright ; B 26 463 295 718 ; +C 187 ; WX 556 ; N guillemotright ; B 97 108 459 446 ; +C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 106 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 703 ; +C 191 ; WX 611 ; N questiondown ; B 91 -201 527 525 ; +C 193 ; WX 333 ; N grave ; B 14 593 211 734 ; +C 194 ; WX 333 ; N acute ; B 122 593 319 734 ; +C 195 ; WX 333 ; N circumflex ; B 21 593 312 734 ; +C 196 ; WX 333 ; N tilde ; B -4 606 337 722 ; +C 197 ; WX 333 ; N macron ; B 10 627 323 684 ; +C 198 ; WX 333 ; N breve ; B 13 595 321 731 ; +C 199 ; WX 333 ; N dotaccent ; B 121 604 212 706 ; +C 200 ; WX 333 ; N dieresis ; B 40 604 293 706 ; +C 202 ; WX 333 ; N ring ; B 75 572 259 756 ; +C 203 ; WX 333 ; N cedilla ; B 45 -225 259 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 31 593 409 734 ; +C 206 ; WX 333 ; N ogonek ; B 73 -225 287 0 ; +C 207 ; WX 333 ; N caron ; B 21 593 312 734 ; +C 208 ; WX 1000 ; N emdash ; B 0 240 1000 313 ; +C 225 ; WX 1000 ; N AE ; B 8 0 951 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 24 405 346 737 ; +C 232 ; WX 556 ; N Lslash ; B -20 0 537 718 ; +C 233 ; WX 778 ; N Oslash ; B 39 -19 740 737 ; +C 234 ; WX 1000 ; N OE ; B 36 -19 965 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 25 405 341 737 ; +C 241 ; WX 889 ; N ae ; B 36 -15 847 538 ; +C 245 ; WX 278 ; N dotlessi ; B 95 0 183 523 ; +C 248 ; WX 222 ; N lslash ; B -20 0 242 718 ; +C 249 ; WX 611 ; N oslash ; B 28 -22 537 545 ; +C 250 ; WX 944 ; N oe ; B 35 -15 902 538 ; +C 251 ; WX 611 ; N germandbls ; B 67 -15 571 728 ; +C -1 ; WX 278 ; N Idieresis ; B 13 0 266 901 ; +C -1 ; WX 556 ; N eacute ; B 40 -15 516 734 ; +C -1 ; WX 556 ; N abreve ; B 36 -15 530 731 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 68 -15 521 734 ; +C -1 ; WX 556 ; N ecaron ; B 40 -15 516 734 ; +C -1 ; WX 667 ; N Ydieresis ; B 14 0 653 901 ; +C -1 ; WX 584 ; N divide ; B 39 -19 545 524 ; +C -1 ; WX 667 ; N Yacute ; B 14 0 653 929 ; +C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; +C -1 ; WX 556 ; N aacute ; B 36 -15 530 734 ; +C -1 ; WX 722 ; N Ucircumflex ; B 79 -19 644 929 ; +C -1 ; WX 500 ; N yacute ; B 11 -214 489 734 ; +C -1 ; WX 500 ; N scommaaccent ; B 32 -225 464 538 ; +C -1 ; WX 556 ; N ecircumflex ; B 40 -15 516 734 ; +C -1 ; WX 722 ; N Uring ; B 79 -19 644 931 ; +C -1 ; WX 722 ; N Udieresis ; B 79 -19 644 901 ; +C -1 ; WX 556 ; N aogonek ; B 36 -220 547 538 ; +C -1 ; WX 722 ; N Uacute ; B 79 -19 644 929 ; +C -1 ; WX 556 ; N uogonek ; B 68 -225 519 523 ; +C -1 ; WX 667 ; N Edieresis ; B 86 0 616 901 ; +C -1 ; WX 722 ; N Dcroat ; B 0 0 674 718 ; +C -1 ; WX 250 ; N commaaccent ; B 87 -225 181 -40 ; +C -1 ; WX 737 ; N copyright ; B -14 -19 752 737 ; +C -1 ; WX 667 ; N Emacron ; B 86 0 616 879 ; +C -1 ; WX 500 ; N ccaron ; B 30 -15 477 734 ; +C -1 ; WX 556 ; N aring ; B 36 -15 530 756 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 76 -225 646 718 ; +C -1 ; WX 222 ; N lacute ; B 67 0 264 929 ; +C -1 ; WX 556 ; N agrave ; B 36 -15 530 734 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 14 -225 597 718 ; +C -1 ; WX 722 ; N Cacute ; B 44 -19 681 929 ; +C -1 ; WX 556 ; N atilde ; B 36 -15 530 722 ; +C -1 ; WX 667 ; N Edotaccent ; B 86 0 616 901 ; +C -1 ; WX 500 ; N scaron ; B 32 -15 464 734 ; +C -1 ; WX 500 ; N scedilla ; B 32 -225 464 538 ; +C -1 ; WX 278 ; N iacute ; B 95 0 292 734 ; +C -1 ; WX 471 ; N lozenge ; B 10 0 462 728 ; +C -1 ; WX 722 ; N Rcaron ; B 88 0 684 929 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 48 -225 704 737 ; +C -1 ; WX 556 ; N ucircumflex ; B 68 -15 489 734 ; +C -1 ; WX 556 ; N acircumflex ; B 36 -15 530 734 ; +C -1 ; WX 667 ; N Amacron ; B 14 0 654 879 ; +C -1 ; WX 333 ; N rcaron ; B 61 0 352 734 ; +C -1 ; WX 500 ; N ccedilla ; B 30 -225 477 538 ; +C -1 ; WX 611 ; N Zdotaccent ; B 23 0 588 901 ; +C -1 ; WX 667 ; N Thorn ; B 86 0 622 718 ; +C -1 ; WX 778 ; N Omacron ; B 39 -19 739 879 ; +C -1 ; WX 722 ; N Racute ; B 88 0 684 929 ; +C -1 ; WX 667 ; N Sacute ; B 49 -19 620 929 ; +C -1 ; WX 643 ; N dcaron ; B 35 -15 655 718 ; +C -1 ; WX 722 ; N Umacron ; B 79 -19 644 879 ; +C -1 ; WX 556 ; N uring ; B 68 -15 489 756 ; +C -1 ; WX 333 ; N threesuperior ; B 5 270 325 703 ; +C -1 ; WX 778 ; N Ograve ; B 39 -19 739 929 ; +C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; +C -1 ; WX 667 ; N Abreve ; B 14 0 654 926 ; +C -1 ; WX 584 ; N multiply ; B 39 0 545 506 ; +C -1 ; WX 556 ; N uacute ; B 68 -15 489 734 ; +C -1 ; WX 611 ; N Tcaron ; B 14 0 597 929 ; +C -1 ; WX 476 ; N partialdiff ; B 13 -38 463 714 ; +C -1 ; WX 500 ; N ydieresis ; B 11 -214 489 706 ; +C -1 ; WX 722 ; N Nacute ; B 76 0 646 929 ; +C -1 ; WX 278 ; N icircumflex ; B -6 0 285 734 ; +C -1 ; WX 667 ; N Ecircumflex ; B 86 0 616 929 ; +C -1 ; WX 556 ; N adieresis ; B 36 -15 530 706 ; +C -1 ; WX 556 ; N edieresis ; B 40 -15 516 706 ; +C -1 ; WX 500 ; N cacute ; B 30 -15 477 734 ; +C -1 ; WX 556 ; N nacute ; B 65 0 491 734 ; +C -1 ; WX 556 ; N umacron ; B 68 -15 489 684 ; +C -1 ; WX 722 ; N Ncaron ; B 76 0 646 929 ; +C -1 ; WX 278 ; N Iacute ; B 91 0 292 929 ; +C -1 ; WX 584 ; N plusminus ; B 39 0 545 506 ; +C -1 ; WX 260 ; N brokenbar ; B 94 -150 167 700 ; +C -1 ; WX 737 ; N registered ; B -14 -19 752 737 ; +C -1 ; WX 778 ; N Gbreve ; B 48 -19 704 926 ; +C -1 ; WX 278 ; N Idotaccent ; B 91 0 188 901 ; +C -1 ; WX 600 ; N summation ; B 15 -10 586 706 ; +C -1 ; WX 667 ; N Egrave ; B 86 0 616 929 ; +C -1 ; WX 333 ; N racute ; B 77 0 332 734 ; +C -1 ; WX 556 ; N omacron ; B 35 -14 521 684 ; +C -1 ; WX 611 ; N Zacute ; B 23 0 588 929 ; +C -1 ; WX 611 ; N Zcaron ; B 23 0 588 929 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 674 ; +C -1 ; WX 722 ; N Eth ; B 0 0 674 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 44 -225 681 737 ; +C -1 ; WX 222 ; N lcommaaccent ; B 67 -225 167 718 ; +C -1 ; WX 317 ; N tcaron ; B 14 -7 329 808 ; +C -1 ; WX 556 ; N eogonek ; B 40 -225 516 538 ; +C -1 ; WX 722 ; N Uogonek ; B 79 -225 644 718 ; +C -1 ; WX 667 ; N Aacute ; B 14 0 654 929 ; +C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; +C -1 ; WX 556 ; N egrave ; B 40 -15 516 734 ; +C -1 ; WX 500 ; N zacute ; B 31 0 469 734 ; +C -1 ; WX 222 ; N iogonek ; B -31 -225 183 718 ; +C -1 ; WX 778 ; N Oacute ; B 39 -19 739 929 ; +C -1 ; WX 556 ; N oacute ; B 35 -14 521 734 ; +C -1 ; WX 556 ; N amacron ; B 36 -15 530 684 ; +C -1 ; WX 500 ; N sacute ; B 32 -15 464 734 ; +C -1 ; WX 278 ; N idieresis ; B 13 0 266 706 ; +C -1 ; WX 778 ; N Ocircumflex ; B 39 -19 739 929 ; +C -1 ; WX 722 ; N Ugrave ; B 79 -19 644 929 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 556 ; N thorn ; B 58 -207 517 718 ; +C -1 ; WX 333 ; N twosuperior ; B 4 281 323 703 ; +C -1 ; WX 778 ; N Odieresis ; B 39 -19 739 901 ; +C -1 ; WX 556 ; N mu ; B 68 -207 489 523 ; +C -1 ; WX 278 ; N igrave ; B -13 0 184 734 ; +C -1 ; WX 556 ; N ohungarumlaut ; B 35 -14 521 734 ; +C -1 ; WX 667 ; N Eogonek ; B 86 -220 633 718 ; +C -1 ; WX 556 ; N dcroat ; B 35 -15 550 718 ; +C -1 ; WX 834 ; N threequarters ; B 45 -19 810 703 ; +C -1 ; WX 667 ; N Scedilla ; B 49 -225 620 737 ; +C -1 ; WX 299 ; N lcaron ; B 67 0 311 718 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 76 -225 663 718 ; +C -1 ; WX 556 ; N Lacute ; B 76 0 537 929 ; +C -1 ; WX 1000 ; N trademark ; B 46 306 903 718 ; +C -1 ; WX 556 ; N edotaccent ; B 40 -15 516 706 ; +C -1 ; WX 278 ; N Igrave ; B -13 0 188 929 ; +C -1 ; WX 278 ; N Imacron ; B -17 0 296 879 ; +C -1 ; WX 556 ; N Lcaron ; B 76 0 537 718 ; +C -1 ; WX 834 ; N onehalf ; B 43 -19 773 703 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 523 674 ; +C -1 ; WX 556 ; N ocircumflex ; B 35 -14 521 734 ; +C -1 ; WX 556 ; N ntilde ; B 65 0 491 722 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 79 -19 644 929 ; +C -1 ; WX 667 ; N Eacute ; B 86 0 616 929 ; +C -1 ; WX 556 ; N emacron ; B 40 -15 516 684 ; +C -1 ; WX 556 ; N gbreve ; B 40 -220 499 731 ; +C -1 ; WX 834 ; N onequarter ; B 73 -19 756 703 ; +C -1 ; WX 667 ; N Scaron ; B 49 -19 620 929 ; +C -1 ; WX 667 ; N Scommaaccent ; B 49 -225 620 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 39 -19 739 929 ; +C -1 ; WX 400 ; N degree ; B 54 411 346 703 ; +C -1 ; WX 556 ; N ograve ; B 35 -14 521 734 ; +C -1 ; WX 722 ; N Ccaron ; B 44 -19 681 929 ; +C -1 ; WX 556 ; N ugrave ; B 68 -15 489 734 ; +C -1 ; WX 453 ; N radical ; B -4 -80 458 762 ; +C -1 ; WX 722 ; N Dcaron ; B 81 0 674 929 ; +C -1 ; WX 333 ; N rcommaaccent ; B 77 -225 332 538 ; +C -1 ; WX 722 ; N Ntilde ; B 76 0 646 917 ; +C -1 ; WX 556 ; N otilde ; B 35 -14 521 722 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 88 -225 684 718 ; +C -1 ; WX 556 ; N Lcommaaccent ; B 76 -225 537 718 ; +C -1 ; WX 667 ; N Atilde ; B 14 0 654 917 ; +C -1 ; WX 667 ; N Aogonek ; B 14 -225 654 718 ; +C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; +C -1 ; WX 778 ; N Otilde ; B 39 -19 739 917 ; +C -1 ; WX 500 ; N zdotaccent ; B 31 0 469 706 ; +C -1 ; WX 667 ; N Ecaron ; B 86 0 616 929 ; +C -1 ; WX 278 ; N Iogonek ; B -3 -225 211 718 ; +C -1 ; WX 500 ; N kcommaaccent ; B 67 -225 501 718 ; +C -1 ; WX 584 ; N minus ; B 39 216 545 289 ; +C -1 ; WX 278 ; N Icircumflex ; B -6 0 285 929 ; +C -1 ; WX 556 ; N ncaron ; B 65 0 491 734 ; +C -1 ; WX 278 ; N tcommaaccent ; B 14 -225 257 669 ; +C -1 ; WX 584 ; N logicalnot ; B 39 108 545 390 ; +C -1 ; WX 556 ; N odieresis ; B 35 -14 521 706 ; +C -1 ; WX 556 ; N udieresis ; B 68 -15 489 706 ; +C -1 ; WX 549 ; N notequal ; B 12 -35 537 551 ; +C -1 ; WX 556 ; N gcommaaccent ; B 40 -220 499 822 ; +C -1 ; WX 556 ; N eth ; B 35 -15 522 737 ; +C -1 ; WX 500 ; N zcaron ; B 31 0 469 734 ; +C -1 ; WX 556 ; N ncommaaccent ; B 65 -225 491 538 ; +C -1 ; WX 333 ; N onesuperior ; B 43 281 222 703 ; +C -1 ; WX 278 ; N imacron ; B 5 0 272 684 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2705 +KPX A C -30 +KPX A Cacute -30 +KPX A Ccaron -30 +KPX A Ccedilla -30 +KPX A G -30 +KPX A Gbreve -30 +KPX A Gcommaaccent -30 +KPX A O -30 +KPX A Oacute -30 +KPX A Ocircumflex -30 +KPX A Odieresis -30 +KPX A Ograve -30 +KPX A Ohungarumlaut -30 +KPX A Omacron -30 +KPX A Oslash -30 +KPX A Otilde -30 +KPX A Q -30 +KPX A T -120 +KPX A Tcaron -120 +KPX A Tcommaaccent -120 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -70 +KPX A W -50 +KPX A Y -100 +KPX A Yacute -100 +KPX A Ydieresis -100 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -40 +KPX A y -40 +KPX A yacute -40 +KPX A ydieresis -40 +KPX Aacute C -30 +KPX Aacute Cacute -30 +KPX Aacute Ccaron -30 +KPX Aacute Ccedilla -30 +KPX Aacute G -30 +KPX Aacute Gbreve -30 +KPX Aacute Gcommaaccent -30 +KPX Aacute O -30 +KPX Aacute Oacute -30 +KPX Aacute Ocircumflex -30 +KPX Aacute Odieresis -30 +KPX Aacute Ograve -30 +KPX Aacute Ohungarumlaut -30 +KPX Aacute Omacron -30 +KPX Aacute Oslash -30 +KPX Aacute Otilde -30 +KPX Aacute Q -30 +KPX Aacute T -120 +KPX Aacute Tcaron -120 +KPX Aacute Tcommaaccent -120 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -70 +KPX Aacute W -50 +KPX Aacute Y -100 +KPX Aacute Yacute -100 +KPX Aacute Ydieresis -100 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -40 +KPX Aacute y -40 +KPX Aacute yacute -40 +KPX Aacute ydieresis -40 +KPX Abreve C -30 +KPX Abreve Cacute -30 +KPX Abreve Ccaron -30 +KPX Abreve Ccedilla -30 +KPX Abreve G -30 +KPX Abreve Gbreve -30 +KPX Abreve Gcommaaccent -30 +KPX Abreve O -30 +KPX Abreve Oacute -30 +KPX Abreve Ocircumflex -30 +KPX Abreve Odieresis -30 +KPX Abreve Ograve -30 +KPX Abreve Ohungarumlaut -30 +KPX Abreve Omacron -30 +KPX Abreve Oslash -30 +KPX Abreve Otilde -30 +KPX Abreve Q -30 +KPX Abreve T -120 +KPX Abreve Tcaron -120 +KPX Abreve Tcommaaccent -120 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -70 +KPX Abreve W -50 +KPX Abreve Y -100 +KPX Abreve Yacute -100 +KPX Abreve Ydieresis -100 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -40 +KPX Abreve y -40 +KPX Abreve yacute -40 +KPX Abreve ydieresis -40 +KPX Acircumflex C -30 +KPX Acircumflex Cacute -30 +KPX Acircumflex Ccaron -30 +KPX Acircumflex Ccedilla -30 +KPX Acircumflex G -30 +KPX Acircumflex Gbreve -30 +KPX Acircumflex Gcommaaccent -30 +KPX Acircumflex O -30 +KPX Acircumflex Oacute -30 +KPX Acircumflex Ocircumflex -30 +KPX Acircumflex Odieresis -30 +KPX Acircumflex Ograve -30 +KPX Acircumflex Ohungarumlaut -30 +KPX Acircumflex Omacron -30 +KPX Acircumflex Oslash -30 +KPX Acircumflex Otilde -30 +KPX Acircumflex Q -30 +KPX Acircumflex T -120 +KPX Acircumflex Tcaron -120 +KPX Acircumflex Tcommaaccent -120 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -70 +KPX Acircumflex W -50 +KPX Acircumflex Y -100 +KPX Acircumflex Yacute -100 +KPX Acircumflex Ydieresis -100 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -40 +KPX Acircumflex y -40 +KPX Acircumflex yacute -40 +KPX Acircumflex ydieresis -40 +KPX Adieresis C -30 +KPX Adieresis Cacute -30 +KPX Adieresis Ccaron -30 +KPX Adieresis Ccedilla -30 +KPX Adieresis G -30 +KPX Adieresis Gbreve -30 +KPX Adieresis Gcommaaccent -30 +KPX Adieresis O -30 +KPX Adieresis Oacute -30 +KPX Adieresis Ocircumflex -30 +KPX Adieresis Odieresis -30 +KPX Adieresis Ograve -30 +KPX Adieresis Ohungarumlaut -30 +KPX Adieresis Omacron -30 +KPX Adieresis Oslash -30 +KPX Adieresis Otilde -30 +KPX Adieresis Q -30 +KPX Adieresis T -120 +KPX Adieresis Tcaron -120 +KPX Adieresis Tcommaaccent -120 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -70 +KPX Adieresis W -50 +KPX Adieresis Y -100 +KPX Adieresis Yacute -100 +KPX Adieresis Ydieresis -100 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -40 +KPX Adieresis y -40 +KPX Adieresis yacute -40 +KPX Adieresis ydieresis -40 +KPX Agrave C -30 +KPX Agrave Cacute -30 +KPX Agrave Ccaron -30 +KPX Agrave Ccedilla -30 +KPX Agrave G -30 +KPX Agrave Gbreve -30 +KPX Agrave Gcommaaccent -30 +KPX Agrave O -30 +KPX Agrave Oacute -30 +KPX Agrave Ocircumflex -30 +KPX Agrave Odieresis -30 +KPX Agrave Ograve -30 +KPX Agrave Ohungarumlaut -30 +KPX Agrave Omacron -30 +KPX Agrave Oslash -30 +KPX Agrave Otilde -30 +KPX Agrave Q -30 +KPX Agrave T -120 +KPX Agrave Tcaron -120 +KPX Agrave Tcommaaccent -120 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -70 +KPX Agrave W -50 +KPX Agrave Y -100 +KPX Agrave Yacute -100 +KPX Agrave Ydieresis -100 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -40 +KPX Agrave y -40 +KPX Agrave yacute -40 +KPX Agrave ydieresis -40 +KPX Amacron C -30 +KPX Amacron Cacute -30 +KPX Amacron Ccaron -30 +KPX Amacron Ccedilla -30 +KPX Amacron G -30 +KPX Amacron Gbreve -30 +KPX Amacron Gcommaaccent -30 +KPX Amacron O -30 +KPX Amacron Oacute -30 +KPX Amacron Ocircumflex -30 +KPX Amacron Odieresis -30 +KPX Amacron Ograve -30 +KPX Amacron Ohungarumlaut -30 +KPX Amacron Omacron -30 +KPX Amacron Oslash -30 +KPX Amacron Otilde -30 +KPX Amacron Q -30 +KPX Amacron T -120 +KPX Amacron Tcaron -120 +KPX Amacron Tcommaaccent -120 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -70 +KPX Amacron W -50 +KPX Amacron Y -100 +KPX Amacron Yacute -100 +KPX Amacron Ydieresis -100 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -40 +KPX Amacron y -40 +KPX Amacron yacute -40 +KPX Amacron ydieresis -40 +KPX Aogonek C -30 +KPX Aogonek Cacute -30 +KPX Aogonek Ccaron -30 +KPX Aogonek Ccedilla -30 +KPX Aogonek G -30 +KPX Aogonek Gbreve -30 +KPX Aogonek Gcommaaccent -30 +KPX Aogonek O -30 +KPX Aogonek Oacute -30 +KPX Aogonek Ocircumflex -30 +KPX Aogonek Odieresis -30 +KPX Aogonek Ograve -30 +KPX Aogonek Ohungarumlaut -30 +KPX Aogonek Omacron -30 +KPX Aogonek Oslash -30 +KPX Aogonek Otilde -30 +KPX Aogonek Q -30 +KPX Aogonek T -120 +KPX Aogonek Tcaron -120 +KPX Aogonek Tcommaaccent -120 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -70 +KPX Aogonek W -50 +KPX Aogonek Y -100 +KPX Aogonek Yacute -100 +KPX Aogonek Ydieresis -100 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -40 +KPX Aogonek y -40 +KPX Aogonek yacute -40 +KPX Aogonek ydieresis -40 +KPX Aring C -30 +KPX Aring Cacute -30 +KPX Aring Ccaron -30 +KPX Aring Ccedilla -30 +KPX Aring G -30 +KPX Aring Gbreve -30 +KPX Aring Gcommaaccent -30 +KPX Aring O -30 +KPX Aring Oacute -30 +KPX Aring Ocircumflex -30 +KPX Aring Odieresis -30 +KPX Aring Ograve -30 +KPX Aring Ohungarumlaut -30 +KPX Aring Omacron -30 +KPX Aring Oslash -30 +KPX Aring Otilde -30 +KPX Aring Q -30 +KPX Aring T -120 +KPX Aring Tcaron -120 +KPX Aring Tcommaaccent -120 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -70 +KPX Aring W -50 +KPX Aring Y -100 +KPX Aring Yacute -100 +KPX Aring Ydieresis -100 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -40 +KPX Aring y -40 +KPX Aring yacute -40 +KPX Aring ydieresis -40 +KPX Atilde C -30 +KPX Atilde Cacute -30 +KPX Atilde Ccaron -30 +KPX Atilde Ccedilla -30 +KPX Atilde G -30 +KPX Atilde Gbreve -30 +KPX Atilde Gcommaaccent -30 +KPX Atilde O -30 +KPX Atilde Oacute -30 +KPX Atilde Ocircumflex -30 +KPX Atilde Odieresis -30 +KPX Atilde Ograve -30 +KPX Atilde Ohungarumlaut -30 +KPX Atilde Omacron -30 +KPX Atilde Oslash -30 +KPX Atilde Otilde -30 +KPX Atilde Q -30 +KPX Atilde T -120 +KPX Atilde Tcaron -120 +KPX Atilde Tcommaaccent -120 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -70 +KPX Atilde W -50 +KPX Atilde Y -100 +KPX Atilde Yacute -100 +KPX Atilde Ydieresis -100 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -40 +KPX Atilde y -40 +KPX Atilde yacute -40 +KPX Atilde ydieresis -40 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX B comma -20 +KPX B period -20 +KPX C comma -30 +KPX C period -30 +KPX Cacute comma -30 +KPX Cacute period -30 +KPX Ccaron comma -30 +KPX Ccaron period -30 +KPX Ccedilla comma -30 +KPX Ccedilla period -30 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -70 +KPX D W -40 +KPX D Y -90 +KPX D Yacute -90 +KPX D Ydieresis -90 +KPX D comma -70 +KPX D period -70 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -70 +KPX Dcaron W -40 +KPX Dcaron Y -90 +KPX Dcaron Yacute -90 +KPX Dcaron Ydieresis -90 +KPX Dcaron comma -70 +KPX Dcaron period -70 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -70 +KPX Dcroat W -40 +KPX Dcroat Y -90 +KPX Dcroat Yacute -90 +KPX Dcroat Ydieresis -90 +KPX Dcroat comma -70 +KPX Dcroat period -70 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -50 +KPX F aacute -50 +KPX F abreve -50 +KPX F acircumflex -50 +KPX F adieresis -50 +KPX F agrave -50 +KPX F amacron -50 +KPX F aogonek -50 +KPX F aring -50 +KPX F atilde -50 +KPX F comma -150 +KPX F e -30 +KPX F eacute -30 +KPX F ecaron -30 +KPX F ecircumflex -30 +KPX F edieresis -30 +KPX F edotaccent -30 +KPX F egrave -30 +KPX F emacron -30 +KPX F eogonek -30 +KPX F o -30 +KPX F oacute -30 +KPX F ocircumflex -30 +KPX F odieresis -30 +KPX F ograve -30 +KPX F ohungarumlaut -30 +KPX F omacron -30 +KPX F oslash -30 +KPX F otilde -30 +KPX F period -150 +KPX F r -45 +KPX F racute -45 +KPX F rcaron -45 +KPX F rcommaaccent -45 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J a -20 +KPX J aacute -20 +KPX J abreve -20 +KPX J acircumflex -20 +KPX J adieresis -20 +KPX J agrave -20 +KPX J amacron -20 +KPX J aogonek -20 +KPX J aring -20 +KPX J atilde -20 +KPX J comma -30 +KPX J period -30 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -50 +KPX K Oacute -50 +KPX K Ocircumflex -50 +KPX K Odieresis -50 +KPX K Ograve -50 +KPX K Ohungarumlaut -50 +KPX K Omacron -50 +KPX K Oslash -50 +KPX K Otilde -50 +KPX K e -40 +KPX K eacute -40 +KPX K ecaron -40 +KPX K ecircumflex -40 +KPX K edieresis -40 +KPX K edotaccent -40 +KPX K egrave -40 +KPX K emacron -40 +KPX K eogonek -40 +KPX K o -40 +KPX K oacute -40 +KPX K ocircumflex -40 +KPX K odieresis -40 +KPX K ograve -40 +KPX K ohungarumlaut -40 +KPX K omacron -40 +KPX K oslash -40 +KPX K otilde -40 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -50 +KPX K yacute -50 +KPX K ydieresis -50 +KPX Kcommaaccent O -50 +KPX Kcommaaccent Oacute -50 +KPX Kcommaaccent Ocircumflex -50 +KPX Kcommaaccent Odieresis -50 +KPX Kcommaaccent Ograve -50 +KPX Kcommaaccent Ohungarumlaut -50 +KPX Kcommaaccent Omacron -50 +KPX Kcommaaccent Oslash -50 +KPX Kcommaaccent Otilde -50 +KPX Kcommaaccent e -40 +KPX Kcommaaccent eacute -40 +KPX Kcommaaccent ecaron -40 +KPX Kcommaaccent ecircumflex -40 +KPX Kcommaaccent edieresis -40 +KPX Kcommaaccent edotaccent -40 +KPX Kcommaaccent egrave -40 +KPX Kcommaaccent emacron -40 +KPX Kcommaaccent eogonek -40 +KPX Kcommaaccent o -40 +KPX Kcommaaccent oacute -40 +KPX Kcommaaccent ocircumflex -40 +KPX Kcommaaccent odieresis -40 +KPX Kcommaaccent ograve -40 +KPX Kcommaaccent ohungarumlaut -40 +KPX Kcommaaccent omacron -40 +KPX Kcommaaccent oslash -40 +KPX Kcommaaccent otilde -40 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -50 +KPX Kcommaaccent yacute -50 +KPX Kcommaaccent ydieresis -50 +KPX L T -110 +KPX L Tcaron -110 +KPX L Tcommaaccent -110 +KPX L V -110 +KPX L W -70 +KPX L Y -140 +KPX L Yacute -140 +KPX L Ydieresis -140 +KPX L quotedblright -140 +KPX L quoteright -160 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -110 +KPX Lacute Tcaron -110 +KPX Lacute Tcommaaccent -110 +KPX Lacute V -110 +KPX Lacute W -70 +KPX Lacute Y -140 +KPX Lacute Yacute -140 +KPX Lacute Ydieresis -140 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -160 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcaron T -110 +KPX Lcaron Tcaron -110 +KPX Lcaron Tcommaaccent -110 +KPX Lcaron V -110 +KPX Lcaron W -70 +KPX Lcaron Y -140 +KPX Lcaron Yacute -140 +KPX Lcaron Ydieresis -140 +KPX Lcaron quotedblright -140 +KPX Lcaron quoteright -160 +KPX Lcaron y -30 +KPX Lcaron yacute -30 +KPX Lcaron ydieresis -30 +KPX Lcommaaccent T -110 +KPX Lcommaaccent Tcaron -110 +KPX Lcommaaccent Tcommaaccent -110 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -70 +KPX Lcommaaccent Y -140 +KPX Lcommaaccent Yacute -140 +KPX Lcommaaccent Ydieresis -140 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -160 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -110 +KPX Lslash Tcaron -110 +KPX Lslash Tcommaaccent -110 +KPX Lslash V -110 +KPX Lslash W -70 +KPX Lslash Y -140 +KPX Lslash Yacute -140 +KPX Lslash Ydieresis -140 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -160 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -20 +KPX O Aacute -20 +KPX O Abreve -20 +KPX O Acircumflex -20 +KPX O Adieresis -20 +KPX O Agrave -20 +KPX O Amacron -20 +KPX O Aogonek -20 +KPX O Aring -20 +KPX O Atilde -20 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -30 +KPX O X -60 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -20 +KPX Oacute Aacute -20 +KPX Oacute Abreve -20 +KPX Oacute Acircumflex -20 +KPX Oacute Adieresis -20 +KPX Oacute Agrave -20 +KPX Oacute Amacron -20 +KPX Oacute Aogonek -20 +KPX Oacute Aring -20 +KPX Oacute Atilde -20 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -30 +KPX Oacute X -60 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -20 +KPX Ocircumflex Aacute -20 +KPX Ocircumflex Abreve -20 +KPX Ocircumflex Acircumflex -20 +KPX Ocircumflex Adieresis -20 +KPX Ocircumflex Agrave -20 +KPX Ocircumflex Amacron -20 +KPX Ocircumflex Aogonek -20 +KPX Ocircumflex Aring -20 +KPX Ocircumflex Atilde -20 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -30 +KPX Ocircumflex X -60 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -20 +KPX Odieresis Aacute -20 +KPX Odieresis Abreve -20 +KPX Odieresis Acircumflex -20 +KPX Odieresis Adieresis -20 +KPX Odieresis Agrave -20 +KPX Odieresis Amacron -20 +KPX Odieresis Aogonek -20 +KPX Odieresis Aring -20 +KPX Odieresis Atilde -20 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -30 +KPX Odieresis X -60 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -20 +KPX Ograve Aacute -20 +KPX Ograve Abreve -20 +KPX Ograve Acircumflex -20 +KPX Ograve Adieresis -20 +KPX Ograve Agrave -20 +KPX Ograve Amacron -20 +KPX Ograve Aogonek -20 +KPX Ograve Aring -20 +KPX Ograve Atilde -20 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -30 +KPX Ograve X -60 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -20 +KPX Ohungarumlaut Aacute -20 +KPX Ohungarumlaut Abreve -20 +KPX Ohungarumlaut Acircumflex -20 +KPX Ohungarumlaut Adieresis -20 +KPX Ohungarumlaut Agrave -20 +KPX Ohungarumlaut Amacron -20 +KPX Ohungarumlaut Aogonek -20 +KPX Ohungarumlaut Aring -20 +KPX Ohungarumlaut Atilde -20 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -30 +KPX Ohungarumlaut X -60 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -20 +KPX Omacron Aacute -20 +KPX Omacron Abreve -20 +KPX Omacron Acircumflex -20 +KPX Omacron Adieresis -20 +KPX Omacron Agrave -20 +KPX Omacron Amacron -20 +KPX Omacron Aogonek -20 +KPX Omacron Aring -20 +KPX Omacron Atilde -20 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -30 +KPX Omacron X -60 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -20 +KPX Oslash Aacute -20 +KPX Oslash Abreve -20 +KPX Oslash Acircumflex -20 +KPX Oslash Adieresis -20 +KPX Oslash Agrave -20 +KPX Oslash Amacron -20 +KPX Oslash Aogonek -20 +KPX Oslash Aring -20 +KPX Oslash Atilde -20 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -30 +KPX Oslash X -60 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -20 +KPX Otilde Aacute -20 +KPX Otilde Abreve -20 +KPX Otilde Acircumflex -20 +KPX Otilde Adieresis -20 +KPX Otilde Agrave -20 +KPX Otilde Amacron -20 +KPX Otilde Aogonek -20 +KPX Otilde Aring -20 +KPX Otilde Atilde -20 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -30 +KPX Otilde X -60 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -120 +KPX P Aacute -120 +KPX P Abreve -120 +KPX P Acircumflex -120 +KPX P Adieresis -120 +KPX P Agrave -120 +KPX P Amacron -120 +KPX P Aogonek -120 +KPX P Aring -120 +KPX P Atilde -120 +KPX P a -40 +KPX P aacute -40 +KPX P abreve -40 +KPX P acircumflex -40 +KPX P adieresis -40 +KPX P agrave -40 +KPX P amacron -40 +KPX P aogonek -40 +KPX P aring -40 +KPX P atilde -40 +KPX P comma -180 +KPX P e -50 +KPX P eacute -50 +KPX P ecaron -50 +KPX P ecircumflex -50 +KPX P edieresis -50 +KPX P edotaccent -50 +KPX P egrave -50 +KPX P emacron -50 +KPX P eogonek -50 +KPX P o -50 +KPX P oacute -50 +KPX P ocircumflex -50 +KPX P odieresis -50 +KPX P ograve -50 +KPX P ohungarumlaut -50 +KPX P omacron -50 +KPX P oslash -50 +KPX P otilde -50 +KPX P period -180 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -30 +KPX R Tcaron -30 +KPX R Tcommaaccent -30 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -50 +KPX R W -30 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -30 +KPX Racute Tcaron -30 +KPX Racute Tcommaaccent -30 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -50 +KPX Racute W -30 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -30 +KPX Rcaron Tcaron -30 +KPX Rcaron Tcommaaccent -30 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -50 +KPX Rcaron W -30 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -30 +KPX Rcommaaccent Tcaron -30 +KPX Rcommaaccent Tcommaaccent -30 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -30 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX S comma -20 +KPX S period -20 +KPX Sacute comma -20 +KPX Sacute period -20 +KPX Scaron comma -20 +KPX Scaron period -20 +KPX Scedilla comma -20 +KPX Scedilla period -20 +KPX Scommaaccent comma -20 +KPX Scommaaccent period -20 +KPX T A -120 +KPX T Aacute -120 +KPX T Abreve -120 +KPX T Acircumflex -120 +KPX T Adieresis -120 +KPX T Agrave -120 +KPX T Amacron -120 +KPX T Aogonek -120 +KPX T Aring -120 +KPX T Atilde -120 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -120 +KPX T aacute -120 +KPX T abreve -60 +KPX T acircumflex -120 +KPX T adieresis -120 +KPX T agrave -120 +KPX T amacron -60 +KPX T aogonek -120 +KPX T aring -120 +KPX T atilde -60 +KPX T colon -20 +KPX T comma -120 +KPX T e -120 +KPX T eacute -120 +KPX T ecaron -120 +KPX T ecircumflex -120 +KPX T edieresis -120 +KPX T edotaccent -120 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -120 +KPX T hyphen -140 +KPX T o -120 +KPX T oacute -120 +KPX T ocircumflex -120 +KPX T odieresis -120 +KPX T ograve -120 +KPX T ohungarumlaut -120 +KPX T omacron -60 +KPX T oslash -120 +KPX T otilde -60 +KPX T period -120 +KPX T r -120 +KPX T racute -120 +KPX T rcaron -120 +KPX T rcommaaccent -120 +KPX T semicolon -20 +KPX T u -120 +KPX T uacute -120 +KPX T ucircumflex -120 +KPX T udieresis -120 +KPX T ugrave -120 +KPX T uhungarumlaut -120 +KPX T umacron -60 +KPX T uogonek -120 +KPX T uring -120 +KPX T w -120 +KPX T y -120 +KPX T yacute -120 +KPX T ydieresis -60 +KPX Tcaron A -120 +KPX Tcaron Aacute -120 +KPX Tcaron Abreve -120 +KPX Tcaron Acircumflex -120 +KPX Tcaron Adieresis -120 +KPX Tcaron Agrave -120 +KPX Tcaron Amacron -120 +KPX Tcaron Aogonek -120 +KPX Tcaron Aring -120 +KPX Tcaron Atilde -120 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -120 +KPX Tcaron aacute -120 +KPX Tcaron abreve -60 +KPX Tcaron acircumflex -120 +KPX Tcaron adieresis -120 +KPX Tcaron agrave -120 +KPX Tcaron amacron -60 +KPX Tcaron aogonek -120 +KPX Tcaron aring -120 +KPX Tcaron atilde -60 +KPX Tcaron colon -20 +KPX Tcaron comma -120 +KPX Tcaron e -120 +KPX Tcaron eacute -120 +KPX Tcaron ecaron -120 +KPX Tcaron ecircumflex -120 +KPX Tcaron edieresis -120 +KPX Tcaron edotaccent -120 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -120 +KPX Tcaron hyphen -140 +KPX Tcaron o -120 +KPX Tcaron oacute -120 +KPX Tcaron ocircumflex -120 +KPX Tcaron odieresis -120 +KPX Tcaron ograve -120 +KPX Tcaron ohungarumlaut -120 +KPX Tcaron omacron -60 +KPX Tcaron oslash -120 +KPX Tcaron otilde -60 +KPX Tcaron period -120 +KPX Tcaron r -120 +KPX Tcaron racute -120 +KPX Tcaron rcaron -120 +KPX Tcaron rcommaaccent -120 +KPX Tcaron semicolon -20 +KPX Tcaron u -120 +KPX Tcaron uacute -120 +KPX Tcaron ucircumflex -120 +KPX Tcaron udieresis -120 +KPX Tcaron ugrave -120 +KPX Tcaron uhungarumlaut -120 +KPX Tcaron umacron -60 +KPX Tcaron uogonek -120 +KPX Tcaron uring -120 +KPX Tcaron w -120 +KPX Tcaron y -120 +KPX Tcaron yacute -120 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -120 +KPX Tcommaaccent Aacute -120 +KPX Tcommaaccent Abreve -120 +KPX Tcommaaccent Acircumflex -120 +KPX Tcommaaccent Adieresis -120 +KPX Tcommaaccent Agrave -120 +KPX Tcommaaccent Amacron -120 +KPX Tcommaaccent Aogonek -120 +KPX Tcommaaccent Aring -120 +KPX Tcommaaccent Atilde -120 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -120 +KPX Tcommaaccent aacute -120 +KPX Tcommaaccent abreve -60 +KPX Tcommaaccent acircumflex -120 +KPX Tcommaaccent adieresis -120 +KPX Tcommaaccent agrave -120 +KPX Tcommaaccent amacron -60 +KPX Tcommaaccent aogonek -120 +KPX Tcommaaccent aring -120 +KPX Tcommaaccent atilde -60 +KPX Tcommaaccent colon -20 +KPX Tcommaaccent comma -120 +KPX Tcommaaccent e -120 +KPX Tcommaaccent eacute -120 +KPX Tcommaaccent ecaron -120 +KPX Tcommaaccent ecircumflex -120 +KPX Tcommaaccent edieresis -120 +KPX Tcommaaccent edotaccent -120 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -120 +KPX Tcommaaccent hyphen -140 +KPX Tcommaaccent o -120 +KPX Tcommaaccent oacute -120 +KPX Tcommaaccent ocircumflex -120 +KPX Tcommaaccent odieresis -120 +KPX Tcommaaccent ograve -120 +KPX Tcommaaccent ohungarumlaut -120 +KPX Tcommaaccent omacron -60 +KPX Tcommaaccent oslash -120 +KPX Tcommaaccent otilde -60 +KPX Tcommaaccent period -120 +KPX Tcommaaccent r -120 +KPX Tcommaaccent racute -120 +KPX Tcommaaccent rcaron -120 +KPX Tcommaaccent rcommaaccent -120 +KPX Tcommaaccent semicolon -20 +KPX Tcommaaccent u -120 +KPX Tcommaaccent uacute -120 +KPX Tcommaaccent ucircumflex -120 +KPX Tcommaaccent udieresis -120 +KPX Tcommaaccent ugrave -120 +KPX Tcommaaccent uhungarumlaut -120 +KPX Tcommaaccent umacron -60 +KPX Tcommaaccent uogonek -120 +KPX Tcommaaccent uring -120 +KPX Tcommaaccent w -120 +KPX Tcommaaccent y -120 +KPX Tcommaaccent yacute -120 +KPX Tcommaaccent ydieresis -60 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -40 +KPX U period -40 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Uacute comma -40 +KPX Uacute period -40 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Ucircumflex comma -40 +KPX Ucircumflex period -40 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Udieresis comma -40 +KPX Udieresis period -40 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Ugrave comma -40 +KPX Ugrave period -40 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Uhungarumlaut comma -40 +KPX Uhungarumlaut period -40 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Umacron comma -40 +KPX Umacron period -40 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uogonek comma -40 +KPX Uogonek period -40 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX Uring comma -40 +KPX Uring period -40 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -40 +KPX V Gbreve -40 +KPX V Gcommaaccent -40 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Ohungarumlaut -40 +KPX V Omacron -40 +KPX V Oslash -40 +KPX V Otilde -40 +KPX V a -70 +KPX V aacute -70 +KPX V abreve -70 +KPX V acircumflex -70 +KPX V adieresis -70 +KPX V agrave -70 +KPX V amacron -70 +KPX V aogonek -70 +KPX V aring -70 +KPX V atilde -70 +KPX V colon -40 +KPX V comma -125 +KPX V e -80 +KPX V eacute -80 +KPX V ecaron -80 +KPX V ecircumflex -80 +KPX V edieresis -80 +KPX V edotaccent -80 +KPX V egrave -80 +KPX V emacron -80 +KPX V eogonek -80 +KPX V hyphen -80 +KPX V o -80 +KPX V oacute -80 +KPX V ocircumflex -80 +KPX V odieresis -80 +KPX V ograve -80 +KPX V ohungarumlaut -80 +KPX V omacron -80 +KPX V oslash -80 +KPX V otilde -80 +KPX V period -125 +KPX V semicolon -40 +KPX V u -70 +KPX V uacute -70 +KPX V ucircumflex -70 +KPX V udieresis -70 +KPX V ugrave -70 +KPX V uhungarumlaut -70 +KPX V umacron -70 +KPX V uogonek -70 +KPX V uring -70 +KPX W A -50 +KPX W Aacute -50 +KPX W Abreve -50 +KPX W Acircumflex -50 +KPX W Adieresis -50 +KPX W Agrave -50 +KPX W Amacron -50 +KPX W Aogonek -50 +KPX W Aring -50 +KPX W Atilde -50 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W comma -80 +KPX W e -30 +KPX W eacute -30 +KPX W ecaron -30 +KPX W ecircumflex -30 +KPX W edieresis -30 +KPX W edotaccent -30 +KPX W egrave -30 +KPX W emacron -30 +KPX W eogonek -30 +KPX W hyphen -40 +KPX W o -30 +KPX W oacute -30 +KPX W ocircumflex -30 +KPX W odieresis -30 +KPX W ograve -30 +KPX W ohungarumlaut -30 +KPX W omacron -30 +KPX W oslash -30 +KPX W otilde -30 +KPX W period -80 +KPX W u -30 +KPX W uacute -30 +KPX W ucircumflex -30 +KPX W udieresis -30 +KPX W ugrave -30 +KPX W uhungarumlaut -30 +KPX W umacron -30 +KPX W uogonek -30 +KPX W uring -30 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -85 +KPX Y Oacute -85 +KPX Y Ocircumflex -85 +KPX Y Odieresis -85 +KPX Y Ograve -85 +KPX Y Ohungarumlaut -85 +KPX Y Omacron -85 +KPX Y Oslash -85 +KPX Y Otilde -85 +KPX Y a -140 +KPX Y aacute -140 +KPX Y abreve -70 +KPX Y acircumflex -140 +KPX Y adieresis -140 +KPX Y agrave -140 +KPX Y amacron -70 +KPX Y aogonek -140 +KPX Y aring -140 +KPX Y atilde -140 +KPX Y colon -60 +KPX Y comma -140 +KPX Y e -140 +KPX Y eacute -140 +KPX Y ecaron -140 +KPX Y ecircumflex -140 +KPX Y edieresis -140 +KPX Y edotaccent -140 +KPX Y egrave -140 +KPX Y emacron -70 +KPX Y eogonek -140 +KPX Y hyphen -140 +KPX Y i -20 +KPX Y iacute -20 +KPX Y iogonek -20 +KPX Y o -140 +KPX Y oacute -140 +KPX Y ocircumflex -140 +KPX Y odieresis -140 +KPX Y ograve -140 +KPX Y ohungarumlaut -140 +KPX Y omacron -140 +KPX Y oslash -140 +KPX Y otilde -140 +KPX Y period -140 +KPX Y semicolon -60 +KPX Y u -110 +KPX Y uacute -110 +KPX Y ucircumflex -110 +KPX Y udieresis -110 +KPX Y ugrave -110 +KPX Y uhungarumlaut -110 +KPX Y umacron -110 +KPX Y uogonek -110 +KPX Y uring -110 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -85 +KPX Yacute Oacute -85 +KPX Yacute Ocircumflex -85 +KPX Yacute Odieresis -85 +KPX Yacute Ograve -85 +KPX Yacute Ohungarumlaut -85 +KPX Yacute Omacron -85 +KPX Yacute Oslash -85 +KPX Yacute Otilde -85 +KPX Yacute a -140 +KPX Yacute aacute -140 +KPX Yacute abreve -70 +KPX Yacute acircumflex -140 +KPX Yacute adieresis -140 +KPX Yacute agrave -140 +KPX Yacute amacron -70 +KPX Yacute aogonek -140 +KPX Yacute aring -140 +KPX Yacute atilde -70 +KPX Yacute colon -60 +KPX Yacute comma -140 +KPX Yacute e -140 +KPX Yacute eacute -140 +KPX Yacute ecaron -140 +KPX Yacute ecircumflex -140 +KPX Yacute edieresis -140 +KPX Yacute edotaccent -140 +KPX Yacute egrave -140 +KPX Yacute emacron -70 +KPX Yacute eogonek -140 +KPX Yacute hyphen -140 +KPX Yacute i -20 +KPX Yacute iacute -20 +KPX Yacute iogonek -20 +KPX Yacute o -140 +KPX Yacute oacute -140 +KPX Yacute ocircumflex -140 +KPX Yacute odieresis -140 +KPX Yacute ograve -140 +KPX Yacute ohungarumlaut -140 +KPX Yacute omacron -70 +KPX Yacute oslash -140 +KPX Yacute otilde -140 +KPX Yacute period -140 +KPX Yacute semicolon -60 +KPX Yacute u -110 +KPX Yacute uacute -110 +KPX Yacute ucircumflex -110 +KPX Yacute udieresis -110 +KPX Yacute ugrave -110 +KPX Yacute uhungarumlaut -110 +KPX Yacute umacron -110 +KPX Yacute uogonek -110 +KPX Yacute uring -110 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -85 +KPX Ydieresis Oacute -85 +KPX Ydieresis Ocircumflex -85 +KPX Ydieresis Odieresis -85 +KPX Ydieresis Ograve -85 +KPX Ydieresis Ohungarumlaut -85 +KPX Ydieresis Omacron -85 +KPX Ydieresis Oslash -85 +KPX Ydieresis Otilde -85 +KPX Ydieresis a -140 +KPX Ydieresis aacute -140 +KPX Ydieresis abreve -70 +KPX Ydieresis acircumflex -140 +KPX Ydieresis adieresis -140 +KPX Ydieresis agrave -140 +KPX Ydieresis amacron -70 +KPX Ydieresis aogonek -140 +KPX Ydieresis aring -140 +KPX Ydieresis atilde -70 +KPX Ydieresis colon -60 +KPX Ydieresis comma -140 +KPX Ydieresis e -140 +KPX Ydieresis eacute -140 +KPX Ydieresis ecaron -140 +KPX Ydieresis ecircumflex -140 +KPX Ydieresis edieresis -140 +KPX Ydieresis edotaccent -140 +KPX Ydieresis egrave -140 +KPX Ydieresis emacron -70 +KPX Ydieresis eogonek -140 +KPX Ydieresis hyphen -140 +KPX Ydieresis i -20 +KPX Ydieresis iacute -20 +KPX Ydieresis iogonek -20 +KPX Ydieresis o -140 +KPX Ydieresis oacute -140 +KPX Ydieresis ocircumflex -140 +KPX Ydieresis odieresis -140 +KPX Ydieresis ograve -140 +KPX Ydieresis ohungarumlaut -140 +KPX Ydieresis omacron -140 +KPX Ydieresis oslash -140 +KPX Ydieresis otilde -140 +KPX Ydieresis period -140 +KPX Ydieresis semicolon -60 +KPX Ydieresis u -110 +KPX Ydieresis uacute -110 +KPX Ydieresis ucircumflex -110 +KPX Ydieresis udieresis -110 +KPX Ydieresis ugrave -110 +KPX Ydieresis uhungarumlaut -110 +KPX Ydieresis umacron -110 +KPX Ydieresis uogonek -110 +KPX Ydieresis uring -110 +KPX a v -20 +KPX a w -20 +KPX a y -30 +KPX a yacute -30 +KPX a ydieresis -30 +KPX aacute v -20 +KPX aacute w -20 +KPX aacute y -30 +KPX aacute yacute -30 +KPX aacute ydieresis -30 +KPX abreve v -20 +KPX abreve w -20 +KPX abreve y -30 +KPX abreve yacute -30 +KPX abreve ydieresis -30 +KPX acircumflex v -20 +KPX acircumflex w -20 +KPX acircumflex y -30 +KPX acircumflex yacute -30 +KPX acircumflex ydieresis -30 +KPX adieresis v -20 +KPX adieresis w -20 +KPX adieresis y -30 +KPX adieresis yacute -30 +KPX adieresis ydieresis -30 +KPX agrave v -20 +KPX agrave w -20 +KPX agrave y -30 +KPX agrave yacute -30 +KPX agrave ydieresis -30 +KPX amacron v -20 +KPX amacron w -20 +KPX amacron y -30 +KPX amacron yacute -30 +KPX amacron ydieresis -30 +KPX aogonek v -20 +KPX aogonek w -20 +KPX aogonek y -30 +KPX aogonek yacute -30 +KPX aogonek ydieresis -30 +KPX aring v -20 +KPX aring w -20 +KPX aring y -30 +KPX aring yacute -30 +KPX aring ydieresis -30 +KPX atilde v -20 +KPX atilde w -20 +KPX atilde y -30 +KPX atilde yacute -30 +KPX atilde ydieresis -30 +KPX b b -10 +KPX b comma -40 +KPX b l -20 +KPX b lacute -20 +KPX b lcommaaccent -20 +KPX b lslash -20 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c comma -15 +KPX c k -20 +KPX c kcommaaccent -20 +KPX cacute comma -15 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX ccaron comma -15 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccedilla comma -15 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX colon space -50 +KPX comma quotedblright -100 +KPX comma quoteright -100 +KPX e comma -15 +KPX e period -15 +KPX e v -30 +KPX e w -20 +KPX e x -30 +KPX e y -20 +KPX e yacute -20 +KPX e ydieresis -20 +KPX eacute comma -15 +KPX eacute period -15 +KPX eacute v -30 +KPX eacute w -20 +KPX eacute x -30 +KPX eacute y -20 +KPX eacute yacute -20 +KPX eacute ydieresis -20 +KPX ecaron comma -15 +KPX ecaron period -15 +KPX ecaron v -30 +KPX ecaron w -20 +KPX ecaron x -30 +KPX ecaron y -20 +KPX ecaron yacute -20 +KPX ecaron ydieresis -20 +KPX ecircumflex comma -15 +KPX ecircumflex period -15 +KPX ecircumflex v -30 +KPX ecircumflex w -20 +KPX ecircumflex x -30 +KPX ecircumflex y -20 +KPX ecircumflex yacute -20 +KPX ecircumflex ydieresis -20 +KPX edieresis comma -15 +KPX edieresis period -15 +KPX edieresis v -30 +KPX edieresis w -20 +KPX edieresis x -30 +KPX edieresis y -20 +KPX edieresis yacute -20 +KPX edieresis ydieresis -20 +KPX edotaccent comma -15 +KPX edotaccent period -15 +KPX edotaccent v -30 +KPX edotaccent w -20 +KPX edotaccent x -30 +KPX edotaccent y -20 +KPX edotaccent yacute -20 +KPX edotaccent ydieresis -20 +KPX egrave comma -15 +KPX egrave period -15 +KPX egrave v -30 +KPX egrave w -20 +KPX egrave x -30 +KPX egrave y -20 +KPX egrave yacute -20 +KPX egrave ydieresis -20 +KPX emacron comma -15 +KPX emacron period -15 +KPX emacron v -30 +KPX emacron w -20 +KPX emacron x -30 +KPX emacron y -20 +KPX emacron yacute -20 +KPX emacron ydieresis -20 +KPX eogonek comma -15 +KPX eogonek period -15 +KPX eogonek v -30 +KPX eogonek w -20 +KPX eogonek x -30 +KPX eogonek y -20 +KPX eogonek yacute -20 +KPX eogonek ydieresis -20 +KPX f a -30 +KPX f aacute -30 +KPX f abreve -30 +KPX f acircumflex -30 +KPX f adieresis -30 +KPX f agrave -30 +KPX f amacron -30 +KPX f aogonek -30 +KPX f aring -30 +KPX f atilde -30 +KPX f comma -30 +KPX f dotlessi -28 +KPX f e -30 +KPX f eacute -30 +KPX f ecaron -30 +KPX f ecircumflex -30 +KPX f edieresis -30 +KPX f edotaccent -30 +KPX f egrave -30 +KPX f emacron -30 +KPX f eogonek -30 +KPX f o -30 +KPX f oacute -30 +KPX f ocircumflex -30 +KPX f odieresis -30 +KPX f ograve -30 +KPX f ohungarumlaut -30 +KPX f omacron -30 +KPX f oslash -30 +KPX f otilde -30 +KPX f period -30 +KPX f quotedblright 60 +KPX f quoteright 50 +KPX g r -10 +KPX g racute -10 +KPX g rcaron -10 +KPX g rcommaaccent -10 +KPX gbreve r -10 +KPX gbreve racute -10 +KPX gbreve rcaron -10 +KPX gbreve rcommaaccent -10 +KPX gcommaaccent r -10 +KPX gcommaaccent racute -10 +KPX gcommaaccent rcaron -10 +KPX gcommaaccent rcommaaccent -10 +KPX h y -30 +KPX h yacute -30 +KPX h ydieresis -30 +KPX k e -20 +KPX k eacute -20 +KPX k ecaron -20 +KPX k ecircumflex -20 +KPX k edieresis -20 +KPX k edotaccent -20 +KPX k egrave -20 +KPX k emacron -20 +KPX k eogonek -20 +KPX k o -20 +KPX k oacute -20 +KPX k ocircumflex -20 +KPX k odieresis -20 +KPX k ograve -20 +KPX k ohungarumlaut -20 +KPX k omacron -20 +KPX k oslash -20 +KPX k otilde -20 +KPX kcommaaccent e -20 +KPX kcommaaccent eacute -20 +KPX kcommaaccent ecaron -20 +KPX kcommaaccent ecircumflex -20 +KPX kcommaaccent edieresis -20 +KPX kcommaaccent edotaccent -20 +KPX kcommaaccent egrave -20 +KPX kcommaaccent emacron -20 +KPX kcommaaccent eogonek -20 +KPX kcommaaccent o -20 +KPX kcommaaccent oacute -20 +KPX kcommaaccent ocircumflex -20 +KPX kcommaaccent odieresis -20 +KPX kcommaaccent ograve -20 +KPX kcommaaccent ohungarumlaut -20 +KPX kcommaaccent omacron -20 +KPX kcommaaccent oslash -20 +KPX kcommaaccent otilde -20 +KPX m u -10 +KPX m uacute -10 +KPX m ucircumflex -10 +KPX m udieresis -10 +KPX m ugrave -10 +KPX m uhungarumlaut -10 +KPX m umacron -10 +KPX m uogonek -10 +KPX m uring -10 +KPX m y -15 +KPX m yacute -15 +KPX m ydieresis -15 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -20 +KPX n y -15 +KPX n yacute -15 +KPX n ydieresis -15 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -20 +KPX nacute y -15 +KPX nacute yacute -15 +KPX nacute ydieresis -15 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -20 +KPX ncaron y -15 +KPX ncaron yacute -15 +KPX ncaron ydieresis -15 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -20 +KPX ncommaaccent y -15 +KPX ncommaaccent yacute -15 +KPX ncommaaccent ydieresis -15 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -20 +KPX ntilde y -15 +KPX ntilde yacute -15 +KPX ntilde ydieresis -15 +KPX o comma -40 +KPX o period -40 +KPX o v -15 +KPX o w -15 +KPX o x -30 +KPX o y -30 +KPX o yacute -30 +KPX o ydieresis -30 +KPX oacute comma -40 +KPX oacute period -40 +KPX oacute v -15 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -30 +KPX oacute yacute -30 +KPX oacute ydieresis -30 +KPX ocircumflex comma -40 +KPX ocircumflex period -40 +KPX ocircumflex v -15 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -30 +KPX ocircumflex yacute -30 +KPX ocircumflex ydieresis -30 +KPX odieresis comma -40 +KPX odieresis period -40 +KPX odieresis v -15 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -30 +KPX odieresis yacute -30 +KPX odieresis ydieresis -30 +KPX ograve comma -40 +KPX ograve period -40 +KPX ograve v -15 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -30 +KPX ograve yacute -30 +KPX ograve ydieresis -30 +KPX ohungarumlaut comma -40 +KPX ohungarumlaut period -40 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -30 +KPX ohungarumlaut yacute -30 +KPX ohungarumlaut ydieresis -30 +KPX omacron comma -40 +KPX omacron period -40 +KPX omacron v -15 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -30 +KPX omacron yacute -30 +KPX omacron ydieresis -30 +KPX oslash a -55 +KPX oslash aacute -55 +KPX oslash abreve -55 +KPX oslash acircumflex -55 +KPX oslash adieresis -55 +KPX oslash agrave -55 +KPX oslash amacron -55 +KPX oslash aogonek -55 +KPX oslash aring -55 +KPX oslash atilde -55 +KPX oslash b -55 +KPX oslash c -55 +KPX oslash cacute -55 +KPX oslash ccaron -55 +KPX oslash ccedilla -55 +KPX oslash comma -95 +KPX oslash d -55 +KPX oslash dcroat -55 +KPX oslash e -55 +KPX oslash eacute -55 +KPX oslash ecaron -55 +KPX oslash ecircumflex -55 +KPX oslash edieresis -55 +KPX oslash edotaccent -55 +KPX oslash egrave -55 +KPX oslash emacron -55 +KPX oslash eogonek -55 +KPX oslash f -55 +KPX oslash g -55 +KPX oslash gbreve -55 +KPX oslash gcommaaccent -55 +KPX oslash h -55 +KPX oslash i -55 +KPX oslash iacute -55 +KPX oslash icircumflex -55 +KPX oslash idieresis -55 +KPX oslash igrave -55 +KPX oslash imacron -55 +KPX oslash iogonek -55 +KPX oslash j -55 +KPX oslash k -55 +KPX oslash kcommaaccent -55 +KPX oslash l -55 +KPX oslash lacute -55 +KPX oslash lcommaaccent -55 +KPX oslash lslash -55 +KPX oslash m -55 +KPX oslash n -55 +KPX oslash nacute -55 +KPX oslash ncaron -55 +KPX oslash ncommaaccent -55 +KPX oslash ntilde -55 +KPX oslash o -55 +KPX oslash oacute -55 +KPX oslash ocircumflex -55 +KPX oslash odieresis -55 +KPX oslash ograve -55 +KPX oslash ohungarumlaut -55 +KPX oslash omacron -55 +KPX oslash oslash -55 +KPX oslash otilde -55 +KPX oslash p -55 +KPX oslash period -95 +KPX oslash q -55 +KPX oslash r -55 +KPX oslash racute -55 +KPX oslash rcaron -55 +KPX oslash rcommaaccent -55 +KPX oslash s -55 +KPX oslash sacute -55 +KPX oslash scaron -55 +KPX oslash scedilla -55 +KPX oslash scommaaccent -55 +KPX oslash t -55 +KPX oslash tcommaaccent -55 +KPX oslash u -55 +KPX oslash uacute -55 +KPX oslash ucircumflex -55 +KPX oslash udieresis -55 +KPX oslash ugrave -55 +KPX oslash uhungarumlaut -55 +KPX oslash umacron -55 +KPX oslash uogonek -55 +KPX oslash uring -55 +KPX oslash v -70 +KPX oslash w -70 +KPX oslash x -85 +KPX oslash y -70 +KPX oslash yacute -70 +KPX oslash ydieresis -70 +KPX oslash z -55 +KPX oslash zacute -55 +KPX oslash zcaron -55 +KPX oslash zdotaccent -55 +KPX otilde comma -40 +KPX otilde period -40 +KPX otilde v -15 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -30 +KPX otilde yacute -30 +KPX otilde ydieresis -30 +KPX p comma -35 +KPX p period -35 +KPX p y -30 +KPX p yacute -30 +KPX p ydieresis -30 +KPX period quotedblright -100 +KPX period quoteright -100 +KPX period space -60 +KPX quotedblright space -40 +KPX quoteleft quoteleft -57 +KPX quoteright d -50 +KPX quoteright dcroat -50 +KPX quoteright quoteright -57 +KPX quoteright r -50 +KPX quoteright racute -50 +KPX quoteright rcaron -50 +KPX quoteright rcommaaccent -50 +KPX quoteright s -50 +KPX quoteright sacute -50 +KPX quoteright scaron -50 +KPX quoteright scedilla -50 +KPX quoteright scommaaccent -50 +KPX quoteright space -70 +KPX r a -10 +KPX r aacute -10 +KPX r abreve -10 +KPX r acircumflex -10 +KPX r adieresis -10 +KPX r agrave -10 +KPX r amacron -10 +KPX r aogonek -10 +KPX r aring -10 +KPX r atilde -10 +KPX r colon 30 +KPX r comma -50 +KPX r i 15 +KPX r iacute 15 +KPX r icircumflex 15 +KPX r idieresis 15 +KPX r igrave 15 +KPX r imacron 15 +KPX r iogonek 15 +KPX r k 15 +KPX r kcommaaccent 15 +KPX r l 15 +KPX r lacute 15 +KPX r lcommaaccent 15 +KPX r lslash 15 +KPX r m 25 +KPX r n 25 +KPX r nacute 25 +KPX r ncaron 25 +KPX r ncommaaccent 25 +KPX r ntilde 25 +KPX r p 30 +KPX r period -50 +KPX r semicolon 30 +KPX r t 40 +KPX r tcommaaccent 40 +KPX r u 15 +KPX r uacute 15 +KPX r ucircumflex 15 +KPX r udieresis 15 +KPX r ugrave 15 +KPX r uhungarumlaut 15 +KPX r umacron 15 +KPX r uogonek 15 +KPX r uring 15 +KPX r v 30 +KPX r y 30 +KPX r yacute 30 +KPX r ydieresis 30 +KPX racute a -10 +KPX racute aacute -10 +KPX racute abreve -10 +KPX racute acircumflex -10 +KPX racute adieresis -10 +KPX racute agrave -10 +KPX racute amacron -10 +KPX racute aogonek -10 +KPX racute aring -10 +KPX racute atilde -10 +KPX racute colon 30 +KPX racute comma -50 +KPX racute i 15 +KPX racute iacute 15 +KPX racute icircumflex 15 +KPX racute idieresis 15 +KPX racute igrave 15 +KPX racute imacron 15 +KPX racute iogonek 15 +KPX racute k 15 +KPX racute kcommaaccent 15 +KPX racute l 15 +KPX racute lacute 15 +KPX racute lcommaaccent 15 +KPX racute lslash 15 +KPX racute m 25 +KPX racute n 25 +KPX racute nacute 25 +KPX racute ncaron 25 +KPX racute ncommaaccent 25 +KPX racute ntilde 25 +KPX racute p 30 +KPX racute period -50 +KPX racute semicolon 30 +KPX racute t 40 +KPX racute tcommaaccent 40 +KPX racute u 15 +KPX racute uacute 15 +KPX racute ucircumflex 15 +KPX racute udieresis 15 +KPX racute ugrave 15 +KPX racute uhungarumlaut 15 +KPX racute umacron 15 +KPX racute uogonek 15 +KPX racute uring 15 +KPX racute v 30 +KPX racute y 30 +KPX racute yacute 30 +KPX racute ydieresis 30 +KPX rcaron a -10 +KPX rcaron aacute -10 +KPX rcaron abreve -10 +KPX rcaron acircumflex -10 +KPX rcaron adieresis -10 +KPX rcaron agrave -10 +KPX rcaron amacron -10 +KPX rcaron aogonek -10 +KPX rcaron aring -10 +KPX rcaron atilde -10 +KPX rcaron colon 30 +KPX rcaron comma -50 +KPX rcaron i 15 +KPX rcaron iacute 15 +KPX rcaron icircumflex 15 +KPX rcaron idieresis 15 +KPX rcaron igrave 15 +KPX rcaron imacron 15 +KPX rcaron iogonek 15 +KPX rcaron k 15 +KPX rcaron kcommaaccent 15 +KPX rcaron l 15 +KPX rcaron lacute 15 +KPX rcaron lcommaaccent 15 +KPX rcaron lslash 15 +KPX rcaron m 25 +KPX rcaron n 25 +KPX rcaron nacute 25 +KPX rcaron ncaron 25 +KPX rcaron ncommaaccent 25 +KPX rcaron ntilde 25 +KPX rcaron p 30 +KPX rcaron period -50 +KPX rcaron semicolon 30 +KPX rcaron t 40 +KPX rcaron tcommaaccent 40 +KPX rcaron u 15 +KPX rcaron uacute 15 +KPX rcaron ucircumflex 15 +KPX rcaron udieresis 15 +KPX rcaron ugrave 15 +KPX rcaron uhungarumlaut 15 +KPX rcaron umacron 15 +KPX rcaron uogonek 15 +KPX rcaron uring 15 +KPX rcaron v 30 +KPX rcaron y 30 +KPX rcaron yacute 30 +KPX rcaron ydieresis 30 +KPX rcommaaccent a -10 +KPX rcommaaccent aacute -10 +KPX rcommaaccent abreve -10 +KPX rcommaaccent acircumflex -10 +KPX rcommaaccent adieresis -10 +KPX rcommaaccent agrave -10 +KPX rcommaaccent amacron -10 +KPX rcommaaccent aogonek -10 +KPX rcommaaccent aring -10 +KPX rcommaaccent atilde -10 +KPX rcommaaccent colon 30 +KPX rcommaaccent comma -50 +KPX rcommaaccent i 15 +KPX rcommaaccent iacute 15 +KPX rcommaaccent icircumflex 15 +KPX rcommaaccent idieresis 15 +KPX rcommaaccent igrave 15 +KPX rcommaaccent imacron 15 +KPX rcommaaccent iogonek 15 +KPX rcommaaccent k 15 +KPX rcommaaccent kcommaaccent 15 +KPX rcommaaccent l 15 +KPX rcommaaccent lacute 15 +KPX rcommaaccent lcommaaccent 15 +KPX rcommaaccent lslash 15 +KPX rcommaaccent m 25 +KPX rcommaaccent n 25 +KPX rcommaaccent nacute 25 +KPX rcommaaccent ncaron 25 +KPX rcommaaccent ncommaaccent 25 +KPX rcommaaccent ntilde 25 +KPX rcommaaccent p 30 +KPX rcommaaccent period -50 +KPX rcommaaccent semicolon 30 +KPX rcommaaccent t 40 +KPX rcommaaccent tcommaaccent 40 +KPX rcommaaccent u 15 +KPX rcommaaccent uacute 15 +KPX rcommaaccent ucircumflex 15 +KPX rcommaaccent udieresis 15 +KPX rcommaaccent ugrave 15 +KPX rcommaaccent uhungarumlaut 15 +KPX rcommaaccent umacron 15 +KPX rcommaaccent uogonek 15 +KPX rcommaaccent uring 15 +KPX rcommaaccent v 30 +KPX rcommaaccent y 30 +KPX rcommaaccent yacute 30 +KPX rcommaaccent ydieresis 30 +KPX s comma -15 +KPX s period -15 +KPX s w -30 +KPX sacute comma -15 +KPX sacute period -15 +KPX sacute w -30 +KPX scaron comma -15 +KPX scaron period -15 +KPX scaron w -30 +KPX scedilla comma -15 +KPX scedilla period -15 +KPX scedilla w -30 +KPX scommaaccent comma -15 +KPX scommaaccent period -15 +KPX scommaaccent w -30 +KPX semicolon space -50 +KPX space T -50 +KPX space Tcaron -50 +KPX space Tcommaaccent -50 +KPX space V -50 +KPX space W -40 +KPX space Y -90 +KPX space Yacute -90 +KPX space Ydieresis -90 +KPX space quotedblleft -30 +KPX space quoteleft -60 +KPX v a -25 +KPX v aacute -25 +KPX v abreve -25 +KPX v acircumflex -25 +KPX v adieresis -25 +KPX v agrave -25 +KPX v amacron -25 +KPX v aogonek -25 +KPX v aring -25 +KPX v atilde -25 +KPX v comma -80 +KPX v e -25 +KPX v eacute -25 +KPX v ecaron -25 +KPX v ecircumflex -25 +KPX v edieresis -25 +KPX v edotaccent -25 +KPX v egrave -25 +KPX v emacron -25 +KPX v eogonek -25 +KPX v o -25 +KPX v oacute -25 +KPX v ocircumflex -25 +KPX v odieresis -25 +KPX v ograve -25 +KPX v ohungarumlaut -25 +KPX v omacron -25 +KPX v oslash -25 +KPX v otilde -25 +KPX v period -80 +KPX w a -15 +KPX w aacute -15 +KPX w abreve -15 +KPX w acircumflex -15 +KPX w adieresis -15 +KPX w agrave -15 +KPX w amacron -15 +KPX w aogonek -15 +KPX w aring -15 +KPX w atilde -15 +KPX w comma -60 +KPX w e -10 +KPX w eacute -10 +KPX w ecaron -10 +KPX w ecircumflex -10 +KPX w edieresis -10 +KPX w edotaccent -10 +KPX w egrave -10 +KPX w emacron -10 +KPX w eogonek -10 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -60 +KPX x e -30 +KPX x eacute -30 +KPX x ecaron -30 +KPX x ecircumflex -30 +KPX x edieresis -30 +KPX x edotaccent -30 +KPX x egrave -30 +KPX x emacron -30 +KPX x eogonek -30 +KPX y a -20 +KPX y aacute -20 +KPX y abreve -20 +KPX y acircumflex -20 +KPX y adieresis -20 +KPX y agrave -20 +KPX y amacron -20 +KPX y aogonek -20 +KPX y aring -20 +KPX y atilde -20 +KPX y comma -100 +KPX y e -20 +KPX y eacute -20 +KPX y ecaron -20 +KPX y ecircumflex -20 +KPX y edieresis -20 +KPX y edotaccent -20 +KPX y egrave -20 +KPX y emacron -20 +KPX y eogonek -20 +KPX y o -20 +KPX y oacute -20 +KPX y ocircumflex -20 +KPX y odieresis -20 +KPX y ograve -20 +KPX y ohungarumlaut -20 +KPX y omacron -20 +KPX y oslash -20 +KPX y otilde -20 +KPX y period -100 +KPX yacute a -20 +KPX yacute aacute -20 +KPX yacute abreve -20 +KPX yacute acircumflex -20 +KPX yacute adieresis -20 +KPX yacute agrave -20 +KPX yacute amacron -20 +KPX yacute aogonek -20 +KPX yacute aring -20 +KPX yacute atilde -20 +KPX yacute comma -100 +KPX yacute e -20 +KPX yacute eacute -20 +KPX yacute ecaron -20 +KPX yacute ecircumflex -20 +KPX yacute edieresis -20 +KPX yacute edotaccent -20 +KPX yacute egrave -20 +KPX yacute emacron -20 +KPX yacute eogonek -20 +KPX yacute o -20 +KPX yacute oacute -20 +KPX yacute ocircumflex -20 +KPX yacute odieresis -20 +KPX yacute ograve -20 +KPX yacute ohungarumlaut -20 +KPX yacute omacron -20 +KPX yacute oslash -20 +KPX yacute otilde -20 +KPX yacute period -100 +KPX ydieresis a -20 +KPX ydieresis aacute -20 +KPX ydieresis abreve -20 +KPX ydieresis acircumflex -20 +KPX ydieresis adieresis -20 +KPX ydieresis agrave -20 +KPX ydieresis amacron -20 +KPX ydieresis aogonek -20 +KPX ydieresis aring -20 +KPX ydieresis atilde -20 +KPX ydieresis comma -100 +KPX ydieresis e -20 +KPX ydieresis eacute -20 +KPX ydieresis ecaron -20 +KPX ydieresis ecircumflex -20 +KPX ydieresis edieresis -20 +KPX ydieresis edotaccent -20 +KPX ydieresis egrave -20 +KPX ydieresis emacron -20 +KPX ydieresis eogonek -20 +KPX ydieresis o -20 +KPX ydieresis oacute -20 +KPX ydieresis ocircumflex -20 +KPX ydieresis odieresis -20 +KPX ydieresis ograve -20 +KPX ydieresis ohungarumlaut -20 +KPX ydieresis omacron -20 +KPX ydieresis oslash -20 +KPX ydieresis otilde -20 +KPX ydieresis period -100 +KPX z e -15 +KPX z eacute -15 +KPX z ecaron -15 +KPX z ecircumflex -15 +KPX z edieresis -15 +KPX z edotaccent -15 +KPX z egrave -15 +KPX z emacron -15 +KPX z eogonek -15 +KPX z o -15 +KPX z oacute -15 +KPX z ocircumflex -15 +KPX z odieresis -15 +KPX z ograve -15 +KPX z ohungarumlaut -15 +KPX z omacron -15 +KPX z oslash -15 +KPX z otilde -15 +KPX zacute e -15 +KPX zacute eacute -15 +KPX zacute ecaron -15 +KPX zacute ecircumflex -15 +KPX zacute edieresis -15 +KPX zacute edotaccent -15 +KPX zacute egrave -15 +KPX zacute emacron -15 +KPX zacute eogonek -15 +KPX zacute o -15 +KPX zacute oacute -15 +KPX zacute ocircumflex -15 +KPX zacute odieresis -15 +KPX zacute ograve -15 +KPX zacute ohungarumlaut -15 +KPX zacute omacron -15 +KPX zacute oslash -15 +KPX zacute otilde -15 +KPX zcaron e -15 +KPX zcaron eacute -15 +KPX zcaron ecaron -15 +KPX zcaron ecircumflex -15 +KPX zcaron edieresis -15 +KPX zcaron edotaccent -15 +KPX zcaron egrave -15 +KPX zcaron emacron -15 +KPX zcaron eogonek -15 +KPX zcaron o -15 +KPX zcaron oacute -15 +KPX zcaron ocircumflex -15 +KPX zcaron odieresis -15 +KPX zcaron ograve -15 +KPX zcaron ohungarumlaut -15 +KPX zcaron omacron -15 +KPX zcaron oslash -15 +KPX zcaron otilde -15 +KPX zdotaccent e -15 +KPX zdotaccent eacute -15 +KPX zdotaccent ecaron -15 +KPX zdotaccent ecircumflex -15 +KPX zdotaccent edieresis -15 +KPX zdotaccent edotaccent -15 +KPX zdotaccent egrave -15 +KPX zdotaccent emacron -15 +KPX zdotaccent eogonek -15 +KPX zdotaccent o -15 +KPX zdotaccent oacute -15 +KPX zdotaccent ocircumflex -15 +KPX zdotaccent odieresis -15 +KPX zdotaccent ograve -15 +KPX zdotaccent ohungarumlaut -15 +KPX zdotaccent omacron -15 +KPX zdotaccent oslash -15 +KPX zdotaccent otilde -15 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/MustRead.html b/internal/pdf/model/fonts/afms/MustRead.html new file mode 100644 index 0000000..d4d7e8a --- /dev/null +++ b/internal/pdf/model/fonts/afms/MustRead.html @@ -0,0 +1 @@ + Core 14 AFM Files - ReadMe or
This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. Col
\ No newline at end of file diff --git a/internal/pdf/model/fonts/afms/Symbol.afm b/internal/pdf/model/fonts/afms/Symbol.afm new file mode 100644 index 0000000..524cfb6 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Symbol.afm @@ -0,0 +1,213 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved. +Comment Creation Date: Thu May 1 15:12:25 1997 +Comment UniqueID 43064 +Comment VMusage 30820 39997 +FontName Symbol +FullName Symbol +FamilyName Symbol +Weight Medium +ItalicAngle 0 +IsFixedPitch false +CharacterSet Special +FontBBox -180 -293 1090 1010 +UnderlinePosition -100 +UnderlineThickness 50 +Version 001.008 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved. +EncodingScheme FontSpecific +StdHW 92 +StdVW 85 +StartCharMetrics 190 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ; +C 34 ; WX 713 ; N universal ; B 31 0 681 705 ; +C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ; +C 36 ; WX 549 ; N existential ; B 25 0 478 707 ; +C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ; +C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ; +C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ; +C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ; +C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ; +C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ; +C 43 ; WX 549 ; N plus ; B 10 0 539 533 ; +C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ; +C 45 ; WX 549 ; N minus ; B 11 233 535 288 ; +C 46 ; WX 250 ; N period ; B 69 -17 181 95 ; +C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ; +C 48 ; WX 500 ; N zero ; B 24 -14 476 685 ; +C 49 ; WX 500 ; N one ; B 117 0 390 673 ; +C 50 ; WX 500 ; N two ; B 25 0 475 685 ; +C 51 ; WX 500 ; N three ; B 43 -14 435 685 ; +C 52 ; WX 500 ; N four ; B 15 0 469 685 ; +C 53 ; WX 500 ; N five ; B 32 -14 445 690 ; +C 54 ; WX 500 ; N six ; B 34 -14 468 685 ; +C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ; +C 56 ; WX 500 ; N eight ; B 56 -14 445 685 ; +C 57 ; WX 500 ; N nine ; B 30 -18 459 685 ; +C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ; +C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ; +C 60 ; WX 549 ; N less ; B 26 0 523 522 ; +C 61 ; WX 549 ; N equal ; B 11 141 537 390 ; +C 62 ; WX 549 ; N greater ; B 26 0 523 522 ; +C 63 ; WX 444 ; N question ; B 70 -17 412 686 ; +C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ; +C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ; +C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ; +C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ; +C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ; +C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ; +C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ; +C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ; +C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ; +C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ; +C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ; +C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ; +C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ; +C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ; +C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ; +C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ; +C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ; +C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ; +C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ; +C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ; +C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ; +C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ; +C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ; +C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ; +C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ; +C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ; +C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ; +C 92 ; WX 863 ; N therefore ; B 163 0 701 487 ; +C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ; +C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ; +C 95 ; WX 500 ; N underscore ; B -2 -125 502 -75 ; +C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ; +C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ; +C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ; +C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ; +C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ; +C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ; +C 102 ; WX 521 ; N phi ; B 28 -224 492 673 ; +C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ; +C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ; +C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ; +C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ; +C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ; +C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ; +C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ; +C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ; +C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ; +C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ; +C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ; +C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ; +C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ; +C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ; +C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ; +C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ; +C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ; +C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ; +C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ; +C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ; +C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ; +C 124 ; WX 200 ; N bar ; B 65 -293 135 707 ; +C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ; +C 126 ; WX 549 ; N similar ; B 17 203 529 307 ; +C 160 ; WX 750 ; N Euro ; B 20 -12 714 685 ; +C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ; +C 162 ; WX 247 ; N minute ; B 27 459 228 735 ; +C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ; +C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ; +C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ; +C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ; +C 167 ; WX 753 ; N club ; B 86 -26 660 533 ; +C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ; +C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ; +C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ; +C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ; +C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ; +C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ; +C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ; +C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ; +C 176 ; WX 400 ; N degree ; B 50 385 350 685 ; +C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ; +C 178 ; WX 411 ; N second ; B 20 459 413 737 ; +C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; +C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ; +C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ; +C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ; +C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ; +C 184 ; WX 549 ; N divide ; B 10 71 536 456 ; +C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ; +C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ; +C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ; +C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ; +C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ; +C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ; +C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ; +C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ; +C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ; +C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ; +C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ; +C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ; +C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ; +C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ; +C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ; +C 200 ; WX 768 ; N union ; B 40 -17 732 492 ; +C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ; +C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ; +C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ; +C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ; +C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ; +C 206 ; WX 713 ; N element ; B 45 0 505 468 ; +C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ; +C 208 ; WX 768 ; N angle ; B 26 0 738 673 ; +C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ; +C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ; +C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ; +C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ; +C 213 ; WX 823 ; N product ; B 25 -101 803 751 ; +C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ; +C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ; +C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ; +C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ; +C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ; +C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ; +C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ; +C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ; +C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ; +C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ; +C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ; +C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ; +C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ; +C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ; +C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ; +C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ; +C 230 ; WX 384 ; N parenlefttp ; B 24 -293 436 926 ; +C 231 ; WX 384 ; N parenleftex ; B 24 -85 108 925 ; +C 232 ; WX 384 ; N parenleftbt ; B 24 -293 436 926 ; +C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 349 926 ; +C 234 ; WX 384 ; N bracketleftex ; B 0 -79 77 925 ; +C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 349 926 ; +C 236 ; WX 494 ; N bracelefttp ; B 209 -85 445 925 ; +C 237 ; WX 494 ; N braceleftmid ; B 20 -85 284 935 ; +C 238 ; WX 494 ; N braceleftbt ; B 209 -75 445 935 ; +C 239 ; WX 494 ; N braceex ; B 209 -85 284 935 ; +C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ; +C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ; +C 243 ; WX 686 ; N integraltp ; B 308 -88 675 920 ; +C 244 ; WX 686 ; N integralex ; B 308 -88 378 975 ; +C 245 ; WX 686 ; N integralbt ; B 11 -87 378 921 ; +C 246 ; WX 384 ; N parenrighttp ; B 54 -293 466 926 ; +C 247 ; WX 384 ; N parenrightex ; B 382 -85 466 925 ; +C 248 ; WX 384 ; N parenrightbt ; B 54 -293 466 926 ; +C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 371 926 ; +C 250 ; WX 384 ; N bracketrightex ; B 294 -79 371 925 ; +C 251 ; WX 384 ; N bracketrightbt ; B 22 -80 371 926 ; +C 252 ; WX 494 ; N bracerighttp ; B 48 -85 284 925 ; +C 253 ; WX 494 ; N bracerightmid ; B 209 -85 473 935 ; +C 254 ; WX 494 ; N bracerightbt ; B 48 -75 284 935 ; +C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ; +EndCharMetrics +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Times-Bold.afm b/internal/pdf/model/fonts/afms/Times-Bold.afm new file mode 100644 index 0000000..ee718a2 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Times-Bold.afm @@ -0,0 +1,2588 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:52:56 1997 +Comment UniqueID 43065 +Comment VMusage 41636 52661 +FontName Times-Bold +FullName Times Bold +FamilyName Times +Weight Bold +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -168 -218 1000 935 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 676 +XHeight 461 +Ascender 683 +Descender -217 +StdHW 44 +StdVW 139 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ; +C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ; +C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ; +C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ; +C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ; +C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ; +C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ; +C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ; +C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ; +C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ; +C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; +C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ; +C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ; +C 46 ; WX 250 ; N period ; B 41 -13 210 156 ; +C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ; +C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ; +C 49 ; WX 500 ; N one ; B 65 0 442 688 ; +C 50 ; WX 500 ; N two ; B 17 0 478 688 ; +C 51 ; WX 500 ; N three ; B 16 -14 468 688 ; +C 52 ; WX 500 ; N four ; B 19 0 475 688 ; +C 53 ; WX 500 ; N five ; B 22 -8 470 676 ; +C 54 ; WX 500 ; N six ; B 28 -13 475 688 ; +C 55 ; WX 500 ; N seven ; B 17 0 477 676 ; +C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ; +C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ; +C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ; +C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ; +C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; +C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; +C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; +C 63 ; WX 500 ; N question ; B 57 -13 445 689 ; +C 64 ; WX 930 ; N at ; B 108 -19 822 691 ; +C 65 ; WX 722 ; N A ; B 9 0 689 690 ; +C 66 ; WX 667 ; N B ; B 16 0 619 676 ; +C 67 ; WX 722 ; N C ; B 49 -19 687 691 ; +C 68 ; WX 722 ; N D ; B 14 0 690 676 ; +C 69 ; WX 667 ; N E ; B 16 0 641 676 ; +C 70 ; WX 611 ; N F ; B 16 0 583 676 ; +C 71 ; WX 778 ; N G ; B 37 -19 755 691 ; +C 72 ; WX 778 ; N H ; B 21 0 759 676 ; +C 73 ; WX 389 ; N I ; B 20 0 370 676 ; +C 74 ; WX 500 ; N J ; B 3 -96 479 676 ; +C 75 ; WX 778 ; N K ; B 30 0 769 676 ; +C 76 ; WX 667 ; N L ; B 19 0 638 676 ; +C 77 ; WX 944 ; N M ; B 14 0 921 676 ; +C 78 ; WX 722 ; N N ; B 16 -18 701 676 ; +C 79 ; WX 778 ; N O ; B 35 -19 743 691 ; +C 80 ; WX 611 ; N P ; B 16 0 600 676 ; +C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ; +C 82 ; WX 722 ; N R ; B 26 0 715 676 ; +C 83 ; WX 556 ; N S ; B 35 -19 513 692 ; +C 84 ; WX 667 ; N T ; B 31 0 636 676 ; +C 85 ; WX 722 ; N U ; B 16 -19 701 676 ; +C 86 ; WX 722 ; N V ; B 16 -18 701 676 ; +C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ; +C 88 ; WX 722 ; N X ; B 16 0 699 676 ; +C 89 ; WX 722 ; N Y ; B 15 0 699 676 ; +C 90 ; WX 667 ; N Z ; B 28 0 634 676 ; +C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ; +C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ; +C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ; +C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ; +C 97 ; WX 500 ; N a ; B 25 -14 488 473 ; +C 98 ; WX 556 ; N b ; B 17 -14 521 676 ; +C 99 ; WX 444 ; N c ; B 25 -14 430 473 ; +C 100 ; WX 556 ; N d ; B 25 -14 534 676 ; +C 101 ; WX 444 ; N e ; B 25 -14 426 473 ; +C 102 ; WX 333 ; N f ; B 14 0 389 691 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B 28 -206 483 473 ; +C 104 ; WX 556 ; N h ; B 16 0 534 676 ; +C 105 ; WX 278 ; N i ; B 16 0 255 691 ; +C 106 ; WX 333 ; N j ; B -57 -203 263 691 ; +C 107 ; WX 556 ; N k ; B 22 0 543 676 ; +C 108 ; WX 278 ; N l ; B 16 0 255 676 ; +C 109 ; WX 833 ; N m ; B 16 0 814 473 ; +C 110 ; WX 556 ; N n ; B 21 0 539 473 ; +C 111 ; WX 500 ; N o ; B 25 -14 476 473 ; +C 112 ; WX 556 ; N p ; B 19 -205 524 473 ; +C 113 ; WX 556 ; N q ; B 34 -205 536 473 ; +C 114 ; WX 444 ; N r ; B 29 0 434 473 ; +C 115 ; WX 389 ; N s ; B 25 -14 361 473 ; +C 116 ; WX 333 ; N t ; B 20 -12 332 630 ; +C 117 ; WX 556 ; N u ; B 16 -14 537 461 ; +C 118 ; WX 500 ; N v ; B 21 -14 485 461 ; +C 119 ; WX 722 ; N w ; B 23 -14 707 461 ; +C 120 ; WX 500 ; N x ; B 12 0 484 461 ; +C 121 ; WX 500 ; N y ; B 16 -205 480 461 ; +C 122 ; WX 444 ; N z ; B 21 0 420 461 ; +C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ; +C 124 ; WX 220 ; N bar ; B 66 -218 154 782 ; +C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ; +C 126 ; WX 520 ; N asciitilde ; B 29 173 491 333 ; +C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ; +C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ; +C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ; +C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ; +C 165 ; WX 500 ; N yen ; B -64 0 547 676 ; +C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ; +C 167 ; WX 500 ; N section ; B 57 -132 443 691 ; +C 168 ; WX 500 ; N currency ; B -26 61 526 613 ; +C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ; +C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ; +C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ; +C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ; +C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ; +C 174 ; WX 556 ; N fi ; B 14 0 536 691 ; +C 175 ; WX 556 ; N fl ; B 14 0 536 691 ; +C 177 ; WX 500 ; N endash ; B 0 181 500 271 ; +C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ; +C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ; +C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ; +C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ; +C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ; +C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ; +C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ; +C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ; +C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ; +C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ; +C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ; +C 193 ; WX 333 ; N grave ; B 8 528 246 713 ; +C 194 ; WX 333 ; N acute ; B 86 528 324 713 ; +C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ; +C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ; +C 197 ; WX 333 ; N macron ; B 1 565 331 637 ; +C 198 ; WX 333 ; N breve ; B 15 528 318 691 ; +C 199 ; WX 333 ; N dotaccent ; B 103 536 258 691 ; +C 200 ; WX 333 ; N dieresis ; B -2 537 335 667 ; +C 202 ; WX 333 ; N ring ; B 60 527 273 740 ; +C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ; +C 206 ; WX 333 ; N ogonek ; B 90 -193 319 24 ; +C 207 ; WX 333 ; N caron ; B -2 528 335 704 ; +C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ; +C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ; +C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ; +C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ; +C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ; +C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ; +C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ; +C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ; +C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ; +C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ; +C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ; +C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ; +C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ; +C -1 ; WX 389 ; N Idieresis ; B 20 0 370 877 ; +C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; +C -1 ; WX 500 ; N abreve ; B 25 -14 488 691 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 16 -14 557 713 ; +C -1 ; WX 444 ; N ecaron ; B 25 -14 426 704 ; +C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 877 ; +C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ; +C -1 ; WX 722 ; N Yacute ; B 15 0 699 923 ; +C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ; +C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; +C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; +C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; +C -1 ; WX 389 ; N scommaaccent ; B 25 -218 361 473 ; +C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; +C -1 ; WX 722 ; N Uring ; B 16 -19 701 935 ; +C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 877 ; +C -1 ; WX 500 ; N aogonek ; B 25 -193 504 473 ; +C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; +C -1 ; WX 556 ; N uogonek ; B 16 -193 539 461 ; +C -1 ; WX 667 ; N Edieresis ; B 16 0 641 877 ; +C -1 ; WX 722 ; N Dcroat ; B 6 0 690 676 ; +C -1 ; WX 250 ; N commaaccent ; B 47 -218 203 -50 ; +C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ; +C -1 ; WX 667 ; N Emacron ; B 16 0 641 847 ; +C -1 ; WX 444 ; N ccaron ; B 25 -14 430 704 ; +C -1 ; WX 500 ; N aring ; B 25 -14 488 740 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 16 -188 701 676 ; +C -1 ; WX 278 ; N lacute ; B 16 0 297 923 ; +C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; +C -1 ; WX 667 ; N Tcommaaccent ; B 31 -218 636 676 ; +C -1 ; WX 722 ; N Cacute ; B 49 -19 687 923 ; +C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; +C -1 ; WX 667 ; N Edotaccent ; B 16 0 641 901 ; +C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; +C -1 ; WX 389 ; N scedilla ; B 25 -218 361 473 ; +C -1 ; WX 278 ; N iacute ; B 16 0 289 713 ; +C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; +C -1 ; WX 722 ; N Rcaron ; B 26 0 715 914 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 37 -218 755 691 ; +C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; +C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; +C -1 ; WX 722 ; N Amacron ; B 9 0 689 847 ; +C -1 ; WX 444 ; N rcaron ; B 29 0 434 704 ; +C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; +C -1 ; WX 667 ; N Zdotaccent ; B 28 0 634 901 ; +C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; +C -1 ; WX 778 ; N Omacron ; B 35 -19 743 847 ; +C -1 ; WX 722 ; N Racute ; B 26 0 715 923 ; +C -1 ; WX 556 ; N Sacute ; B 35 -19 513 923 ; +C -1 ; WX 672 ; N dcaron ; B 25 -14 681 682 ; +C -1 ; WX 722 ; N Umacron ; B 16 -19 701 847 ; +C -1 ; WX 556 ; N uring ; B 16 -14 537 740 ; +C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; +C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ; +C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ; +C -1 ; WX 722 ; N Abreve ; B 9 0 689 901 ; +C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; +C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; +C -1 ; WX 667 ; N Tcaron ; B 31 0 636 914 ; +C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; +C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 667 ; +C -1 ; WX 722 ; N Nacute ; B 16 -18 701 923 ; +C -1 ; WX 278 ; N icircumflex ; B -37 0 300 704 ; +C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ; +C -1 ; WX 500 ; N adieresis ; B 25 -14 488 667 ; +C -1 ; WX 444 ; N edieresis ; B 25 -14 426 667 ; +C -1 ; WX 444 ; N cacute ; B 25 -14 430 713 ; +C -1 ; WX 556 ; N nacute ; B 21 0 539 713 ; +C -1 ; WX 556 ; N umacron ; B 16 -14 537 637 ; +C -1 ; WX 722 ; N Ncaron ; B 16 -18 701 914 ; +C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ; +C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; +C -1 ; WX 220 ; N brokenbar ; B 66 -143 154 707 ; +C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ; +C -1 ; WX 778 ; N Gbreve ; B 37 -19 755 901 ; +C -1 ; WX 389 ; N Idotaccent ; B 20 0 370 901 ; +C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; +C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; +C -1 ; WX 444 ; N racute ; B 29 0 434 713 ; +C -1 ; WX 500 ; N omacron ; B 25 -14 476 637 ; +C -1 ; WX 667 ; N Zacute ; B 28 0 634 923 ; +C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; +C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; +C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; +C -1 ; WX 278 ; N lcommaaccent ; B 16 -218 255 676 ; +C -1 ; WX 416 ; N tcaron ; B 20 -12 425 815 ; +C -1 ; WX 444 ; N eogonek ; B 25 -193 426 473 ; +C -1 ; WX 722 ; N Uogonek ; B 16 -193 701 676 ; +C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ; +C -1 ; WX 722 ; N Adieresis ; B 9 0 689 877 ; +C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; +C -1 ; WX 444 ; N zacute ; B 21 0 420 713 ; +C -1 ; WX 278 ; N iogonek ; B 16 -193 274 691 ; +C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; +C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; +C -1 ; WX 500 ; N amacron ; B 25 -14 488 637 ; +C -1 ; WX 389 ; N sacute ; B 25 -14 361 713 ; +C -1 ; WX 278 ; N idieresis ; B -37 0 300 667 ; +C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; +C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; +C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; +C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 877 ; +C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ; +C -1 ; WX 278 ; N igrave ; B -27 0 255 713 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 25 -14 529 713 ; +C -1 ; WX 667 ; N Eogonek ; B 16 -193 644 676 ; +C -1 ; WX 556 ; N dcroat ; B 25 -14 534 676 ; +C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ; +C -1 ; WX 556 ; N Scedilla ; B 35 -218 513 692 ; +C -1 ; WX 394 ; N lcaron ; B 16 0 412 682 ; +C -1 ; WX 778 ; N Kcommaaccent ; B 30 -218 769 676 ; +C -1 ; WX 667 ; N Lacute ; B 19 0 638 923 ; +C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ; +C -1 ; WX 444 ; N edotaccent ; B 25 -14 426 691 ; +C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ; +C -1 ; WX 389 ; N Imacron ; B 20 0 370 847 ; +C -1 ; WX 667 ; N Lcaron ; B 19 0 652 682 ; +C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; +C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; +C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 16 -19 701 923 ; +C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; +C -1 ; WX 444 ; N emacron ; B 25 -14 426 637 ; +C -1 ; WX 500 ; N gbreve ; B 28 -206 483 691 ; +C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ; +C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ; +C -1 ; WX 556 ; N Scommaaccent ; B 35 -218 513 692 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 35 -19 743 923 ; +C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; +C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; +C -1 ; WX 722 ; N Ccaron ; B 49 -19 687 914 ; +C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; +C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; +C -1 ; WX 722 ; N Dcaron ; B 14 0 690 914 ; +C -1 ; WX 444 ; N rcommaaccent ; B 29 -218 434 473 ; +C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ; +C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 26 -218 715 676 ; +C -1 ; WX 667 ; N Lcommaaccent ; B 19 -218 638 676 ; +C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; +C -1 ; WX 722 ; N Aogonek ; B 9 -193 699 690 ; +C -1 ; WX 722 ; N Aring ; B 9 0 689 935 ; +C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ; +C -1 ; WX 444 ; N zdotaccent ; B 21 0 420 691 ; +C -1 ; WX 667 ; N Ecaron ; B 16 0 641 914 ; +C -1 ; WX 389 ; N Iogonek ; B 20 -193 370 676 ; +C -1 ; WX 556 ; N kcommaaccent ; B 22 -218 543 676 ; +C -1 ; WX 570 ; N minus ; B 33 209 537 297 ; +C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ; +C -1 ; WX 556 ; N ncaron ; B 21 0 539 704 ; +C -1 ; WX 333 ; N tcommaaccent ; B 20 -218 332 630 ; +C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; +C -1 ; WX 500 ; N odieresis ; B 25 -14 476 667 ; +C -1 ; WX 556 ; N udieresis ; B 16 -14 537 667 ; +C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; +C -1 ; WX 500 ; N gcommaaccent ; B 28 -206 483 829 ; +C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; +C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; +C -1 ; WX 556 ; N ncommaaccent ; B 21 -218 539 473 ; +C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; +C -1 ; WX 278 ; N imacron ; B -8 0 272 637 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2242 +KPX A C -55 +KPX A Cacute -55 +KPX A Ccaron -55 +KPX A Ccedilla -55 +KPX A G -55 +KPX A Gbreve -55 +KPX A Gcommaaccent -55 +KPX A O -45 +KPX A Oacute -45 +KPX A Ocircumflex -45 +KPX A Odieresis -45 +KPX A Ograve -45 +KPX A Ohungarumlaut -45 +KPX A Omacron -45 +KPX A Oslash -45 +KPX A Otilde -45 +KPX A Q -45 +KPX A T -95 +KPX A Tcaron -95 +KPX A Tcommaaccent -95 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -145 +KPX A W -130 +KPX A Y -100 +KPX A Yacute -100 +KPX A Ydieresis -100 +KPX A p -25 +KPX A quoteright -74 +KPX A u -50 +KPX A uacute -50 +KPX A ucircumflex -50 +KPX A udieresis -50 +KPX A ugrave -50 +KPX A uhungarumlaut -50 +KPX A umacron -50 +KPX A uogonek -50 +KPX A uring -50 +KPX A v -100 +KPX A w -90 +KPX A y -74 +KPX A yacute -74 +KPX A ydieresis -74 +KPX Aacute C -55 +KPX Aacute Cacute -55 +KPX Aacute Ccaron -55 +KPX Aacute Ccedilla -55 +KPX Aacute G -55 +KPX Aacute Gbreve -55 +KPX Aacute Gcommaaccent -55 +KPX Aacute O -45 +KPX Aacute Oacute -45 +KPX Aacute Ocircumflex -45 +KPX Aacute Odieresis -45 +KPX Aacute Ograve -45 +KPX Aacute Ohungarumlaut -45 +KPX Aacute Omacron -45 +KPX Aacute Oslash -45 +KPX Aacute Otilde -45 +KPX Aacute Q -45 +KPX Aacute T -95 +KPX Aacute Tcaron -95 +KPX Aacute Tcommaaccent -95 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -145 +KPX Aacute W -130 +KPX Aacute Y -100 +KPX Aacute Yacute -100 +KPX Aacute Ydieresis -100 +KPX Aacute p -25 +KPX Aacute quoteright -74 +KPX Aacute u -50 +KPX Aacute uacute -50 +KPX Aacute ucircumflex -50 +KPX Aacute udieresis -50 +KPX Aacute ugrave -50 +KPX Aacute uhungarumlaut -50 +KPX Aacute umacron -50 +KPX Aacute uogonek -50 +KPX Aacute uring -50 +KPX Aacute v -100 +KPX Aacute w -90 +KPX Aacute y -74 +KPX Aacute yacute -74 +KPX Aacute ydieresis -74 +KPX Abreve C -55 +KPX Abreve Cacute -55 +KPX Abreve Ccaron -55 +KPX Abreve Ccedilla -55 +KPX Abreve G -55 +KPX Abreve Gbreve -55 +KPX Abreve Gcommaaccent -55 +KPX Abreve O -45 +KPX Abreve Oacute -45 +KPX Abreve Ocircumflex -45 +KPX Abreve Odieresis -45 +KPX Abreve Ograve -45 +KPX Abreve Ohungarumlaut -45 +KPX Abreve Omacron -45 +KPX Abreve Oslash -45 +KPX Abreve Otilde -45 +KPX Abreve Q -45 +KPX Abreve T -95 +KPX Abreve Tcaron -95 +KPX Abreve Tcommaaccent -95 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -145 +KPX Abreve W -130 +KPX Abreve Y -100 +KPX Abreve Yacute -100 +KPX Abreve Ydieresis -100 +KPX Abreve p -25 +KPX Abreve quoteright -74 +KPX Abreve u -50 +KPX Abreve uacute -50 +KPX Abreve ucircumflex -50 +KPX Abreve udieresis -50 +KPX Abreve ugrave -50 +KPX Abreve uhungarumlaut -50 +KPX Abreve umacron -50 +KPX Abreve uogonek -50 +KPX Abreve uring -50 +KPX Abreve v -100 +KPX Abreve w -90 +KPX Abreve y -74 +KPX Abreve yacute -74 +KPX Abreve ydieresis -74 +KPX Acircumflex C -55 +KPX Acircumflex Cacute -55 +KPX Acircumflex Ccaron -55 +KPX Acircumflex Ccedilla -55 +KPX Acircumflex G -55 +KPX Acircumflex Gbreve -55 +KPX Acircumflex Gcommaaccent -55 +KPX Acircumflex O -45 +KPX Acircumflex Oacute -45 +KPX Acircumflex Ocircumflex -45 +KPX Acircumflex Odieresis -45 +KPX Acircumflex Ograve -45 +KPX Acircumflex Ohungarumlaut -45 +KPX Acircumflex Omacron -45 +KPX Acircumflex Oslash -45 +KPX Acircumflex Otilde -45 +KPX Acircumflex Q -45 +KPX Acircumflex T -95 +KPX Acircumflex Tcaron -95 +KPX Acircumflex Tcommaaccent -95 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -145 +KPX Acircumflex W -130 +KPX Acircumflex Y -100 +KPX Acircumflex Yacute -100 +KPX Acircumflex Ydieresis -100 +KPX Acircumflex p -25 +KPX Acircumflex quoteright -74 +KPX Acircumflex u -50 +KPX Acircumflex uacute -50 +KPX Acircumflex ucircumflex -50 +KPX Acircumflex udieresis -50 +KPX Acircumflex ugrave -50 +KPX Acircumflex uhungarumlaut -50 +KPX Acircumflex umacron -50 +KPX Acircumflex uogonek -50 +KPX Acircumflex uring -50 +KPX Acircumflex v -100 +KPX Acircumflex w -90 +KPX Acircumflex y -74 +KPX Acircumflex yacute -74 +KPX Acircumflex ydieresis -74 +KPX Adieresis C -55 +KPX Adieresis Cacute -55 +KPX Adieresis Ccaron -55 +KPX Adieresis Ccedilla -55 +KPX Adieresis G -55 +KPX Adieresis Gbreve -55 +KPX Adieresis Gcommaaccent -55 +KPX Adieresis O -45 +KPX Adieresis Oacute -45 +KPX Adieresis Ocircumflex -45 +KPX Adieresis Odieresis -45 +KPX Adieresis Ograve -45 +KPX Adieresis Ohungarumlaut -45 +KPX Adieresis Omacron -45 +KPX Adieresis Oslash -45 +KPX Adieresis Otilde -45 +KPX Adieresis Q -45 +KPX Adieresis T -95 +KPX Adieresis Tcaron -95 +KPX Adieresis Tcommaaccent -95 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -145 +KPX Adieresis W -130 +KPX Adieresis Y -100 +KPX Adieresis Yacute -100 +KPX Adieresis Ydieresis -100 +KPX Adieresis p -25 +KPX Adieresis quoteright -74 +KPX Adieresis u -50 +KPX Adieresis uacute -50 +KPX Adieresis ucircumflex -50 +KPX Adieresis udieresis -50 +KPX Adieresis ugrave -50 +KPX Adieresis uhungarumlaut -50 +KPX Adieresis umacron -50 +KPX Adieresis uogonek -50 +KPX Adieresis uring -50 +KPX Adieresis v -100 +KPX Adieresis w -90 +KPX Adieresis y -74 +KPX Adieresis yacute -74 +KPX Adieresis ydieresis -74 +KPX Agrave C -55 +KPX Agrave Cacute -55 +KPX Agrave Ccaron -55 +KPX Agrave Ccedilla -55 +KPX Agrave G -55 +KPX Agrave Gbreve -55 +KPX Agrave Gcommaaccent -55 +KPX Agrave O -45 +KPX Agrave Oacute -45 +KPX Agrave Ocircumflex -45 +KPX Agrave Odieresis -45 +KPX Agrave Ograve -45 +KPX Agrave Ohungarumlaut -45 +KPX Agrave Omacron -45 +KPX Agrave Oslash -45 +KPX Agrave Otilde -45 +KPX Agrave Q -45 +KPX Agrave T -95 +KPX Agrave Tcaron -95 +KPX Agrave Tcommaaccent -95 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -145 +KPX Agrave W -130 +KPX Agrave Y -100 +KPX Agrave Yacute -100 +KPX Agrave Ydieresis -100 +KPX Agrave p -25 +KPX Agrave quoteright -74 +KPX Agrave u -50 +KPX Agrave uacute -50 +KPX Agrave ucircumflex -50 +KPX Agrave udieresis -50 +KPX Agrave ugrave -50 +KPX Agrave uhungarumlaut -50 +KPX Agrave umacron -50 +KPX Agrave uogonek -50 +KPX Agrave uring -50 +KPX Agrave v -100 +KPX Agrave w -90 +KPX Agrave y -74 +KPX Agrave yacute -74 +KPX Agrave ydieresis -74 +KPX Amacron C -55 +KPX Amacron Cacute -55 +KPX Amacron Ccaron -55 +KPX Amacron Ccedilla -55 +KPX Amacron G -55 +KPX Amacron Gbreve -55 +KPX Amacron Gcommaaccent -55 +KPX Amacron O -45 +KPX Amacron Oacute -45 +KPX Amacron Ocircumflex -45 +KPX Amacron Odieresis -45 +KPX Amacron Ograve -45 +KPX Amacron Ohungarumlaut -45 +KPX Amacron Omacron -45 +KPX Amacron Oslash -45 +KPX Amacron Otilde -45 +KPX Amacron Q -45 +KPX Amacron T -95 +KPX Amacron Tcaron -95 +KPX Amacron Tcommaaccent -95 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -145 +KPX Amacron W -130 +KPX Amacron Y -100 +KPX Amacron Yacute -100 +KPX Amacron Ydieresis -100 +KPX Amacron p -25 +KPX Amacron quoteright -74 +KPX Amacron u -50 +KPX Amacron uacute -50 +KPX Amacron ucircumflex -50 +KPX Amacron udieresis -50 +KPX Amacron ugrave -50 +KPX Amacron uhungarumlaut -50 +KPX Amacron umacron -50 +KPX Amacron uogonek -50 +KPX Amacron uring -50 +KPX Amacron v -100 +KPX Amacron w -90 +KPX Amacron y -74 +KPX Amacron yacute -74 +KPX Amacron ydieresis -74 +KPX Aogonek C -55 +KPX Aogonek Cacute -55 +KPX Aogonek Ccaron -55 +KPX Aogonek Ccedilla -55 +KPX Aogonek G -55 +KPX Aogonek Gbreve -55 +KPX Aogonek Gcommaaccent -55 +KPX Aogonek O -45 +KPX Aogonek Oacute -45 +KPX Aogonek Ocircumflex -45 +KPX Aogonek Odieresis -45 +KPX Aogonek Ograve -45 +KPX Aogonek Ohungarumlaut -45 +KPX Aogonek Omacron -45 +KPX Aogonek Oslash -45 +KPX Aogonek Otilde -45 +KPX Aogonek Q -45 +KPX Aogonek T -95 +KPX Aogonek Tcaron -95 +KPX Aogonek Tcommaaccent -95 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -145 +KPX Aogonek W -130 +KPX Aogonek Y -100 +KPX Aogonek Yacute -100 +KPX Aogonek Ydieresis -100 +KPX Aogonek p -25 +KPX Aogonek quoteright -74 +KPX Aogonek u -50 +KPX Aogonek uacute -50 +KPX Aogonek ucircumflex -50 +KPX Aogonek udieresis -50 +KPX Aogonek ugrave -50 +KPX Aogonek uhungarumlaut -50 +KPX Aogonek umacron -50 +KPX Aogonek uogonek -50 +KPX Aogonek uring -50 +KPX Aogonek v -100 +KPX Aogonek w -90 +KPX Aogonek y -34 +KPX Aogonek yacute -34 +KPX Aogonek ydieresis -34 +KPX Aring C -55 +KPX Aring Cacute -55 +KPX Aring Ccaron -55 +KPX Aring Ccedilla -55 +KPX Aring G -55 +KPX Aring Gbreve -55 +KPX Aring Gcommaaccent -55 +KPX Aring O -45 +KPX Aring Oacute -45 +KPX Aring Ocircumflex -45 +KPX Aring Odieresis -45 +KPX Aring Ograve -45 +KPX Aring Ohungarumlaut -45 +KPX Aring Omacron -45 +KPX Aring Oslash -45 +KPX Aring Otilde -45 +KPX Aring Q -45 +KPX Aring T -95 +KPX Aring Tcaron -95 +KPX Aring Tcommaaccent -95 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -145 +KPX Aring W -130 +KPX Aring Y -100 +KPX Aring Yacute -100 +KPX Aring Ydieresis -100 +KPX Aring p -25 +KPX Aring quoteright -74 +KPX Aring u -50 +KPX Aring uacute -50 +KPX Aring ucircumflex -50 +KPX Aring udieresis -50 +KPX Aring ugrave -50 +KPX Aring uhungarumlaut -50 +KPX Aring umacron -50 +KPX Aring uogonek -50 +KPX Aring uring -50 +KPX Aring v -100 +KPX Aring w -90 +KPX Aring y -74 +KPX Aring yacute -74 +KPX Aring ydieresis -74 +KPX Atilde C -55 +KPX Atilde Cacute -55 +KPX Atilde Ccaron -55 +KPX Atilde Ccedilla -55 +KPX Atilde G -55 +KPX Atilde Gbreve -55 +KPX Atilde Gcommaaccent -55 +KPX Atilde O -45 +KPX Atilde Oacute -45 +KPX Atilde Ocircumflex -45 +KPX Atilde Odieresis -45 +KPX Atilde Ograve -45 +KPX Atilde Ohungarumlaut -45 +KPX Atilde Omacron -45 +KPX Atilde Oslash -45 +KPX Atilde Otilde -45 +KPX Atilde Q -45 +KPX Atilde T -95 +KPX Atilde Tcaron -95 +KPX Atilde Tcommaaccent -95 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -145 +KPX Atilde W -130 +KPX Atilde Y -100 +KPX Atilde Yacute -100 +KPX Atilde Ydieresis -100 +KPX Atilde p -25 +KPX Atilde quoteright -74 +KPX Atilde u -50 +KPX Atilde uacute -50 +KPX Atilde ucircumflex -50 +KPX Atilde udieresis -50 +KPX Atilde ugrave -50 +KPX Atilde uhungarumlaut -50 +KPX Atilde umacron -50 +KPX Atilde uogonek -50 +KPX Atilde uring -50 +KPX Atilde v -100 +KPX Atilde w -90 +KPX Atilde y -74 +KPX Atilde yacute -74 +KPX Atilde ydieresis -74 +KPX B A -30 +KPX B Aacute -30 +KPX B Abreve -30 +KPX B Acircumflex -30 +KPX B Adieresis -30 +KPX B Agrave -30 +KPX B Amacron -30 +KPX B Aogonek -30 +KPX B Aring -30 +KPX B Atilde -30 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -35 +KPX D Aacute -35 +KPX D Abreve -35 +KPX D Acircumflex -35 +KPX D Adieresis -35 +KPX D Agrave -35 +KPX D Amacron -35 +KPX D Aogonek -35 +KPX D Aring -35 +KPX D Atilde -35 +KPX D V -40 +KPX D W -40 +KPX D Y -40 +KPX D Yacute -40 +KPX D Ydieresis -40 +KPX D period -20 +KPX Dcaron A -35 +KPX Dcaron Aacute -35 +KPX Dcaron Abreve -35 +KPX Dcaron Acircumflex -35 +KPX Dcaron Adieresis -35 +KPX Dcaron Agrave -35 +KPX Dcaron Amacron -35 +KPX Dcaron Aogonek -35 +KPX Dcaron Aring -35 +KPX Dcaron Atilde -35 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -40 +KPX Dcaron Yacute -40 +KPX Dcaron Ydieresis -40 +KPX Dcaron period -20 +KPX Dcroat A -35 +KPX Dcroat Aacute -35 +KPX Dcroat Abreve -35 +KPX Dcroat Acircumflex -35 +KPX Dcroat Adieresis -35 +KPX Dcroat Agrave -35 +KPX Dcroat Amacron -35 +KPX Dcroat Aogonek -35 +KPX Dcroat Aring -35 +KPX Dcroat Atilde -35 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -40 +KPX Dcroat Yacute -40 +KPX Dcroat Ydieresis -40 +KPX Dcroat period -20 +KPX F A -90 +KPX F Aacute -90 +KPX F Abreve -90 +KPX F Acircumflex -90 +KPX F Adieresis -90 +KPX F Agrave -90 +KPX F Amacron -90 +KPX F Aogonek -90 +KPX F Aring -90 +KPX F Atilde -90 +KPX F a -25 +KPX F aacute -25 +KPX F abreve -25 +KPX F acircumflex -25 +KPX F adieresis -25 +KPX F agrave -25 +KPX F amacron -25 +KPX F aogonek -25 +KPX F aring -25 +KPX F atilde -25 +KPX F comma -92 +KPX F e -25 +KPX F eacute -25 +KPX F ecaron -25 +KPX F ecircumflex -25 +KPX F edieresis -25 +KPX F edotaccent -25 +KPX F egrave -25 +KPX F emacron -25 +KPX F eogonek -25 +KPX F o -25 +KPX F oacute -25 +KPX F ocircumflex -25 +KPX F odieresis -25 +KPX F ograve -25 +KPX F ohungarumlaut -25 +KPX F omacron -25 +KPX F oslash -25 +KPX F otilde -25 +KPX F period -110 +KPX J A -30 +KPX J Aacute -30 +KPX J Abreve -30 +KPX J Acircumflex -30 +KPX J Adieresis -30 +KPX J Agrave -30 +KPX J Amacron -30 +KPX J Aogonek -30 +KPX J Aring -30 +KPX J Atilde -30 +KPX J a -15 +KPX J aacute -15 +KPX J abreve -15 +KPX J acircumflex -15 +KPX J adieresis -15 +KPX J agrave -15 +KPX J amacron -15 +KPX J aogonek -15 +KPX J aring -15 +KPX J atilde -15 +KPX J e -15 +KPX J eacute -15 +KPX J ecaron -15 +KPX J ecircumflex -15 +KPX J edieresis -15 +KPX J edotaccent -15 +KPX J egrave -15 +KPX J emacron -15 +KPX J eogonek -15 +KPX J o -15 +KPX J oacute -15 +KPX J ocircumflex -15 +KPX J odieresis -15 +KPX J ograve -15 +KPX J ohungarumlaut -15 +KPX J omacron -15 +KPX J oslash -15 +KPX J otilde -15 +KPX J period -20 +KPX J u -15 +KPX J uacute -15 +KPX J ucircumflex -15 +KPX J udieresis -15 +KPX J ugrave -15 +KPX J uhungarumlaut -15 +KPX J umacron -15 +KPX J uogonek -15 +KPX J uring -15 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -25 +KPX K eacute -25 +KPX K ecaron -25 +KPX K ecircumflex -25 +KPX K edieresis -25 +KPX K edotaccent -25 +KPX K egrave -25 +KPX K emacron -25 +KPX K eogonek -25 +KPX K o -25 +KPX K oacute -25 +KPX K ocircumflex -25 +KPX K odieresis -25 +KPX K ograve -25 +KPX K ohungarumlaut -25 +KPX K omacron -25 +KPX K oslash -25 +KPX K otilde -25 +KPX K u -15 +KPX K uacute -15 +KPX K ucircumflex -15 +KPX K udieresis -15 +KPX K ugrave -15 +KPX K uhungarumlaut -15 +KPX K umacron -15 +KPX K uogonek -15 +KPX K uring -15 +KPX K y -45 +KPX K yacute -45 +KPX K ydieresis -45 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -25 +KPX Kcommaaccent eacute -25 +KPX Kcommaaccent ecaron -25 +KPX Kcommaaccent ecircumflex -25 +KPX Kcommaaccent edieresis -25 +KPX Kcommaaccent edotaccent -25 +KPX Kcommaaccent egrave -25 +KPX Kcommaaccent emacron -25 +KPX Kcommaaccent eogonek -25 +KPX Kcommaaccent o -25 +KPX Kcommaaccent oacute -25 +KPX Kcommaaccent ocircumflex -25 +KPX Kcommaaccent odieresis -25 +KPX Kcommaaccent ograve -25 +KPX Kcommaaccent ohungarumlaut -25 +KPX Kcommaaccent omacron -25 +KPX Kcommaaccent oslash -25 +KPX Kcommaaccent otilde -25 +KPX Kcommaaccent u -15 +KPX Kcommaaccent uacute -15 +KPX Kcommaaccent ucircumflex -15 +KPX Kcommaaccent udieresis -15 +KPX Kcommaaccent ugrave -15 +KPX Kcommaaccent uhungarumlaut -15 +KPX Kcommaaccent umacron -15 +KPX Kcommaaccent uogonek -15 +KPX Kcommaaccent uring -15 +KPX Kcommaaccent y -45 +KPX Kcommaaccent yacute -45 +KPX Kcommaaccent ydieresis -45 +KPX L T -92 +KPX L Tcaron -92 +KPX L Tcommaaccent -92 +KPX L V -92 +KPX L W -92 +KPX L Y -92 +KPX L Yacute -92 +KPX L Ydieresis -92 +KPX L quotedblright -20 +KPX L quoteright -110 +KPX L y -55 +KPX L yacute -55 +KPX L ydieresis -55 +KPX Lacute T -92 +KPX Lacute Tcaron -92 +KPX Lacute Tcommaaccent -92 +KPX Lacute V -92 +KPX Lacute W -92 +KPX Lacute Y -92 +KPX Lacute Yacute -92 +KPX Lacute Ydieresis -92 +KPX Lacute quotedblright -20 +KPX Lacute quoteright -110 +KPX Lacute y -55 +KPX Lacute yacute -55 +KPX Lacute ydieresis -55 +KPX Lcommaaccent T -92 +KPX Lcommaaccent Tcaron -92 +KPX Lcommaaccent Tcommaaccent -92 +KPX Lcommaaccent V -92 +KPX Lcommaaccent W -92 +KPX Lcommaaccent Y -92 +KPX Lcommaaccent Yacute -92 +KPX Lcommaaccent Ydieresis -92 +KPX Lcommaaccent quotedblright -20 +KPX Lcommaaccent quoteright -110 +KPX Lcommaaccent y -55 +KPX Lcommaaccent yacute -55 +KPX Lcommaaccent ydieresis -55 +KPX Lslash T -92 +KPX Lslash Tcaron -92 +KPX Lslash Tcommaaccent -92 +KPX Lslash V -92 +KPX Lslash W -92 +KPX Lslash Y -92 +KPX Lslash Yacute -92 +KPX Lslash Ydieresis -92 +KPX Lslash quotedblright -20 +KPX Lslash quoteright -110 +KPX Lslash y -55 +KPX Lslash yacute -55 +KPX Lslash ydieresis -55 +KPX N A -20 +KPX N Aacute -20 +KPX N Abreve -20 +KPX N Acircumflex -20 +KPX N Adieresis -20 +KPX N Agrave -20 +KPX N Amacron -20 +KPX N Aogonek -20 +KPX N Aring -20 +KPX N Atilde -20 +KPX Nacute A -20 +KPX Nacute Aacute -20 +KPX Nacute Abreve -20 +KPX Nacute Acircumflex -20 +KPX Nacute Adieresis -20 +KPX Nacute Agrave -20 +KPX Nacute Amacron -20 +KPX Nacute Aogonek -20 +KPX Nacute Aring -20 +KPX Nacute Atilde -20 +KPX Ncaron A -20 +KPX Ncaron Aacute -20 +KPX Ncaron Abreve -20 +KPX Ncaron Acircumflex -20 +KPX Ncaron Adieresis -20 +KPX Ncaron Agrave -20 +KPX Ncaron Amacron -20 +KPX Ncaron Aogonek -20 +KPX Ncaron Aring -20 +KPX Ncaron Atilde -20 +KPX Ncommaaccent A -20 +KPX Ncommaaccent Aacute -20 +KPX Ncommaaccent Abreve -20 +KPX Ncommaaccent Acircumflex -20 +KPX Ncommaaccent Adieresis -20 +KPX Ncommaaccent Agrave -20 +KPX Ncommaaccent Amacron -20 +KPX Ncommaaccent Aogonek -20 +KPX Ncommaaccent Aring -20 +KPX Ncommaaccent Atilde -20 +KPX Ntilde A -20 +KPX Ntilde Aacute -20 +KPX Ntilde Abreve -20 +KPX Ntilde Acircumflex -20 +KPX Ntilde Adieresis -20 +KPX Ntilde Agrave -20 +KPX Ntilde Amacron -20 +KPX Ntilde Aogonek -20 +KPX Ntilde Aring -20 +KPX Ntilde Atilde -20 +KPX O A -40 +KPX O Aacute -40 +KPX O Abreve -40 +KPX O Acircumflex -40 +KPX O Adieresis -40 +KPX O Agrave -40 +KPX O Amacron -40 +KPX O Aogonek -40 +KPX O Aring -40 +KPX O Atilde -40 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -40 +KPX Oacute Aacute -40 +KPX Oacute Abreve -40 +KPX Oacute Acircumflex -40 +KPX Oacute Adieresis -40 +KPX Oacute Agrave -40 +KPX Oacute Amacron -40 +KPX Oacute Aogonek -40 +KPX Oacute Aring -40 +KPX Oacute Atilde -40 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -40 +KPX Ocircumflex Aacute -40 +KPX Ocircumflex Abreve -40 +KPX Ocircumflex Acircumflex -40 +KPX Ocircumflex Adieresis -40 +KPX Ocircumflex Agrave -40 +KPX Ocircumflex Amacron -40 +KPX Ocircumflex Aogonek -40 +KPX Ocircumflex Aring -40 +KPX Ocircumflex Atilde -40 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -40 +KPX Odieresis Aacute -40 +KPX Odieresis Abreve -40 +KPX Odieresis Acircumflex -40 +KPX Odieresis Adieresis -40 +KPX Odieresis Agrave -40 +KPX Odieresis Amacron -40 +KPX Odieresis Aogonek -40 +KPX Odieresis Aring -40 +KPX Odieresis Atilde -40 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -40 +KPX Ograve Aacute -40 +KPX Ograve Abreve -40 +KPX Ograve Acircumflex -40 +KPX Ograve Adieresis -40 +KPX Ograve Agrave -40 +KPX Ograve Amacron -40 +KPX Ograve Aogonek -40 +KPX Ograve Aring -40 +KPX Ograve Atilde -40 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -40 +KPX Ohungarumlaut Aacute -40 +KPX Ohungarumlaut Abreve -40 +KPX Ohungarumlaut Acircumflex -40 +KPX Ohungarumlaut Adieresis -40 +KPX Ohungarumlaut Agrave -40 +KPX Ohungarumlaut Amacron -40 +KPX Ohungarumlaut Aogonek -40 +KPX Ohungarumlaut Aring -40 +KPX Ohungarumlaut Atilde -40 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -40 +KPX Omacron Aacute -40 +KPX Omacron Abreve -40 +KPX Omacron Acircumflex -40 +KPX Omacron Adieresis -40 +KPX Omacron Agrave -40 +KPX Omacron Amacron -40 +KPX Omacron Aogonek -40 +KPX Omacron Aring -40 +KPX Omacron Atilde -40 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -40 +KPX Oslash Aacute -40 +KPX Oslash Abreve -40 +KPX Oslash Acircumflex -40 +KPX Oslash Adieresis -40 +KPX Oslash Agrave -40 +KPX Oslash Amacron -40 +KPX Oslash Aogonek -40 +KPX Oslash Aring -40 +KPX Oslash Atilde -40 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -40 +KPX Otilde Aacute -40 +KPX Otilde Abreve -40 +KPX Otilde Acircumflex -40 +KPX Otilde Adieresis -40 +KPX Otilde Agrave -40 +KPX Otilde Amacron -40 +KPX Otilde Aogonek -40 +KPX Otilde Aring -40 +KPX Otilde Atilde -40 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -74 +KPX P Aacute -74 +KPX P Abreve -74 +KPX P Acircumflex -74 +KPX P Adieresis -74 +KPX P Agrave -74 +KPX P Amacron -74 +KPX P Aogonek -74 +KPX P Aring -74 +KPX P Atilde -74 +KPX P a -10 +KPX P aacute -10 +KPX P abreve -10 +KPX P acircumflex -10 +KPX P adieresis -10 +KPX P agrave -10 +KPX P amacron -10 +KPX P aogonek -10 +KPX P aring -10 +KPX P atilde -10 +KPX P comma -92 +KPX P e -20 +KPX P eacute -20 +KPX P ecaron -20 +KPX P ecircumflex -20 +KPX P edieresis -20 +KPX P edotaccent -20 +KPX P egrave -20 +KPX P emacron -20 +KPX P eogonek -20 +KPX P o -20 +KPX P oacute -20 +KPX P ocircumflex -20 +KPX P odieresis -20 +KPX P ograve -20 +KPX P ohungarumlaut -20 +KPX P omacron -20 +KPX P oslash -20 +KPX P otilde -20 +KPX P period -110 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX Q period -20 +KPX R O -30 +KPX R Oacute -30 +KPX R Ocircumflex -30 +KPX R Odieresis -30 +KPX R Ograve -30 +KPX R Ohungarumlaut -30 +KPX R Omacron -30 +KPX R Oslash -30 +KPX R Otilde -30 +KPX R T -40 +KPX R Tcaron -40 +KPX R Tcommaaccent -40 +KPX R U -30 +KPX R Uacute -30 +KPX R Ucircumflex -30 +KPX R Udieresis -30 +KPX R Ugrave -30 +KPX R Uhungarumlaut -30 +KPX R Umacron -30 +KPX R Uogonek -30 +KPX R Uring -30 +KPX R V -55 +KPX R W -35 +KPX R Y -35 +KPX R Yacute -35 +KPX R Ydieresis -35 +KPX Racute O -30 +KPX Racute Oacute -30 +KPX Racute Ocircumflex -30 +KPX Racute Odieresis -30 +KPX Racute Ograve -30 +KPX Racute Ohungarumlaut -30 +KPX Racute Omacron -30 +KPX Racute Oslash -30 +KPX Racute Otilde -30 +KPX Racute T -40 +KPX Racute Tcaron -40 +KPX Racute Tcommaaccent -40 +KPX Racute U -30 +KPX Racute Uacute -30 +KPX Racute Ucircumflex -30 +KPX Racute Udieresis -30 +KPX Racute Ugrave -30 +KPX Racute Uhungarumlaut -30 +KPX Racute Umacron -30 +KPX Racute Uogonek -30 +KPX Racute Uring -30 +KPX Racute V -55 +KPX Racute W -35 +KPX Racute Y -35 +KPX Racute Yacute -35 +KPX Racute Ydieresis -35 +KPX Rcaron O -30 +KPX Rcaron Oacute -30 +KPX Rcaron Ocircumflex -30 +KPX Rcaron Odieresis -30 +KPX Rcaron Ograve -30 +KPX Rcaron Ohungarumlaut -30 +KPX Rcaron Omacron -30 +KPX Rcaron Oslash -30 +KPX Rcaron Otilde -30 +KPX Rcaron T -40 +KPX Rcaron Tcaron -40 +KPX Rcaron Tcommaaccent -40 +KPX Rcaron U -30 +KPX Rcaron Uacute -30 +KPX Rcaron Ucircumflex -30 +KPX Rcaron Udieresis -30 +KPX Rcaron Ugrave -30 +KPX Rcaron Uhungarumlaut -30 +KPX Rcaron Umacron -30 +KPX Rcaron Uogonek -30 +KPX Rcaron Uring -30 +KPX Rcaron V -55 +KPX Rcaron W -35 +KPX Rcaron Y -35 +KPX Rcaron Yacute -35 +KPX Rcaron Ydieresis -35 +KPX Rcommaaccent O -30 +KPX Rcommaaccent Oacute -30 +KPX Rcommaaccent Ocircumflex -30 +KPX Rcommaaccent Odieresis -30 +KPX Rcommaaccent Ograve -30 +KPX Rcommaaccent Ohungarumlaut -30 +KPX Rcommaaccent Omacron -30 +KPX Rcommaaccent Oslash -30 +KPX Rcommaaccent Otilde -30 +KPX Rcommaaccent T -40 +KPX Rcommaaccent Tcaron -40 +KPX Rcommaaccent Tcommaaccent -40 +KPX Rcommaaccent U -30 +KPX Rcommaaccent Uacute -30 +KPX Rcommaaccent Ucircumflex -30 +KPX Rcommaaccent Udieresis -30 +KPX Rcommaaccent Ugrave -30 +KPX Rcommaaccent Uhungarumlaut -30 +KPX Rcommaaccent Umacron -30 +KPX Rcommaaccent Uogonek -30 +KPX Rcommaaccent Uring -30 +KPX Rcommaaccent V -55 +KPX Rcommaaccent W -35 +KPX Rcommaaccent Y -35 +KPX Rcommaaccent Yacute -35 +KPX Rcommaaccent Ydieresis -35 +KPX T A -90 +KPX T Aacute -90 +KPX T Abreve -90 +KPX T Acircumflex -90 +KPX T Adieresis -90 +KPX T Agrave -90 +KPX T Amacron -90 +KPX T Aogonek -90 +KPX T Aring -90 +KPX T Atilde -90 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -92 +KPX T aacute -92 +KPX T abreve -52 +KPX T acircumflex -52 +KPX T adieresis -52 +KPX T agrave -52 +KPX T amacron -52 +KPX T aogonek -92 +KPX T aring -92 +KPX T atilde -52 +KPX T colon -74 +KPX T comma -74 +KPX T e -92 +KPX T eacute -92 +KPX T ecaron -92 +KPX T ecircumflex -92 +KPX T edieresis -52 +KPX T edotaccent -92 +KPX T egrave -52 +KPX T emacron -52 +KPX T eogonek -92 +KPX T hyphen -92 +KPX T i -18 +KPX T iacute -18 +KPX T iogonek -18 +KPX T o -92 +KPX T oacute -92 +KPX T ocircumflex -92 +KPX T odieresis -92 +KPX T ograve -92 +KPX T ohungarumlaut -92 +KPX T omacron -92 +KPX T oslash -92 +KPX T otilde -92 +KPX T period -90 +KPX T r -74 +KPX T racute -74 +KPX T rcaron -74 +KPX T rcommaaccent -74 +KPX T semicolon -74 +KPX T u -92 +KPX T uacute -92 +KPX T ucircumflex -92 +KPX T udieresis -92 +KPX T ugrave -92 +KPX T uhungarumlaut -92 +KPX T umacron -92 +KPX T uogonek -92 +KPX T uring -92 +KPX T w -74 +KPX T y -34 +KPX T yacute -34 +KPX T ydieresis -34 +KPX Tcaron A -90 +KPX Tcaron Aacute -90 +KPX Tcaron Abreve -90 +KPX Tcaron Acircumflex -90 +KPX Tcaron Adieresis -90 +KPX Tcaron Agrave -90 +KPX Tcaron Amacron -90 +KPX Tcaron Aogonek -90 +KPX Tcaron Aring -90 +KPX Tcaron Atilde -90 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -92 +KPX Tcaron aacute -92 +KPX Tcaron abreve -52 +KPX Tcaron acircumflex -52 +KPX Tcaron adieresis -52 +KPX Tcaron agrave -52 +KPX Tcaron amacron -52 +KPX Tcaron aogonek -92 +KPX Tcaron aring -92 +KPX Tcaron atilde -52 +KPX Tcaron colon -74 +KPX Tcaron comma -74 +KPX Tcaron e -92 +KPX Tcaron eacute -92 +KPX Tcaron ecaron -92 +KPX Tcaron ecircumflex -92 +KPX Tcaron edieresis -52 +KPX Tcaron edotaccent -92 +KPX Tcaron egrave -52 +KPX Tcaron emacron -52 +KPX Tcaron eogonek -92 +KPX Tcaron hyphen -92 +KPX Tcaron i -18 +KPX Tcaron iacute -18 +KPX Tcaron iogonek -18 +KPX Tcaron o -92 +KPX Tcaron oacute -92 +KPX Tcaron ocircumflex -92 +KPX Tcaron odieresis -92 +KPX Tcaron ograve -92 +KPX Tcaron ohungarumlaut -92 +KPX Tcaron omacron -92 +KPX Tcaron oslash -92 +KPX Tcaron otilde -92 +KPX Tcaron period -90 +KPX Tcaron r -74 +KPX Tcaron racute -74 +KPX Tcaron rcaron -74 +KPX Tcaron rcommaaccent -74 +KPX Tcaron semicolon -74 +KPX Tcaron u -92 +KPX Tcaron uacute -92 +KPX Tcaron ucircumflex -92 +KPX Tcaron udieresis -92 +KPX Tcaron ugrave -92 +KPX Tcaron uhungarumlaut -92 +KPX Tcaron umacron -92 +KPX Tcaron uogonek -92 +KPX Tcaron uring -92 +KPX Tcaron w -74 +KPX Tcaron y -34 +KPX Tcaron yacute -34 +KPX Tcaron ydieresis -34 +KPX Tcommaaccent A -90 +KPX Tcommaaccent Aacute -90 +KPX Tcommaaccent Abreve -90 +KPX Tcommaaccent Acircumflex -90 +KPX Tcommaaccent Adieresis -90 +KPX Tcommaaccent Agrave -90 +KPX Tcommaaccent Amacron -90 +KPX Tcommaaccent Aogonek -90 +KPX Tcommaaccent Aring -90 +KPX Tcommaaccent Atilde -90 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -92 +KPX Tcommaaccent aacute -92 +KPX Tcommaaccent abreve -52 +KPX Tcommaaccent acircumflex -52 +KPX Tcommaaccent adieresis -52 +KPX Tcommaaccent agrave -52 +KPX Tcommaaccent amacron -52 +KPX Tcommaaccent aogonek -92 +KPX Tcommaaccent aring -92 +KPX Tcommaaccent atilde -52 +KPX Tcommaaccent colon -74 +KPX Tcommaaccent comma -74 +KPX Tcommaaccent e -92 +KPX Tcommaaccent eacute -92 +KPX Tcommaaccent ecaron -92 +KPX Tcommaaccent ecircumflex -92 +KPX Tcommaaccent edieresis -52 +KPX Tcommaaccent edotaccent -92 +KPX Tcommaaccent egrave -52 +KPX Tcommaaccent emacron -52 +KPX Tcommaaccent eogonek -92 +KPX Tcommaaccent hyphen -92 +KPX Tcommaaccent i -18 +KPX Tcommaaccent iacute -18 +KPX Tcommaaccent iogonek -18 +KPX Tcommaaccent o -92 +KPX Tcommaaccent oacute -92 +KPX Tcommaaccent ocircumflex -92 +KPX Tcommaaccent odieresis -92 +KPX Tcommaaccent ograve -92 +KPX Tcommaaccent ohungarumlaut -92 +KPX Tcommaaccent omacron -92 +KPX Tcommaaccent oslash -92 +KPX Tcommaaccent otilde -92 +KPX Tcommaaccent period -90 +KPX Tcommaaccent r -74 +KPX Tcommaaccent racute -74 +KPX Tcommaaccent rcaron -74 +KPX Tcommaaccent rcommaaccent -74 +KPX Tcommaaccent semicolon -74 +KPX Tcommaaccent u -92 +KPX Tcommaaccent uacute -92 +KPX Tcommaaccent ucircumflex -92 +KPX Tcommaaccent udieresis -92 +KPX Tcommaaccent ugrave -92 +KPX Tcommaaccent uhungarumlaut -92 +KPX Tcommaaccent umacron -92 +KPX Tcommaaccent uogonek -92 +KPX Tcommaaccent uring -92 +KPX Tcommaaccent w -74 +KPX Tcommaaccent y -34 +KPX Tcommaaccent yacute -34 +KPX Tcommaaccent ydieresis -34 +KPX U A -60 +KPX U Aacute -60 +KPX U Abreve -60 +KPX U Acircumflex -60 +KPX U Adieresis -60 +KPX U Agrave -60 +KPX U Amacron -60 +KPX U Aogonek -60 +KPX U Aring -60 +KPX U Atilde -60 +KPX U comma -50 +KPX U period -50 +KPX Uacute A -60 +KPX Uacute Aacute -60 +KPX Uacute Abreve -60 +KPX Uacute Acircumflex -60 +KPX Uacute Adieresis -60 +KPX Uacute Agrave -60 +KPX Uacute Amacron -60 +KPX Uacute Aogonek -60 +KPX Uacute Aring -60 +KPX Uacute Atilde -60 +KPX Uacute comma -50 +KPX Uacute period -50 +KPX Ucircumflex A -60 +KPX Ucircumflex Aacute -60 +KPX Ucircumflex Abreve -60 +KPX Ucircumflex Acircumflex -60 +KPX Ucircumflex Adieresis -60 +KPX Ucircumflex Agrave -60 +KPX Ucircumflex Amacron -60 +KPX Ucircumflex Aogonek -60 +KPX Ucircumflex Aring -60 +KPX Ucircumflex Atilde -60 +KPX Ucircumflex comma -50 +KPX Ucircumflex period -50 +KPX Udieresis A -60 +KPX Udieresis Aacute -60 +KPX Udieresis Abreve -60 +KPX Udieresis Acircumflex -60 +KPX Udieresis Adieresis -60 +KPX Udieresis Agrave -60 +KPX Udieresis Amacron -60 +KPX Udieresis Aogonek -60 +KPX Udieresis Aring -60 +KPX Udieresis Atilde -60 +KPX Udieresis comma -50 +KPX Udieresis period -50 +KPX Ugrave A -60 +KPX Ugrave Aacute -60 +KPX Ugrave Abreve -60 +KPX Ugrave Acircumflex -60 +KPX Ugrave Adieresis -60 +KPX Ugrave Agrave -60 +KPX Ugrave Amacron -60 +KPX Ugrave Aogonek -60 +KPX Ugrave Aring -60 +KPX Ugrave Atilde -60 +KPX Ugrave comma -50 +KPX Ugrave period -50 +KPX Uhungarumlaut A -60 +KPX Uhungarumlaut Aacute -60 +KPX Uhungarumlaut Abreve -60 +KPX Uhungarumlaut Acircumflex -60 +KPX Uhungarumlaut Adieresis -60 +KPX Uhungarumlaut Agrave -60 +KPX Uhungarumlaut Amacron -60 +KPX Uhungarumlaut Aogonek -60 +KPX Uhungarumlaut Aring -60 +KPX Uhungarumlaut Atilde -60 +KPX Uhungarumlaut comma -50 +KPX Uhungarumlaut period -50 +KPX Umacron A -60 +KPX Umacron Aacute -60 +KPX Umacron Abreve -60 +KPX Umacron Acircumflex -60 +KPX Umacron Adieresis -60 +KPX Umacron Agrave -60 +KPX Umacron Amacron -60 +KPX Umacron Aogonek -60 +KPX Umacron Aring -60 +KPX Umacron Atilde -60 +KPX Umacron comma -50 +KPX Umacron period -50 +KPX Uogonek A -60 +KPX Uogonek Aacute -60 +KPX Uogonek Abreve -60 +KPX Uogonek Acircumflex -60 +KPX Uogonek Adieresis -60 +KPX Uogonek Agrave -60 +KPX Uogonek Amacron -60 +KPX Uogonek Aogonek -60 +KPX Uogonek Aring -60 +KPX Uogonek Atilde -60 +KPX Uogonek comma -50 +KPX Uogonek period -50 +KPX Uring A -60 +KPX Uring Aacute -60 +KPX Uring Abreve -60 +KPX Uring Acircumflex -60 +KPX Uring Adieresis -60 +KPX Uring Agrave -60 +KPX Uring Amacron -60 +KPX Uring Aogonek -60 +KPX Uring Aring -60 +KPX Uring Atilde -60 +KPX Uring comma -50 +KPX Uring period -50 +KPX V A -135 +KPX V Aacute -135 +KPX V Abreve -135 +KPX V Acircumflex -135 +KPX V Adieresis -135 +KPX V Agrave -135 +KPX V Amacron -135 +KPX V Aogonek -135 +KPX V Aring -135 +KPX V Atilde -135 +KPX V G -30 +KPX V Gbreve -30 +KPX V Gcommaaccent -30 +KPX V O -45 +KPX V Oacute -45 +KPX V Ocircumflex -45 +KPX V Odieresis -45 +KPX V Ograve -45 +KPX V Ohungarumlaut -45 +KPX V Omacron -45 +KPX V Oslash -45 +KPX V Otilde -45 +KPX V a -92 +KPX V aacute -92 +KPX V abreve -92 +KPX V acircumflex -92 +KPX V adieresis -92 +KPX V agrave -92 +KPX V amacron -92 +KPX V aogonek -92 +KPX V aring -92 +KPX V atilde -92 +KPX V colon -92 +KPX V comma -129 +KPX V e -100 +KPX V eacute -100 +KPX V ecaron -100 +KPX V ecircumflex -100 +KPX V edieresis -100 +KPX V edotaccent -100 +KPX V egrave -100 +KPX V emacron -100 +KPX V eogonek -100 +KPX V hyphen -74 +KPX V i -37 +KPX V iacute -37 +KPX V icircumflex -37 +KPX V idieresis -37 +KPX V igrave -37 +KPX V imacron -37 +KPX V iogonek -37 +KPX V o -100 +KPX V oacute -100 +KPX V ocircumflex -100 +KPX V odieresis -100 +KPX V ograve -100 +KPX V ohungarumlaut -100 +KPX V omacron -100 +KPX V oslash -100 +KPX V otilde -100 +KPX V period -145 +KPX V semicolon -92 +KPX V u -92 +KPX V uacute -92 +KPX V ucircumflex -92 +KPX V udieresis -92 +KPX V ugrave -92 +KPX V uhungarumlaut -92 +KPX V umacron -92 +KPX V uogonek -92 +KPX V uring -92 +KPX W A -120 +KPX W Aacute -120 +KPX W Abreve -120 +KPX W Acircumflex -120 +KPX W Adieresis -120 +KPX W Agrave -120 +KPX W Amacron -120 +KPX W Aogonek -120 +KPX W Aring -120 +KPX W Atilde -120 +KPX W O -10 +KPX W Oacute -10 +KPX W Ocircumflex -10 +KPX W Odieresis -10 +KPX W Ograve -10 +KPX W Ohungarumlaut -10 +KPX W Omacron -10 +KPX W Oslash -10 +KPX W Otilde -10 +KPX W a -65 +KPX W aacute -65 +KPX W abreve -65 +KPX W acircumflex -65 +KPX W adieresis -65 +KPX W agrave -65 +KPX W amacron -65 +KPX W aogonek -65 +KPX W aring -65 +KPX W atilde -65 +KPX W colon -55 +KPX W comma -92 +KPX W e -65 +KPX W eacute -65 +KPX W ecaron -65 +KPX W ecircumflex -65 +KPX W edieresis -65 +KPX W edotaccent -65 +KPX W egrave -65 +KPX W emacron -65 +KPX W eogonek -65 +KPX W hyphen -37 +KPX W i -18 +KPX W iacute -18 +KPX W iogonek -18 +KPX W o -75 +KPX W oacute -75 +KPX W ocircumflex -75 +KPX W odieresis -75 +KPX W ograve -75 +KPX W ohungarumlaut -75 +KPX W omacron -75 +KPX W oslash -75 +KPX W otilde -75 +KPX W period -92 +KPX W semicolon -55 +KPX W u -50 +KPX W uacute -50 +KPX W ucircumflex -50 +KPX W udieresis -50 +KPX W ugrave -50 +KPX W uhungarumlaut -50 +KPX W umacron -50 +KPX W uogonek -50 +KPX W uring -50 +KPX W y -60 +KPX W yacute -60 +KPX W ydieresis -60 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -35 +KPX Y Oacute -35 +KPX Y Ocircumflex -35 +KPX Y Odieresis -35 +KPX Y Ograve -35 +KPX Y Ohungarumlaut -35 +KPX Y Omacron -35 +KPX Y Oslash -35 +KPX Y Otilde -35 +KPX Y a -85 +KPX Y aacute -85 +KPX Y abreve -85 +KPX Y acircumflex -85 +KPX Y adieresis -85 +KPX Y agrave -85 +KPX Y amacron -85 +KPX Y aogonek -85 +KPX Y aring -85 +KPX Y atilde -85 +KPX Y colon -92 +KPX Y comma -92 +KPX Y e -111 +KPX Y eacute -111 +KPX Y ecaron -111 +KPX Y ecircumflex -111 +KPX Y edieresis -71 +KPX Y edotaccent -111 +KPX Y egrave -71 +KPX Y emacron -71 +KPX Y eogonek -111 +KPX Y hyphen -92 +KPX Y i -37 +KPX Y iacute -37 +KPX Y iogonek -37 +KPX Y o -111 +KPX Y oacute -111 +KPX Y ocircumflex -111 +KPX Y odieresis -111 +KPX Y ograve -111 +KPX Y ohungarumlaut -111 +KPX Y omacron -111 +KPX Y oslash -111 +KPX Y otilde -111 +KPX Y period -92 +KPX Y semicolon -92 +KPX Y u -92 +KPX Y uacute -92 +KPX Y ucircumflex -92 +KPX Y udieresis -92 +KPX Y ugrave -92 +KPX Y uhungarumlaut -92 +KPX Y umacron -92 +KPX Y uogonek -92 +KPX Y uring -92 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -35 +KPX Yacute Oacute -35 +KPX Yacute Ocircumflex -35 +KPX Yacute Odieresis -35 +KPX Yacute Ograve -35 +KPX Yacute Ohungarumlaut -35 +KPX Yacute Omacron -35 +KPX Yacute Oslash -35 +KPX Yacute Otilde -35 +KPX Yacute a -85 +KPX Yacute aacute -85 +KPX Yacute abreve -85 +KPX Yacute acircumflex -85 +KPX Yacute adieresis -85 +KPX Yacute agrave -85 +KPX Yacute amacron -85 +KPX Yacute aogonek -85 +KPX Yacute aring -85 +KPX Yacute atilde -85 +KPX Yacute colon -92 +KPX Yacute comma -92 +KPX Yacute e -111 +KPX Yacute eacute -111 +KPX Yacute ecaron -111 +KPX Yacute ecircumflex -111 +KPX Yacute edieresis -71 +KPX Yacute edotaccent -111 +KPX Yacute egrave -71 +KPX Yacute emacron -71 +KPX Yacute eogonek -111 +KPX Yacute hyphen -92 +KPX Yacute i -37 +KPX Yacute iacute -37 +KPX Yacute iogonek -37 +KPX Yacute o -111 +KPX Yacute oacute -111 +KPX Yacute ocircumflex -111 +KPX Yacute odieresis -111 +KPX Yacute ograve -111 +KPX Yacute ohungarumlaut -111 +KPX Yacute omacron -111 +KPX Yacute oslash -111 +KPX Yacute otilde -111 +KPX Yacute period -92 +KPX Yacute semicolon -92 +KPX Yacute u -92 +KPX Yacute uacute -92 +KPX Yacute ucircumflex -92 +KPX Yacute udieresis -92 +KPX Yacute ugrave -92 +KPX Yacute uhungarumlaut -92 +KPX Yacute umacron -92 +KPX Yacute uogonek -92 +KPX Yacute uring -92 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -35 +KPX Ydieresis Oacute -35 +KPX Ydieresis Ocircumflex -35 +KPX Ydieresis Odieresis -35 +KPX Ydieresis Ograve -35 +KPX Ydieresis Ohungarumlaut -35 +KPX Ydieresis Omacron -35 +KPX Ydieresis Oslash -35 +KPX Ydieresis Otilde -35 +KPX Ydieresis a -85 +KPX Ydieresis aacute -85 +KPX Ydieresis abreve -85 +KPX Ydieresis acircumflex -85 +KPX Ydieresis adieresis -85 +KPX Ydieresis agrave -85 +KPX Ydieresis amacron -85 +KPX Ydieresis aogonek -85 +KPX Ydieresis aring -85 +KPX Ydieresis atilde -85 +KPX Ydieresis colon -92 +KPX Ydieresis comma -92 +KPX Ydieresis e -111 +KPX Ydieresis eacute -111 +KPX Ydieresis ecaron -111 +KPX Ydieresis ecircumflex -111 +KPX Ydieresis edieresis -71 +KPX Ydieresis edotaccent -111 +KPX Ydieresis egrave -71 +KPX Ydieresis emacron -71 +KPX Ydieresis eogonek -111 +KPX Ydieresis hyphen -92 +KPX Ydieresis i -37 +KPX Ydieresis iacute -37 +KPX Ydieresis iogonek -37 +KPX Ydieresis o -111 +KPX Ydieresis oacute -111 +KPX Ydieresis ocircumflex -111 +KPX Ydieresis odieresis -111 +KPX Ydieresis ograve -111 +KPX Ydieresis ohungarumlaut -111 +KPX Ydieresis omacron -111 +KPX Ydieresis oslash -111 +KPX Ydieresis otilde -111 +KPX Ydieresis period -92 +KPX Ydieresis semicolon -92 +KPX Ydieresis u -92 +KPX Ydieresis uacute -92 +KPX Ydieresis ucircumflex -92 +KPX Ydieresis udieresis -92 +KPX Ydieresis ugrave -92 +KPX Ydieresis uhungarumlaut -92 +KPX Ydieresis umacron -92 +KPX Ydieresis uogonek -92 +KPX Ydieresis uring -92 +KPX a v -25 +KPX aacute v -25 +KPX abreve v -25 +KPX acircumflex v -25 +KPX adieresis v -25 +KPX agrave v -25 +KPX amacron v -25 +KPX aogonek v -25 +KPX aring v -25 +KPX atilde v -25 +KPX b b -10 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -15 +KPX comma quotedblright -45 +KPX comma quoteright -55 +KPX d w -15 +KPX dcroat w -15 +KPX e v -15 +KPX eacute v -15 +KPX ecaron v -15 +KPX ecircumflex v -15 +KPX edieresis v -15 +KPX edotaccent v -15 +KPX egrave v -15 +KPX emacron v -15 +KPX eogonek v -15 +KPX f comma -15 +KPX f dotlessi -35 +KPX f i -25 +KPX f o -25 +KPX f oacute -25 +KPX f ocircumflex -25 +KPX f odieresis -25 +KPX f ograve -25 +KPX f ohungarumlaut -25 +KPX f omacron -25 +KPX f oslash -25 +KPX f otilde -25 +KPX f period -15 +KPX f quotedblright 50 +KPX f quoteright 55 +KPX g period -15 +KPX gbreve period -15 +KPX gcommaaccent period -15 +KPX h y -15 +KPX h yacute -15 +KPX h ydieresis -15 +KPX i v -10 +KPX iacute v -10 +KPX icircumflex v -10 +KPX idieresis v -10 +KPX igrave v -10 +KPX imacron v -10 +KPX iogonek v -10 +KPX k e -10 +KPX k eacute -10 +KPX k ecaron -10 +KPX k ecircumflex -10 +KPX k edieresis -10 +KPX k edotaccent -10 +KPX k egrave -10 +KPX k emacron -10 +KPX k eogonek -10 +KPX k o -15 +KPX k oacute -15 +KPX k ocircumflex -15 +KPX k odieresis -15 +KPX k ograve -15 +KPX k ohungarumlaut -15 +KPX k omacron -15 +KPX k oslash -15 +KPX k otilde -15 +KPX k y -15 +KPX k yacute -15 +KPX k ydieresis -15 +KPX kcommaaccent e -10 +KPX kcommaaccent eacute -10 +KPX kcommaaccent ecaron -10 +KPX kcommaaccent ecircumflex -10 +KPX kcommaaccent edieresis -10 +KPX kcommaaccent edotaccent -10 +KPX kcommaaccent egrave -10 +KPX kcommaaccent emacron -10 +KPX kcommaaccent eogonek -10 +KPX kcommaaccent o -15 +KPX kcommaaccent oacute -15 +KPX kcommaaccent ocircumflex -15 +KPX kcommaaccent odieresis -15 +KPX kcommaaccent ograve -15 +KPX kcommaaccent ohungarumlaut -15 +KPX kcommaaccent omacron -15 +KPX kcommaaccent oslash -15 +KPX kcommaaccent otilde -15 +KPX kcommaaccent y -15 +KPX kcommaaccent yacute -15 +KPX kcommaaccent ydieresis -15 +KPX n v -40 +KPX nacute v -40 +KPX ncaron v -40 +KPX ncommaaccent v -40 +KPX ntilde v -40 +KPX o v -10 +KPX o w -10 +KPX oacute v -10 +KPX oacute w -10 +KPX ocircumflex v -10 +KPX ocircumflex w -10 +KPX odieresis v -10 +KPX odieresis w -10 +KPX ograve v -10 +KPX ograve w -10 +KPX ohungarumlaut v -10 +KPX ohungarumlaut w -10 +KPX omacron v -10 +KPX omacron w -10 +KPX oslash v -10 +KPX oslash w -10 +KPX otilde v -10 +KPX otilde w -10 +KPX period quotedblright -55 +KPX period quoteright -55 +KPX quotedblleft A -10 +KPX quotedblleft Aacute -10 +KPX quotedblleft Abreve -10 +KPX quotedblleft Acircumflex -10 +KPX quotedblleft Adieresis -10 +KPX quotedblleft Agrave -10 +KPX quotedblleft Amacron -10 +KPX quotedblleft Aogonek -10 +KPX quotedblleft Aring -10 +KPX quotedblleft Atilde -10 +KPX quoteleft A -10 +KPX quoteleft Aacute -10 +KPX quoteleft Abreve -10 +KPX quoteleft Acircumflex -10 +KPX quoteleft Adieresis -10 +KPX quoteleft Agrave -10 +KPX quoteleft Amacron -10 +KPX quoteleft Aogonek -10 +KPX quoteleft Aring -10 +KPX quoteleft Atilde -10 +KPX quoteleft quoteleft -63 +KPX quoteright d -20 +KPX quoteright dcroat -20 +KPX quoteright quoteright -63 +KPX quoteright r -20 +KPX quoteright racute -20 +KPX quoteright rcaron -20 +KPX quoteright rcommaaccent -20 +KPX quoteright s -37 +KPX quoteright sacute -37 +KPX quoteright scaron -37 +KPX quoteright scedilla -37 +KPX quoteright scommaaccent -37 +KPX quoteright space -74 +KPX quoteright v -20 +KPX r c -18 +KPX r cacute -18 +KPX r ccaron -18 +KPX r ccedilla -18 +KPX r comma -92 +KPX r e -18 +KPX r eacute -18 +KPX r ecaron -18 +KPX r ecircumflex -18 +KPX r edieresis -18 +KPX r edotaccent -18 +KPX r egrave -18 +KPX r emacron -18 +KPX r eogonek -18 +KPX r g -10 +KPX r gbreve -10 +KPX r gcommaaccent -10 +KPX r hyphen -37 +KPX r n -15 +KPX r nacute -15 +KPX r ncaron -15 +KPX r ncommaaccent -15 +KPX r ntilde -15 +KPX r o -18 +KPX r oacute -18 +KPX r ocircumflex -18 +KPX r odieresis -18 +KPX r ograve -18 +KPX r ohungarumlaut -18 +KPX r omacron -18 +KPX r oslash -18 +KPX r otilde -18 +KPX r p -10 +KPX r period -100 +KPX r q -18 +KPX r v -10 +KPX racute c -18 +KPX racute cacute -18 +KPX racute ccaron -18 +KPX racute ccedilla -18 +KPX racute comma -92 +KPX racute e -18 +KPX racute eacute -18 +KPX racute ecaron -18 +KPX racute ecircumflex -18 +KPX racute edieresis -18 +KPX racute edotaccent -18 +KPX racute egrave -18 +KPX racute emacron -18 +KPX racute eogonek -18 +KPX racute g -10 +KPX racute gbreve -10 +KPX racute gcommaaccent -10 +KPX racute hyphen -37 +KPX racute n -15 +KPX racute nacute -15 +KPX racute ncaron -15 +KPX racute ncommaaccent -15 +KPX racute ntilde -15 +KPX racute o -18 +KPX racute oacute -18 +KPX racute ocircumflex -18 +KPX racute odieresis -18 +KPX racute ograve -18 +KPX racute ohungarumlaut -18 +KPX racute omacron -18 +KPX racute oslash -18 +KPX racute otilde -18 +KPX racute p -10 +KPX racute period -100 +KPX racute q -18 +KPX racute v -10 +KPX rcaron c -18 +KPX rcaron cacute -18 +KPX rcaron ccaron -18 +KPX rcaron ccedilla -18 +KPX rcaron comma -92 +KPX rcaron e -18 +KPX rcaron eacute -18 +KPX rcaron ecaron -18 +KPX rcaron ecircumflex -18 +KPX rcaron edieresis -18 +KPX rcaron edotaccent -18 +KPX rcaron egrave -18 +KPX rcaron emacron -18 +KPX rcaron eogonek -18 +KPX rcaron g -10 +KPX rcaron gbreve -10 +KPX rcaron gcommaaccent -10 +KPX rcaron hyphen -37 +KPX rcaron n -15 +KPX rcaron nacute -15 +KPX rcaron ncaron -15 +KPX rcaron ncommaaccent -15 +KPX rcaron ntilde -15 +KPX rcaron o -18 +KPX rcaron oacute -18 +KPX rcaron ocircumflex -18 +KPX rcaron odieresis -18 +KPX rcaron ograve -18 +KPX rcaron ohungarumlaut -18 +KPX rcaron omacron -18 +KPX rcaron oslash -18 +KPX rcaron otilde -18 +KPX rcaron p -10 +KPX rcaron period -100 +KPX rcaron q -18 +KPX rcaron v -10 +KPX rcommaaccent c -18 +KPX rcommaaccent cacute -18 +KPX rcommaaccent ccaron -18 +KPX rcommaaccent ccedilla -18 +KPX rcommaaccent comma -92 +KPX rcommaaccent e -18 +KPX rcommaaccent eacute -18 +KPX rcommaaccent ecaron -18 +KPX rcommaaccent ecircumflex -18 +KPX rcommaaccent edieresis -18 +KPX rcommaaccent edotaccent -18 +KPX rcommaaccent egrave -18 +KPX rcommaaccent emacron -18 +KPX rcommaaccent eogonek -18 +KPX rcommaaccent g -10 +KPX rcommaaccent gbreve -10 +KPX rcommaaccent gcommaaccent -10 +KPX rcommaaccent hyphen -37 +KPX rcommaaccent n -15 +KPX rcommaaccent nacute -15 +KPX rcommaaccent ncaron -15 +KPX rcommaaccent ncommaaccent -15 +KPX rcommaaccent ntilde -15 +KPX rcommaaccent o -18 +KPX rcommaaccent oacute -18 +KPX rcommaaccent ocircumflex -18 +KPX rcommaaccent odieresis -18 +KPX rcommaaccent ograve -18 +KPX rcommaaccent ohungarumlaut -18 +KPX rcommaaccent omacron -18 +KPX rcommaaccent oslash -18 +KPX rcommaaccent otilde -18 +KPX rcommaaccent p -10 +KPX rcommaaccent period -100 +KPX rcommaaccent q -18 +KPX rcommaaccent v -10 +KPX space A -55 +KPX space Aacute -55 +KPX space Abreve -55 +KPX space Acircumflex -55 +KPX space Adieresis -55 +KPX space Agrave -55 +KPX space Amacron -55 +KPX space Aogonek -55 +KPX space Aring -55 +KPX space Atilde -55 +KPX space T -30 +KPX space Tcaron -30 +KPX space Tcommaaccent -30 +KPX space V -45 +KPX space W -30 +KPX space Y -55 +KPX space Yacute -55 +KPX space Ydieresis -55 +KPX v a -10 +KPX v aacute -10 +KPX v abreve -10 +KPX v acircumflex -10 +KPX v adieresis -10 +KPX v agrave -10 +KPX v amacron -10 +KPX v aogonek -10 +KPX v aring -10 +KPX v atilde -10 +KPX v comma -55 +KPX v e -10 +KPX v eacute -10 +KPX v ecaron -10 +KPX v ecircumflex -10 +KPX v edieresis -10 +KPX v edotaccent -10 +KPX v egrave -10 +KPX v emacron -10 +KPX v eogonek -10 +KPX v o -10 +KPX v oacute -10 +KPX v ocircumflex -10 +KPX v odieresis -10 +KPX v ograve -10 +KPX v ohungarumlaut -10 +KPX v omacron -10 +KPX v oslash -10 +KPX v otilde -10 +KPX v period -70 +KPX w comma -55 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -70 +KPX y comma -55 +KPX y e -10 +KPX y eacute -10 +KPX y ecaron -10 +KPX y ecircumflex -10 +KPX y edieresis -10 +KPX y edotaccent -10 +KPX y egrave -10 +KPX y emacron -10 +KPX y eogonek -10 +KPX y o -25 +KPX y oacute -25 +KPX y ocircumflex -25 +KPX y odieresis -25 +KPX y ograve -25 +KPX y ohungarumlaut -25 +KPX y omacron -25 +KPX y oslash -25 +KPX y otilde -25 +KPX y period -70 +KPX yacute comma -55 +KPX yacute e -10 +KPX yacute eacute -10 +KPX yacute ecaron -10 +KPX yacute ecircumflex -10 +KPX yacute edieresis -10 +KPX yacute edotaccent -10 +KPX yacute egrave -10 +KPX yacute emacron -10 +KPX yacute eogonek -10 +KPX yacute o -25 +KPX yacute oacute -25 +KPX yacute ocircumflex -25 +KPX yacute odieresis -25 +KPX yacute ograve -25 +KPX yacute ohungarumlaut -25 +KPX yacute omacron -25 +KPX yacute oslash -25 +KPX yacute otilde -25 +KPX yacute period -70 +KPX ydieresis comma -55 +KPX ydieresis e -10 +KPX ydieresis eacute -10 +KPX ydieresis ecaron -10 +KPX ydieresis ecircumflex -10 +KPX ydieresis edieresis -10 +KPX ydieresis edotaccent -10 +KPX ydieresis egrave -10 +KPX ydieresis emacron -10 +KPX ydieresis eogonek -10 +KPX ydieresis o -25 +KPX ydieresis oacute -25 +KPX ydieresis ocircumflex -25 +KPX ydieresis odieresis -25 +KPX ydieresis ograve -25 +KPX ydieresis ohungarumlaut -25 +KPX ydieresis omacron -25 +KPX ydieresis oslash -25 +KPX ydieresis otilde -25 +KPX ydieresis period -70 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Times-BoldItalic.afm b/internal/pdf/model/fonts/afms/Times-BoldItalic.afm new file mode 100644 index 0000000..6da5178 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Times-BoldItalic.afm @@ -0,0 +1,2384 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 13:04:06 1997 +Comment UniqueID 43066 +Comment VMusage 45874 56899 +FontName Times-BoldItalic +FullName Times Bold Italic +FamilyName Times +Weight Bold +ItalicAngle -15 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -200 -218 996 921 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 669 +XHeight 462 +Ascender 683 +Descender -217 +StdHW 42 +StdVW 121 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ; +C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ; +C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ; +C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ; +C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ; +C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ; +C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ; +C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ; +C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ; +C 42 ; WX 500 ; N asterisk ; B 65 249 456 685 ; +C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; +C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ; +C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ; +C 46 ; WX 250 ; N period ; B -9 -13 139 135 ; +C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ; +C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ; +C 49 ; WX 500 ; N one ; B 5 0 419 683 ; +C 50 ; WX 500 ; N two ; B -27 0 446 683 ; +C 51 ; WX 500 ; N three ; B -15 -13 450 683 ; +C 52 ; WX 500 ; N four ; B -15 0 503 683 ; +C 53 ; WX 500 ; N five ; B -11 -13 487 669 ; +C 54 ; WX 500 ; N six ; B 23 -15 509 679 ; +C 55 ; WX 500 ; N seven ; B 52 0 525 669 ; +C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ; +C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ; +C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ; +C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ; +C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; +C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; +C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; +C 63 ; WX 500 ; N question ; B 79 -13 470 684 ; +C 64 ; WX 832 ; N at ; B 63 -18 770 685 ; +C 65 ; WX 667 ; N A ; B -67 0 593 683 ; +C 66 ; WX 667 ; N B ; B -24 0 624 669 ; +C 67 ; WX 667 ; N C ; B 32 -18 677 685 ; +C 68 ; WX 722 ; N D ; B -46 0 685 669 ; +C 69 ; WX 667 ; N E ; B -27 0 653 669 ; +C 70 ; WX 667 ; N F ; B -13 0 660 669 ; +C 71 ; WX 722 ; N G ; B 21 -18 706 685 ; +C 72 ; WX 778 ; N H ; B -24 0 799 669 ; +C 73 ; WX 389 ; N I ; B -32 0 406 669 ; +C 74 ; WX 500 ; N J ; B -46 -99 524 669 ; +C 75 ; WX 667 ; N K ; B -21 0 702 669 ; +C 76 ; WX 611 ; N L ; B -22 0 590 669 ; +C 77 ; WX 889 ; N M ; B -29 -12 917 669 ; +C 78 ; WX 722 ; N N ; B -27 -15 748 669 ; +C 79 ; WX 722 ; N O ; B 27 -18 691 685 ; +C 80 ; WX 611 ; N P ; B -27 0 613 669 ; +C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ; +C 82 ; WX 667 ; N R ; B -29 0 623 669 ; +C 83 ; WX 556 ; N S ; B 2 -18 526 685 ; +C 84 ; WX 611 ; N T ; B 50 0 650 669 ; +C 85 ; WX 722 ; N U ; B 67 -18 744 669 ; +C 86 ; WX 667 ; N V ; B 65 -18 715 669 ; +C 87 ; WX 889 ; N W ; B 65 -18 940 669 ; +C 88 ; WX 667 ; N X ; B -24 0 694 669 ; +C 89 ; WX 611 ; N Y ; B 73 0 659 669 ; +C 90 ; WX 611 ; N Z ; B -11 0 590 669 ; +C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ; +C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ; +C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ; +C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ; +C 97 ; WX 500 ; N a ; B -21 -14 455 462 ; +C 98 ; WX 500 ; N b ; B -14 -13 444 699 ; +C 99 ; WX 444 ; N c ; B -5 -13 392 462 ; +C 100 ; WX 500 ; N d ; B -21 -13 517 699 ; +C 101 ; WX 444 ; N e ; B 5 -13 398 462 ; +C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B -52 -203 478 462 ; +C 104 ; WX 556 ; N h ; B -13 -9 498 699 ; +C 105 ; WX 278 ; N i ; B 2 -9 263 684 ; +C 106 ; WX 278 ; N j ; B -189 -207 279 684 ; +C 107 ; WX 500 ; N k ; B -23 -8 483 699 ; +C 108 ; WX 278 ; N l ; B 2 -9 290 699 ; +C 109 ; WX 778 ; N m ; B -14 -9 722 462 ; +C 110 ; WX 556 ; N n ; B -6 -9 493 462 ; +C 111 ; WX 500 ; N o ; B -3 -13 441 462 ; +C 112 ; WX 500 ; N p ; B -120 -205 446 462 ; +C 113 ; WX 500 ; N q ; B 1 -205 471 462 ; +C 114 ; WX 389 ; N r ; B -21 0 389 462 ; +C 115 ; WX 389 ; N s ; B -19 -13 333 462 ; +C 116 ; WX 278 ; N t ; B -11 -9 281 594 ; +C 117 ; WX 556 ; N u ; B 15 -9 492 462 ; +C 118 ; WX 444 ; N v ; B 16 -13 401 462 ; +C 119 ; WX 667 ; N w ; B 16 -13 614 462 ; +C 120 ; WX 500 ; N x ; B -46 -13 469 462 ; +C 121 ; WX 444 ; N y ; B -94 -205 392 462 ; +C 122 ; WX 389 ; N z ; B -43 -78 368 449 ; +C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ; +C 124 ; WX 220 ; N bar ; B 66 -218 154 782 ; +C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ; +C 126 ; WX 570 ; N asciitilde ; B 54 173 516 333 ; +C 161 ; WX 389 ; N exclamdown ; B 19 -205 322 492 ; +C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ; +C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ; +C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ; +C 165 ; WX 500 ; N yen ; B 33 0 628 669 ; +C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ; +C 167 ; WX 500 ; N section ; B 36 -143 459 685 ; +C 168 ; WX 500 ; N currency ; B -26 34 526 586 ; +C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ; +C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ; +C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ; +C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ; +C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ; +C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ; +C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ; +C 177 ; WX 500 ; N endash ; B -40 178 477 269 ; +C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ; +C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ; +C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ; +C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ; +C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ; +C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ; +C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ; +C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ; +C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ; +C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ; +C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ; +C 193 ; WX 333 ; N grave ; B 85 516 297 697 ; +C 194 ; WX 333 ; N acute ; B 139 516 379 697 ; +C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ; +C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ; +C 197 ; WX 333 ; N macron ; B 51 553 393 623 ; +C 198 ; WX 333 ; N breve ; B 71 516 387 678 ; +C 199 ; WX 333 ; N dotaccent ; B 163 550 298 684 ; +C 200 ; WX 333 ; N dieresis ; B 55 550 402 684 ; +C 202 ; WX 333 ; N ring ; B 127 516 340 729 ; +C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ; +C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ; +C 206 ; WX 333 ; N ogonek ; B 15 -183 244 34 ; +C 207 ; WX 333 ; N caron ; B 79 516 411 690 ; +C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ; +C 225 ; WX 944 ; N AE ; B -64 0 918 669 ; +C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ; +C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ; +C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ; +C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ; +C 235 ; WX 300 ; N ordmasculine ; B 56 400 347 685 ; +C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ; +C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ; +C 248 ; WX 278 ; N lslash ; B -7 -9 307 699 ; +C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ; +C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ; +C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ; +C -1 ; WX 389 ; N Idieresis ; B -32 0 450 862 ; +C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; +C -1 ; WX 500 ; N abreve ; B -21 -14 471 678 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 15 -9 610 697 ; +C -1 ; WX 444 ; N ecaron ; B 5 -13 467 690 ; +C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; +C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ; +C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; +C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ; +C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; +C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; +C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; +C -1 ; WX 389 ; N scommaaccent ; B -19 -218 333 462 ; +C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; +C -1 ; WX 722 ; N Uring ; B 67 -18 744 921 ; +C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ; +C -1 ; WX 500 ; N aogonek ; B -21 -183 455 462 ; +C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; +C -1 ; WX 556 ; N uogonek ; B 15 -183 492 462 ; +C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; +C -1 ; WX 722 ; N Dcroat ; B -31 0 700 669 ; +C -1 ; WX 250 ; N commaaccent ; B -36 -218 131 -50 ; +C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ; +C -1 ; WX 667 ; N Emacron ; B -27 0 653 830 ; +C -1 ; WX 444 ; N ccaron ; B -5 -13 467 690 ; +C -1 ; WX 500 ; N aring ; B -21 -14 455 729 ; +C -1 ; WX 722 ; N Ncommaaccent ; B -27 -218 748 669 ; +C -1 ; WX 278 ; N lacute ; B 2 -9 392 904 ; +C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 50 -218 650 669 ; +C -1 ; WX 667 ; N Cacute ; B 32 -18 677 904 ; +C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; +C -1 ; WX 667 ; N Edotaccent ; B -27 0 653 862 ; +C -1 ; WX 389 ; N scaron ; B -19 -13 424 690 ; +C -1 ; WX 389 ; N scedilla ; B -19 -218 333 462 ; +C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; +C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; +C -1 ; WX 667 ; N Rcaron ; B -29 0 623 897 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 21 -218 706 685 ; +C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; +C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; +C -1 ; WX 667 ; N Amacron ; B -67 0 593 830 ; +C -1 ; WX 389 ; N rcaron ; B -21 0 424 690 ; +C -1 ; WX 444 ; N ccedilla ; B -5 -218 392 462 ; +C -1 ; WX 611 ; N Zdotaccent ; B -11 0 590 862 ; +C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ; +C -1 ; WX 722 ; N Omacron ; B 27 -18 691 830 ; +C -1 ; WX 667 ; N Racute ; B -29 0 623 904 ; +C -1 ; WX 556 ; N Sacute ; B 2 -18 531 904 ; +C -1 ; WX 608 ; N dcaron ; B -21 -13 675 708 ; +C -1 ; WX 722 ; N Umacron ; B 67 -18 744 830 ; +C -1 ; WX 556 ; N uring ; B 15 -9 492 729 ; +C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; +C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ; +C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ; +C -1 ; WX 667 ; N Abreve ; B -67 0 593 885 ; +C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; +C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; +C -1 ; WX 611 ; N Tcaron ; B 50 0 650 897 ; +C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; +C -1 ; WX 444 ; N ydieresis ; B -94 -205 443 655 ; +C -1 ; WX 722 ; N Nacute ; B -27 -15 748 904 ; +C -1 ; WX 278 ; N icircumflex ; B -3 -9 324 690 ; +C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ; +C -1 ; WX 500 ; N adieresis ; B -21 -14 476 655 ; +C -1 ; WX 444 ; N edieresis ; B 5 -13 448 655 ; +C -1 ; WX 444 ; N cacute ; B -5 -13 435 697 ; +C -1 ; WX 556 ; N nacute ; B -6 -9 493 697 ; +C -1 ; WX 556 ; N umacron ; B 15 -9 492 623 ; +C -1 ; WX 722 ; N Ncaron ; B -27 -15 748 897 ; +C -1 ; WX 389 ; N Iacute ; B -32 0 432 904 ; +C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; +C -1 ; WX 220 ; N brokenbar ; B 66 -143 154 707 ; +C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ; +C -1 ; WX 722 ; N Gbreve ; B 21 -18 706 885 ; +C -1 ; WX 389 ; N Idotaccent ; B -32 0 406 862 ; +C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; +C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; +C -1 ; WX 389 ; N racute ; B -21 0 407 697 ; +C -1 ; WX 500 ; N omacron ; B -3 -13 462 623 ; +C -1 ; WX 611 ; N Zacute ; B -11 0 590 904 ; +C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; +C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; +C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; +C -1 ; WX 278 ; N lcommaaccent ; B -42 -218 290 699 ; +C -1 ; WX 366 ; N tcaron ; B -11 -9 434 754 ; +C -1 ; WX 444 ; N eogonek ; B 5 -183 398 462 ; +C -1 ; WX 722 ; N Uogonek ; B 67 -183 744 669 ; +C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ; +C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ; +C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; +C -1 ; WX 389 ; N zacute ; B -43 -78 407 697 ; +C -1 ; WX 278 ; N iogonek ; B -20 -183 263 684 ; +C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; +C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; +C -1 ; WX 500 ; N amacron ; B -21 -14 467 623 ; +C -1 ; WX 389 ; N sacute ; B -19 -13 407 697 ; +C -1 ; WX 278 ; N idieresis ; B 2 -9 364 655 ; +C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; +C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; +C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; +C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ; +C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ; +C -1 ; WX 278 ; N igrave ; B 2 -9 259 697 ; +C -1 ; WX 500 ; N ohungarumlaut ; B -3 -13 582 697 ; +C -1 ; WX 667 ; N Eogonek ; B -27 -183 653 669 ; +C -1 ; WX 500 ; N dcroat ; B -21 -13 552 699 ; +C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ; +C -1 ; WX 556 ; N Scedilla ; B 2 -218 526 685 ; +C -1 ; WX 382 ; N lcaron ; B 2 -9 448 708 ; +C -1 ; WX 667 ; N Kcommaaccent ; B -21 -218 702 669 ; +C -1 ; WX 611 ; N Lacute ; B -22 0 590 904 ; +C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ; +C -1 ; WX 444 ; N edotaccent ; B 5 -13 398 655 ; +C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ; +C -1 ; WX 389 ; N Imacron ; B -32 0 461 830 ; +C -1 ; WX 611 ; N Lcaron ; B -22 0 671 718 ; +C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; +C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; +C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 67 -18 744 904 ; +C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; +C -1 ; WX 444 ; N emacron ; B 5 -13 439 623 ; +C -1 ; WX 500 ; N gbreve ; B -52 -203 478 678 ; +C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ; +C -1 ; WX 556 ; N Scaron ; B 2 -18 553 897 ; +C -1 ; WX 556 ; N Scommaaccent ; B 2 -218 526 685 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 27 -18 723 904 ; +C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; +C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; +C -1 ; WX 667 ; N Ccaron ; B 32 -18 677 897 ; +C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; +C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; +C -1 ; WX 722 ; N Dcaron ; B -46 0 685 897 ; +C -1 ; WX 389 ; N rcommaaccent ; B -67 -218 389 462 ; +C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ; +C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; +C -1 ; WX 667 ; N Rcommaaccent ; B -29 -218 623 669 ; +C -1 ; WX 611 ; N Lcommaaccent ; B -22 -218 590 669 ; +C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; +C -1 ; WX 667 ; N Aogonek ; B -67 -183 604 683 ; +C -1 ; WX 667 ; N Aring ; B -67 0 593 921 ; +C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ; +C -1 ; WX 389 ; N zdotaccent ; B -43 -78 368 655 ; +C -1 ; WX 667 ; N Ecaron ; B -27 0 653 897 ; +C -1 ; WX 389 ; N Iogonek ; B -32 -183 406 669 ; +C -1 ; WX 500 ; N kcommaaccent ; B -23 -218 483 699 ; +C -1 ; WX 606 ; N minus ; B 51 209 555 297 ; +C -1 ; WX 389 ; N Icircumflex ; B -32 0 450 897 ; +C -1 ; WX 556 ; N ncaron ; B -6 -9 523 690 ; +C -1 ; WX 278 ; N tcommaaccent ; B -62 -218 281 594 ; +C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; +C -1 ; WX 500 ; N odieresis ; B -3 -13 471 655 ; +C -1 ; WX 556 ; N udieresis ; B 15 -9 499 655 ; +C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; +C -1 ; WX 500 ; N gcommaaccent ; B -52 -203 478 767 ; +C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; +C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; +C -1 ; WX 556 ; N ncommaaccent ; B -6 -218 493 462 ; +C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; +C -1 ; WX 278 ; N imacron ; B 2 -9 294 623 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2038 +KPX A C -65 +KPX A Cacute -65 +KPX A Ccaron -65 +KPX A Ccedilla -65 +KPX A G -60 +KPX A Gbreve -60 +KPX A Gcommaaccent -60 +KPX A O -50 +KPX A Oacute -50 +KPX A Ocircumflex -50 +KPX A Odieresis -50 +KPX A Ograve -50 +KPX A Ohungarumlaut -50 +KPX A Omacron -50 +KPX A Oslash -50 +KPX A Otilde -50 +KPX A Q -55 +KPX A T -55 +KPX A Tcaron -55 +KPX A Tcommaaccent -55 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -95 +KPX A W -100 +KPX A Y -70 +KPX A Yacute -70 +KPX A Ydieresis -70 +KPX A quoteright -74 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -74 +KPX A w -74 +KPX A y -74 +KPX A yacute -74 +KPX A ydieresis -74 +KPX Aacute C -65 +KPX Aacute Cacute -65 +KPX Aacute Ccaron -65 +KPX Aacute Ccedilla -65 +KPX Aacute G -60 +KPX Aacute Gbreve -60 +KPX Aacute Gcommaaccent -60 +KPX Aacute O -50 +KPX Aacute Oacute -50 +KPX Aacute Ocircumflex -50 +KPX Aacute Odieresis -50 +KPX Aacute Ograve -50 +KPX Aacute Ohungarumlaut -50 +KPX Aacute Omacron -50 +KPX Aacute Oslash -50 +KPX Aacute Otilde -50 +KPX Aacute Q -55 +KPX Aacute T -55 +KPX Aacute Tcaron -55 +KPX Aacute Tcommaaccent -55 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -95 +KPX Aacute W -100 +KPX Aacute Y -70 +KPX Aacute Yacute -70 +KPX Aacute Ydieresis -70 +KPX Aacute quoteright -74 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -74 +KPX Aacute w -74 +KPX Aacute y -74 +KPX Aacute yacute -74 +KPX Aacute ydieresis -74 +KPX Abreve C -65 +KPX Abreve Cacute -65 +KPX Abreve Ccaron -65 +KPX Abreve Ccedilla -65 +KPX Abreve G -60 +KPX Abreve Gbreve -60 +KPX Abreve Gcommaaccent -60 +KPX Abreve O -50 +KPX Abreve Oacute -50 +KPX Abreve Ocircumflex -50 +KPX Abreve Odieresis -50 +KPX Abreve Ograve -50 +KPX Abreve Ohungarumlaut -50 +KPX Abreve Omacron -50 +KPX Abreve Oslash -50 +KPX Abreve Otilde -50 +KPX Abreve Q -55 +KPX Abreve T -55 +KPX Abreve Tcaron -55 +KPX Abreve Tcommaaccent -55 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -95 +KPX Abreve W -100 +KPX Abreve Y -70 +KPX Abreve Yacute -70 +KPX Abreve Ydieresis -70 +KPX Abreve quoteright -74 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -74 +KPX Abreve w -74 +KPX Abreve y -74 +KPX Abreve yacute -74 +KPX Abreve ydieresis -74 +KPX Acircumflex C -65 +KPX Acircumflex Cacute -65 +KPX Acircumflex Ccaron -65 +KPX Acircumflex Ccedilla -65 +KPX Acircumflex G -60 +KPX Acircumflex Gbreve -60 +KPX Acircumflex Gcommaaccent -60 +KPX Acircumflex O -50 +KPX Acircumflex Oacute -50 +KPX Acircumflex Ocircumflex -50 +KPX Acircumflex Odieresis -50 +KPX Acircumflex Ograve -50 +KPX Acircumflex Ohungarumlaut -50 +KPX Acircumflex Omacron -50 +KPX Acircumflex Oslash -50 +KPX Acircumflex Otilde -50 +KPX Acircumflex Q -55 +KPX Acircumflex T -55 +KPX Acircumflex Tcaron -55 +KPX Acircumflex Tcommaaccent -55 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -95 +KPX Acircumflex W -100 +KPX Acircumflex Y -70 +KPX Acircumflex Yacute -70 +KPX Acircumflex Ydieresis -70 +KPX Acircumflex quoteright -74 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -74 +KPX Acircumflex w -74 +KPX Acircumflex y -74 +KPX Acircumflex yacute -74 +KPX Acircumflex ydieresis -74 +KPX Adieresis C -65 +KPX Adieresis Cacute -65 +KPX Adieresis Ccaron -65 +KPX Adieresis Ccedilla -65 +KPX Adieresis G -60 +KPX Adieresis Gbreve -60 +KPX Adieresis Gcommaaccent -60 +KPX Adieresis O -50 +KPX Adieresis Oacute -50 +KPX Adieresis Ocircumflex -50 +KPX Adieresis Odieresis -50 +KPX Adieresis Ograve -50 +KPX Adieresis Ohungarumlaut -50 +KPX Adieresis Omacron -50 +KPX Adieresis Oslash -50 +KPX Adieresis Otilde -50 +KPX Adieresis Q -55 +KPX Adieresis T -55 +KPX Adieresis Tcaron -55 +KPX Adieresis Tcommaaccent -55 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -95 +KPX Adieresis W -100 +KPX Adieresis Y -70 +KPX Adieresis Yacute -70 +KPX Adieresis Ydieresis -70 +KPX Adieresis quoteright -74 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -74 +KPX Adieresis w -74 +KPX Adieresis y -74 +KPX Adieresis yacute -74 +KPX Adieresis ydieresis -74 +KPX Agrave C -65 +KPX Agrave Cacute -65 +KPX Agrave Ccaron -65 +KPX Agrave Ccedilla -65 +KPX Agrave G -60 +KPX Agrave Gbreve -60 +KPX Agrave Gcommaaccent -60 +KPX Agrave O -50 +KPX Agrave Oacute -50 +KPX Agrave Ocircumflex -50 +KPX Agrave Odieresis -50 +KPX Agrave Ograve -50 +KPX Agrave Ohungarumlaut -50 +KPX Agrave Omacron -50 +KPX Agrave Oslash -50 +KPX Agrave Otilde -50 +KPX Agrave Q -55 +KPX Agrave T -55 +KPX Agrave Tcaron -55 +KPX Agrave Tcommaaccent -55 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -95 +KPX Agrave W -100 +KPX Agrave Y -70 +KPX Agrave Yacute -70 +KPX Agrave Ydieresis -70 +KPX Agrave quoteright -74 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -74 +KPX Agrave w -74 +KPX Agrave y -74 +KPX Agrave yacute -74 +KPX Agrave ydieresis -74 +KPX Amacron C -65 +KPX Amacron Cacute -65 +KPX Amacron Ccaron -65 +KPX Amacron Ccedilla -65 +KPX Amacron G -60 +KPX Amacron Gbreve -60 +KPX Amacron Gcommaaccent -60 +KPX Amacron O -50 +KPX Amacron Oacute -50 +KPX Amacron Ocircumflex -50 +KPX Amacron Odieresis -50 +KPX Amacron Ograve -50 +KPX Amacron Ohungarumlaut -50 +KPX Amacron Omacron -50 +KPX Amacron Oslash -50 +KPX Amacron Otilde -50 +KPX Amacron Q -55 +KPX Amacron T -55 +KPX Amacron Tcaron -55 +KPX Amacron Tcommaaccent -55 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -95 +KPX Amacron W -100 +KPX Amacron Y -70 +KPX Amacron Yacute -70 +KPX Amacron Ydieresis -70 +KPX Amacron quoteright -74 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -74 +KPX Amacron w -74 +KPX Amacron y -74 +KPX Amacron yacute -74 +KPX Amacron ydieresis -74 +KPX Aogonek C -65 +KPX Aogonek Cacute -65 +KPX Aogonek Ccaron -65 +KPX Aogonek Ccedilla -65 +KPX Aogonek G -60 +KPX Aogonek Gbreve -60 +KPX Aogonek Gcommaaccent -60 +KPX Aogonek O -50 +KPX Aogonek Oacute -50 +KPX Aogonek Ocircumflex -50 +KPX Aogonek Odieresis -50 +KPX Aogonek Ograve -50 +KPX Aogonek Ohungarumlaut -50 +KPX Aogonek Omacron -50 +KPX Aogonek Oslash -50 +KPX Aogonek Otilde -50 +KPX Aogonek Q -55 +KPX Aogonek T -55 +KPX Aogonek Tcaron -55 +KPX Aogonek Tcommaaccent -55 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -95 +KPX Aogonek W -100 +KPX Aogonek Y -70 +KPX Aogonek Yacute -70 +KPX Aogonek Ydieresis -70 +KPX Aogonek quoteright -74 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -74 +KPX Aogonek w -74 +KPX Aogonek y -34 +KPX Aogonek yacute -34 +KPX Aogonek ydieresis -34 +KPX Aring C -65 +KPX Aring Cacute -65 +KPX Aring Ccaron -65 +KPX Aring Ccedilla -65 +KPX Aring G -60 +KPX Aring Gbreve -60 +KPX Aring Gcommaaccent -60 +KPX Aring O -50 +KPX Aring Oacute -50 +KPX Aring Ocircumflex -50 +KPX Aring Odieresis -50 +KPX Aring Ograve -50 +KPX Aring Ohungarumlaut -50 +KPX Aring Omacron -50 +KPX Aring Oslash -50 +KPX Aring Otilde -50 +KPX Aring Q -55 +KPX Aring T -55 +KPX Aring Tcaron -55 +KPX Aring Tcommaaccent -55 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -95 +KPX Aring W -100 +KPX Aring Y -70 +KPX Aring Yacute -70 +KPX Aring Ydieresis -70 +KPX Aring quoteright -74 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -74 +KPX Aring w -74 +KPX Aring y -74 +KPX Aring yacute -74 +KPX Aring ydieresis -74 +KPX Atilde C -65 +KPX Atilde Cacute -65 +KPX Atilde Ccaron -65 +KPX Atilde Ccedilla -65 +KPX Atilde G -60 +KPX Atilde Gbreve -60 +KPX Atilde Gcommaaccent -60 +KPX Atilde O -50 +KPX Atilde Oacute -50 +KPX Atilde Ocircumflex -50 +KPX Atilde Odieresis -50 +KPX Atilde Ograve -50 +KPX Atilde Ohungarumlaut -50 +KPX Atilde Omacron -50 +KPX Atilde Oslash -50 +KPX Atilde Otilde -50 +KPX Atilde Q -55 +KPX Atilde T -55 +KPX Atilde Tcaron -55 +KPX Atilde Tcommaaccent -55 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -95 +KPX Atilde W -100 +KPX Atilde Y -70 +KPX Atilde Yacute -70 +KPX Atilde Ydieresis -70 +KPX Atilde quoteright -74 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -74 +KPX Atilde w -74 +KPX Atilde y -74 +KPX Atilde yacute -74 +KPX Atilde ydieresis -74 +KPX B A -25 +KPX B Aacute -25 +KPX B Abreve -25 +KPX B Acircumflex -25 +KPX B Adieresis -25 +KPX B Agrave -25 +KPX B Amacron -25 +KPX B Aogonek -25 +KPX B Aring -25 +KPX B Atilde -25 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -25 +KPX D Aacute -25 +KPX D Abreve -25 +KPX D Acircumflex -25 +KPX D Adieresis -25 +KPX D Agrave -25 +KPX D Amacron -25 +KPX D Aogonek -25 +KPX D Aring -25 +KPX D Atilde -25 +KPX D V -50 +KPX D W -40 +KPX D Y -50 +KPX D Yacute -50 +KPX D Ydieresis -50 +KPX Dcaron A -25 +KPX Dcaron Aacute -25 +KPX Dcaron Abreve -25 +KPX Dcaron Acircumflex -25 +KPX Dcaron Adieresis -25 +KPX Dcaron Agrave -25 +KPX Dcaron Amacron -25 +KPX Dcaron Aogonek -25 +KPX Dcaron Aring -25 +KPX Dcaron Atilde -25 +KPX Dcaron V -50 +KPX Dcaron W -40 +KPX Dcaron Y -50 +KPX Dcaron Yacute -50 +KPX Dcaron Ydieresis -50 +KPX Dcroat A -25 +KPX Dcroat Aacute -25 +KPX Dcroat Abreve -25 +KPX Dcroat Acircumflex -25 +KPX Dcroat Adieresis -25 +KPX Dcroat Agrave -25 +KPX Dcroat Amacron -25 +KPX Dcroat Aogonek -25 +KPX Dcroat Aring -25 +KPX Dcroat Atilde -25 +KPX Dcroat V -50 +KPX Dcroat W -40 +KPX Dcroat Y -50 +KPX Dcroat Yacute -50 +KPX Dcroat Ydieresis -50 +KPX F A -100 +KPX F Aacute -100 +KPX F Abreve -100 +KPX F Acircumflex -100 +KPX F Adieresis -100 +KPX F Agrave -100 +KPX F Amacron -100 +KPX F Aogonek -100 +KPX F Aring -100 +KPX F Atilde -100 +KPX F a -95 +KPX F aacute -95 +KPX F abreve -95 +KPX F acircumflex -95 +KPX F adieresis -95 +KPX F agrave -95 +KPX F amacron -95 +KPX F aogonek -95 +KPX F aring -95 +KPX F atilde -95 +KPX F comma -129 +KPX F e -100 +KPX F eacute -100 +KPX F ecaron -100 +KPX F ecircumflex -100 +KPX F edieresis -100 +KPX F edotaccent -100 +KPX F egrave -100 +KPX F emacron -100 +KPX F eogonek -100 +KPX F i -40 +KPX F iacute -40 +KPX F icircumflex -40 +KPX F idieresis -40 +KPX F igrave -40 +KPX F imacron -40 +KPX F iogonek -40 +KPX F o -70 +KPX F oacute -70 +KPX F ocircumflex -70 +KPX F odieresis -70 +KPX F ograve -70 +KPX F ohungarumlaut -70 +KPX F omacron -70 +KPX F oslash -70 +KPX F otilde -70 +KPX F period -129 +KPX F r -50 +KPX F racute -50 +KPX F rcaron -50 +KPX F rcommaaccent -50 +KPX J A -25 +KPX J Aacute -25 +KPX J Abreve -25 +KPX J Acircumflex -25 +KPX J Adieresis -25 +KPX J Agrave -25 +KPX J Amacron -25 +KPX J Aogonek -25 +KPX J Aring -25 +KPX J Atilde -25 +KPX J a -40 +KPX J aacute -40 +KPX J abreve -40 +KPX J acircumflex -40 +KPX J adieresis -40 +KPX J agrave -40 +KPX J amacron -40 +KPX J aogonek -40 +KPX J aring -40 +KPX J atilde -40 +KPX J comma -10 +KPX J e -40 +KPX J eacute -40 +KPX J ecaron -40 +KPX J ecircumflex -40 +KPX J edieresis -40 +KPX J edotaccent -40 +KPX J egrave -40 +KPX J emacron -40 +KPX J eogonek -40 +KPX J o -40 +KPX J oacute -40 +KPX J ocircumflex -40 +KPX J odieresis -40 +KPX J ograve -40 +KPX J ohungarumlaut -40 +KPX J omacron -40 +KPX J oslash -40 +KPX J otilde -40 +KPX J period -10 +KPX J u -40 +KPX J uacute -40 +KPX J ucircumflex -40 +KPX J udieresis -40 +KPX J ugrave -40 +KPX J uhungarumlaut -40 +KPX J umacron -40 +KPX J uogonek -40 +KPX J uring -40 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -25 +KPX K eacute -25 +KPX K ecaron -25 +KPX K ecircumflex -25 +KPX K edieresis -25 +KPX K edotaccent -25 +KPX K egrave -25 +KPX K emacron -25 +KPX K eogonek -25 +KPX K o -25 +KPX K oacute -25 +KPX K ocircumflex -25 +KPX K odieresis -25 +KPX K ograve -25 +KPX K ohungarumlaut -25 +KPX K omacron -25 +KPX K oslash -25 +KPX K otilde -25 +KPX K u -20 +KPX K uacute -20 +KPX K ucircumflex -20 +KPX K udieresis -20 +KPX K ugrave -20 +KPX K uhungarumlaut -20 +KPX K umacron -20 +KPX K uogonek -20 +KPX K uring -20 +KPX K y -20 +KPX K yacute -20 +KPX K ydieresis -20 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -25 +KPX Kcommaaccent eacute -25 +KPX Kcommaaccent ecaron -25 +KPX Kcommaaccent ecircumflex -25 +KPX Kcommaaccent edieresis -25 +KPX Kcommaaccent edotaccent -25 +KPX Kcommaaccent egrave -25 +KPX Kcommaaccent emacron -25 +KPX Kcommaaccent eogonek -25 +KPX Kcommaaccent o -25 +KPX Kcommaaccent oacute -25 +KPX Kcommaaccent ocircumflex -25 +KPX Kcommaaccent odieresis -25 +KPX Kcommaaccent ograve -25 +KPX Kcommaaccent ohungarumlaut -25 +KPX Kcommaaccent omacron -25 +KPX Kcommaaccent oslash -25 +KPX Kcommaaccent otilde -25 +KPX Kcommaaccent u -20 +KPX Kcommaaccent uacute -20 +KPX Kcommaaccent ucircumflex -20 +KPX Kcommaaccent udieresis -20 +KPX Kcommaaccent ugrave -20 +KPX Kcommaaccent uhungarumlaut -20 +KPX Kcommaaccent umacron -20 +KPX Kcommaaccent uogonek -20 +KPX Kcommaaccent uring -20 +KPX Kcommaaccent y -20 +KPX Kcommaaccent yacute -20 +KPX Kcommaaccent ydieresis -20 +KPX L T -18 +KPX L Tcaron -18 +KPX L Tcommaaccent -18 +KPX L V -37 +KPX L W -37 +KPX L Y -37 +KPX L Yacute -37 +KPX L Ydieresis -37 +KPX L quoteright -55 +KPX L y -37 +KPX L yacute -37 +KPX L ydieresis -37 +KPX Lacute T -18 +KPX Lacute Tcaron -18 +KPX Lacute Tcommaaccent -18 +KPX Lacute V -37 +KPX Lacute W -37 +KPX Lacute Y -37 +KPX Lacute Yacute -37 +KPX Lacute Ydieresis -37 +KPX Lacute quoteright -55 +KPX Lacute y -37 +KPX Lacute yacute -37 +KPX Lacute ydieresis -37 +KPX Lcommaaccent T -18 +KPX Lcommaaccent Tcaron -18 +KPX Lcommaaccent Tcommaaccent -18 +KPX Lcommaaccent V -37 +KPX Lcommaaccent W -37 +KPX Lcommaaccent Y -37 +KPX Lcommaaccent Yacute -37 +KPX Lcommaaccent Ydieresis -37 +KPX Lcommaaccent quoteright -55 +KPX Lcommaaccent y -37 +KPX Lcommaaccent yacute -37 +KPX Lcommaaccent ydieresis -37 +KPX Lslash T -18 +KPX Lslash Tcaron -18 +KPX Lslash Tcommaaccent -18 +KPX Lslash V -37 +KPX Lslash W -37 +KPX Lslash Y -37 +KPX Lslash Yacute -37 +KPX Lslash Ydieresis -37 +KPX Lslash quoteright -55 +KPX Lslash y -37 +KPX Lslash yacute -37 +KPX Lslash ydieresis -37 +KPX N A -30 +KPX N Aacute -30 +KPX N Abreve -30 +KPX N Acircumflex -30 +KPX N Adieresis -30 +KPX N Agrave -30 +KPX N Amacron -30 +KPX N Aogonek -30 +KPX N Aring -30 +KPX N Atilde -30 +KPX Nacute A -30 +KPX Nacute Aacute -30 +KPX Nacute Abreve -30 +KPX Nacute Acircumflex -30 +KPX Nacute Adieresis -30 +KPX Nacute Agrave -30 +KPX Nacute Amacron -30 +KPX Nacute Aogonek -30 +KPX Nacute Aring -30 +KPX Nacute Atilde -30 +KPX Ncaron A -30 +KPX Ncaron Aacute -30 +KPX Ncaron Abreve -30 +KPX Ncaron Acircumflex -30 +KPX Ncaron Adieresis -30 +KPX Ncaron Agrave -30 +KPX Ncaron Amacron -30 +KPX Ncaron Aogonek -30 +KPX Ncaron Aring -30 +KPX Ncaron Atilde -30 +KPX Ncommaaccent A -30 +KPX Ncommaaccent Aacute -30 +KPX Ncommaaccent Abreve -30 +KPX Ncommaaccent Acircumflex -30 +KPX Ncommaaccent Adieresis -30 +KPX Ncommaaccent Agrave -30 +KPX Ncommaaccent Amacron -30 +KPX Ncommaaccent Aogonek -30 +KPX Ncommaaccent Aring -30 +KPX Ncommaaccent Atilde -30 +KPX Ntilde A -30 +KPX Ntilde Aacute -30 +KPX Ntilde Abreve -30 +KPX Ntilde Acircumflex -30 +KPX Ntilde Adieresis -30 +KPX Ntilde Agrave -30 +KPX Ntilde Amacron -30 +KPX Ntilde Aogonek -30 +KPX Ntilde Aring -30 +KPX Ntilde Atilde -30 +KPX O A -40 +KPX O Aacute -40 +KPX O Abreve -40 +KPX O Acircumflex -40 +KPX O Adieresis -40 +KPX O Agrave -40 +KPX O Amacron -40 +KPX O Aogonek -40 +KPX O Aring -40 +KPX O Atilde -40 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -40 +KPX Oacute Aacute -40 +KPX Oacute Abreve -40 +KPX Oacute Acircumflex -40 +KPX Oacute Adieresis -40 +KPX Oacute Agrave -40 +KPX Oacute Amacron -40 +KPX Oacute Aogonek -40 +KPX Oacute Aring -40 +KPX Oacute Atilde -40 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -40 +KPX Ocircumflex Aacute -40 +KPX Ocircumflex Abreve -40 +KPX Ocircumflex Acircumflex -40 +KPX Ocircumflex Adieresis -40 +KPX Ocircumflex Agrave -40 +KPX Ocircumflex Amacron -40 +KPX Ocircumflex Aogonek -40 +KPX Ocircumflex Aring -40 +KPX Ocircumflex Atilde -40 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -40 +KPX Odieresis Aacute -40 +KPX Odieresis Abreve -40 +KPX Odieresis Acircumflex -40 +KPX Odieresis Adieresis -40 +KPX Odieresis Agrave -40 +KPX Odieresis Amacron -40 +KPX Odieresis Aogonek -40 +KPX Odieresis Aring -40 +KPX Odieresis Atilde -40 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -40 +KPX Ograve Aacute -40 +KPX Ograve Abreve -40 +KPX Ograve Acircumflex -40 +KPX Ograve Adieresis -40 +KPX Ograve Agrave -40 +KPX Ograve Amacron -40 +KPX Ograve Aogonek -40 +KPX Ograve Aring -40 +KPX Ograve Atilde -40 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -40 +KPX Ohungarumlaut Aacute -40 +KPX Ohungarumlaut Abreve -40 +KPX Ohungarumlaut Acircumflex -40 +KPX Ohungarumlaut Adieresis -40 +KPX Ohungarumlaut Agrave -40 +KPX Ohungarumlaut Amacron -40 +KPX Ohungarumlaut Aogonek -40 +KPX Ohungarumlaut Aring -40 +KPX Ohungarumlaut Atilde -40 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -40 +KPX Omacron Aacute -40 +KPX Omacron Abreve -40 +KPX Omacron Acircumflex -40 +KPX Omacron Adieresis -40 +KPX Omacron Agrave -40 +KPX Omacron Amacron -40 +KPX Omacron Aogonek -40 +KPX Omacron Aring -40 +KPX Omacron Atilde -40 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -40 +KPX Oslash Aacute -40 +KPX Oslash Abreve -40 +KPX Oslash Acircumflex -40 +KPX Oslash Adieresis -40 +KPX Oslash Agrave -40 +KPX Oslash Amacron -40 +KPX Oslash Aogonek -40 +KPX Oslash Aring -40 +KPX Oslash Atilde -40 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -40 +KPX Otilde Aacute -40 +KPX Otilde Abreve -40 +KPX Otilde Acircumflex -40 +KPX Otilde Adieresis -40 +KPX Otilde Agrave -40 +KPX Otilde Amacron -40 +KPX Otilde Aogonek -40 +KPX Otilde Aring -40 +KPX Otilde Atilde -40 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -85 +KPX P Aacute -85 +KPX P Abreve -85 +KPX P Acircumflex -85 +KPX P Adieresis -85 +KPX P Agrave -85 +KPX P Amacron -85 +KPX P Aogonek -85 +KPX P Aring -85 +KPX P Atilde -85 +KPX P a -40 +KPX P aacute -40 +KPX P abreve -40 +KPX P acircumflex -40 +KPX P adieresis -40 +KPX P agrave -40 +KPX P amacron -40 +KPX P aogonek -40 +KPX P aring -40 +KPX P atilde -40 +KPX P comma -129 +KPX P e -50 +KPX P eacute -50 +KPX P ecaron -50 +KPX P ecircumflex -50 +KPX P edieresis -50 +KPX P edotaccent -50 +KPX P egrave -50 +KPX P emacron -50 +KPX P eogonek -50 +KPX P o -55 +KPX P oacute -55 +KPX P ocircumflex -55 +KPX P odieresis -55 +KPX P ograve -55 +KPX P ohungarumlaut -55 +KPX P omacron -55 +KPX P oslash -55 +KPX P otilde -55 +KPX P period -129 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -40 +KPX R Oacute -40 +KPX R Ocircumflex -40 +KPX R Odieresis -40 +KPX R Ograve -40 +KPX R Ohungarumlaut -40 +KPX R Omacron -40 +KPX R Oslash -40 +KPX R Otilde -40 +KPX R T -30 +KPX R Tcaron -30 +KPX R Tcommaaccent -30 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -18 +KPX R W -18 +KPX R Y -18 +KPX R Yacute -18 +KPX R Ydieresis -18 +KPX Racute O -40 +KPX Racute Oacute -40 +KPX Racute Ocircumflex -40 +KPX Racute Odieresis -40 +KPX Racute Ograve -40 +KPX Racute Ohungarumlaut -40 +KPX Racute Omacron -40 +KPX Racute Oslash -40 +KPX Racute Otilde -40 +KPX Racute T -30 +KPX Racute Tcaron -30 +KPX Racute Tcommaaccent -30 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -18 +KPX Racute W -18 +KPX Racute Y -18 +KPX Racute Yacute -18 +KPX Racute Ydieresis -18 +KPX Rcaron O -40 +KPX Rcaron Oacute -40 +KPX Rcaron Ocircumflex -40 +KPX Rcaron Odieresis -40 +KPX Rcaron Ograve -40 +KPX Rcaron Ohungarumlaut -40 +KPX Rcaron Omacron -40 +KPX Rcaron Oslash -40 +KPX Rcaron Otilde -40 +KPX Rcaron T -30 +KPX Rcaron Tcaron -30 +KPX Rcaron Tcommaaccent -30 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -18 +KPX Rcaron W -18 +KPX Rcaron Y -18 +KPX Rcaron Yacute -18 +KPX Rcaron Ydieresis -18 +KPX Rcommaaccent O -40 +KPX Rcommaaccent Oacute -40 +KPX Rcommaaccent Ocircumflex -40 +KPX Rcommaaccent Odieresis -40 +KPX Rcommaaccent Ograve -40 +KPX Rcommaaccent Ohungarumlaut -40 +KPX Rcommaaccent Omacron -40 +KPX Rcommaaccent Oslash -40 +KPX Rcommaaccent Otilde -40 +KPX Rcommaaccent T -30 +KPX Rcommaaccent Tcaron -30 +KPX Rcommaaccent Tcommaaccent -30 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -18 +KPX Rcommaaccent W -18 +KPX Rcommaaccent Y -18 +KPX Rcommaaccent Yacute -18 +KPX Rcommaaccent Ydieresis -18 +KPX T A -55 +KPX T Aacute -55 +KPX T Abreve -55 +KPX T Acircumflex -55 +KPX T Adieresis -55 +KPX T Agrave -55 +KPX T Amacron -55 +KPX T Aogonek -55 +KPX T Aring -55 +KPX T Atilde -55 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -92 +KPX T aacute -92 +KPX T abreve -92 +KPX T acircumflex -92 +KPX T adieresis -92 +KPX T agrave -92 +KPX T amacron -92 +KPX T aogonek -92 +KPX T aring -92 +KPX T atilde -92 +KPX T colon -74 +KPX T comma -92 +KPX T e -92 +KPX T eacute -92 +KPX T ecaron -92 +KPX T ecircumflex -92 +KPX T edieresis -52 +KPX T edotaccent -92 +KPX T egrave -52 +KPX T emacron -52 +KPX T eogonek -92 +KPX T hyphen -92 +KPX T i -37 +KPX T iacute -37 +KPX T iogonek -37 +KPX T o -95 +KPX T oacute -95 +KPX T ocircumflex -95 +KPX T odieresis -95 +KPX T ograve -95 +KPX T ohungarumlaut -95 +KPX T omacron -95 +KPX T oslash -95 +KPX T otilde -95 +KPX T period -92 +KPX T r -37 +KPX T racute -37 +KPX T rcaron -37 +KPX T rcommaaccent -37 +KPX T semicolon -74 +KPX T u -37 +KPX T uacute -37 +KPX T ucircumflex -37 +KPX T udieresis -37 +KPX T ugrave -37 +KPX T uhungarumlaut -37 +KPX T umacron -37 +KPX T uogonek -37 +KPX T uring -37 +KPX T w -37 +KPX T y -37 +KPX T yacute -37 +KPX T ydieresis -37 +KPX Tcaron A -55 +KPX Tcaron Aacute -55 +KPX Tcaron Abreve -55 +KPX Tcaron Acircumflex -55 +KPX Tcaron Adieresis -55 +KPX Tcaron Agrave -55 +KPX Tcaron Amacron -55 +KPX Tcaron Aogonek -55 +KPX Tcaron Aring -55 +KPX Tcaron Atilde -55 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -92 +KPX Tcaron aacute -92 +KPX Tcaron abreve -92 +KPX Tcaron acircumflex -92 +KPX Tcaron adieresis -92 +KPX Tcaron agrave -92 +KPX Tcaron amacron -92 +KPX Tcaron aogonek -92 +KPX Tcaron aring -92 +KPX Tcaron atilde -92 +KPX Tcaron colon -74 +KPX Tcaron comma -92 +KPX Tcaron e -92 +KPX Tcaron eacute -92 +KPX Tcaron ecaron -92 +KPX Tcaron ecircumflex -92 +KPX Tcaron edieresis -52 +KPX Tcaron edotaccent -92 +KPX Tcaron egrave -52 +KPX Tcaron emacron -52 +KPX Tcaron eogonek -92 +KPX Tcaron hyphen -92 +KPX Tcaron i -37 +KPX Tcaron iacute -37 +KPX Tcaron iogonek -37 +KPX Tcaron o -95 +KPX Tcaron oacute -95 +KPX Tcaron ocircumflex -95 +KPX Tcaron odieresis -95 +KPX Tcaron ograve -95 +KPX Tcaron ohungarumlaut -95 +KPX Tcaron omacron -95 +KPX Tcaron oslash -95 +KPX Tcaron otilde -95 +KPX Tcaron period -92 +KPX Tcaron r -37 +KPX Tcaron racute -37 +KPX Tcaron rcaron -37 +KPX Tcaron rcommaaccent -37 +KPX Tcaron semicolon -74 +KPX Tcaron u -37 +KPX Tcaron uacute -37 +KPX Tcaron ucircumflex -37 +KPX Tcaron udieresis -37 +KPX Tcaron ugrave -37 +KPX Tcaron uhungarumlaut -37 +KPX Tcaron umacron -37 +KPX Tcaron uogonek -37 +KPX Tcaron uring -37 +KPX Tcaron w -37 +KPX Tcaron y -37 +KPX Tcaron yacute -37 +KPX Tcaron ydieresis -37 +KPX Tcommaaccent A -55 +KPX Tcommaaccent Aacute -55 +KPX Tcommaaccent Abreve -55 +KPX Tcommaaccent Acircumflex -55 +KPX Tcommaaccent Adieresis -55 +KPX Tcommaaccent Agrave -55 +KPX Tcommaaccent Amacron -55 +KPX Tcommaaccent Aogonek -55 +KPX Tcommaaccent Aring -55 +KPX Tcommaaccent Atilde -55 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -92 +KPX Tcommaaccent aacute -92 +KPX Tcommaaccent abreve -92 +KPX Tcommaaccent acircumflex -92 +KPX Tcommaaccent adieresis -92 +KPX Tcommaaccent agrave -92 +KPX Tcommaaccent amacron -92 +KPX Tcommaaccent aogonek -92 +KPX Tcommaaccent aring -92 +KPX Tcommaaccent atilde -92 +KPX Tcommaaccent colon -74 +KPX Tcommaaccent comma -92 +KPX Tcommaaccent e -92 +KPX Tcommaaccent eacute -92 +KPX Tcommaaccent ecaron -92 +KPX Tcommaaccent ecircumflex -92 +KPX Tcommaaccent edieresis -52 +KPX Tcommaaccent edotaccent -92 +KPX Tcommaaccent egrave -52 +KPX Tcommaaccent emacron -52 +KPX Tcommaaccent eogonek -92 +KPX Tcommaaccent hyphen -92 +KPX Tcommaaccent i -37 +KPX Tcommaaccent iacute -37 +KPX Tcommaaccent iogonek -37 +KPX Tcommaaccent o -95 +KPX Tcommaaccent oacute -95 +KPX Tcommaaccent ocircumflex -95 +KPX Tcommaaccent odieresis -95 +KPX Tcommaaccent ograve -95 +KPX Tcommaaccent ohungarumlaut -95 +KPX Tcommaaccent omacron -95 +KPX Tcommaaccent oslash -95 +KPX Tcommaaccent otilde -95 +KPX Tcommaaccent period -92 +KPX Tcommaaccent r -37 +KPX Tcommaaccent racute -37 +KPX Tcommaaccent rcaron -37 +KPX Tcommaaccent rcommaaccent -37 +KPX Tcommaaccent semicolon -74 +KPX Tcommaaccent u -37 +KPX Tcommaaccent uacute -37 +KPX Tcommaaccent ucircumflex -37 +KPX Tcommaaccent udieresis -37 +KPX Tcommaaccent ugrave -37 +KPX Tcommaaccent uhungarumlaut -37 +KPX Tcommaaccent umacron -37 +KPX Tcommaaccent uogonek -37 +KPX Tcommaaccent uring -37 +KPX Tcommaaccent w -37 +KPX Tcommaaccent y -37 +KPX Tcommaaccent yacute -37 +KPX Tcommaaccent ydieresis -37 +KPX U A -45 +KPX U Aacute -45 +KPX U Abreve -45 +KPX U Acircumflex -45 +KPX U Adieresis -45 +KPX U Agrave -45 +KPX U Amacron -45 +KPX U Aogonek -45 +KPX U Aring -45 +KPX U Atilde -45 +KPX Uacute A -45 +KPX Uacute Aacute -45 +KPX Uacute Abreve -45 +KPX Uacute Acircumflex -45 +KPX Uacute Adieresis -45 +KPX Uacute Agrave -45 +KPX Uacute Amacron -45 +KPX Uacute Aogonek -45 +KPX Uacute Aring -45 +KPX Uacute Atilde -45 +KPX Ucircumflex A -45 +KPX Ucircumflex Aacute -45 +KPX Ucircumflex Abreve -45 +KPX Ucircumflex Acircumflex -45 +KPX Ucircumflex Adieresis -45 +KPX Ucircumflex Agrave -45 +KPX Ucircumflex Amacron -45 +KPX Ucircumflex Aogonek -45 +KPX Ucircumflex Aring -45 +KPX Ucircumflex Atilde -45 +KPX Udieresis A -45 +KPX Udieresis Aacute -45 +KPX Udieresis Abreve -45 +KPX Udieresis Acircumflex -45 +KPX Udieresis Adieresis -45 +KPX Udieresis Agrave -45 +KPX Udieresis Amacron -45 +KPX Udieresis Aogonek -45 +KPX Udieresis Aring -45 +KPX Udieresis Atilde -45 +KPX Ugrave A -45 +KPX Ugrave Aacute -45 +KPX Ugrave Abreve -45 +KPX Ugrave Acircumflex -45 +KPX Ugrave Adieresis -45 +KPX Ugrave Agrave -45 +KPX Ugrave Amacron -45 +KPX Ugrave Aogonek -45 +KPX Ugrave Aring -45 +KPX Ugrave Atilde -45 +KPX Uhungarumlaut A -45 +KPX Uhungarumlaut Aacute -45 +KPX Uhungarumlaut Abreve -45 +KPX Uhungarumlaut Acircumflex -45 +KPX Uhungarumlaut Adieresis -45 +KPX Uhungarumlaut Agrave -45 +KPX Uhungarumlaut Amacron -45 +KPX Uhungarumlaut Aogonek -45 +KPX Uhungarumlaut Aring -45 +KPX Uhungarumlaut Atilde -45 +KPX Umacron A -45 +KPX Umacron Aacute -45 +KPX Umacron Abreve -45 +KPX Umacron Acircumflex -45 +KPX Umacron Adieresis -45 +KPX Umacron Agrave -45 +KPX Umacron Amacron -45 +KPX Umacron Aogonek -45 +KPX Umacron Aring -45 +KPX Umacron Atilde -45 +KPX Uogonek A -45 +KPX Uogonek Aacute -45 +KPX Uogonek Abreve -45 +KPX Uogonek Acircumflex -45 +KPX Uogonek Adieresis -45 +KPX Uogonek Agrave -45 +KPX Uogonek Amacron -45 +KPX Uogonek Aogonek -45 +KPX Uogonek Aring -45 +KPX Uogonek Atilde -45 +KPX Uring A -45 +KPX Uring Aacute -45 +KPX Uring Abreve -45 +KPX Uring Acircumflex -45 +KPX Uring Adieresis -45 +KPX Uring Agrave -45 +KPX Uring Amacron -45 +KPX Uring Aogonek -45 +KPX Uring Aring -45 +KPX Uring Atilde -45 +KPX V A -85 +KPX V Aacute -85 +KPX V Abreve -85 +KPX V Acircumflex -85 +KPX V Adieresis -85 +KPX V Agrave -85 +KPX V Amacron -85 +KPX V Aogonek -85 +KPX V Aring -85 +KPX V Atilde -85 +KPX V G -10 +KPX V Gbreve -10 +KPX V Gcommaaccent -10 +KPX V O -30 +KPX V Oacute -30 +KPX V Ocircumflex -30 +KPX V Odieresis -30 +KPX V Ograve -30 +KPX V Ohungarumlaut -30 +KPX V Omacron -30 +KPX V Oslash -30 +KPX V Otilde -30 +KPX V a -111 +KPX V aacute -111 +KPX V abreve -111 +KPX V acircumflex -111 +KPX V adieresis -111 +KPX V agrave -111 +KPX V amacron -111 +KPX V aogonek -111 +KPX V aring -111 +KPX V atilde -111 +KPX V colon -74 +KPX V comma -129 +KPX V e -111 +KPX V eacute -111 +KPX V ecaron -111 +KPX V ecircumflex -111 +KPX V edieresis -71 +KPX V edotaccent -111 +KPX V egrave -71 +KPX V emacron -71 +KPX V eogonek -111 +KPX V hyphen -70 +KPX V i -55 +KPX V iacute -55 +KPX V iogonek -55 +KPX V o -111 +KPX V oacute -111 +KPX V ocircumflex -111 +KPX V odieresis -111 +KPX V ograve -111 +KPX V ohungarumlaut -111 +KPX V omacron -111 +KPX V oslash -111 +KPX V otilde -111 +KPX V period -129 +KPX V semicolon -74 +KPX V u -55 +KPX V uacute -55 +KPX V ucircumflex -55 +KPX V udieresis -55 +KPX V ugrave -55 +KPX V uhungarumlaut -55 +KPX V umacron -55 +KPX V uogonek -55 +KPX V uring -55 +KPX W A -74 +KPX W Aacute -74 +KPX W Abreve -74 +KPX W Acircumflex -74 +KPX W Adieresis -74 +KPX W Agrave -74 +KPX W Amacron -74 +KPX W Aogonek -74 +KPX W Aring -74 +KPX W Atilde -74 +KPX W O -15 +KPX W Oacute -15 +KPX W Ocircumflex -15 +KPX W Odieresis -15 +KPX W Ograve -15 +KPX W Ohungarumlaut -15 +KPX W Omacron -15 +KPX W Oslash -15 +KPX W Otilde -15 +KPX W a -85 +KPX W aacute -85 +KPX W abreve -85 +KPX W acircumflex -85 +KPX W adieresis -85 +KPX W agrave -85 +KPX W amacron -85 +KPX W aogonek -85 +KPX W aring -85 +KPX W atilde -85 +KPX W colon -55 +KPX W comma -74 +KPX W e -90 +KPX W eacute -90 +KPX W ecaron -90 +KPX W ecircumflex -90 +KPX W edieresis -50 +KPX W edotaccent -90 +KPX W egrave -50 +KPX W emacron -50 +KPX W eogonek -90 +KPX W hyphen -50 +KPX W i -37 +KPX W iacute -37 +KPX W iogonek -37 +KPX W o -80 +KPX W oacute -80 +KPX W ocircumflex -80 +KPX W odieresis -80 +KPX W ograve -80 +KPX W ohungarumlaut -80 +KPX W omacron -80 +KPX W oslash -80 +KPX W otilde -80 +KPX W period -74 +KPX W semicolon -55 +KPX W u -55 +KPX W uacute -55 +KPX W ucircumflex -55 +KPX W udieresis -55 +KPX W ugrave -55 +KPX W uhungarumlaut -55 +KPX W umacron -55 +KPX W uogonek -55 +KPX W uring -55 +KPX W y -55 +KPX W yacute -55 +KPX W ydieresis -55 +KPX Y A -74 +KPX Y Aacute -74 +KPX Y Abreve -74 +KPX Y Acircumflex -74 +KPX Y Adieresis -74 +KPX Y Agrave -74 +KPX Y Amacron -74 +KPX Y Aogonek -74 +KPX Y Aring -74 +KPX Y Atilde -74 +KPX Y O -25 +KPX Y Oacute -25 +KPX Y Ocircumflex -25 +KPX Y Odieresis -25 +KPX Y Ograve -25 +KPX Y Ohungarumlaut -25 +KPX Y Omacron -25 +KPX Y Oslash -25 +KPX Y Otilde -25 +KPX Y a -92 +KPX Y aacute -92 +KPX Y abreve -92 +KPX Y acircumflex -92 +KPX Y adieresis -92 +KPX Y agrave -92 +KPX Y amacron -92 +KPX Y aogonek -92 +KPX Y aring -92 +KPX Y atilde -92 +KPX Y colon -92 +KPX Y comma -92 +KPX Y e -111 +KPX Y eacute -111 +KPX Y ecaron -111 +KPX Y ecircumflex -71 +KPX Y edieresis -71 +KPX Y edotaccent -111 +KPX Y egrave -71 +KPX Y emacron -71 +KPX Y eogonek -111 +KPX Y hyphen -92 +KPX Y i -55 +KPX Y iacute -55 +KPX Y iogonek -55 +KPX Y o -111 +KPX Y oacute -111 +KPX Y ocircumflex -111 +KPX Y odieresis -111 +KPX Y ograve -111 +KPX Y ohungarumlaut -111 +KPX Y omacron -111 +KPX Y oslash -111 +KPX Y otilde -111 +KPX Y period -74 +KPX Y semicolon -92 +KPX Y u -92 +KPX Y uacute -92 +KPX Y ucircumflex -92 +KPX Y udieresis -92 +KPX Y ugrave -92 +KPX Y uhungarumlaut -92 +KPX Y umacron -92 +KPX Y uogonek -92 +KPX Y uring -92 +KPX Yacute A -74 +KPX Yacute Aacute -74 +KPX Yacute Abreve -74 +KPX Yacute Acircumflex -74 +KPX Yacute Adieresis -74 +KPX Yacute Agrave -74 +KPX Yacute Amacron -74 +KPX Yacute Aogonek -74 +KPX Yacute Aring -74 +KPX Yacute Atilde -74 +KPX Yacute O -25 +KPX Yacute Oacute -25 +KPX Yacute Ocircumflex -25 +KPX Yacute Odieresis -25 +KPX Yacute Ograve -25 +KPX Yacute Ohungarumlaut -25 +KPX Yacute Omacron -25 +KPX Yacute Oslash -25 +KPX Yacute Otilde -25 +KPX Yacute a -92 +KPX Yacute aacute -92 +KPX Yacute abreve -92 +KPX Yacute acircumflex -92 +KPX Yacute adieresis -92 +KPX Yacute agrave -92 +KPX Yacute amacron -92 +KPX Yacute aogonek -92 +KPX Yacute aring -92 +KPX Yacute atilde -92 +KPX Yacute colon -92 +KPX Yacute comma -92 +KPX Yacute e -111 +KPX Yacute eacute -111 +KPX Yacute ecaron -111 +KPX Yacute ecircumflex -71 +KPX Yacute edieresis -71 +KPX Yacute edotaccent -111 +KPX Yacute egrave -71 +KPX Yacute emacron -71 +KPX Yacute eogonek -111 +KPX Yacute hyphen -92 +KPX Yacute i -55 +KPX Yacute iacute -55 +KPX Yacute iogonek -55 +KPX Yacute o -111 +KPX Yacute oacute -111 +KPX Yacute ocircumflex -111 +KPX Yacute odieresis -111 +KPX Yacute ograve -111 +KPX Yacute ohungarumlaut -111 +KPX Yacute omacron -111 +KPX Yacute oslash -111 +KPX Yacute otilde -111 +KPX Yacute period -74 +KPX Yacute semicolon -92 +KPX Yacute u -92 +KPX Yacute uacute -92 +KPX Yacute ucircumflex -92 +KPX Yacute udieresis -92 +KPX Yacute ugrave -92 +KPX Yacute uhungarumlaut -92 +KPX Yacute umacron -92 +KPX Yacute uogonek -92 +KPX Yacute uring -92 +KPX Ydieresis A -74 +KPX Ydieresis Aacute -74 +KPX Ydieresis Abreve -74 +KPX Ydieresis Acircumflex -74 +KPX Ydieresis Adieresis -74 +KPX Ydieresis Agrave -74 +KPX Ydieresis Amacron -74 +KPX Ydieresis Aogonek -74 +KPX Ydieresis Aring -74 +KPX Ydieresis Atilde -74 +KPX Ydieresis O -25 +KPX Ydieresis Oacute -25 +KPX Ydieresis Ocircumflex -25 +KPX Ydieresis Odieresis -25 +KPX Ydieresis Ograve -25 +KPX Ydieresis Ohungarumlaut -25 +KPX Ydieresis Omacron -25 +KPX Ydieresis Oslash -25 +KPX Ydieresis Otilde -25 +KPX Ydieresis a -92 +KPX Ydieresis aacute -92 +KPX Ydieresis abreve -92 +KPX Ydieresis acircumflex -92 +KPX Ydieresis adieresis -92 +KPX Ydieresis agrave -92 +KPX Ydieresis amacron -92 +KPX Ydieresis aogonek -92 +KPX Ydieresis aring -92 +KPX Ydieresis atilde -92 +KPX Ydieresis colon -92 +KPX Ydieresis comma -92 +KPX Ydieresis e -111 +KPX Ydieresis eacute -111 +KPX Ydieresis ecaron -111 +KPX Ydieresis ecircumflex -71 +KPX Ydieresis edieresis -71 +KPX Ydieresis edotaccent -111 +KPX Ydieresis egrave -71 +KPX Ydieresis emacron -71 +KPX Ydieresis eogonek -111 +KPX Ydieresis hyphen -92 +KPX Ydieresis i -55 +KPX Ydieresis iacute -55 +KPX Ydieresis iogonek -55 +KPX Ydieresis o -111 +KPX Ydieresis oacute -111 +KPX Ydieresis ocircumflex -111 +KPX Ydieresis odieresis -111 +KPX Ydieresis ograve -111 +KPX Ydieresis ohungarumlaut -111 +KPX Ydieresis omacron -111 +KPX Ydieresis oslash -111 +KPX Ydieresis otilde -111 +KPX Ydieresis period -74 +KPX Ydieresis semicolon -92 +KPX Ydieresis u -92 +KPX Ydieresis uacute -92 +KPX Ydieresis ucircumflex -92 +KPX Ydieresis udieresis -92 +KPX Ydieresis ugrave -92 +KPX Ydieresis uhungarumlaut -92 +KPX Ydieresis umacron -92 +KPX Ydieresis uogonek -92 +KPX Ydieresis uring -92 +KPX b b -10 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX c h -10 +KPX c k -10 +KPX c kcommaaccent -10 +KPX cacute h -10 +KPX cacute k -10 +KPX cacute kcommaaccent -10 +KPX ccaron h -10 +KPX ccaron k -10 +KPX ccaron kcommaaccent -10 +KPX ccedilla h -10 +KPX ccedilla k -10 +KPX ccedilla kcommaaccent -10 +KPX comma quotedblright -95 +KPX comma quoteright -95 +KPX e b -10 +KPX eacute b -10 +KPX ecaron b -10 +KPX ecircumflex b -10 +KPX edieresis b -10 +KPX edotaccent b -10 +KPX egrave b -10 +KPX emacron b -10 +KPX eogonek b -10 +KPX f comma -10 +KPX f dotlessi -30 +KPX f e -10 +KPX f eacute -10 +KPX f edotaccent -10 +KPX f eogonek -10 +KPX f f -18 +KPX f o -10 +KPX f oacute -10 +KPX f ocircumflex -10 +KPX f ograve -10 +KPX f ohungarumlaut -10 +KPX f oslash -10 +KPX f otilde -10 +KPX f period -10 +KPX f quoteright 55 +KPX k e -30 +KPX k eacute -30 +KPX k ecaron -30 +KPX k ecircumflex -30 +KPX k edieresis -30 +KPX k edotaccent -30 +KPX k egrave -30 +KPX k emacron -30 +KPX k eogonek -30 +KPX k o -10 +KPX k oacute -10 +KPX k ocircumflex -10 +KPX k odieresis -10 +KPX k ograve -10 +KPX k ohungarumlaut -10 +KPX k omacron -10 +KPX k oslash -10 +KPX k otilde -10 +KPX kcommaaccent e -30 +KPX kcommaaccent eacute -30 +KPX kcommaaccent ecaron -30 +KPX kcommaaccent ecircumflex -30 +KPX kcommaaccent edieresis -30 +KPX kcommaaccent edotaccent -30 +KPX kcommaaccent egrave -30 +KPX kcommaaccent emacron -30 +KPX kcommaaccent eogonek -30 +KPX kcommaaccent o -10 +KPX kcommaaccent oacute -10 +KPX kcommaaccent ocircumflex -10 +KPX kcommaaccent odieresis -10 +KPX kcommaaccent ograve -10 +KPX kcommaaccent ohungarumlaut -10 +KPX kcommaaccent omacron -10 +KPX kcommaaccent oslash -10 +KPX kcommaaccent otilde -10 +KPX n v -40 +KPX nacute v -40 +KPX ncaron v -40 +KPX ncommaaccent v -40 +KPX ntilde v -40 +KPX o v -15 +KPX o w -25 +KPX o x -10 +KPX o y -10 +KPX o yacute -10 +KPX o ydieresis -10 +KPX oacute v -15 +KPX oacute w -25 +KPX oacute x -10 +KPX oacute y -10 +KPX oacute yacute -10 +KPX oacute ydieresis -10 +KPX ocircumflex v -15 +KPX ocircumflex w -25 +KPX ocircumflex x -10 +KPX ocircumflex y -10 +KPX ocircumflex yacute -10 +KPX ocircumflex ydieresis -10 +KPX odieresis v -15 +KPX odieresis w -25 +KPX odieresis x -10 +KPX odieresis y -10 +KPX odieresis yacute -10 +KPX odieresis ydieresis -10 +KPX ograve v -15 +KPX ograve w -25 +KPX ograve x -10 +KPX ograve y -10 +KPX ograve yacute -10 +KPX ograve ydieresis -10 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -25 +KPX ohungarumlaut x -10 +KPX ohungarumlaut y -10 +KPX ohungarumlaut yacute -10 +KPX ohungarumlaut ydieresis -10 +KPX omacron v -15 +KPX omacron w -25 +KPX omacron x -10 +KPX omacron y -10 +KPX omacron yacute -10 +KPX omacron ydieresis -10 +KPX oslash v -15 +KPX oslash w -25 +KPX oslash x -10 +KPX oslash y -10 +KPX oslash yacute -10 +KPX oslash ydieresis -10 +KPX otilde v -15 +KPX otilde w -25 +KPX otilde x -10 +KPX otilde y -10 +KPX otilde yacute -10 +KPX otilde ydieresis -10 +KPX period quotedblright -95 +KPX period quoteright -95 +KPX quoteleft quoteleft -74 +KPX quoteright d -15 +KPX quoteright dcroat -15 +KPX quoteright quoteright -74 +KPX quoteright r -15 +KPX quoteright racute -15 +KPX quoteright rcaron -15 +KPX quoteright rcommaaccent -15 +KPX quoteright s -74 +KPX quoteright sacute -74 +KPX quoteright scaron -74 +KPX quoteright scedilla -74 +KPX quoteright scommaaccent -74 +KPX quoteright space -74 +KPX quoteright t -37 +KPX quoteright tcommaaccent -37 +KPX quoteright v -15 +KPX r comma -65 +KPX r period -65 +KPX racute comma -65 +KPX racute period -65 +KPX rcaron comma -65 +KPX rcaron period -65 +KPX rcommaaccent comma -65 +KPX rcommaaccent period -65 +KPX space A -37 +KPX space Aacute -37 +KPX space Abreve -37 +KPX space Acircumflex -37 +KPX space Adieresis -37 +KPX space Agrave -37 +KPX space Amacron -37 +KPX space Aogonek -37 +KPX space Aring -37 +KPX space Atilde -37 +KPX space V -70 +KPX space W -70 +KPX space Y -70 +KPX space Yacute -70 +KPX space Ydieresis -70 +KPX v comma -37 +KPX v e -15 +KPX v eacute -15 +KPX v ecaron -15 +KPX v ecircumflex -15 +KPX v edieresis -15 +KPX v edotaccent -15 +KPX v egrave -15 +KPX v emacron -15 +KPX v eogonek -15 +KPX v o -15 +KPX v oacute -15 +KPX v ocircumflex -15 +KPX v odieresis -15 +KPX v ograve -15 +KPX v ohungarumlaut -15 +KPX v omacron -15 +KPX v oslash -15 +KPX v otilde -15 +KPX v period -37 +KPX w a -10 +KPX w aacute -10 +KPX w abreve -10 +KPX w acircumflex -10 +KPX w adieresis -10 +KPX w agrave -10 +KPX w amacron -10 +KPX w aogonek -10 +KPX w aring -10 +KPX w atilde -10 +KPX w comma -37 +KPX w e -10 +KPX w eacute -10 +KPX w ecaron -10 +KPX w ecircumflex -10 +KPX w edieresis -10 +KPX w edotaccent -10 +KPX w egrave -10 +KPX w emacron -10 +KPX w eogonek -10 +KPX w o -15 +KPX w oacute -15 +KPX w ocircumflex -15 +KPX w odieresis -15 +KPX w ograve -15 +KPX w ohungarumlaut -15 +KPX w omacron -15 +KPX w oslash -15 +KPX w otilde -15 +KPX w period -37 +KPX x e -10 +KPX x eacute -10 +KPX x ecaron -10 +KPX x ecircumflex -10 +KPX x edieresis -10 +KPX x edotaccent -10 +KPX x egrave -10 +KPX x emacron -10 +KPX x eogonek -10 +KPX y comma -37 +KPX y period -37 +KPX yacute comma -37 +KPX yacute period -37 +KPX ydieresis comma -37 +KPX ydieresis period -37 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Times-Italic.afm b/internal/pdf/model/fonts/afms/Times-Italic.afm new file mode 100644 index 0000000..8de6e42 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Times-Italic.afm @@ -0,0 +1,2667 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:56:55 1997 +Comment UniqueID 43067 +Comment VMusage 47727 58752 +FontName Times-Italic +FullName Times Italic +FamilyName Times +Weight Medium +ItalicAngle -15.5 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -169 -217 1010 883 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 653 +XHeight 441 +Ascender 683 +Descender -217 +StdHW 32 +StdVW 76 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ; +C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ; +C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ; +C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ; +C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ; +C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ; +C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ; +C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ; +C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ; +C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ; +C 43 ; WX 675 ; N plus ; B 86 0 590 506 ; +C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ; +C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ; +C 46 ; WX 250 ; N period ; B 27 -11 138 100 ; +C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ; +C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ; +C 49 ; WX 500 ; N one ; B 49 0 409 676 ; +C 50 ; WX 500 ; N two ; B 12 0 452 676 ; +C 51 ; WX 500 ; N three ; B 15 -7 465 676 ; +C 52 ; WX 500 ; N four ; B 1 0 479 676 ; +C 53 ; WX 500 ; N five ; B 15 -7 491 666 ; +C 54 ; WX 500 ; N six ; B 30 -7 521 686 ; +C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ; +C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ; +C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ; +C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ; +C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ; +C 60 ; WX 675 ; N less ; B 84 -8 592 514 ; +C 61 ; WX 675 ; N equal ; B 86 120 590 386 ; +C 62 ; WX 675 ; N greater ; B 84 -8 592 514 ; +C 63 ; WX 500 ; N question ; B 132 -12 472 664 ; +C 64 ; WX 920 ; N at ; B 118 -18 806 666 ; +C 65 ; WX 611 ; N A ; B -51 0 564 668 ; +C 66 ; WX 611 ; N B ; B -8 0 588 653 ; +C 67 ; WX 667 ; N C ; B 66 -18 689 666 ; +C 68 ; WX 722 ; N D ; B -8 0 700 653 ; +C 69 ; WX 611 ; N E ; B -1 0 634 653 ; +C 70 ; WX 611 ; N F ; B 8 0 645 653 ; +C 71 ; WX 722 ; N G ; B 52 -18 722 666 ; +C 72 ; WX 722 ; N H ; B -8 0 767 653 ; +C 73 ; WX 333 ; N I ; B -8 0 384 653 ; +C 74 ; WX 444 ; N J ; B -6 -18 491 653 ; +C 75 ; WX 667 ; N K ; B 7 0 722 653 ; +C 76 ; WX 556 ; N L ; B -8 0 559 653 ; +C 77 ; WX 833 ; N M ; B -18 0 873 653 ; +C 78 ; WX 667 ; N N ; B -20 -15 727 653 ; +C 79 ; WX 722 ; N O ; B 60 -18 699 666 ; +C 80 ; WX 611 ; N P ; B 0 0 605 653 ; +C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ; +C 82 ; WX 611 ; N R ; B -13 0 588 653 ; +C 83 ; WX 500 ; N S ; B 17 -18 508 667 ; +C 84 ; WX 556 ; N T ; B 59 0 633 653 ; +C 85 ; WX 722 ; N U ; B 102 -18 765 653 ; +C 86 ; WX 611 ; N V ; B 76 -18 688 653 ; +C 87 ; WX 833 ; N W ; B 71 -18 906 653 ; +C 88 ; WX 611 ; N X ; B -29 0 655 653 ; +C 89 ; WX 556 ; N Y ; B 78 0 633 653 ; +C 90 ; WX 556 ; N Z ; B -6 0 606 653 ; +C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ; +C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ; +C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ; +C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ; +C 97 ; WX 500 ; N a ; B 17 -11 476 441 ; +C 98 ; WX 500 ; N b ; B 23 -11 473 683 ; +C 99 ; WX 444 ; N c ; B 30 -11 425 441 ; +C 100 ; WX 500 ; N d ; B 15 -13 527 683 ; +C 101 ; WX 444 ; N e ; B 31 -11 412 441 ; +C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B 8 -206 472 441 ; +C 104 ; WX 500 ; N h ; B 19 -9 478 683 ; +C 105 ; WX 278 ; N i ; B 49 -11 264 654 ; +C 106 ; WX 278 ; N j ; B -124 -207 276 654 ; +C 107 ; WX 444 ; N k ; B 14 -11 461 683 ; +C 108 ; WX 278 ; N l ; B 41 -11 279 683 ; +C 109 ; WX 722 ; N m ; B 12 -9 704 441 ; +C 110 ; WX 500 ; N n ; B 14 -9 474 441 ; +C 111 ; WX 500 ; N o ; B 27 -11 468 441 ; +C 112 ; WX 500 ; N p ; B -75 -205 469 441 ; +C 113 ; WX 500 ; N q ; B 25 -209 483 441 ; +C 114 ; WX 389 ; N r ; B 45 0 412 441 ; +C 115 ; WX 389 ; N s ; B 16 -13 366 442 ; +C 116 ; WX 278 ; N t ; B 37 -11 296 546 ; +C 117 ; WX 500 ; N u ; B 42 -11 475 441 ; +C 118 ; WX 444 ; N v ; B 21 -18 426 441 ; +C 119 ; WX 667 ; N w ; B 16 -18 648 441 ; +C 120 ; WX 444 ; N x ; B -27 -11 447 441 ; +C 121 ; WX 444 ; N y ; B -24 -206 426 441 ; +C 122 ; WX 389 ; N z ; B -2 -81 380 428 ; +C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ; +C 124 ; WX 275 ; N bar ; B 105 -217 171 783 ; +C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ; +C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; +C 161 ; WX 389 ; N exclamdown ; B 59 -205 322 473 ; +C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ; +C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ; +C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ; +C 165 ; WX 500 ; N yen ; B 27 0 603 653 ; +C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ; +C 167 ; WX 500 ; N section ; B 53 -162 461 666 ; +C 168 ; WX 500 ; N currency ; B -22 53 522 597 ; +C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ; +C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ; +C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ; +C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ; +C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ; +C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ; +C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ; +C 177 ; WX 500 ; N endash ; B -6 197 505 243 ; +C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ; +C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ; +C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; +C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ; +C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ; +C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ; +C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ; +C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ; +C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ; +C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ; +C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ; +C 191 ; WX 500 ; N questiondown ; B 28 -205 368 471 ; +C 193 ; WX 333 ; N grave ; B 121 492 311 664 ; +C 194 ; WX 333 ; N acute ; B 180 494 403 664 ; +C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ; +C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ; +C 197 ; WX 333 ; N macron ; B 99 532 411 583 ; +C 198 ; WX 333 ; N breve ; B 117 492 418 650 ; +C 199 ; WX 333 ; N dotaccent ; B 207 548 305 646 ; +C 200 ; WX 333 ; N dieresis ; B 107 548 405 646 ; +C 202 ; WX 333 ; N ring ; B 155 492 355 691 ; +C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ; +C 206 ; WX 333 ; N ogonek ; B 20 -169 203 40 ; +C 207 ; WX 333 ; N caron ; B 121 492 426 661 ; +C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ; +C 225 ; WX 889 ; N AE ; B -27 0 911 653 ; +C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ; +C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ; +C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ; +C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ; +C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ; +C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ; +C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ; +C 248 ; WX 278 ; N lslash ; B 41 -11 312 683 ; +C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ; +C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ; +C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ; +C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ; +C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ; +C -1 ; WX 500 ; N abreve ; B 17 -11 502 650 ; +C -1 ; WX 500 ; N uhungarumlaut ; B 42 -11 580 664 ; +C -1 ; WX 444 ; N ecaron ; B 31 -11 482 661 ; +C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ; +C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ; +C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ; +C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ; +C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ; +C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ; +C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ; +C -1 ; WX 389 ; N scommaaccent ; B 16 -217 366 442 ; +C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ; +C -1 ; WX 722 ; N Uring ; B 102 -18 765 883 ; +C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ; +C -1 ; WX 500 ; N aogonek ; B 17 -169 476 441 ; +C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ; +C -1 ; WX 500 ; N uogonek ; B 42 -169 477 441 ; +C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ; +C -1 ; WX 722 ; N Dcroat ; B -8 0 700 653 ; +C -1 ; WX 250 ; N commaaccent ; B 8 -217 133 -50 ; +C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ; +C -1 ; WX 611 ; N Emacron ; B -1 0 634 795 ; +C -1 ; WX 444 ; N ccaron ; B 30 -11 482 661 ; +C -1 ; WX 500 ; N aring ; B 17 -11 476 691 ; +C -1 ; WX 667 ; N Ncommaaccent ; B -20 -187 727 653 ; +C -1 ; WX 278 ; N lacute ; B 41 -11 395 876 ; +C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ; +C -1 ; WX 556 ; N Tcommaaccent ; B 59 -217 633 653 ; +C -1 ; WX 667 ; N Cacute ; B 66 -18 690 876 ; +C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ; +C -1 ; WX 611 ; N Edotaccent ; B -1 0 634 818 ; +C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ; +C -1 ; WX 389 ; N scedilla ; B 16 -217 366 442 ; +C -1 ; WX 278 ; N iacute ; B 49 -11 355 664 ; +C -1 ; WX 471 ; N lozenge ; B 13 0 459 724 ; +C -1 ; WX 611 ; N Rcaron ; B -13 0 588 873 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 52 -217 722 666 ; +C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ; +C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ; +C -1 ; WX 611 ; N Amacron ; B -51 0 564 795 ; +C -1 ; WX 389 ; N rcaron ; B 45 0 434 661 ; +C -1 ; WX 444 ; N ccedilla ; B 30 -217 425 441 ; +C -1 ; WX 556 ; N Zdotaccent ; B -6 0 606 818 ; +C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ; +C -1 ; WX 722 ; N Omacron ; B 60 -18 699 795 ; +C -1 ; WX 611 ; N Racute ; B -13 0 588 876 ; +C -1 ; WX 500 ; N Sacute ; B 17 -18 508 876 ; +C -1 ; WX 544 ; N dcaron ; B 15 -13 658 683 ; +C -1 ; WX 722 ; N Umacron ; B 102 -18 765 795 ; +C -1 ; WX 500 ; N uring ; B 42 -11 475 691 ; +C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ; +C -1 ; WX 722 ; N Ograve ; B 60 -18 699 876 ; +C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ; +C -1 ; WX 611 ; N Abreve ; B -51 0 564 862 ; +C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ; +C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ; +C -1 ; WX 556 ; N Tcaron ; B 59 0 633 873 ; +C -1 ; WX 476 ; N partialdiff ; B 17 -38 459 710 ; +C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ; +C -1 ; WX 667 ; N Nacute ; B -20 -15 727 876 ; +C -1 ; WX 278 ; N icircumflex ; B 33 -11 327 661 ; +C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ; +C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ; +C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ; +C -1 ; WX 444 ; N cacute ; B 30 -11 459 664 ; +C -1 ; WX 500 ; N nacute ; B 14 -9 477 664 ; +C -1 ; WX 500 ; N umacron ; B 42 -11 485 583 ; +C -1 ; WX 667 ; N Ncaron ; B -20 -15 727 873 ; +C -1 ; WX 333 ; N Iacute ; B -8 0 433 876 ; +C -1 ; WX 675 ; N plusminus ; B 86 0 590 506 ; +C -1 ; WX 275 ; N brokenbar ; B 105 -142 171 708 ; +C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ; +C -1 ; WX 722 ; N Gbreve ; B 52 -18 722 862 ; +C -1 ; WX 333 ; N Idotaccent ; B -8 0 384 818 ; +C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; +C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ; +C -1 ; WX 389 ; N racute ; B 45 0 431 664 ; +C -1 ; WX 500 ; N omacron ; B 27 -11 495 583 ; +C -1 ; WX 556 ; N Zacute ; B -6 0 606 876 ; +C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 658 ; +C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ; +C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ; +C -1 ; WX 278 ; N lcommaaccent ; B 22 -217 279 683 ; +C -1 ; WX 300 ; N tcaron ; B 37 -11 407 681 ; +C -1 ; WX 444 ; N eogonek ; B 31 -169 412 441 ; +C -1 ; WX 722 ; N Uogonek ; B 102 -184 765 653 ; +C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ; +C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ; +C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ; +C -1 ; WX 389 ; N zacute ; B -2 -81 431 664 ; +C -1 ; WX 278 ; N iogonek ; B 49 -169 264 654 ; +C -1 ; WX 722 ; N Oacute ; B 60 -18 699 876 ; +C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ; +C -1 ; WX 500 ; N amacron ; B 17 -11 495 583 ; +C -1 ; WX 389 ; N sacute ; B 16 -13 431 664 ; +C -1 ; WX 278 ; N idieresis ; B 49 -11 352 606 ; +C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 699 873 ; +C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ; +C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ; +C -1 ; WX 722 ; N Odieresis ; B 60 -18 699 818 ; +C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ; +C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 27 -11 590 664 ; +C -1 ; WX 611 ; N Eogonek ; B -1 -169 634 653 ; +C -1 ; WX 500 ; N dcroat ; B 15 -13 572 683 ; +C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ; +C -1 ; WX 500 ; N Scedilla ; B 17 -217 508 667 ; +C -1 ; WX 300 ; N lcaron ; B 41 -11 407 683 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 7 -217 722 653 ; +C -1 ; WX 556 ; N Lacute ; B -8 0 559 876 ; +C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ; +C -1 ; WX 444 ; N edotaccent ; B 31 -11 412 606 ; +C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ; +C -1 ; WX 333 ; N Imacron ; B -8 0 441 795 ; +C -1 ; WX 611 ; N Lcaron ; B -8 0 586 653 ; +C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 523 658 ; +C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ; +C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 102 -18 765 876 ; +C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ; +C -1 ; WX 444 ; N emacron ; B 31 -11 457 583 ; +C -1 ; WX 500 ; N gbreve ; B 8 -206 487 650 ; +C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ; +C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ; +C -1 ; WX 500 ; N Scommaaccent ; B 17 -217 508 667 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 60 -18 699 876 ; +C -1 ; WX 400 ; N degree ; B 101 390 387 676 ; +C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ; +C -1 ; WX 667 ; N Ccaron ; B 66 -18 689 873 ; +C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ; +C -1 ; WX 453 ; N radical ; B 2 -60 452 768 ; +C -1 ; WX 722 ; N Dcaron ; B -8 0 700 873 ; +C -1 ; WX 389 ; N rcommaaccent ; B -3 -217 412 441 ; +C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ; +C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ; +C -1 ; WX 611 ; N Rcommaaccent ; B -13 -187 588 653 ; +C -1 ; WX 556 ; N Lcommaaccent ; B -8 -217 559 653 ; +C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ; +C -1 ; WX 611 ; N Aogonek ; B -51 -169 566 668 ; +C -1 ; WX 611 ; N Aring ; B -51 0 564 883 ; +C -1 ; WX 722 ; N Otilde ; B 60 -18 699 836 ; +C -1 ; WX 389 ; N zdotaccent ; B -2 -81 380 606 ; +C -1 ; WX 611 ; N Ecaron ; B -1 0 634 873 ; +C -1 ; WX 333 ; N Iogonek ; B -8 -169 384 653 ; +C -1 ; WX 444 ; N kcommaaccent ; B 14 -187 461 683 ; +C -1 ; WX 675 ; N minus ; B 86 220 590 286 ; +C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ; +C -1 ; WX 500 ; N ncaron ; B 14 -9 510 661 ; +C -1 ; WX 278 ; N tcommaaccent ; B 2 -217 296 546 ; +C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ; +C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ; +C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ; +C -1 ; WX 549 ; N notequal ; B 12 -29 537 541 ; +C -1 ; WX 500 ; N gcommaaccent ; B 8 -206 472 706 ; +C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ; +C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ; +C -1 ; WX 500 ; N ncommaaccent ; B 14 -187 474 441 ; +C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ; +C -1 ; WX 278 ; N imacron ; B 46 -11 311 583 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2321 +KPX A C -30 +KPX A Cacute -30 +KPX A Ccaron -30 +KPX A Ccedilla -30 +KPX A G -35 +KPX A Gbreve -35 +KPX A Gcommaaccent -35 +KPX A O -40 +KPX A Oacute -40 +KPX A Ocircumflex -40 +KPX A Odieresis -40 +KPX A Ograve -40 +KPX A Ohungarumlaut -40 +KPX A Omacron -40 +KPX A Oslash -40 +KPX A Otilde -40 +KPX A Q -40 +KPX A T -37 +KPX A Tcaron -37 +KPX A Tcommaaccent -37 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -105 +KPX A W -95 +KPX A Y -55 +KPX A Yacute -55 +KPX A Ydieresis -55 +KPX A quoteright -37 +KPX A u -20 +KPX A uacute -20 +KPX A ucircumflex -20 +KPX A udieresis -20 +KPX A ugrave -20 +KPX A uhungarumlaut -20 +KPX A umacron -20 +KPX A uogonek -20 +KPX A uring -20 +KPX A v -55 +KPX A w -55 +KPX A y -55 +KPX A yacute -55 +KPX A ydieresis -55 +KPX Aacute C -30 +KPX Aacute Cacute -30 +KPX Aacute Ccaron -30 +KPX Aacute Ccedilla -30 +KPX Aacute G -35 +KPX Aacute Gbreve -35 +KPX Aacute Gcommaaccent -35 +KPX Aacute O -40 +KPX Aacute Oacute -40 +KPX Aacute Ocircumflex -40 +KPX Aacute Odieresis -40 +KPX Aacute Ograve -40 +KPX Aacute Ohungarumlaut -40 +KPX Aacute Omacron -40 +KPX Aacute Oslash -40 +KPX Aacute Otilde -40 +KPX Aacute Q -40 +KPX Aacute T -37 +KPX Aacute Tcaron -37 +KPX Aacute Tcommaaccent -37 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -105 +KPX Aacute W -95 +KPX Aacute Y -55 +KPX Aacute Yacute -55 +KPX Aacute Ydieresis -55 +KPX Aacute quoteright -37 +KPX Aacute u -20 +KPX Aacute uacute -20 +KPX Aacute ucircumflex -20 +KPX Aacute udieresis -20 +KPX Aacute ugrave -20 +KPX Aacute uhungarumlaut -20 +KPX Aacute umacron -20 +KPX Aacute uogonek -20 +KPX Aacute uring -20 +KPX Aacute v -55 +KPX Aacute w -55 +KPX Aacute y -55 +KPX Aacute yacute -55 +KPX Aacute ydieresis -55 +KPX Abreve C -30 +KPX Abreve Cacute -30 +KPX Abreve Ccaron -30 +KPX Abreve Ccedilla -30 +KPX Abreve G -35 +KPX Abreve Gbreve -35 +KPX Abreve Gcommaaccent -35 +KPX Abreve O -40 +KPX Abreve Oacute -40 +KPX Abreve Ocircumflex -40 +KPX Abreve Odieresis -40 +KPX Abreve Ograve -40 +KPX Abreve Ohungarumlaut -40 +KPX Abreve Omacron -40 +KPX Abreve Oslash -40 +KPX Abreve Otilde -40 +KPX Abreve Q -40 +KPX Abreve T -37 +KPX Abreve Tcaron -37 +KPX Abreve Tcommaaccent -37 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -105 +KPX Abreve W -95 +KPX Abreve Y -55 +KPX Abreve Yacute -55 +KPX Abreve Ydieresis -55 +KPX Abreve quoteright -37 +KPX Abreve u -20 +KPX Abreve uacute -20 +KPX Abreve ucircumflex -20 +KPX Abreve udieresis -20 +KPX Abreve ugrave -20 +KPX Abreve uhungarumlaut -20 +KPX Abreve umacron -20 +KPX Abreve uogonek -20 +KPX Abreve uring -20 +KPX Abreve v -55 +KPX Abreve w -55 +KPX Abreve y -55 +KPX Abreve yacute -55 +KPX Abreve ydieresis -55 +KPX Acircumflex C -30 +KPX Acircumflex Cacute -30 +KPX Acircumflex Ccaron -30 +KPX Acircumflex Ccedilla -30 +KPX Acircumflex G -35 +KPX Acircumflex Gbreve -35 +KPX Acircumflex Gcommaaccent -35 +KPX Acircumflex O -40 +KPX Acircumflex Oacute -40 +KPX Acircumflex Ocircumflex -40 +KPX Acircumflex Odieresis -40 +KPX Acircumflex Ograve -40 +KPX Acircumflex Ohungarumlaut -40 +KPX Acircumflex Omacron -40 +KPX Acircumflex Oslash -40 +KPX Acircumflex Otilde -40 +KPX Acircumflex Q -40 +KPX Acircumflex T -37 +KPX Acircumflex Tcaron -37 +KPX Acircumflex Tcommaaccent -37 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -105 +KPX Acircumflex W -95 +KPX Acircumflex Y -55 +KPX Acircumflex Yacute -55 +KPX Acircumflex Ydieresis -55 +KPX Acircumflex quoteright -37 +KPX Acircumflex u -20 +KPX Acircumflex uacute -20 +KPX Acircumflex ucircumflex -20 +KPX Acircumflex udieresis -20 +KPX Acircumflex ugrave -20 +KPX Acircumflex uhungarumlaut -20 +KPX Acircumflex umacron -20 +KPX Acircumflex uogonek -20 +KPX Acircumflex uring -20 +KPX Acircumflex v -55 +KPX Acircumflex w -55 +KPX Acircumflex y -55 +KPX Acircumflex yacute -55 +KPX Acircumflex ydieresis -55 +KPX Adieresis C -30 +KPX Adieresis Cacute -30 +KPX Adieresis Ccaron -30 +KPX Adieresis Ccedilla -30 +KPX Adieresis G -35 +KPX Adieresis Gbreve -35 +KPX Adieresis Gcommaaccent -35 +KPX Adieresis O -40 +KPX Adieresis Oacute -40 +KPX Adieresis Ocircumflex -40 +KPX Adieresis Odieresis -40 +KPX Adieresis Ograve -40 +KPX Adieresis Ohungarumlaut -40 +KPX Adieresis Omacron -40 +KPX Adieresis Oslash -40 +KPX Adieresis Otilde -40 +KPX Adieresis Q -40 +KPX Adieresis T -37 +KPX Adieresis Tcaron -37 +KPX Adieresis Tcommaaccent -37 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -105 +KPX Adieresis W -95 +KPX Adieresis Y -55 +KPX Adieresis Yacute -55 +KPX Adieresis Ydieresis -55 +KPX Adieresis quoteright -37 +KPX Adieresis u -20 +KPX Adieresis uacute -20 +KPX Adieresis ucircumflex -20 +KPX Adieresis udieresis -20 +KPX Adieresis ugrave -20 +KPX Adieresis uhungarumlaut -20 +KPX Adieresis umacron -20 +KPX Adieresis uogonek -20 +KPX Adieresis uring -20 +KPX Adieresis v -55 +KPX Adieresis w -55 +KPX Adieresis y -55 +KPX Adieresis yacute -55 +KPX Adieresis ydieresis -55 +KPX Agrave C -30 +KPX Agrave Cacute -30 +KPX Agrave Ccaron -30 +KPX Agrave Ccedilla -30 +KPX Agrave G -35 +KPX Agrave Gbreve -35 +KPX Agrave Gcommaaccent -35 +KPX Agrave O -40 +KPX Agrave Oacute -40 +KPX Agrave Ocircumflex -40 +KPX Agrave Odieresis -40 +KPX Agrave Ograve -40 +KPX Agrave Ohungarumlaut -40 +KPX Agrave Omacron -40 +KPX Agrave Oslash -40 +KPX Agrave Otilde -40 +KPX Agrave Q -40 +KPX Agrave T -37 +KPX Agrave Tcaron -37 +KPX Agrave Tcommaaccent -37 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -105 +KPX Agrave W -95 +KPX Agrave Y -55 +KPX Agrave Yacute -55 +KPX Agrave Ydieresis -55 +KPX Agrave quoteright -37 +KPX Agrave u -20 +KPX Agrave uacute -20 +KPX Agrave ucircumflex -20 +KPX Agrave udieresis -20 +KPX Agrave ugrave -20 +KPX Agrave uhungarumlaut -20 +KPX Agrave umacron -20 +KPX Agrave uogonek -20 +KPX Agrave uring -20 +KPX Agrave v -55 +KPX Agrave w -55 +KPX Agrave y -55 +KPX Agrave yacute -55 +KPX Agrave ydieresis -55 +KPX Amacron C -30 +KPX Amacron Cacute -30 +KPX Amacron Ccaron -30 +KPX Amacron Ccedilla -30 +KPX Amacron G -35 +KPX Amacron Gbreve -35 +KPX Amacron Gcommaaccent -35 +KPX Amacron O -40 +KPX Amacron Oacute -40 +KPX Amacron Ocircumflex -40 +KPX Amacron Odieresis -40 +KPX Amacron Ograve -40 +KPX Amacron Ohungarumlaut -40 +KPX Amacron Omacron -40 +KPX Amacron Oslash -40 +KPX Amacron Otilde -40 +KPX Amacron Q -40 +KPX Amacron T -37 +KPX Amacron Tcaron -37 +KPX Amacron Tcommaaccent -37 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -105 +KPX Amacron W -95 +KPX Amacron Y -55 +KPX Amacron Yacute -55 +KPX Amacron Ydieresis -55 +KPX Amacron quoteright -37 +KPX Amacron u -20 +KPX Amacron uacute -20 +KPX Amacron ucircumflex -20 +KPX Amacron udieresis -20 +KPX Amacron ugrave -20 +KPX Amacron uhungarumlaut -20 +KPX Amacron umacron -20 +KPX Amacron uogonek -20 +KPX Amacron uring -20 +KPX Amacron v -55 +KPX Amacron w -55 +KPX Amacron y -55 +KPX Amacron yacute -55 +KPX Amacron ydieresis -55 +KPX Aogonek C -30 +KPX Aogonek Cacute -30 +KPX Aogonek Ccaron -30 +KPX Aogonek Ccedilla -30 +KPX Aogonek G -35 +KPX Aogonek Gbreve -35 +KPX Aogonek Gcommaaccent -35 +KPX Aogonek O -40 +KPX Aogonek Oacute -40 +KPX Aogonek Ocircumflex -40 +KPX Aogonek Odieresis -40 +KPX Aogonek Ograve -40 +KPX Aogonek Ohungarumlaut -40 +KPX Aogonek Omacron -40 +KPX Aogonek Oslash -40 +KPX Aogonek Otilde -40 +KPX Aogonek Q -40 +KPX Aogonek T -37 +KPX Aogonek Tcaron -37 +KPX Aogonek Tcommaaccent -37 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -105 +KPX Aogonek W -95 +KPX Aogonek Y -55 +KPX Aogonek Yacute -55 +KPX Aogonek Ydieresis -55 +KPX Aogonek quoteright -37 +KPX Aogonek u -20 +KPX Aogonek uacute -20 +KPX Aogonek ucircumflex -20 +KPX Aogonek udieresis -20 +KPX Aogonek ugrave -20 +KPX Aogonek uhungarumlaut -20 +KPX Aogonek umacron -20 +KPX Aogonek uogonek -20 +KPX Aogonek uring -20 +KPX Aogonek v -55 +KPX Aogonek w -55 +KPX Aogonek y -55 +KPX Aogonek yacute -55 +KPX Aogonek ydieresis -55 +KPX Aring C -30 +KPX Aring Cacute -30 +KPX Aring Ccaron -30 +KPX Aring Ccedilla -30 +KPX Aring G -35 +KPX Aring Gbreve -35 +KPX Aring Gcommaaccent -35 +KPX Aring O -40 +KPX Aring Oacute -40 +KPX Aring Ocircumflex -40 +KPX Aring Odieresis -40 +KPX Aring Ograve -40 +KPX Aring Ohungarumlaut -40 +KPX Aring Omacron -40 +KPX Aring Oslash -40 +KPX Aring Otilde -40 +KPX Aring Q -40 +KPX Aring T -37 +KPX Aring Tcaron -37 +KPX Aring Tcommaaccent -37 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -105 +KPX Aring W -95 +KPX Aring Y -55 +KPX Aring Yacute -55 +KPX Aring Ydieresis -55 +KPX Aring quoteright -37 +KPX Aring u -20 +KPX Aring uacute -20 +KPX Aring ucircumflex -20 +KPX Aring udieresis -20 +KPX Aring ugrave -20 +KPX Aring uhungarumlaut -20 +KPX Aring umacron -20 +KPX Aring uogonek -20 +KPX Aring uring -20 +KPX Aring v -55 +KPX Aring w -55 +KPX Aring y -55 +KPX Aring yacute -55 +KPX Aring ydieresis -55 +KPX Atilde C -30 +KPX Atilde Cacute -30 +KPX Atilde Ccaron -30 +KPX Atilde Ccedilla -30 +KPX Atilde G -35 +KPX Atilde Gbreve -35 +KPX Atilde Gcommaaccent -35 +KPX Atilde O -40 +KPX Atilde Oacute -40 +KPX Atilde Ocircumflex -40 +KPX Atilde Odieresis -40 +KPX Atilde Ograve -40 +KPX Atilde Ohungarumlaut -40 +KPX Atilde Omacron -40 +KPX Atilde Oslash -40 +KPX Atilde Otilde -40 +KPX Atilde Q -40 +KPX Atilde T -37 +KPX Atilde Tcaron -37 +KPX Atilde Tcommaaccent -37 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -105 +KPX Atilde W -95 +KPX Atilde Y -55 +KPX Atilde Yacute -55 +KPX Atilde Ydieresis -55 +KPX Atilde quoteright -37 +KPX Atilde u -20 +KPX Atilde uacute -20 +KPX Atilde ucircumflex -20 +KPX Atilde udieresis -20 +KPX Atilde ugrave -20 +KPX Atilde uhungarumlaut -20 +KPX Atilde umacron -20 +KPX Atilde uogonek -20 +KPX Atilde uring -20 +KPX Atilde v -55 +KPX Atilde w -55 +KPX Atilde y -55 +KPX Atilde yacute -55 +KPX Atilde ydieresis -55 +KPX B A -25 +KPX B Aacute -25 +KPX B Abreve -25 +KPX B Acircumflex -25 +KPX B Adieresis -25 +KPX B Agrave -25 +KPX B Amacron -25 +KPX B Aogonek -25 +KPX B Aring -25 +KPX B Atilde -25 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -35 +KPX D Aacute -35 +KPX D Abreve -35 +KPX D Acircumflex -35 +KPX D Adieresis -35 +KPX D Agrave -35 +KPX D Amacron -35 +KPX D Aogonek -35 +KPX D Aring -35 +KPX D Atilde -35 +KPX D V -40 +KPX D W -40 +KPX D Y -40 +KPX D Yacute -40 +KPX D Ydieresis -40 +KPX Dcaron A -35 +KPX Dcaron Aacute -35 +KPX Dcaron Abreve -35 +KPX Dcaron Acircumflex -35 +KPX Dcaron Adieresis -35 +KPX Dcaron Agrave -35 +KPX Dcaron Amacron -35 +KPX Dcaron Aogonek -35 +KPX Dcaron Aring -35 +KPX Dcaron Atilde -35 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -40 +KPX Dcaron Yacute -40 +KPX Dcaron Ydieresis -40 +KPX Dcroat A -35 +KPX Dcroat Aacute -35 +KPX Dcroat Abreve -35 +KPX Dcroat Acircumflex -35 +KPX Dcroat Adieresis -35 +KPX Dcroat Agrave -35 +KPX Dcroat Amacron -35 +KPX Dcroat Aogonek -35 +KPX Dcroat Aring -35 +KPX Dcroat Atilde -35 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -40 +KPX Dcroat Yacute -40 +KPX Dcroat Ydieresis -40 +KPX F A -115 +KPX F Aacute -115 +KPX F Abreve -115 +KPX F Acircumflex -115 +KPX F Adieresis -115 +KPX F Agrave -115 +KPX F Amacron -115 +KPX F Aogonek -115 +KPX F Aring -115 +KPX F Atilde -115 +KPX F a -75 +KPX F aacute -75 +KPX F abreve -75 +KPX F acircumflex -75 +KPX F adieresis -75 +KPX F agrave -75 +KPX F amacron -75 +KPX F aogonek -75 +KPX F aring -75 +KPX F atilde -75 +KPX F comma -135 +KPX F e -75 +KPX F eacute -75 +KPX F ecaron -75 +KPX F ecircumflex -75 +KPX F edieresis -75 +KPX F edotaccent -75 +KPX F egrave -75 +KPX F emacron -75 +KPX F eogonek -75 +KPX F i -45 +KPX F iacute -45 +KPX F icircumflex -45 +KPX F idieresis -45 +KPX F igrave -45 +KPX F imacron -45 +KPX F iogonek -45 +KPX F o -105 +KPX F oacute -105 +KPX F ocircumflex -105 +KPX F odieresis -105 +KPX F ograve -105 +KPX F ohungarumlaut -105 +KPX F omacron -105 +KPX F oslash -105 +KPX F otilde -105 +KPX F period -135 +KPX F r -55 +KPX F racute -55 +KPX F rcaron -55 +KPX F rcommaaccent -55 +KPX J A -40 +KPX J Aacute -40 +KPX J Abreve -40 +KPX J Acircumflex -40 +KPX J Adieresis -40 +KPX J Agrave -40 +KPX J Amacron -40 +KPX J Aogonek -40 +KPX J Aring -40 +KPX J Atilde -40 +KPX J a -35 +KPX J aacute -35 +KPX J abreve -35 +KPX J acircumflex -35 +KPX J adieresis -35 +KPX J agrave -35 +KPX J amacron -35 +KPX J aogonek -35 +KPX J aring -35 +KPX J atilde -35 +KPX J comma -25 +KPX J e -25 +KPX J eacute -25 +KPX J ecaron -25 +KPX J ecircumflex -25 +KPX J edieresis -25 +KPX J edotaccent -25 +KPX J egrave -25 +KPX J emacron -25 +KPX J eogonek -25 +KPX J o -25 +KPX J oacute -25 +KPX J ocircumflex -25 +KPX J odieresis -25 +KPX J ograve -25 +KPX J ohungarumlaut -25 +KPX J omacron -25 +KPX J oslash -25 +KPX J otilde -25 +KPX J period -25 +KPX J u -35 +KPX J uacute -35 +KPX J ucircumflex -35 +KPX J udieresis -35 +KPX J ugrave -35 +KPX J uhungarumlaut -35 +KPX J umacron -35 +KPX J uogonek -35 +KPX J uring -35 +KPX K O -50 +KPX K Oacute -50 +KPX K Ocircumflex -50 +KPX K Odieresis -50 +KPX K Ograve -50 +KPX K Ohungarumlaut -50 +KPX K Omacron -50 +KPX K Oslash -50 +KPX K Otilde -50 +KPX K e -35 +KPX K eacute -35 +KPX K ecaron -35 +KPX K ecircumflex -35 +KPX K edieresis -35 +KPX K edotaccent -35 +KPX K egrave -35 +KPX K emacron -35 +KPX K eogonek -35 +KPX K o -40 +KPX K oacute -40 +KPX K ocircumflex -40 +KPX K odieresis -40 +KPX K ograve -40 +KPX K ohungarumlaut -40 +KPX K omacron -40 +KPX K oslash -40 +KPX K otilde -40 +KPX K u -40 +KPX K uacute -40 +KPX K ucircumflex -40 +KPX K udieresis -40 +KPX K ugrave -40 +KPX K uhungarumlaut -40 +KPX K umacron -40 +KPX K uogonek -40 +KPX K uring -40 +KPX K y -40 +KPX K yacute -40 +KPX K ydieresis -40 +KPX Kcommaaccent O -50 +KPX Kcommaaccent Oacute -50 +KPX Kcommaaccent Ocircumflex -50 +KPX Kcommaaccent Odieresis -50 +KPX Kcommaaccent Ograve -50 +KPX Kcommaaccent Ohungarumlaut -50 +KPX Kcommaaccent Omacron -50 +KPX Kcommaaccent Oslash -50 +KPX Kcommaaccent Otilde -50 +KPX Kcommaaccent e -35 +KPX Kcommaaccent eacute -35 +KPX Kcommaaccent ecaron -35 +KPX Kcommaaccent ecircumflex -35 +KPX Kcommaaccent edieresis -35 +KPX Kcommaaccent edotaccent -35 +KPX Kcommaaccent egrave -35 +KPX Kcommaaccent emacron -35 +KPX Kcommaaccent eogonek -35 +KPX Kcommaaccent o -40 +KPX Kcommaaccent oacute -40 +KPX Kcommaaccent ocircumflex -40 +KPX Kcommaaccent odieresis -40 +KPX Kcommaaccent ograve -40 +KPX Kcommaaccent ohungarumlaut -40 +KPX Kcommaaccent omacron -40 +KPX Kcommaaccent oslash -40 +KPX Kcommaaccent otilde -40 +KPX Kcommaaccent u -40 +KPX Kcommaaccent uacute -40 +KPX Kcommaaccent ucircumflex -40 +KPX Kcommaaccent udieresis -40 +KPX Kcommaaccent ugrave -40 +KPX Kcommaaccent uhungarumlaut -40 +KPX Kcommaaccent umacron -40 +KPX Kcommaaccent uogonek -40 +KPX Kcommaaccent uring -40 +KPX Kcommaaccent y -40 +KPX Kcommaaccent yacute -40 +KPX Kcommaaccent ydieresis -40 +KPX L T -20 +KPX L Tcaron -20 +KPX L Tcommaaccent -20 +KPX L V -55 +KPX L W -55 +KPX L Y -20 +KPX L Yacute -20 +KPX L Ydieresis -20 +KPX L quoteright -37 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -20 +KPX Lacute Tcaron -20 +KPX Lacute Tcommaaccent -20 +KPX Lacute V -55 +KPX Lacute W -55 +KPX Lacute Y -20 +KPX Lacute Yacute -20 +KPX Lacute Ydieresis -20 +KPX Lacute quoteright -37 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcommaaccent T -20 +KPX Lcommaaccent Tcaron -20 +KPX Lcommaaccent Tcommaaccent -20 +KPX Lcommaaccent V -55 +KPX Lcommaaccent W -55 +KPX Lcommaaccent Y -20 +KPX Lcommaaccent Yacute -20 +KPX Lcommaaccent Ydieresis -20 +KPX Lcommaaccent quoteright -37 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -20 +KPX Lslash Tcaron -20 +KPX Lslash Tcommaaccent -20 +KPX Lslash V -55 +KPX Lslash W -55 +KPX Lslash Y -20 +KPX Lslash Yacute -20 +KPX Lslash Ydieresis -20 +KPX Lslash quoteright -37 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX N A -27 +KPX N Aacute -27 +KPX N Abreve -27 +KPX N Acircumflex -27 +KPX N Adieresis -27 +KPX N Agrave -27 +KPX N Amacron -27 +KPX N Aogonek -27 +KPX N Aring -27 +KPX N Atilde -27 +KPX Nacute A -27 +KPX Nacute Aacute -27 +KPX Nacute Abreve -27 +KPX Nacute Acircumflex -27 +KPX Nacute Adieresis -27 +KPX Nacute Agrave -27 +KPX Nacute Amacron -27 +KPX Nacute Aogonek -27 +KPX Nacute Aring -27 +KPX Nacute Atilde -27 +KPX Ncaron A -27 +KPX Ncaron Aacute -27 +KPX Ncaron Abreve -27 +KPX Ncaron Acircumflex -27 +KPX Ncaron Adieresis -27 +KPX Ncaron Agrave -27 +KPX Ncaron Amacron -27 +KPX Ncaron Aogonek -27 +KPX Ncaron Aring -27 +KPX Ncaron Atilde -27 +KPX Ncommaaccent A -27 +KPX Ncommaaccent Aacute -27 +KPX Ncommaaccent Abreve -27 +KPX Ncommaaccent Acircumflex -27 +KPX Ncommaaccent Adieresis -27 +KPX Ncommaaccent Agrave -27 +KPX Ncommaaccent Amacron -27 +KPX Ncommaaccent Aogonek -27 +KPX Ncommaaccent Aring -27 +KPX Ncommaaccent Atilde -27 +KPX Ntilde A -27 +KPX Ntilde Aacute -27 +KPX Ntilde Abreve -27 +KPX Ntilde Acircumflex -27 +KPX Ntilde Adieresis -27 +KPX Ntilde Agrave -27 +KPX Ntilde Amacron -27 +KPX Ntilde Aogonek -27 +KPX Ntilde Aring -27 +KPX Ntilde Atilde -27 +KPX O A -55 +KPX O Aacute -55 +KPX O Abreve -55 +KPX O Acircumflex -55 +KPX O Adieresis -55 +KPX O Agrave -55 +KPX O Amacron -55 +KPX O Aogonek -55 +KPX O Aring -55 +KPX O Atilde -55 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -55 +KPX Oacute Aacute -55 +KPX Oacute Abreve -55 +KPX Oacute Acircumflex -55 +KPX Oacute Adieresis -55 +KPX Oacute Agrave -55 +KPX Oacute Amacron -55 +KPX Oacute Aogonek -55 +KPX Oacute Aring -55 +KPX Oacute Atilde -55 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -55 +KPX Ocircumflex Aacute -55 +KPX Ocircumflex Abreve -55 +KPX Ocircumflex Acircumflex -55 +KPX Ocircumflex Adieresis -55 +KPX Ocircumflex Agrave -55 +KPX Ocircumflex Amacron -55 +KPX Ocircumflex Aogonek -55 +KPX Ocircumflex Aring -55 +KPX Ocircumflex Atilde -55 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -55 +KPX Odieresis Aacute -55 +KPX Odieresis Abreve -55 +KPX Odieresis Acircumflex -55 +KPX Odieresis Adieresis -55 +KPX Odieresis Agrave -55 +KPX Odieresis Amacron -55 +KPX Odieresis Aogonek -55 +KPX Odieresis Aring -55 +KPX Odieresis Atilde -55 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -55 +KPX Ograve Aacute -55 +KPX Ograve Abreve -55 +KPX Ograve Acircumflex -55 +KPX Ograve Adieresis -55 +KPX Ograve Agrave -55 +KPX Ograve Amacron -55 +KPX Ograve Aogonek -55 +KPX Ograve Aring -55 +KPX Ograve Atilde -55 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -55 +KPX Ohungarumlaut Aacute -55 +KPX Ohungarumlaut Abreve -55 +KPX Ohungarumlaut Acircumflex -55 +KPX Ohungarumlaut Adieresis -55 +KPX Ohungarumlaut Agrave -55 +KPX Ohungarumlaut Amacron -55 +KPX Ohungarumlaut Aogonek -55 +KPX Ohungarumlaut Aring -55 +KPX Ohungarumlaut Atilde -55 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -55 +KPX Omacron Aacute -55 +KPX Omacron Abreve -55 +KPX Omacron Acircumflex -55 +KPX Omacron Adieresis -55 +KPX Omacron Agrave -55 +KPX Omacron Amacron -55 +KPX Omacron Aogonek -55 +KPX Omacron Aring -55 +KPX Omacron Atilde -55 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -55 +KPX Oslash Aacute -55 +KPX Oslash Abreve -55 +KPX Oslash Acircumflex -55 +KPX Oslash Adieresis -55 +KPX Oslash Agrave -55 +KPX Oslash Amacron -55 +KPX Oslash Aogonek -55 +KPX Oslash Aring -55 +KPX Oslash Atilde -55 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -55 +KPX Otilde Aacute -55 +KPX Otilde Abreve -55 +KPX Otilde Acircumflex -55 +KPX Otilde Adieresis -55 +KPX Otilde Agrave -55 +KPX Otilde Amacron -55 +KPX Otilde Aogonek -55 +KPX Otilde Aring -55 +KPX Otilde Atilde -55 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -90 +KPX P Aacute -90 +KPX P Abreve -90 +KPX P Acircumflex -90 +KPX P Adieresis -90 +KPX P Agrave -90 +KPX P Amacron -90 +KPX P Aogonek -90 +KPX P Aring -90 +KPX P Atilde -90 +KPX P a -80 +KPX P aacute -80 +KPX P abreve -80 +KPX P acircumflex -80 +KPX P adieresis -80 +KPX P agrave -80 +KPX P amacron -80 +KPX P aogonek -80 +KPX P aring -80 +KPX P atilde -80 +KPX P comma -135 +KPX P e -80 +KPX P eacute -80 +KPX P ecaron -80 +KPX P ecircumflex -80 +KPX P edieresis -80 +KPX P edotaccent -80 +KPX P egrave -80 +KPX P emacron -80 +KPX P eogonek -80 +KPX P o -80 +KPX P oacute -80 +KPX P ocircumflex -80 +KPX P odieresis -80 +KPX P ograve -80 +KPX P ohungarumlaut -80 +KPX P omacron -80 +KPX P oslash -80 +KPX P otilde -80 +KPX P period -135 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -40 +KPX R Oacute -40 +KPX R Ocircumflex -40 +KPX R Odieresis -40 +KPX R Ograve -40 +KPX R Ohungarumlaut -40 +KPX R Omacron -40 +KPX R Oslash -40 +KPX R Otilde -40 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -18 +KPX R W -18 +KPX R Y -18 +KPX R Yacute -18 +KPX R Ydieresis -18 +KPX Racute O -40 +KPX Racute Oacute -40 +KPX Racute Ocircumflex -40 +KPX Racute Odieresis -40 +KPX Racute Ograve -40 +KPX Racute Ohungarumlaut -40 +KPX Racute Omacron -40 +KPX Racute Oslash -40 +KPX Racute Otilde -40 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -18 +KPX Racute W -18 +KPX Racute Y -18 +KPX Racute Yacute -18 +KPX Racute Ydieresis -18 +KPX Rcaron O -40 +KPX Rcaron Oacute -40 +KPX Rcaron Ocircumflex -40 +KPX Rcaron Odieresis -40 +KPX Rcaron Ograve -40 +KPX Rcaron Ohungarumlaut -40 +KPX Rcaron Omacron -40 +KPX Rcaron Oslash -40 +KPX Rcaron Otilde -40 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -18 +KPX Rcaron W -18 +KPX Rcaron Y -18 +KPX Rcaron Yacute -18 +KPX Rcaron Ydieresis -18 +KPX Rcommaaccent O -40 +KPX Rcommaaccent Oacute -40 +KPX Rcommaaccent Ocircumflex -40 +KPX Rcommaaccent Odieresis -40 +KPX Rcommaaccent Ograve -40 +KPX Rcommaaccent Ohungarumlaut -40 +KPX Rcommaaccent Omacron -40 +KPX Rcommaaccent Oslash -40 +KPX Rcommaaccent Otilde -40 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -18 +KPX Rcommaaccent W -18 +KPX Rcommaaccent Y -18 +KPX Rcommaaccent Yacute -18 +KPX Rcommaaccent Ydieresis -18 +KPX T A -50 +KPX T Aacute -50 +KPX T Abreve -50 +KPX T Acircumflex -50 +KPX T Adieresis -50 +KPX T Agrave -50 +KPX T Amacron -50 +KPX T Aogonek -50 +KPX T Aring -50 +KPX T Atilde -50 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -92 +KPX T aacute -92 +KPX T abreve -92 +KPX T acircumflex -92 +KPX T adieresis -92 +KPX T agrave -92 +KPX T amacron -92 +KPX T aogonek -92 +KPX T aring -92 +KPX T atilde -92 +KPX T colon -55 +KPX T comma -74 +KPX T e -92 +KPX T eacute -92 +KPX T ecaron -92 +KPX T ecircumflex -52 +KPX T edieresis -52 +KPX T edotaccent -92 +KPX T egrave -52 +KPX T emacron -52 +KPX T eogonek -92 +KPX T hyphen -74 +KPX T i -55 +KPX T iacute -55 +KPX T iogonek -55 +KPX T o -92 +KPX T oacute -92 +KPX T ocircumflex -92 +KPX T odieresis -92 +KPX T ograve -92 +KPX T ohungarumlaut -92 +KPX T omacron -92 +KPX T oslash -92 +KPX T otilde -92 +KPX T period -74 +KPX T r -55 +KPX T racute -55 +KPX T rcaron -55 +KPX T rcommaaccent -55 +KPX T semicolon -65 +KPX T u -55 +KPX T uacute -55 +KPX T ucircumflex -55 +KPX T udieresis -55 +KPX T ugrave -55 +KPX T uhungarumlaut -55 +KPX T umacron -55 +KPX T uogonek -55 +KPX T uring -55 +KPX T w -74 +KPX T y -74 +KPX T yacute -74 +KPX T ydieresis -34 +KPX Tcaron A -50 +KPX Tcaron Aacute -50 +KPX Tcaron Abreve -50 +KPX Tcaron Acircumflex -50 +KPX Tcaron Adieresis -50 +KPX Tcaron Agrave -50 +KPX Tcaron Amacron -50 +KPX Tcaron Aogonek -50 +KPX Tcaron Aring -50 +KPX Tcaron Atilde -50 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -92 +KPX Tcaron aacute -92 +KPX Tcaron abreve -92 +KPX Tcaron acircumflex -92 +KPX Tcaron adieresis -92 +KPX Tcaron agrave -92 +KPX Tcaron amacron -92 +KPX Tcaron aogonek -92 +KPX Tcaron aring -92 +KPX Tcaron atilde -92 +KPX Tcaron colon -55 +KPX Tcaron comma -74 +KPX Tcaron e -92 +KPX Tcaron eacute -92 +KPX Tcaron ecaron -92 +KPX Tcaron ecircumflex -52 +KPX Tcaron edieresis -52 +KPX Tcaron edotaccent -92 +KPX Tcaron egrave -52 +KPX Tcaron emacron -52 +KPX Tcaron eogonek -92 +KPX Tcaron hyphen -74 +KPX Tcaron i -55 +KPX Tcaron iacute -55 +KPX Tcaron iogonek -55 +KPX Tcaron o -92 +KPX Tcaron oacute -92 +KPX Tcaron ocircumflex -92 +KPX Tcaron odieresis -92 +KPX Tcaron ograve -92 +KPX Tcaron ohungarumlaut -92 +KPX Tcaron omacron -92 +KPX Tcaron oslash -92 +KPX Tcaron otilde -92 +KPX Tcaron period -74 +KPX Tcaron r -55 +KPX Tcaron racute -55 +KPX Tcaron rcaron -55 +KPX Tcaron rcommaaccent -55 +KPX Tcaron semicolon -65 +KPX Tcaron u -55 +KPX Tcaron uacute -55 +KPX Tcaron ucircumflex -55 +KPX Tcaron udieresis -55 +KPX Tcaron ugrave -55 +KPX Tcaron uhungarumlaut -55 +KPX Tcaron umacron -55 +KPX Tcaron uogonek -55 +KPX Tcaron uring -55 +KPX Tcaron w -74 +KPX Tcaron y -74 +KPX Tcaron yacute -74 +KPX Tcaron ydieresis -34 +KPX Tcommaaccent A -50 +KPX Tcommaaccent Aacute -50 +KPX Tcommaaccent Abreve -50 +KPX Tcommaaccent Acircumflex -50 +KPX Tcommaaccent Adieresis -50 +KPX Tcommaaccent Agrave -50 +KPX Tcommaaccent Amacron -50 +KPX Tcommaaccent Aogonek -50 +KPX Tcommaaccent Aring -50 +KPX Tcommaaccent Atilde -50 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -92 +KPX Tcommaaccent aacute -92 +KPX Tcommaaccent abreve -92 +KPX Tcommaaccent acircumflex -92 +KPX Tcommaaccent adieresis -92 +KPX Tcommaaccent agrave -92 +KPX Tcommaaccent amacron -92 +KPX Tcommaaccent aogonek -92 +KPX Tcommaaccent aring -92 +KPX Tcommaaccent atilde -92 +KPX Tcommaaccent colon -55 +KPX Tcommaaccent comma -74 +KPX Tcommaaccent e -92 +KPX Tcommaaccent eacute -92 +KPX Tcommaaccent ecaron -92 +KPX Tcommaaccent ecircumflex -52 +KPX Tcommaaccent edieresis -52 +KPX Tcommaaccent edotaccent -92 +KPX Tcommaaccent egrave -52 +KPX Tcommaaccent emacron -52 +KPX Tcommaaccent eogonek -92 +KPX Tcommaaccent hyphen -74 +KPX Tcommaaccent i -55 +KPX Tcommaaccent iacute -55 +KPX Tcommaaccent iogonek -55 +KPX Tcommaaccent o -92 +KPX Tcommaaccent oacute -92 +KPX Tcommaaccent ocircumflex -92 +KPX Tcommaaccent odieresis -92 +KPX Tcommaaccent ograve -92 +KPX Tcommaaccent ohungarumlaut -92 +KPX Tcommaaccent omacron -92 +KPX Tcommaaccent oslash -92 +KPX Tcommaaccent otilde -92 +KPX Tcommaaccent period -74 +KPX Tcommaaccent r -55 +KPX Tcommaaccent racute -55 +KPX Tcommaaccent rcaron -55 +KPX Tcommaaccent rcommaaccent -55 +KPX Tcommaaccent semicolon -65 +KPX Tcommaaccent u -55 +KPX Tcommaaccent uacute -55 +KPX Tcommaaccent ucircumflex -55 +KPX Tcommaaccent udieresis -55 +KPX Tcommaaccent ugrave -55 +KPX Tcommaaccent uhungarumlaut -55 +KPX Tcommaaccent umacron -55 +KPX Tcommaaccent uogonek -55 +KPX Tcommaaccent uring -55 +KPX Tcommaaccent w -74 +KPX Tcommaaccent y -74 +KPX Tcommaaccent yacute -74 +KPX Tcommaaccent ydieresis -34 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -25 +KPX U period -25 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Uacute comma -25 +KPX Uacute period -25 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Ucircumflex comma -25 +KPX Ucircumflex period -25 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Udieresis comma -25 +KPX Udieresis period -25 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Ugrave comma -25 +KPX Ugrave period -25 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Uhungarumlaut comma -25 +KPX Uhungarumlaut period -25 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Umacron comma -25 +KPX Umacron period -25 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uogonek comma -25 +KPX Uogonek period -25 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX Uring comma -25 +KPX Uring period -25 +KPX V A -60 +KPX V Aacute -60 +KPX V Abreve -60 +KPX V Acircumflex -60 +KPX V Adieresis -60 +KPX V Agrave -60 +KPX V Amacron -60 +KPX V Aogonek -60 +KPX V Aring -60 +KPX V Atilde -60 +KPX V O -30 +KPX V Oacute -30 +KPX V Ocircumflex -30 +KPX V Odieresis -30 +KPX V Ograve -30 +KPX V Ohungarumlaut -30 +KPX V Omacron -30 +KPX V Oslash -30 +KPX V Otilde -30 +KPX V a -111 +KPX V aacute -111 +KPX V abreve -111 +KPX V acircumflex -111 +KPX V adieresis -111 +KPX V agrave -111 +KPX V amacron -111 +KPX V aogonek -111 +KPX V aring -111 +KPX V atilde -111 +KPX V colon -65 +KPX V comma -129 +KPX V e -111 +KPX V eacute -111 +KPX V ecaron -111 +KPX V ecircumflex -111 +KPX V edieresis -71 +KPX V edotaccent -111 +KPX V egrave -71 +KPX V emacron -71 +KPX V eogonek -111 +KPX V hyphen -55 +KPX V i -74 +KPX V iacute -74 +KPX V icircumflex -34 +KPX V idieresis -34 +KPX V igrave -34 +KPX V imacron -34 +KPX V iogonek -74 +KPX V o -111 +KPX V oacute -111 +KPX V ocircumflex -111 +KPX V odieresis -111 +KPX V ograve -111 +KPX V ohungarumlaut -111 +KPX V omacron -111 +KPX V oslash -111 +KPX V otilde -111 +KPX V period -129 +KPX V semicolon -74 +KPX V u -74 +KPX V uacute -74 +KPX V ucircumflex -74 +KPX V udieresis -74 +KPX V ugrave -74 +KPX V uhungarumlaut -74 +KPX V umacron -74 +KPX V uogonek -74 +KPX V uring -74 +KPX W A -60 +KPX W Aacute -60 +KPX W Abreve -60 +KPX W Acircumflex -60 +KPX W Adieresis -60 +KPX W Agrave -60 +KPX W Amacron -60 +KPX W Aogonek -60 +KPX W Aring -60 +KPX W Atilde -60 +KPX W O -25 +KPX W Oacute -25 +KPX W Ocircumflex -25 +KPX W Odieresis -25 +KPX W Ograve -25 +KPX W Ohungarumlaut -25 +KPX W Omacron -25 +KPX W Oslash -25 +KPX W Otilde -25 +KPX W a -92 +KPX W aacute -92 +KPX W abreve -92 +KPX W acircumflex -92 +KPX W adieresis -92 +KPX W agrave -92 +KPX W amacron -92 +KPX W aogonek -92 +KPX W aring -92 +KPX W atilde -92 +KPX W colon -65 +KPX W comma -92 +KPX W e -92 +KPX W eacute -92 +KPX W ecaron -92 +KPX W ecircumflex -92 +KPX W edieresis -52 +KPX W edotaccent -92 +KPX W egrave -52 +KPX W emacron -52 +KPX W eogonek -92 +KPX W hyphen -37 +KPX W i -55 +KPX W iacute -55 +KPX W iogonek -55 +KPX W o -92 +KPX W oacute -92 +KPX W ocircumflex -92 +KPX W odieresis -92 +KPX W ograve -92 +KPX W ohungarumlaut -92 +KPX W omacron -92 +KPX W oslash -92 +KPX W otilde -92 +KPX W period -92 +KPX W semicolon -65 +KPX W u -55 +KPX W uacute -55 +KPX W ucircumflex -55 +KPX W udieresis -55 +KPX W ugrave -55 +KPX W uhungarumlaut -55 +KPX W umacron -55 +KPX W uogonek -55 +KPX W uring -55 +KPX W y -70 +KPX W yacute -70 +KPX W ydieresis -70 +KPX Y A -50 +KPX Y Aacute -50 +KPX Y Abreve -50 +KPX Y Acircumflex -50 +KPX Y Adieresis -50 +KPX Y Agrave -50 +KPX Y Amacron -50 +KPX Y Aogonek -50 +KPX Y Aring -50 +KPX Y Atilde -50 +KPX Y O -15 +KPX Y Oacute -15 +KPX Y Ocircumflex -15 +KPX Y Odieresis -15 +KPX Y Ograve -15 +KPX Y Ohungarumlaut -15 +KPX Y Omacron -15 +KPX Y Oslash -15 +KPX Y Otilde -15 +KPX Y a -92 +KPX Y aacute -92 +KPX Y abreve -92 +KPX Y acircumflex -92 +KPX Y adieresis -92 +KPX Y agrave -92 +KPX Y amacron -92 +KPX Y aogonek -92 +KPX Y aring -92 +KPX Y atilde -92 +KPX Y colon -65 +KPX Y comma -92 +KPX Y e -92 +KPX Y eacute -92 +KPX Y ecaron -92 +KPX Y ecircumflex -92 +KPX Y edieresis -52 +KPX Y edotaccent -92 +KPX Y egrave -52 +KPX Y emacron -52 +KPX Y eogonek -92 +KPX Y hyphen -74 +KPX Y i -74 +KPX Y iacute -74 +KPX Y icircumflex -34 +KPX Y idieresis -34 +KPX Y igrave -34 +KPX Y imacron -34 +KPX Y iogonek -74 +KPX Y o -92 +KPX Y oacute -92 +KPX Y ocircumflex -92 +KPX Y odieresis -92 +KPX Y ograve -92 +KPX Y ohungarumlaut -92 +KPX Y omacron -92 +KPX Y oslash -92 +KPX Y otilde -92 +KPX Y period -92 +KPX Y semicolon -65 +KPX Y u -92 +KPX Y uacute -92 +KPX Y ucircumflex -92 +KPX Y udieresis -92 +KPX Y ugrave -92 +KPX Y uhungarumlaut -92 +KPX Y umacron -92 +KPX Y uogonek -92 +KPX Y uring -92 +KPX Yacute A -50 +KPX Yacute Aacute -50 +KPX Yacute Abreve -50 +KPX Yacute Acircumflex -50 +KPX Yacute Adieresis -50 +KPX Yacute Agrave -50 +KPX Yacute Amacron -50 +KPX Yacute Aogonek -50 +KPX Yacute Aring -50 +KPX Yacute Atilde -50 +KPX Yacute O -15 +KPX Yacute Oacute -15 +KPX Yacute Ocircumflex -15 +KPX Yacute Odieresis -15 +KPX Yacute Ograve -15 +KPX Yacute Ohungarumlaut -15 +KPX Yacute Omacron -15 +KPX Yacute Oslash -15 +KPX Yacute Otilde -15 +KPX Yacute a -92 +KPX Yacute aacute -92 +KPX Yacute abreve -92 +KPX Yacute acircumflex -92 +KPX Yacute adieresis -92 +KPX Yacute agrave -92 +KPX Yacute amacron -92 +KPX Yacute aogonek -92 +KPX Yacute aring -92 +KPX Yacute atilde -92 +KPX Yacute colon -65 +KPX Yacute comma -92 +KPX Yacute e -92 +KPX Yacute eacute -92 +KPX Yacute ecaron -92 +KPX Yacute ecircumflex -92 +KPX Yacute edieresis -52 +KPX Yacute edotaccent -92 +KPX Yacute egrave -52 +KPX Yacute emacron -52 +KPX Yacute eogonek -92 +KPX Yacute hyphen -74 +KPX Yacute i -74 +KPX Yacute iacute -74 +KPX Yacute icircumflex -34 +KPX Yacute idieresis -34 +KPX Yacute igrave -34 +KPX Yacute imacron -34 +KPX Yacute iogonek -74 +KPX Yacute o -92 +KPX Yacute oacute -92 +KPX Yacute ocircumflex -92 +KPX Yacute odieresis -92 +KPX Yacute ograve -92 +KPX Yacute ohungarumlaut -92 +KPX Yacute omacron -92 +KPX Yacute oslash -92 +KPX Yacute otilde -92 +KPX Yacute period -92 +KPX Yacute semicolon -65 +KPX Yacute u -92 +KPX Yacute uacute -92 +KPX Yacute ucircumflex -92 +KPX Yacute udieresis -92 +KPX Yacute ugrave -92 +KPX Yacute uhungarumlaut -92 +KPX Yacute umacron -92 +KPX Yacute uogonek -92 +KPX Yacute uring -92 +KPX Ydieresis A -50 +KPX Ydieresis Aacute -50 +KPX Ydieresis Abreve -50 +KPX Ydieresis Acircumflex -50 +KPX Ydieresis Adieresis -50 +KPX Ydieresis Agrave -50 +KPX Ydieresis Amacron -50 +KPX Ydieresis Aogonek -50 +KPX Ydieresis Aring -50 +KPX Ydieresis Atilde -50 +KPX Ydieresis O -15 +KPX Ydieresis Oacute -15 +KPX Ydieresis Ocircumflex -15 +KPX Ydieresis Odieresis -15 +KPX Ydieresis Ograve -15 +KPX Ydieresis Ohungarumlaut -15 +KPX Ydieresis Omacron -15 +KPX Ydieresis Oslash -15 +KPX Ydieresis Otilde -15 +KPX Ydieresis a -92 +KPX Ydieresis aacute -92 +KPX Ydieresis abreve -92 +KPX Ydieresis acircumflex -92 +KPX Ydieresis adieresis -92 +KPX Ydieresis agrave -92 +KPX Ydieresis amacron -92 +KPX Ydieresis aogonek -92 +KPX Ydieresis aring -92 +KPX Ydieresis atilde -92 +KPX Ydieresis colon -65 +KPX Ydieresis comma -92 +KPX Ydieresis e -92 +KPX Ydieresis eacute -92 +KPX Ydieresis ecaron -92 +KPX Ydieresis ecircumflex -92 +KPX Ydieresis edieresis -52 +KPX Ydieresis edotaccent -92 +KPX Ydieresis egrave -52 +KPX Ydieresis emacron -52 +KPX Ydieresis eogonek -92 +KPX Ydieresis hyphen -74 +KPX Ydieresis i -74 +KPX Ydieresis iacute -74 +KPX Ydieresis icircumflex -34 +KPX Ydieresis idieresis -34 +KPX Ydieresis igrave -34 +KPX Ydieresis imacron -34 +KPX Ydieresis iogonek -74 +KPX Ydieresis o -92 +KPX Ydieresis oacute -92 +KPX Ydieresis ocircumflex -92 +KPX Ydieresis odieresis -92 +KPX Ydieresis ograve -92 +KPX Ydieresis ohungarumlaut -92 +KPX Ydieresis omacron -92 +KPX Ydieresis oslash -92 +KPX Ydieresis otilde -92 +KPX Ydieresis period -92 +KPX Ydieresis semicolon -65 +KPX Ydieresis u -92 +KPX Ydieresis uacute -92 +KPX Ydieresis ucircumflex -92 +KPX Ydieresis udieresis -92 +KPX Ydieresis ugrave -92 +KPX Ydieresis uhungarumlaut -92 +KPX Ydieresis umacron -92 +KPX Ydieresis uogonek -92 +KPX Ydieresis uring -92 +KPX a g -10 +KPX a gbreve -10 +KPX a gcommaaccent -10 +KPX aacute g -10 +KPX aacute gbreve -10 +KPX aacute gcommaaccent -10 +KPX abreve g -10 +KPX abreve gbreve -10 +KPX abreve gcommaaccent -10 +KPX acircumflex g -10 +KPX acircumflex gbreve -10 +KPX acircumflex gcommaaccent -10 +KPX adieresis g -10 +KPX adieresis gbreve -10 +KPX adieresis gcommaaccent -10 +KPX agrave g -10 +KPX agrave gbreve -10 +KPX agrave gcommaaccent -10 +KPX amacron g -10 +KPX amacron gbreve -10 +KPX amacron gcommaaccent -10 +KPX aogonek g -10 +KPX aogonek gbreve -10 +KPX aogonek gcommaaccent -10 +KPX aring g -10 +KPX aring gbreve -10 +KPX aring gcommaaccent -10 +KPX atilde g -10 +KPX atilde gbreve -10 +KPX atilde gcommaaccent -10 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX c h -15 +KPX c k -20 +KPX c kcommaaccent -20 +KPX cacute h -15 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX ccaron h -15 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccedilla h -15 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX comma quotedblright -140 +KPX comma quoteright -140 +KPX e comma -10 +KPX e g -40 +KPX e gbreve -40 +KPX e gcommaaccent -40 +KPX e period -15 +KPX e v -15 +KPX e w -15 +KPX e x -20 +KPX e y -30 +KPX e yacute -30 +KPX e ydieresis -30 +KPX eacute comma -10 +KPX eacute g -40 +KPX eacute gbreve -40 +KPX eacute gcommaaccent -40 +KPX eacute period -15 +KPX eacute v -15 +KPX eacute w -15 +KPX eacute x -20 +KPX eacute y -30 +KPX eacute yacute -30 +KPX eacute ydieresis -30 +KPX ecaron comma -10 +KPX ecaron g -40 +KPX ecaron gbreve -40 +KPX ecaron gcommaaccent -40 +KPX ecaron period -15 +KPX ecaron v -15 +KPX ecaron w -15 +KPX ecaron x -20 +KPX ecaron y -30 +KPX ecaron yacute -30 +KPX ecaron ydieresis -30 +KPX ecircumflex comma -10 +KPX ecircumflex g -40 +KPX ecircumflex gbreve -40 +KPX ecircumflex gcommaaccent -40 +KPX ecircumflex period -15 +KPX ecircumflex v -15 +KPX ecircumflex w -15 +KPX ecircumflex x -20 +KPX ecircumflex y -30 +KPX ecircumflex yacute -30 +KPX ecircumflex ydieresis -30 +KPX edieresis comma -10 +KPX edieresis g -40 +KPX edieresis gbreve -40 +KPX edieresis gcommaaccent -40 +KPX edieresis period -15 +KPX edieresis v -15 +KPX edieresis w -15 +KPX edieresis x -20 +KPX edieresis y -30 +KPX edieresis yacute -30 +KPX edieresis ydieresis -30 +KPX edotaccent comma -10 +KPX edotaccent g -40 +KPX edotaccent gbreve -40 +KPX edotaccent gcommaaccent -40 +KPX edotaccent period -15 +KPX edotaccent v -15 +KPX edotaccent w -15 +KPX edotaccent x -20 +KPX edotaccent y -30 +KPX edotaccent yacute -30 +KPX edotaccent ydieresis -30 +KPX egrave comma -10 +KPX egrave g -40 +KPX egrave gbreve -40 +KPX egrave gcommaaccent -40 +KPX egrave period -15 +KPX egrave v -15 +KPX egrave w -15 +KPX egrave x -20 +KPX egrave y -30 +KPX egrave yacute -30 +KPX egrave ydieresis -30 +KPX emacron comma -10 +KPX emacron g -40 +KPX emacron gbreve -40 +KPX emacron gcommaaccent -40 +KPX emacron period -15 +KPX emacron v -15 +KPX emacron w -15 +KPX emacron x -20 +KPX emacron y -30 +KPX emacron yacute -30 +KPX emacron ydieresis -30 +KPX eogonek comma -10 +KPX eogonek g -40 +KPX eogonek gbreve -40 +KPX eogonek gcommaaccent -40 +KPX eogonek period -15 +KPX eogonek v -15 +KPX eogonek w -15 +KPX eogonek x -20 +KPX eogonek y -30 +KPX eogonek yacute -30 +KPX eogonek ydieresis -30 +KPX f comma -10 +KPX f dotlessi -60 +KPX f f -18 +KPX f i -20 +KPX f iogonek -20 +KPX f period -15 +KPX f quoteright 92 +KPX g comma -10 +KPX g e -10 +KPX g eacute -10 +KPX g ecaron -10 +KPX g ecircumflex -10 +KPX g edieresis -10 +KPX g edotaccent -10 +KPX g egrave -10 +KPX g emacron -10 +KPX g eogonek -10 +KPX g g -10 +KPX g gbreve -10 +KPX g gcommaaccent -10 +KPX g period -15 +KPX gbreve comma -10 +KPX gbreve e -10 +KPX gbreve eacute -10 +KPX gbreve ecaron -10 +KPX gbreve ecircumflex -10 +KPX gbreve edieresis -10 +KPX gbreve edotaccent -10 +KPX gbreve egrave -10 +KPX gbreve emacron -10 +KPX gbreve eogonek -10 +KPX gbreve g -10 +KPX gbreve gbreve -10 +KPX gbreve gcommaaccent -10 +KPX gbreve period -15 +KPX gcommaaccent comma -10 +KPX gcommaaccent e -10 +KPX gcommaaccent eacute -10 +KPX gcommaaccent ecaron -10 +KPX gcommaaccent ecircumflex -10 +KPX gcommaaccent edieresis -10 +KPX gcommaaccent edotaccent -10 +KPX gcommaaccent egrave -10 +KPX gcommaaccent emacron -10 +KPX gcommaaccent eogonek -10 +KPX gcommaaccent g -10 +KPX gcommaaccent gbreve -10 +KPX gcommaaccent gcommaaccent -10 +KPX gcommaaccent period -15 +KPX k e -10 +KPX k eacute -10 +KPX k ecaron -10 +KPX k ecircumflex -10 +KPX k edieresis -10 +KPX k edotaccent -10 +KPX k egrave -10 +KPX k emacron -10 +KPX k eogonek -10 +KPX k o -10 +KPX k oacute -10 +KPX k ocircumflex -10 +KPX k odieresis -10 +KPX k ograve -10 +KPX k ohungarumlaut -10 +KPX k omacron -10 +KPX k oslash -10 +KPX k otilde -10 +KPX k y -10 +KPX k yacute -10 +KPX k ydieresis -10 +KPX kcommaaccent e -10 +KPX kcommaaccent eacute -10 +KPX kcommaaccent ecaron -10 +KPX kcommaaccent ecircumflex -10 +KPX kcommaaccent edieresis -10 +KPX kcommaaccent edotaccent -10 +KPX kcommaaccent egrave -10 +KPX kcommaaccent emacron -10 +KPX kcommaaccent eogonek -10 +KPX kcommaaccent o -10 +KPX kcommaaccent oacute -10 +KPX kcommaaccent ocircumflex -10 +KPX kcommaaccent odieresis -10 +KPX kcommaaccent ograve -10 +KPX kcommaaccent ohungarumlaut -10 +KPX kcommaaccent omacron -10 +KPX kcommaaccent oslash -10 +KPX kcommaaccent otilde -10 +KPX kcommaaccent y -10 +KPX kcommaaccent yacute -10 +KPX kcommaaccent ydieresis -10 +KPX n v -40 +KPX nacute v -40 +KPX ncaron v -40 +KPX ncommaaccent v -40 +KPX ntilde v -40 +KPX o g -10 +KPX o gbreve -10 +KPX o gcommaaccent -10 +KPX o v -10 +KPX oacute g -10 +KPX oacute gbreve -10 +KPX oacute gcommaaccent -10 +KPX oacute v -10 +KPX ocircumflex g -10 +KPX ocircumflex gbreve -10 +KPX ocircumflex gcommaaccent -10 +KPX ocircumflex v -10 +KPX odieresis g -10 +KPX odieresis gbreve -10 +KPX odieresis gcommaaccent -10 +KPX odieresis v -10 +KPX ograve g -10 +KPX ograve gbreve -10 +KPX ograve gcommaaccent -10 +KPX ograve v -10 +KPX ohungarumlaut g -10 +KPX ohungarumlaut gbreve -10 +KPX ohungarumlaut gcommaaccent -10 +KPX ohungarumlaut v -10 +KPX omacron g -10 +KPX omacron gbreve -10 +KPX omacron gcommaaccent -10 +KPX omacron v -10 +KPX oslash g -10 +KPX oslash gbreve -10 +KPX oslash gcommaaccent -10 +KPX oslash v -10 +KPX otilde g -10 +KPX otilde gbreve -10 +KPX otilde gcommaaccent -10 +KPX otilde v -10 +KPX period quotedblright -140 +KPX period quoteright -140 +KPX quoteleft quoteleft -111 +KPX quoteright d -25 +KPX quoteright dcroat -25 +KPX quoteright quoteright -111 +KPX quoteright r -25 +KPX quoteright racute -25 +KPX quoteright rcaron -25 +KPX quoteright rcommaaccent -25 +KPX quoteright s -40 +KPX quoteright sacute -40 +KPX quoteright scaron -40 +KPX quoteright scedilla -40 +KPX quoteright scommaaccent -40 +KPX quoteright space -111 +KPX quoteright t -30 +KPX quoteright tcommaaccent -30 +KPX quoteright v -10 +KPX r a -15 +KPX r aacute -15 +KPX r abreve -15 +KPX r acircumflex -15 +KPX r adieresis -15 +KPX r agrave -15 +KPX r amacron -15 +KPX r aogonek -15 +KPX r aring -15 +KPX r atilde -15 +KPX r c -37 +KPX r cacute -37 +KPX r ccaron -37 +KPX r ccedilla -37 +KPX r comma -111 +KPX r d -37 +KPX r dcroat -37 +KPX r e -37 +KPX r eacute -37 +KPX r ecaron -37 +KPX r ecircumflex -37 +KPX r edieresis -37 +KPX r edotaccent -37 +KPX r egrave -37 +KPX r emacron -37 +KPX r eogonek -37 +KPX r g -37 +KPX r gbreve -37 +KPX r gcommaaccent -37 +KPX r hyphen -20 +KPX r o -45 +KPX r oacute -45 +KPX r ocircumflex -45 +KPX r odieresis -45 +KPX r ograve -45 +KPX r ohungarumlaut -45 +KPX r omacron -45 +KPX r oslash -45 +KPX r otilde -45 +KPX r period -111 +KPX r q -37 +KPX r s -10 +KPX r sacute -10 +KPX r scaron -10 +KPX r scedilla -10 +KPX r scommaaccent -10 +KPX racute a -15 +KPX racute aacute -15 +KPX racute abreve -15 +KPX racute acircumflex -15 +KPX racute adieresis -15 +KPX racute agrave -15 +KPX racute amacron -15 +KPX racute aogonek -15 +KPX racute aring -15 +KPX racute atilde -15 +KPX racute c -37 +KPX racute cacute -37 +KPX racute ccaron -37 +KPX racute ccedilla -37 +KPX racute comma -111 +KPX racute d -37 +KPX racute dcroat -37 +KPX racute e -37 +KPX racute eacute -37 +KPX racute ecaron -37 +KPX racute ecircumflex -37 +KPX racute edieresis -37 +KPX racute edotaccent -37 +KPX racute egrave -37 +KPX racute emacron -37 +KPX racute eogonek -37 +KPX racute g -37 +KPX racute gbreve -37 +KPX racute gcommaaccent -37 +KPX racute hyphen -20 +KPX racute o -45 +KPX racute oacute -45 +KPX racute ocircumflex -45 +KPX racute odieresis -45 +KPX racute ograve -45 +KPX racute ohungarumlaut -45 +KPX racute omacron -45 +KPX racute oslash -45 +KPX racute otilde -45 +KPX racute period -111 +KPX racute q -37 +KPX racute s -10 +KPX racute sacute -10 +KPX racute scaron -10 +KPX racute scedilla -10 +KPX racute scommaaccent -10 +KPX rcaron a -15 +KPX rcaron aacute -15 +KPX rcaron abreve -15 +KPX rcaron acircumflex -15 +KPX rcaron adieresis -15 +KPX rcaron agrave -15 +KPX rcaron amacron -15 +KPX rcaron aogonek -15 +KPX rcaron aring -15 +KPX rcaron atilde -15 +KPX rcaron c -37 +KPX rcaron cacute -37 +KPX rcaron ccaron -37 +KPX rcaron ccedilla -37 +KPX rcaron comma -111 +KPX rcaron d -37 +KPX rcaron dcroat -37 +KPX rcaron e -37 +KPX rcaron eacute -37 +KPX rcaron ecaron -37 +KPX rcaron ecircumflex -37 +KPX rcaron edieresis -37 +KPX rcaron edotaccent -37 +KPX rcaron egrave -37 +KPX rcaron emacron -37 +KPX rcaron eogonek -37 +KPX rcaron g -37 +KPX rcaron gbreve -37 +KPX rcaron gcommaaccent -37 +KPX rcaron hyphen -20 +KPX rcaron o -45 +KPX rcaron oacute -45 +KPX rcaron ocircumflex -45 +KPX rcaron odieresis -45 +KPX rcaron ograve -45 +KPX rcaron ohungarumlaut -45 +KPX rcaron omacron -45 +KPX rcaron oslash -45 +KPX rcaron otilde -45 +KPX rcaron period -111 +KPX rcaron q -37 +KPX rcaron s -10 +KPX rcaron sacute -10 +KPX rcaron scaron -10 +KPX rcaron scedilla -10 +KPX rcaron scommaaccent -10 +KPX rcommaaccent a -15 +KPX rcommaaccent aacute -15 +KPX rcommaaccent abreve -15 +KPX rcommaaccent acircumflex -15 +KPX rcommaaccent adieresis -15 +KPX rcommaaccent agrave -15 +KPX rcommaaccent amacron -15 +KPX rcommaaccent aogonek -15 +KPX rcommaaccent aring -15 +KPX rcommaaccent atilde -15 +KPX rcommaaccent c -37 +KPX rcommaaccent cacute -37 +KPX rcommaaccent ccaron -37 +KPX rcommaaccent ccedilla -37 +KPX rcommaaccent comma -111 +KPX rcommaaccent d -37 +KPX rcommaaccent dcroat -37 +KPX rcommaaccent e -37 +KPX rcommaaccent eacute -37 +KPX rcommaaccent ecaron -37 +KPX rcommaaccent ecircumflex -37 +KPX rcommaaccent edieresis -37 +KPX rcommaaccent edotaccent -37 +KPX rcommaaccent egrave -37 +KPX rcommaaccent emacron -37 +KPX rcommaaccent eogonek -37 +KPX rcommaaccent g -37 +KPX rcommaaccent gbreve -37 +KPX rcommaaccent gcommaaccent -37 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent o -45 +KPX rcommaaccent oacute -45 +KPX rcommaaccent ocircumflex -45 +KPX rcommaaccent odieresis -45 +KPX rcommaaccent ograve -45 +KPX rcommaaccent ohungarumlaut -45 +KPX rcommaaccent omacron -45 +KPX rcommaaccent oslash -45 +KPX rcommaaccent otilde -45 +KPX rcommaaccent period -111 +KPX rcommaaccent q -37 +KPX rcommaaccent s -10 +KPX rcommaaccent sacute -10 +KPX rcommaaccent scaron -10 +KPX rcommaaccent scedilla -10 +KPX rcommaaccent scommaaccent -10 +KPX space A -18 +KPX space Aacute -18 +KPX space Abreve -18 +KPX space Acircumflex -18 +KPX space Adieresis -18 +KPX space Agrave -18 +KPX space Amacron -18 +KPX space Aogonek -18 +KPX space Aring -18 +KPX space Atilde -18 +KPX space T -18 +KPX space Tcaron -18 +KPX space Tcommaaccent -18 +KPX space V -35 +KPX space W -40 +KPX space Y -75 +KPX space Yacute -75 +KPX space Ydieresis -75 +KPX v comma -74 +KPX v period -74 +KPX w comma -74 +KPX w period -74 +KPX y comma -55 +KPX y period -55 +KPX yacute comma -55 +KPX yacute period -55 +KPX ydieresis comma -55 +KPX ydieresis period -55 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/Times-Roman.afm b/internal/pdf/model/fonts/afms/Times-Roman.afm new file mode 100644 index 0000000..2680669 --- /dev/null +++ b/internal/pdf/model/fonts/afms/Times-Roman.afm @@ -0,0 +1,2419 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:49:17 1997 +Comment UniqueID 43068 +Comment VMusage 43909 54934 +FontName Times-Roman +FullName Times Roman +FamilyName Times +Weight Roman +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -168 -218 1000 898 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 662 +XHeight 450 +Ascender 683 +Descender -217 +StdHW 28 +StdVW 84 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ; +C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; +C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; +C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; +C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ; +C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ; +C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ; +C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ; +C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ; +C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ; +C 43 ; WX 564 ; N plus ; B 30 0 534 506 ; +C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ; +C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ; +C 46 ; WX 250 ; N period ; B 70 -11 181 100 ; +C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ; +C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; +C 49 ; WX 500 ; N one ; B 111 0 394 676 ; +C 50 ; WX 500 ; N two ; B 30 0 475 676 ; +C 51 ; WX 500 ; N three ; B 43 -14 431 676 ; +C 52 ; WX 500 ; N four ; B 12 0 472 676 ; +C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; +C 54 ; WX 500 ; N six ; B 34 -14 468 684 ; +C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ; +C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ; +C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ; +C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ; +C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ; +C 60 ; WX 564 ; N less ; B 28 -8 536 514 ; +C 61 ; WX 564 ; N equal ; B 30 120 534 386 ; +C 62 ; WX 564 ; N greater ; B 28 -8 536 514 ; +C 63 ; WX 444 ; N question ; B 68 -8 414 676 ; +C 64 ; WX 921 ; N at ; B 116 -14 809 676 ; +C 65 ; WX 722 ; N A ; B 15 0 706 674 ; +C 66 ; WX 667 ; N B ; B 17 0 593 662 ; +C 67 ; WX 667 ; N C ; B 28 -14 633 676 ; +C 68 ; WX 722 ; N D ; B 16 0 685 662 ; +C 69 ; WX 611 ; N E ; B 12 0 597 662 ; +C 70 ; WX 556 ; N F ; B 12 0 546 662 ; +C 71 ; WX 722 ; N G ; B 32 -14 709 676 ; +C 72 ; WX 722 ; N H ; B 19 0 702 662 ; +C 73 ; WX 333 ; N I ; B 18 0 315 662 ; +C 74 ; WX 389 ; N J ; B 10 -14 370 662 ; +C 75 ; WX 722 ; N K ; B 34 0 723 662 ; +C 76 ; WX 611 ; N L ; B 12 0 598 662 ; +C 77 ; WX 889 ; N M ; B 12 0 863 662 ; +C 78 ; WX 722 ; N N ; B 12 -11 707 662 ; +C 79 ; WX 722 ; N O ; B 34 -14 688 676 ; +C 80 ; WX 556 ; N P ; B 16 0 542 662 ; +C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ; +C 82 ; WX 667 ; N R ; B 17 0 659 662 ; +C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; +C 84 ; WX 611 ; N T ; B 17 0 593 662 ; +C 85 ; WX 722 ; N U ; B 14 -14 705 662 ; +C 86 ; WX 722 ; N V ; B 16 -11 697 662 ; +C 87 ; WX 944 ; N W ; B 5 -11 932 662 ; +C 88 ; WX 722 ; N X ; B 10 0 704 662 ; +C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; +C 90 ; WX 611 ; N Z ; B 9 0 597 662 ; +C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; +C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ; +C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; +C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ; +C 97 ; WX 444 ; N a ; B 37 -10 442 460 ; +C 98 ; WX 500 ; N b ; B 3 -10 468 683 ; +C 99 ; WX 444 ; N c ; B 25 -10 412 460 ; +C 100 ; WX 500 ; N d ; B 27 -10 491 683 ; +C 101 ; WX 444 ; N e ; B 25 -10 424 460 ; +C 102 ; WX 333 ; N f ; B 20 0 383 683 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B 28 -218 470 460 ; +C 104 ; WX 500 ; N h ; B 9 0 487 683 ; +C 105 ; WX 278 ; N i ; B 16 0 253 683 ; +C 106 ; WX 278 ; N j ; B -70 -218 194 683 ; +C 107 ; WX 500 ; N k ; B 7 0 505 683 ; +C 108 ; WX 278 ; N l ; B 19 0 257 683 ; +C 109 ; WX 778 ; N m ; B 16 0 775 460 ; +C 110 ; WX 500 ; N n ; B 16 0 485 460 ; +C 111 ; WX 500 ; N o ; B 29 -10 470 460 ; +C 112 ; WX 500 ; N p ; B 5 -217 470 460 ; +C 113 ; WX 500 ; N q ; B 24 -217 488 460 ; +C 114 ; WX 333 ; N r ; B 5 0 335 460 ; +C 115 ; WX 389 ; N s ; B 51 -10 348 460 ; +C 116 ; WX 278 ; N t ; B 13 -10 279 579 ; +C 117 ; WX 500 ; N u ; B 9 -10 479 450 ; +C 118 ; WX 500 ; N v ; B 19 -14 477 450 ; +C 119 ; WX 722 ; N w ; B 21 -14 694 450 ; +C 120 ; WX 500 ; N x ; B 17 0 479 450 ; +C 121 ; WX 500 ; N y ; B 14 -218 475 450 ; +C 122 ; WX 444 ; N z ; B 27 0 418 450 ; +C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ; +C 124 ; WX 200 ; N bar ; B 67 -218 133 782 ; +C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ; +C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; +C 161 ; WX 333 ; N exclamdown ; B 97 -218 205 467 ; +C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; +C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ; +C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ; +C 165 ; WX 500 ; N yen ; B -53 0 512 662 ; +C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ; +C 167 ; WX 500 ; N section ; B 70 -148 426 676 ; +C 168 ; WX 500 ; N currency ; B -22 58 522 602 ; +C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ; +C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ; +C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ; +C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ; +C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ; +C 174 ; WX 556 ; N fi ; B 31 0 521 683 ; +C 175 ; WX 556 ; N fl ; B 32 0 521 683 ; +C 177 ; WX 500 ; N endash ; B 0 201 500 250 ; +C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ; +C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ; +C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; +C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ; +C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ; +C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ; +C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ; +C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ; +C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ; +C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ; +C 191 ; WX 444 ; N questiondown ; B 30 -218 376 466 ; +C 193 ; WX 333 ; N grave ; B 19 507 242 678 ; +C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; +C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ; +C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ; +C 197 ; WX 333 ; N macron ; B 11 547 322 601 ; +C 198 ; WX 333 ; N breve ; B 26 507 307 664 ; +C 199 ; WX 333 ; N dotaccent ; B 118 581 216 681 ; +C 200 ; WX 333 ; N dieresis ; B 18 581 315 681 ; +C 202 ; WX 333 ; N ring ; B 67 512 266 711 ; +C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ; +C 206 ; WX 333 ; N ogonek ; B 62 -165 243 0 ; +C 207 ; WX 333 ; N caron ; B 11 507 322 674 ; +C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ; +C 225 ; WX 889 ; N AE ; B 0 0 863 662 ; +C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ; +C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; +C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ; +C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ; +C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ; +C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ; +C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ; +C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ; +C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ; +C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ; +C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ; +C -1 ; WX 333 ; N Idieresis ; B 18 0 315 835 ; +C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; +C -1 ; WX 444 ; N abreve ; B 37 -10 442 664 ; +C -1 ; WX 500 ; N uhungarumlaut ; B 9 -10 501 678 ; +C -1 ; WX 444 ; N ecaron ; B 25 -10 424 674 ; +C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 835 ; +C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ; +C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; +C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ; +C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; +C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; +C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; +C -1 ; WX 389 ; N scommaaccent ; B 51 -218 348 460 ; +C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; +C -1 ; WX 722 ; N Uring ; B 14 -14 705 898 ; +C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 835 ; +C -1 ; WX 444 ; N aogonek ; B 37 -165 469 460 ; +C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; +C -1 ; WX 500 ; N uogonek ; B 9 -155 487 450 ; +C -1 ; WX 611 ; N Edieresis ; B 12 0 597 835 ; +C -1 ; WX 722 ; N Dcroat ; B 16 0 685 662 ; +C -1 ; WX 250 ; N commaaccent ; B 59 -218 184 -50 ; +C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ; +C -1 ; WX 611 ; N Emacron ; B 12 0 597 813 ; +C -1 ; WX 444 ; N ccaron ; B 25 -10 412 674 ; +C -1 ; WX 444 ; N aring ; B 37 -10 442 711 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 12 -198 707 662 ; +C -1 ; WX 278 ; N lacute ; B 19 0 290 890 ; +C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 17 -218 593 662 ; +C -1 ; WX 667 ; N Cacute ; B 28 -14 633 890 ; +C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; +C -1 ; WX 611 ; N Edotaccent ; B 12 0 597 835 ; +C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; +C -1 ; WX 389 ; N scedilla ; B 51 -215 348 460 ; +C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; +C -1 ; WX 471 ; N lozenge ; B 13 0 459 724 ; +C -1 ; WX 667 ; N Rcaron ; B 17 0 659 886 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 32 -218 709 676 ; +C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; +C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; +C -1 ; WX 722 ; N Amacron ; B 15 0 706 813 ; +C -1 ; WX 333 ; N rcaron ; B 5 0 335 674 ; +C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; +C -1 ; WX 611 ; N Zdotaccent ; B 9 0 597 835 ; +C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; +C -1 ; WX 722 ; N Omacron ; B 34 -14 688 813 ; +C -1 ; WX 667 ; N Racute ; B 17 0 659 890 ; +C -1 ; WX 556 ; N Sacute ; B 42 -14 491 890 ; +C -1 ; WX 588 ; N dcaron ; B 27 -10 589 695 ; +C -1 ; WX 722 ; N Umacron ; B 14 -14 705 813 ; +C -1 ; WX 500 ; N uring ; B 9 -10 479 711 ; +C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ; +C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ; +C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ; +C -1 ; WX 722 ; N Abreve ; B 15 0 706 876 ; +C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ; +C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; +C -1 ; WX 611 ; N Tcaron ; B 17 0 593 886 ; +C -1 ; WX 476 ; N partialdiff ; B 17 -38 459 710 ; +C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 623 ; +C -1 ; WX 722 ; N Nacute ; B 12 -11 707 890 ; +C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; +C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ; +C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ; +C -1 ; WX 444 ; N edieresis ; B 25 -10 424 623 ; +C -1 ; WX 444 ; N cacute ; B 25 -10 413 678 ; +C -1 ; WX 500 ; N nacute ; B 16 0 485 678 ; +C -1 ; WX 500 ; N umacron ; B 9 -10 479 601 ; +C -1 ; WX 722 ; N Ncaron ; B 12 -11 707 886 ; +C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ; +C -1 ; WX 564 ; N plusminus ; B 30 0 534 506 ; +C -1 ; WX 200 ; N brokenbar ; B 67 -143 133 707 ; +C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ; +C -1 ; WX 722 ; N Gbreve ; B 32 -14 709 876 ; +C -1 ; WX 333 ; N Idotaccent ; B 18 0 315 835 ; +C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; +C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; +C -1 ; WX 333 ; N racute ; B 5 0 335 678 ; +C -1 ; WX 500 ; N omacron ; B 29 -10 470 601 ; +C -1 ; WX 611 ; N Zacute ; B 9 0 597 890 ; +C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 666 ; +C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; +C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; +C -1 ; WX 278 ; N lcommaaccent ; B 19 -218 257 683 ; +C -1 ; WX 326 ; N tcaron ; B 13 -10 318 722 ; +C -1 ; WX 444 ; N eogonek ; B 25 -165 424 460 ; +C -1 ; WX 722 ; N Uogonek ; B 14 -165 705 662 ; +C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ; +C -1 ; WX 722 ; N Adieresis ; B 15 0 706 835 ; +C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; +C -1 ; WX 444 ; N zacute ; B 27 0 418 678 ; +C -1 ; WX 278 ; N iogonek ; B 16 -165 265 683 ; +C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; +C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; +C -1 ; WX 444 ; N amacron ; B 37 -10 442 601 ; +C -1 ; WX 389 ; N sacute ; B 51 -10 348 678 ; +C -1 ; WX 278 ; N idieresis ; B -9 0 288 623 ; +C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; +C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; +C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; +C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 835 ; +C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ; +C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 29 -10 491 678 ; +C -1 ; WX 611 ; N Eogonek ; B 12 -165 597 662 ; +C -1 ; WX 500 ; N dcroat ; B 27 -10 500 683 ; +C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ; +C -1 ; WX 556 ; N Scedilla ; B 42 -215 491 676 ; +C -1 ; WX 344 ; N lcaron ; B 19 0 347 695 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 34 -198 723 662 ; +C -1 ; WX 611 ; N Lacute ; B 12 0 598 890 ; +C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ; +C -1 ; WX 444 ; N edotaccent ; B 25 -10 424 623 ; +C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ; +C -1 ; WX 333 ; N Imacron ; B 11 0 322 813 ; +C -1 ; WX 611 ; N Lcaron ; B 12 0 598 676 ; +C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 523 666 ; +C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; +C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 14 -14 705 890 ; +C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; +C -1 ; WX 444 ; N emacron ; B 25 -10 424 601 ; +C -1 ; WX 500 ; N gbreve ; B 28 -218 470 664 ; +C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ; +C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ; +C -1 ; WX 556 ; N Scommaaccent ; B 42 -218 491 676 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 34 -14 688 890 ; +C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; +C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; +C -1 ; WX 667 ; N Ccaron ; B 28 -14 633 886 ; +C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; +C -1 ; WX 453 ; N radical ; B 2 -60 452 768 ; +C -1 ; WX 722 ; N Dcaron ; B 16 0 685 886 ; +C -1 ; WX 333 ; N rcommaaccent ; B 5 -218 335 460 ; +C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ; +C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; +C -1 ; WX 667 ; N Rcommaaccent ; B 17 -198 659 662 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 12 -218 598 662 ; +C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; +C -1 ; WX 722 ; N Aogonek ; B 15 -165 738 674 ; +C -1 ; WX 722 ; N Aring ; B 15 0 706 898 ; +C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ; +C -1 ; WX 444 ; N zdotaccent ; B 27 0 418 623 ; +C -1 ; WX 611 ; N Ecaron ; B 12 0 597 886 ; +C -1 ; WX 333 ; N Iogonek ; B 18 -165 315 662 ; +C -1 ; WX 500 ; N kcommaaccent ; B 7 -218 505 683 ; +C -1 ; WX 564 ; N minus ; B 30 220 534 286 ; +C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ; +C -1 ; WX 500 ; N ncaron ; B 16 0 485 674 ; +C -1 ; WX 278 ; N tcommaaccent ; B 13 -218 279 579 ; +C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; +C -1 ; WX 500 ; N odieresis ; B 29 -10 470 623 ; +C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ; +C -1 ; WX 549 ; N notequal ; B 12 -31 537 547 ; +C -1 ; WX 500 ; N gcommaaccent ; B 28 -218 470 749 ; +C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; +C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; +C -1 ; WX 500 ; N ncommaaccent ; B 16 -218 485 460 ; +C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; +C -1 ; WX 278 ; N imacron ; B 6 0 271 601 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2073 +KPX A C -40 +KPX A Cacute -40 +KPX A Ccaron -40 +KPX A Ccedilla -40 +KPX A G -40 +KPX A Gbreve -40 +KPX A Gcommaaccent -40 +KPX A O -55 +KPX A Oacute -55 +KPX A Ocircumflex -55 +KPX A Odieresis -55 +KPX A Ograve -55 +KPX A Ohungarumlaut -55 +KPX A Omacron -55 +KPX A Oslash -55 +KPX A Otilde -55 +KPX A Q -55 +KPX A T -111 +KPX A Tcaron -111 +KPX A Tcommaaccent -111 +KPX A U -55 +KPX A Uacute -55 +KPX A Ucircumflex -55 +KPX A Udieresis -55 +KPX A Ugrave -55 +KPX A Uhungarumlaut -55 +KPX A Umacron -55 +KPX A Uogonek -55 +KPX A Uring -55 +KPX A V -135 +KPX A W -90 +KPX A Y -105 +KPX A Yacute -105 +KPX A Ydieresis -105 +KPX A quoteright -111 +KPX A v -74 +KPX A w -92 +KPX A y -92 +KPX A yacute -92 +KPX A ydieresis -92 +KPX Aacute C -40 +KPX Aacute Cacute -40 +KPX Aacute Ccaron -40 +KPX Aacute Ccedilla -40 +KPX Aacute G -40 +KPX Aacute Gbreve -40 +KPX Aacute Gcommaaccent -40 +KPX Aacute O -55 +KPX Aacute Oacute -55 +KPX Aacute Ocircumflex -55 +KPX Aacute Odieresis -55 +KPX Aacute Ograve -55 +KPX Aacute Ohungarumlaut -55 +KPX Aacute Omacron -55 +KPX Aacute Oslash -55 +KPX Aacute Otilde -55 +KPX Aacute Q -55 +KPX Aacute T -111 +KPX Aacute Tcaron -111 +KPX Aacute Tcommaaccent -111 +KPX Aacute U -55 +KPX Aacute Uacute -55 +KPX Aacute Ucircumflex -55 +KPX Aacute Udieresis -55 +KPX Aacute Ugrave -55 +KPX Aacute Uhungarumlaut -55 +KPX Aacute Umacron -55 +KPX Aacute Uogonek -55 +KPX Aacute Uring -55 +KPX Aacute V -135 +KPX Aacute W -90 +KPX Aacute Y -105 +KPX Aacute Yacute -105 +KPX Aacute Ydieresis -105 +KPX Aacute quoteright -111 +KPX Aacute v -74 +KPX Aacute w -92 +KPX Aacute y -92 +KPX Aacute yacute -92 +KPX Aacute ydieresis -92 +KPX Abreve C -40 +KPX Abreve Cacute -40 +KPX Abreve Ccaron -40 +KPX Abreve Ccedilla -40 +KPX Abreve G -40 +KPX Abreve Gbreve -40 +KPX Abreve Gcommaaccent -40 +KPX Abreve O -55 +KPX Abreve Oacute -55 +KPX Abreve Ocircumflex -55 +KPX Abreve Odieresis -55 +KPX Abreve Ograve -55 +KPX Abreve Ohungarumlaut -55 +KPX Abreve Omacron -55 +KPX Abreve Oslash -55 +KPX Abreve Otilde -55 +KPX Abreve Q -55 +KPX Abreve T -111 +KPX Abreve Tcaron -111 +KPX Abreve Tcommaaccent -111 +KPX Abreve U -55 +KPX Abreve Uacute -55 +KPX Abreve Ucircumflex -55 +KPX Abreve Udieresis -55 +KPX Abreve Ugrave -55 +KPX Abreve Uhungarumlaut -55 +KPX Abreve Umacron -55 +KPX Abreve Uogonek -55 +KPX Abreve Uring -55 +KPX Abreve V -135 +KPX Abreve W -90 +KPX Abreve Y -105 +KPX Abreve Yacute -105 +KPX Abreve Ydieresis -105 +KPX Abreve quoteright -111 +KPX Abreve v -74 +KPX Abreve w -92 +KPX Abreve y -92 +KPX Abreve yacute -92 +KPX Abreve ydieresis -92 +KPX Acircumflex C -40 +KPX Acircumflex Cacute -40 +KPX Acircumflex Ccaron -40 +KPX Acircumflex Ccedilla -40 +KPX Acircumflex G -40 +KPX Acircumflex Gbreve -40 +KPX Acircumflex Gcommaaccent -40 +KPX Acircumflex O -55 +KPX Acircumflex Oacute -55 +KPX Acircumflex Ocircumflex -55 +KPX Acircumflex Odieresis -55 +KPX Acircumflex Ograve -55 +KPX Acircumflex Ohungarumlaut -55 +KPX Acircumflex Omacron -55 +KPX Acircumflex Oslash -55 +KPX Acircumflex Otilde -55 +KPX Acircumflex Q -55 +KPX Acircumflex T -111 +KPX Acircumflex Tcaron -111 +KPX Acircumflex Tcommaaccent -111 +KPX Acircumflex U -55 +KPX Acircumflex Uacute -55 +KPX Acircumflex Ucircumflex -55 +KPX Acircumflex Udieresis -55 +KPX Acircumflex Ugrave -55 +KPX Acircumflex Uhungarumlaut -55 +KPX Acircumflex Umacron -55 +KPX Acircumflex Uogonek -55 +KPX Acircumflex Uring -55 +KPX Acircumflex V -135 +KPX Acircumflex W -90 +KPX Acircumflex Y -105 +KPX Acircumflex Yacute -105 +KPX Acircumflex Ydieresis -105 +KPX Acircumflex quoteright -111 +KPX Acircumflex v -74 +KPX Acircumflex w -92 +KPX Acircumflex y -92 +KPX Acircumflex yacute -92 +KPX Acircumflex ydieresis -92 +KPX Adieresis C -40 +KPX Adieresis Cacute -40 +KPX Adieresis Ccaron -40 +KPX Adieresis Ccedilla -40 +KPX Adieresis G -40 +KPX Adieresis Gbreve -40 +KPX Adieresis Gcommaaccent -40 +KPX Adieresis O -55 +KPX Adieresis Oacute -55 +KPX Adieresis Ocircumflex -55 +KPX Adieresis Odieresis -55 +KPX Adieresis Ograve -55 +KPX Adieresis Ohungarumlaut -55 +KPX Adieresis Omacron -55 +KPX Adieresis Oslash -55 +KPX Adieresis Otilde -55 +KPX Adieresis Q -55 +KPX Adieresis T -111 +KPX Adieresis Tcaron -111 +KPX Adieresis Tcommaaccent -111 +KPX Adieresis U -55 +KPX Adieresis Uacute -55 +KPX Adieresis Ucircumflex -55 +KPX Adieresis Udieresis -55 +KPX Adieresis Ugrave -55 +KPX Adieresis Uhungarumlaut -55 +KPX Adieresis Umacron -55 +KPX Adieresis Uogonek -55 +KPX Adieresis Uring -55 +KPX Adieresis V -135 +KPX Adieresis W -90 +KPX Adieresis Y -105 +KPX Adieresis Yacute -105 +KPX Adieresis Ydieresis -105 +KPX Adieresis quoteright -111 +KPX Adieresis v -74 +KPX Adieresis w -92 +KPX Adieresis y -92 +KPX Adieresis yacute -92 +KPX Adieresis ydieresis -92 +KPX Agrave C -40 +KPX Agrave Cacute -40 +KPX Agrave Ccaron -40 +KPX Agrave Ccedilla -40 +KPX Agrave G -40 +KPX Agrave Gbreve -40 +KPX Agrave Gcommaaccent -40 +KPX Agrave O -55 +KPX Agrave Oacute -55 +KPX Agrave Ocircumflex -55 +KPX Agrave Odieresis -55 +KPX Agrave Ograve -55 +KPX Agrave Ohungarumlaut -55 +KPX Agrave Omacron -55 +KPX Agrave Oslash -55 +KPX Agrave Otilde -55 +KPX Agrave Q -55 +KPX Agrave T -111 +KPX Agrave Tcaron -111 +KPX Agrave Tcommaaccent -111 +KPX Agrave U -55 +KPX Agrave Uacute -55 +KPX Agrave Ucircumflex -55 +KPX Agrave Udieresis -55 +KPX Agrave Ugrave -55 +KPX Agrave Uhungarumlaut -55 +KPX Agrave Umacron -55 +KPX Agrave Uogonek -55 +KPX Agrave Uring -55 +KPX Agrave V -135 +KPX Agrave W -90 +KPX Agrave Y -105 +KPX Agrave Yacute -105 +KPX Agrave Ydieresis -105 +KPX Agrave quoteright -111 +KPX Agrave v -74 +KPX Agrave w -92 +KPX Agrave y -92 +KPX Agrave yacute -92 +KPX Agrave ydieresis -92 +KPX Amacron C -40 +KPX Amacron Cacute -40 +KPX Amacron Ccaron -40 +KPX Amacron Ccedilla -40 +KPX Amacron G -40 +KPX Amacron Gbreve -40 +KPX Amacron Gcommaaccent -40 +KPX Amacron O -55 +KPX Amacron Oacute -55 +KPX Amacron Ocircumflex -55 +KPX Amacron Odieresis -55 +KPX Amacron Ograve -55 +KPX Amacron Ohungarumlaut -55 +KPX Amacron Omacron -55 +KPX Amacron Oslash -55 +KPX Amacron Otilde -55 +KPX Amacron Q -55 +KPX Amacron T -111 +KPX Amacron Tcaron -111 +KPX Amacron Tcommaaccent -111 +KPX Amacron U -55 +KPX Amacron Uacute -55 +KPX Amacron Ucircumflex -55 +KPX Amacron Udieresis -55 +KPX Amacron Ugrave -55 +KPX Amacron Uhungarumlaut -55 +KPX Amacron Umacron -55 +KPX Amacron Uogonek -55 +KPX Amacron Uring -55 +KPX Amacron V -135 +KPX Amacron W -90 +KPX Amacron Y -105 +KPX Amacron Yacute -105 +KPX Amacron Ydieresis -105 +KPX Amacron quoteright -111 +KPX Amacron v -74 +KPX Amacron w -92 +KPX Amacron y -92 +KPX Amacron yacute -92 +KPX Amacron ydieresis -92 +KPX Aogonek C -40 +KPX Aogonek Cacute -40 +KPX Aogonek Ccaron -40 +KPX Aogonek Ccedilla -40 +KPX Aogonek G -40 +KPX Aogonek Gbreve -40 +KPX Aogonek Gcommaaccent -40 +KPX Aogonek O -55 +KPX Aogonek Oacute -55 +KPX Aogonek Ocircumflex -55 +KPX Aogonek Odieresis -55 +KPX Aogonek Ograve -55 +KPX Aogonek Ohungarumlaut -55 +KPX Aogonek Omacron -55 +KPX Aogonek Oslash -55 +KPX Aogonek Otilde -55 +KPX Aogonek Q -55 +KPX Aogonek T -111 +KPX Aogonek Tcaron -111 +KPX Aogonek Tcommaaccent -111 +KPX Aogonek U -55 +KPX Aogonek Uacute -55 +KPX Aogonek Ucircumflex -55 +KPX Aogonek Udieresis -55 +KPX Aogonek Ugrave -55 +KPX Aogonek Uhungarumlaut -55 +KPX Aogonek Umacron -55 +KPX Aogonek Uogonek -55 +KPX Aogonek Uring -55 +KPX Aogonek V -135 +KPX Aogonek W -90 +KPX Aogonek Y -105 +KPX Aogonek Yacute -105 +KPX Aogonek Ydieresis -105 +KPX Aogonek quoteright -111 +KPX Aogonek v -74 +KPX Aogonek w -52 +KPX Aogonek y -52 +KPX Aogonek yacute -52 +KPX Aogonek ydieresis -52 +KPX Aring C -40 +KPX Aring Cacute -40 +KPX Aring Ccaron -40 +KPX Aring Ccedilla -40 +KPX Aring G -40 +KPX Aring Gbreve -40 +KPX Aring Gcommaaccent -40 +KPX Aring O -55 +KPX Aring Oacute -55 +KPX Aring Ocircumflex -55 +KPX Aring Odieresis -55 +KPX Aring Ograve -55 +KPX Aring Ohungarumlaut -55 +KPX Aring Omacron -55 +KPX Aring Oslash -55 +KPX Aring Otilde -55 +KPX Aring Q -55 +KPX Aring T -111 +KPX Aring Tcaron -111 +KPX Aring Tcommaaccent -111 +KPX Aring U -55 +KPX Aring Uacute -55 +KPX Aring Ucircumflex -55 +KPX Aring Udieresis -55 +KPX Aring Ugrave -55 +KPX Aring Uhungarumlaut -55 +KPX Aring Umacron -55 +KPX Aring Uogonek -55 +KPX Aring Uring -55 +KPX Aring V -135 +KPX Aring W -90 +KPX Aring Y -105 +KPX Aring Yacute -105 +KPX Aring Ydieresis -105 +KPX Aring quoteright -111 +KPX Aring v -74 +KPX Aring w -92 +KPX Aring y -92 +KPX Aring yacute -92 +KPX Aring ydieresis -92 +KPX Atilde C -40 +KPX Atilde Cacute -40 +KPX Atilde Ccaron -40 +KPX Atilde Ccedilla -40 +KPX Atilde G -40 +KPX Atilde Gbreve -40 +KPX Atilde Gcommaaccent -40 +KPX Atilde O -55 +KPX Atilde Oacute -55 +KPX Atilde Ocircumflex -55 +KPX Atilde Odieresis -55 +KPX Atilde Ograve -55 +KPX Atilde Ohungarumlaut -55 +KPX Atilde Omacron -55 +KPX Atilde Oslash -55 +KPX Atilde Otilde -55 +KPX Atilde Q -55 +KPX Atilde T -111 +KPX Atilde Tcaron -111 +KPX Atilde Tcommaaccent -111 +KPX Atilde U -55 +KPX Atilde Uacute -55 +KPX Atilde Ucircumflex -55 +KPX Atilde Udieresis -55 +KPX Atilde Ugrave -55 +KPX Atilde Uhungarumlaut -55 +KPX Atilde Umacron -55 +KPX Atilde Uogonek -55 +KPX Atilde Uring -55 +KPX Atilde V -135 +KPX Atilde W -90 +KPX Atilde Y -105 +KPX Atilde Yacute -105 +KPX Atilde Ydieresis -105 +KPX Atilde quoteright -111 +KPX Atilde v -74 +KPX Atilde w -92 +KPX Atilde y -92 +KPX Atilde yacute -92 +KPX Atilde ydieresis -92 +KPX B A -35 +KPX B Aacute -35 +KPX B Abreve -35 +KPX B Acircumflex -35 +KPX B Adieresis -35 +KPX B Agrave -35 +KPX B Amacron -35 +KPX B Aogonek -35 +KPX B Aring -35 +KPX B Atilde -35 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -40 +KPX D W -30 +KPX D Y -55 +KPX D Yacute -55 +KPX D Ydieresis -55 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -40 +KPX Dcaron W -30 +KPX Dcaron Y -55 +KPX Dcaron Yacute -55 +KPX Dcaron Ydieresis -55 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -40 +KPX Dcroat W -30 +KPX Dcroat Y -55 +KPX Dcroat Yacute -55 +KPX Dcroat Ydieresis -55 +KPX F A -74 +KPX F Aacute -74 +KPX F Abreve -74 +KPX F Acircumflex -74 +KPX F Adieresis -74 +KPX F Agrave -74 +KPX F Amacron -74 +KPX F Aogonek -74 +KPX F Aring -74 +KPX F Atilde -74 +KPX F a -15 +KPX F aacute -15 +KPX F abreve -15 +KPX F acircumflex -15 +KPX F adieresis -15 +KPX F agrave -15 +KPX F amacron -15 +KPX F aogonek -15 +KPX F aring -15 +KPX F atilde -15 +KPX F comma -80 +KPX F o -15 +KPX F oacute -15 +KPX F ocircumflex -15 +KPX F odieresis -15 +KPX F ograve -15 +KPX F ohungarumlaut -15 +KPX F omacron -15 +KPX F oslash -15 +KPX F otilde -15 +KPX F period -80 +KPX J A -60 +KPX J Aacute -60 +KPX J Abreve -60 +KPX J Acircumflex -60 +KPX J Adieresis -60 +KPX J Agrave -60 +KPX J Amacron -60 +KPX J Aogonek -60 +KPX J Aring -60 +KPX J Atilde -60 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -25 +KPX K eacute -25 +KPX K ecaron -25 +KPX K ecircumflex -25 +KPX K edieresis -25 +KPX K edotaccent -25 +KPX K egrave -25 +KPX K emacron -25 +KPX K eogonek -25 +KPX K o -35 +KPX K oacute -35 +KPX K ocircumflex -35 +KPX K odieresis -35 +KPX K ograve -35 +KPX K ohungarumlaut -35 +KPX K omacron -35 +KPX K oslash -35 +KPX K otilde -35 +KPX K u -15 +KPX K uacute -15 +KPX K ucircumflex -15 +KPX K udieresis -15 +KPX K ugrave -15 +KPX K uhungarumlaut -15 +KPX K umacron -15 +KPX K uogonek -15 +KPX K uring -15 +KPX K y -25 +KPX K yacute -25 +KPX K ydieresis -25 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -25 +KPX Kcommaaccent eacute -25 +KPX Kcommaaccent ecaron -25 +KPX Kcommaaccent ecircumflex -25 +KPX Kcommaaccent edieresis -25 +KPX Kcommaaccent edotaccent -25 +KPX Kcommaaccent egrave -25 +KPX Kcommaaccent emacron -25 +KPX Kcommaaccent eogonek -25 +KPX Kcommaaccent o -35 +KPX Kcommaaccent oacute -35 +KPX Kcommaaccent ocircumflex -35 +KPX Kcommaaccent odieresis -35 +KPX Kcommaaccent ograve -35 +KPX Kcommaaccent ohungarumlaut -35 +KPX Kcommaaccent omacron -35 +KPX Kcommaaccent oslash -35 +KPX Kcommaaccent otilde -35 +KPX Kcommaaccent u -15 +KPX Kcommaaccent uacute -15 +KPX Kcommaaccent ucircumflex -15 +KPX Kcommaaccent udieresis -15 +KPX Kcommaaccent ugrave -15 +KPX Kcommaaccent uhungarumlaut -15 +KPX Kcommaaccent umacron -15 +KPX Kcommaaccent uogonek -15 +KPX Kcommaaccent uring -15 +KPX Kcommaaccent y -25 +KPX Kcommaaccent yacute -25 +KPX Kcommaaccent ydieresis -25 +KPX L T -92 +KPX L Tcaron -92 +KPX L Tcommaaccent -92 +KPX L V -100 +KPX L W -74 +KPX L Y -100 +KPX L Yacute -100 +KPX L Ydieresis -100 +KPX L quoteright -92 +KPX L y -55 +KPX L yacute -55 +KPX L ydieresis -55 +KPX Lacute T -92 +KPX Lacute Tcaron -92 +KPX Lacute Tcommaaccent -92 +KPX Lacute V -100 +KPX Lacute W -74 +KPX Lacute Y -100 +KPX Lacute Yacute -100 +KPX Lacute Ydieresis -100 +KPX Lacute quoteright -92 +KPX Lacute y -55 +KPX Lacute yacute -55 +KPX Lacute ydieresis -55 +KPX Lcaron quoteright -92 +KPX Lcaron y -55 +KPX Lcaron yacute -55 +KPX Lcaron ydieresis -55 +KPX Lcommaaccent T -92 +KPX Lcommaaccent Tcaron -92 +KPX Lcommaaccent Tcommaaccent -92 +KPX Lcommaaccent V -100 +KPX Lcommaaccent W -74 +KPX Lcommaaccent Y -100 +KPX Lcommaaccent Yacute -100 +KPX Lcommaaccent Ydieresis -100 +KPX Lcommaaccent quoteright -92 +KPX Lcommaaccent y -55 +KPX Lcommaaccent yacute -55 +KPX Lcommaaccent ydieresis -55 +KPX Lslash T -92 +KPX Lslash Tcaron -92 +KPX Lslash Tcommaaccent -92 +KPX Lslash V -100 +KPX Lslash W -74 +KPX Lslash Y -100 +KPX Lslash Yacute -100 +KPX Lslash Ydieresis -100 +KPX Lslash quoteright -92 +KPX Lslash y -55 +KPX Lslash yacute -55 +KPX Lslash ydieresis -55 +KPX N A -35 +KPX N Aacute -35 +KPX N Abreve -35 +KPX N Acircumflex -35 +KPX N Adieresis -35 +KPX N Agrave -35 +KPX N Amacron -35 +KPX N Aogonek -35 +KPX N Aring -35 +KPX N Atilde -35 +KPX Nacute A -35 +KPX Nacute Aacute -35 +KPX Nacute Abreve -35 +KPX Nacute Acircumflex -35 +KPX Nacute Adieresis -35 +KPX Nacute Agrave -35 +KPX Nacute Amacron -35 +KPX Nacute Aogonek -35 +KPX Nacute Aring -35 +KPX Nacute Atilde -35 +KPX Ncaron A -35 +KPX Ncaron Aacute -35 +KPX Ncaron Abreve -35 +KPX Ncaron Acircumflex -35 +KPX Ncaron Adieresis -35 +KPX Ncaron Agrave -35 +KPX Ncaron Amacron -35 +KPX Ncaron Aogonek -35 +KPX Ncaron Aring -35 +KPX Ncaron Atilde -35 +KPX Ncommaaccent A -35 +KPX Ncommaaccent Aacute -35 +KPX Ncommaaccent Abreve -35 +KPX Ncommaaccent Acircumflex -35 +KPX Ncommaaccent Adieresis -35 +KPX Ncommaaccent Agrave -35 +KPX Ncommaaccent Amacron -35 +KPX Ncommaaccent Aogonek -35 +KPX Ncommaaccent Aring -35 +KPX Ncommaaccent Atilde -35 +KPX Ntilde A -35 +KPX Ntilde Aacute -35 +KPX Ntilde Abreve -35 +KPX Ntilde Acircumflex -35 +KPX Ntilde Adieresis -35 +KPX Ntilde Agrave -35 +KPX Ntilde Amacron -35 +KPX Ntilde Aogonek -35 +KPX Ntilde Aring -35 +KPX Ntilde Atilde -35 +KPX O A -35 +KPX O Aacute -35 +KPX O Abreve -35 +KPX O Acircumflex -35 +KPX O Adieresis -35 +KPX O Agrave -35 +KPX O Amacron -35 +KPX O Aogonek -35 +KPX O Aring -35 +KPX O Atilde -35 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -35 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -35 +KPX Oacute Aacute -35 +KPX Oacute Abreve -35 +KPX Oacute Acircumflex -35 +KPX Oacute Adieresis -35 +KPX Oacute Agrave -35 +KPX Oacute Amacron -35 +KPX Oacute Aogonek -35 +KPX Oacute Aring -35 +KPX Oacute Atilde -35 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -35 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -35 +KPX Ocircumflex Aacute -35 +KPX Ocircumflex Abreve -35 +KPX Ocircumflex Acircumflex -35 +KPX Ocircumflex Adieresis -35 +KPX Ocircumflex Agrave -35 +KPX Ocircumflex Amacron -35 +KPX Ocircumflex Aogonek -35 +KPX Ocircumflex Aring -35 +KPX Ocircumflex Atilde -35 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -35 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -35 +KPX Odieresis Aacute -35 +KPX Odieresis Abreve -35 +KPX Odieresis Acircumflex -35 +KPX Odieresis Adieresis -35 +KPX Odieresis Agrave -35 +KPX Odieresis Amacron -35 +KPX Odieresis Aogonek -35 +KPX Odieresis Aring -35 +KPX Odieresis Atilde -35 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -35 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -35 +KPX Ograve Aacute -35 +KPX Ograve Abreve -35 +KPX Ograve Acircumflex -35 +KPX Ograve Adieresis -35 +KPX Ograve Agrave -35 +KPX Ograve Amacron -35 +KPX Ograve Aogonek -35 +KPX Ograve Aring -35 +KPX Ograve Atilde -35 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -35 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -35 +KPX Ohungarumlaut Aacute -35 +KPX Ohungarumlaut Abreve -35 +KPX Ohungarumlaut Acircumflex -35 +KPX Ohungarumlaut Adieresis -35 +KPX Ohungarumlaut Agrave -35 +KPX Ohungarumlaut Amacron -35 +KPX Ohungarumlaut Aogonek -35 +KPX Ohungarumlaut Aring -35 +KPX Ohungarumlaut Atilde -35 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -35 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -35 +KPX Omacron Aacute -35 +KPX Omacron Abreve -35 +KPX Omacron Acircumflex -35 +KPX Omacron Adieresis -35 +KPX Omacron Agrave -35 +KPX Omacron Amacron -35 +KPX Omacron Aogonek -35 +KPX Omacron Aring -35 +KPX Omacron Atilde -35 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -35 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -35 +KPX Oslash Aacute -35 +KPX Oslash Abreve -35 +KPX Oslash Acircumflex -35 +KPX Oslash Adieresis -35 +KPX Oslash Agrave -35 +KPX Oslash Amacron -35 +KPX Oslash Aogonek -35 +KPX Oslash Aring -35 +KPX Oslash Atilde -35 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -35 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -35 +KPX Otilde Aacute -35 +KPX Otilde Abreve -35 +KPX Otilde Acircumflex -35 +KPX Otilde Adieresis -35 +KPX Otilde Agrave -35 +KPX Otilde Amacron -35 +KPX Otilde Aogonek -35 +KPX Otilde Aring -35 +KPX Otilde Atilde -35 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -35 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -92 +KPX P Aacute -92 +KPX P Abreve -92 +KPX P Acircumflex -92 +KPX P Adieresis -92 +KPX P Agrave -92 +KPX P Amacron -92 +KPX P Aogonek -92 +KPX P Aring -92 +KPX P Atilde -92 +KPX P a -15 +KPX P aacute -15 +KPX P abreve -15 +KPX P acircumflex -15 +KPX P adieresis -15 +KPX P agrave -15 +KPX P amacron -15 +KPX P aogonek -15 +KPX P aring -15 +KPX P atilde -15 +KPX P comma -111 +KPX P period -111 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -40 +KPX R Oacute -40 +KPX R Ocircumflex -40 +KPX R Odieresis -40 +KPX R Ograve -40 +KPX R Ohungarumlaut -40 +KPX R Omacron -40 +KPX R Oslash -40 +KPX R Otilde -40 +KPX R T -60 +KPX R Tcaron -60 +KPX R Tcommaaccent -60 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -80 +KPX R W -55 +KPX R Y -65 +KPX R Yacute -65 +KPX R Ydieresis -65 +KPX Racute O -40 +KPX Racute Oacute -40 +KPX Racute Ocircumflex -40 +KPX Racute Odieresis -40 +KPX Racute Ograve -40 +KPX Racute Ohungarumlaut -40 +KPX Racute Omacron -40 +KPX Racute Oslash -40 +KPX Racute Otilde -40 +KPX Racute T -60 +KPX Racute Tcaron -60 +KPX Racute Tcommaaccent -60 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -80 +KPX Racute W -55 +KPX Racute Y -65 +KPX Racute Yacute -65 +KPX Racute Ydieresis -65 +KPX Rcaron O -40 +KPX Rcaron Oacute -40 +KPX Rcaron Ocircumflex -40 +KPX Rcaron Odieresis -40 +KPX Rcaron Ograve -40 +KPX Rcaron Ohungarumlaut -40 +KPX Rcaron Omacron -40 +KPX Rcaron Oslash -40 +KPX Rcaron Otilde -40 +KPX Rcaron T -60 +KPX Rcaron Tcaron -60 +KPX Rcaron Tcommaaccent -60 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -80 +KPX Rcaron W -55 +KPX Rcaron Y -65 +KPX Rcaron Yacute -65 +KPX Rcaron Ydieresis -65 +KPX Rcommaaccent O -40 +KPX Rcommaaccent Oacute -40 +KPX Rcommaaccent Ocircumflex -40 +KPX Rcommaaccent Odieresis -40 +KPX Rcommaaccent Ograve -40 +KPX Rcommaaccent Ohungarumlaut -40 +KPX Rcommaaccent Omacron -40 +KPX Rcommaaccent Oslash -40 +KPX Rcommaaccent Otilde -40 +KPX Rcommaaccent T -60 +KPX Rcommaaccent Tcaron -60 +KPX Rcommaaccent Tcommaaccent -60 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -80 +KPX Rcommaaccent W -55 +KPX Rcommaaccent Y -65 +KPX Rcommaaccent Yacute -65 +KPX Rcommaaccent Ydieresis -65 +KPX T A -93 +KPX T Aacute -93 +KPX T Abreve -93 +KPX T Acircumflex -93 +KPX T Adieresis -93 +KPX T Agrave -93 +KPX T Amacron -93 +KPX T Aogonek -93 +KPX T Aring -93 +KPX T Atilde -93 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -80 +KPX T aacute -80 +KPX T abreve -80 +KPX T acircumflex -80 +KPX T adieresis -40 +KPX T agrave -40 +KPX T amacron -40 +KPX T aogonek -80 +KPX T aring -80 +KPX T atilde -40 +KPX T colon -50 +KPX T comma -74 +KPX T e -70 +KPX T eacute -70 +KPX T ecaron -70 +KPX T ecircumflex -70 +KPX T edieresis -30 +KPX T edotaccent -70 +KPX T egrave -70 +KPX T emacron -30 +KPX T eogonek -70 +KPX T hyphen -92 +KPX T i -35 +KPX T iacute -35 +KPX T iogonek -35 +KPX T o -80 +KPX T oacute -80 +KPX T ocircumflex -80 +KPX T odieresis -80 +KPX T ograve -80 +KPX T ohungarumlaut -80 +KPX T omacron -80 +KPX T oslash -80 +KPX T otilde -80 +KPX T period -74 +KPX T r -35 +KPX T racute -35 +KPX T rcaron -35 +KPX T rcommaaccent -35 +KPX T semicolon -55 +KPX T u -45 +KPX T uacute -45 +KPX T ucircumflex -45 +KPX T udieresis -45 +KPX T ugrave -45 +KPX T uhungarumlaut -45 +KPX T umacron -45 +KPX T uogonek -45 +KPX T uring -45 +KPX T w -80 +KPX T y -80 +KPX T yacute -80 +KPX T ydieresis -80 +KPX Tcaron A -93 +KPX Tcaron Aacute -93 +KPX Tcaron Abreve -93 +KPX Tcaron Acircumflex -93 +KPX Tcaron Adieresis -93 +KPX Tcaron Agrave -93 +KPX Tcaron Amacron -93 +KPX Tcaron Aogonek -93 +KPX Tcaron Aring -93 +KPX Tcaron Atilde -93 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -80 +KPX Tcaron aacute -80 +KPX Tcaron abreve -80 +KPX Tcaron acircumflex -80 +KPX Tcaron adieresis -40 +KPX Tcaron agrave -40 +KPX Tcaron amacron -40 +KPX Tcaron aogonek -80 +KPX Tcaron aring -80 +KPX Tcaron atilde -40 +KPX Tcaron colon -50 +KPX Tcaron comma -74 +KPX Tcaron e -70 +KPX Tcaron eacute -70 +KPX Tcaron ecaron -70 +KPX Tcaron ecircumflex -30 +KPX Tcaron edieresis -30 +KPX Tcaron edotaccent -70 +KPX Tcaron egrave -70 +KPX Tcaron emacron -30 +KPX Tcaron eogonek -70 +KPX Tcaron hyphen -92 +KPX Tcaron i -35 +KPX Tcaron iacute -35 +KPX Tcaron iogonek -35 +KPX Tcaron o -80 +KPX Tcaron oacute -80 +KPX Tcaron ocircumflex -80 +KPX Tcaron odieresis -80 +KPX Tcaron ograve -80 +KPX Tcaron ohungarumlaut -80 +KPX Tcaron omacron -80 +KPX Tcaron oslash -80 +KPX Tcaron otilde -80 +KPX Tcaron period -74 +KPX Tcaron r -35 +KPX Tcaron racute -35 +KPX Tcaron rcaron -35 +KPX Tcaron rcommaaccent -35 +KPX Tcaron semicolon -55 +KPX Tcaron u -45 +KPX Tcaron uacute -45 +KPX Tcaron ucircumflex -45 +KPX Tcaron udieresis -45 +KPX Tcaron ugrave -45 +KPX Tcaron uhungarumlaut -45 +KPX Tcaron umacron -45 +KPX Tcaron uogonek -45 +KPX Tcaron uring -45 +KPX Tcaron w -80 +KPX Tcaron y -80 +KPX Tcaron yacute -80 +KPX Tcaron ydieresis -80 +KPX Tcommaaccent A -93 +KPX Tcommaaccent Aacute -93 +KPX Tcommaaccent Abreve -93 +KPX Tcommaaccent Acircumflex -93 +KPX Tcommaaccent Adieresis -93 +KPX Tcommaaccent Agrave -93 +KPX Tcommaaccent Amacron -93 +KPX Tcommaaccent Aogonek -93 +KPX Tcommaaccent Aring -93 +KPX Tcommaaccent Atilde -93 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -80 +KPX Tcommaaccent aacute -80 +KPX Tcommaaccent abreve -80 +KPX Tcommaaccent acircumflex -80 +KPX Tcommaaccent adieresis -40 +KPX Tcommaaccent agrave -40 +KPX Tcommaaccent amacron -40 +KPX Tcommaaccent aogonek -80 +KPX Tcommaaccent aring -80 +KPX Tcommaaccent atilde -40 +KPX Tcommaaccent colon -50 +KPX Tcommaaccent comma -74 +KPX Tcommaaccent e -70 +KPX Tcommaaccent eacute -70 +KPX Tcommaaccent ecaron -70 +KPX Tcommaaccent ecircumflex -30 +KPX Tcommaaccent edieresis -30 +KPX Tcommaaccent edotaccent -70 +KPX Tcommaaccent egrave -30 +KPX Tcommaaccent emacron -70 +KPX Tcommaaccent eogonek -70 +KPX Tcommaaccent hyphen -92 +KPX Tcommaaccent i -35 +KPX Tcommaaccent iacute -35 +KPX Tcommaaccent iogonek -35 +KPX Tcommaaccent o -80 +KPX Tcommaaccent oacute -80 +KPX Tcommaaccent ocircumflex -80 +KPX Tcommaaccent odieresis -80 +KPX Tcommaaccent ograve -80 +KPX Tcommaaccent ohungarumlaut -80 +KPX Tcommaaccent omacron -80 +KPX Tcommaaccent oslash -80 +KPX Tcommaaccent otilde -80 +KPX Tcommaaccent period -74 +KPX Tcommaaccent r -35 +KPX Tcommaaccent racute -35 +KPX Tcommaaccent rcaron -35 +KPX Tcommaaccent rcommaaccent -35 +KPX Tcommaaccent semicolon -55 +KPX Tcommaaccent u -45 +KPX Tcommaaccent uacute -45 +KPX Tcommaaccent ucircumflex -45 +KPX Tcommaaccent udieresis -45 +KPX Tcommaaccent ugrave -45 +KPX Tcommaaccent uhungarumlaut -45 +KPX Tcommaaccent umacron -45 +KPX Tcommaaccent uogonek -45 +KPX Tcommaaccent uring -45 +KPX Tcommaaccent w -80 +KPX Tcommaaccent y -80 +KPX Tcommaaccent yacute -80 +KPX Tcommaaccent ydieresis -80 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX V A -135 +KPX V Aacute -135 +KPX V Abreve -135 +KPX V Acircumflex -135 +KPX V Adieresis -135 +KPX V Agrave -135 +KPX V Amacron -135 +KPX V Aogonek -135 +KPX V Aring -135 +KPX V Atilde -135 +KPX V G -15 +KPX V Gbreve -15 +KPX V Gcommaaccent -15 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Ohungarumlaut -40 +KPX V Omacron -40 +KPX V Oslash -40 +KPX V Otilde -40 +KPX V a -111 +KPX V aacute -111 +KPX V abreve -111 +KPX V acircumflex -71 +KPX V adieresis -71 +KPX V agrave -71 +KPX V amacron -71 +KPX V aogonek -111 +KPX V aring -111 +KPX V atilde -71 +KPX V colon -74 +KPX V comma -129 +KPX V e -111 +KPX V eacute -111 +KPX V ecaron -71 +KPX V ecircumflex -71 +KPX V edieresis -71 +KPX V edotaccent -111 +KPX V egrave -71 +KPX V emacron -71 +KPX V eogonek -111 +KPX V hyphen -100 +KPX V i -60 +KPX V iacute -60 +KPX V icircumflex -20 +KPX V idieresis -20 +KPX V igrave -20 +KPX V imacron -20 +KPX V iogonek -60 +KPX V o -129 +KPX V oacute -129 +KPX V ocircumflex -129 +KPX V odieresis -89 +KPX V ograve -89 +KPX V ohungarumlaut -129 +KPX V omacron -89 +KPX V oslash -129 +KPX V otilde -89 +KPX V period -129 +KPX V semicolon -74 +KPX V u -75 +KPX V uacute -75 +KPX V ucircumflex -75 +KPX V udieresis -75 +KPX V ugrave -75 +KPX V uhungarumlaut -75 +KPX V umacron -75 +KPX V uogonek -75 +KPX V uring -75 +KPX W A -120 +KPX W Aacute -120 +KPX W Abreve -120 +KPX W Acircumflex -120 +KPX W Adieresis -120 +KPX W Agrave -120 +KPX W Amacron -120 +KPX W Aogonek -120 +KPX W Aring -120 +KPX W Atilde -120 +KPX W O -10 +KPX W Oacute -10 +KPX W Ocircumflex -10 +KPX W Odieresis -10 +KPX W Ograve -10 +KPX W Ohungarumlaut -10 +KPX W Omacron -10 +KPX W Oslash -10 +KPX W Otilde -10 +KPX W a -80 +KPX W aacute -80 +KPX W abreve -80 +KPX W acircumflex -80 +KPX W adieresis -80 +KPX W agrave -80 +KPX W amacron -80 +KPX W aogonek -80 +KPX W aring -80 +KPX W atilde -80 +KPX W colon -37 +KPX W comma -92 +KPX W e -80 +KPX W eacute -80 +KPX W ecaron -80 +KPX W ecircumflex -80 +KPX W edieresis -40 +KPX W edotaccent -80 +KPX W egrave -40 +KPX W emacron -40 +KPX W eogonek -80 +KPX W hyphen -65 +KPX W i -40 +KPX W iacute -40 +KPX W iogonek -40 +KPX W o -80 +KPX W oacute -80 +KPX W ocircumflex -80 +KPX W odieresis -80 +KPX W ograve -80 +KPX W ohungarumlaut -80 +KPX W omacron -80 +KPX W oslash -80 +KPX W otilde -80 +KPX W period -92 +KPX W semicolon -37 +KPX W u -50 +KPX W uacute -50 +KPX W ucircumflex -50 +KPX W udieresis -50 +KPX W ugrave -50 +KPX W uhungarumlaut -50 +KPX W umacron -50 +KPX W uogonek -50 +KPX W uring -50 +KPX W y -73 +KPX W yacute -73 +KPX W ydieresis -73 +KPX Y A -120 +KPX Y Aacute -120 +KPX Y Abreve -120 +KPX Y Acircumflex -120 +KPX Y Adieresis -120 +KPX Y Agrave -120 +KPX Y Amacron -120 +KPX Y Aogonek -120 +KPX Y Aring -120 +KPX Y Atilde -120 +KPX Y O -30 +KPX Y Oacute -30 +KPX Y Ocircumflex -30 +KPX Y Odieresis -30 +KPX Y Ograve -30 +KPX Y Ohungarumlaut -30 +KPX Y Omacron -30 +KPX Y Oslash -30 +KPX Y Otilde -30 +KPX Y a -100 +KPX Y aacute -100 +KPX Y abreve -100 +KPX Y acircumflex -100 +KPX Y adieresis -60 +KPX Y agrave -60 +KPX Y amacron -60 +KPX Y aogonek -100 +KPX Y aring -100 +KPX Y atilde -60 +KPX Y colon -92 +KPX Y comma -129 +KPX Y e -100 +KPX Y eacute -100 +KPX Y ecaron -100 +KPX Y ecircumflex -100 +KPX Y edieresis -60 +KPX Y edotaccent -100 +KPX Y egrave -60 +KPX Y emacron -60 +KPX Y eogonek -100 +KPX Y hyphen -111 +KPX Y i -55 +KPX Y iacute -55 +KPX Y iogonek -55 +KPX Y o -110 +KPX Y oacute -110 +KPX Y ocircumflex -110 +KPX Y odieresis -70 +KPX Y ograve -70 +KPX Y ohungarumlaut -110 +KPX Y omacron -70 +KPX Y oslash -110 +KPX Y otilde -70 +KPX Y period -129 +KPX Y semicolon -92 +KPX Y u -111 +KPX Y uacute -111 +KPX Y ucircumflex -111 +KPX Y udieresis -71 +KPX Y ugrave -71 +KPX Y uhungarumlaut -111 +KPX Y umacron -71 +KPX Y uogonek -111 +KPX Y uring -111 +KPX Yacute A -120 +KPX Yacute Aacute -120 +KPX Yacute Abreve -120 +KPX Yacute Acircumflex -120 +KPX Yacute Adieresis -120 +KPX Yacute Agrave -120 +KPX Yacute Amacron -120 +KPX Yacute Aogonek -120 +KPX Yacute Aring -120 +KPX Yacute Atilde -120 +KPX Yacute O -30 +KPX Yacute Oacute -30 +KPX Yacute Ocircumflex -30 +KPX Yacute Odieresis -30 +KPX Yacute Ograve -30 +KPX Yacute Ohungarumlaut -30 +KPX Yacute Omacron -30 +KPX Yacute Oslash -30 +KPX Yacute Otilde -30 +KPX Yacute a -100 +KPX Yacute aacute -100 +KPX Yacute abreve -100 +KPX Yacute acircumflex -100 +KPX Yacute adieresis -60 +KPX Yacute agrave -60 +KPX Yacute amacron -60 +KPX Yacute aogonek -100 +KPX Yacute aring -100 +KPX Yacute atilde -60 +KPX Yacute colon -92 +KPX Yacute comma -129 +KPX Yacute e -100 +KPX Yacute eacute -100 +KPX Yacute ecaron -100 +KPX Yacute ecircumflex -100 +KPX Yacute edieresis -60 +KPX Yacute edotaccent -100 +KPX Yacute egrave -60 +KPX Yacute emacron -60 +KPX Yacute eogonek -100 +KPX Yacute hyphen -111 +KPX Yacute i -55 +KPX Yacute iacute -55 +KPX Yacute iogonek -55 +KPX Yacute o -110 +KPX Yacute oacute -110 +KPX Yacute ocircumflex -110 +KPX Yacute odieresis -70 +KPX Yacute ograve -70 +KPX Yacute ohungarumlaut -110 +KPX Yacute omacron -70 +KPX Yacute oslash -110 +KPX Yacute otilde -70 +KPX Yacute period -129 +KPX Yacute semicolon -92 +KPX Yacute u -111 +KPX Yacute uacute -111 +KPX Yacute ucircumflex -111 +KPX Yacute udieresis -71 +KPX Yacute ugrave -71 +KPX Yacute uhungarumlaut -111 +KPX Yacute umacron -71 +KPX Yacute uogonek -111 +KPX Yacute uring -111 +KPX Ydieresis A -120 +KPX Ydieresis Aacute -120 +KPX Ydieresis Abreve -120 +KPX Ydieresis Acircumflex -120 +KPX Ydieresis Adieresis -120 +KPX Ydieresis Agrave -120 +KPX Ydieresis Amacron -120 +KPX Ydieresis Aogonek -120 +KPX Ydieresis Aring -120 +KPX Ydieresis Atilde -120 +KPX Ydieresis O -30 +KPX Ydieresis Oacute -30 +KPX Ydieresis Ocircumflex -30 +KPX Ydieresis Odieresis -30 +KPX Ydieresis Ograve -30 +KPX Ydieresis Ohungarumlaut -30 +KPX Ydieresis Omacron -30 +KPX Ydieresis Oslash -30 +KPX Ydieresis Otilde -30 +KPX Ydieresis a -100 +KPX Ydieresis aacute -100 +KPX Ydieresis abreve -100 +KPX Ydieresis acircumflex -100 +KPX Ydieresis adieresis -60 +KPX Ydieresis agrave -60 +KPX Ydieresis amacron -60 +KPX Ydieresis aogonek -100 +KPX Ydieresis aring -100 +KPX Ydieresis atilde -100 +KPX Ydieresis colon -92 +KPX Ydieresis comma -129 +KPX Ydieresis e -100 +KPX Ydieresis eacute -100 +KPX Ydieresis ecaron -100 +KPX Ydieresis ecircumflex -100 +KPX Ydieresis edieresis -60 +KPX Ydieresis edotaccent -100 +KPX Ydieresis egrave -60 +KPX Ydieresis emacron -60 +KPX Ydieresis eogonek -100 +KPX Ydieresis hyphen -111 +KPX Ydieresis i -55 +KPX Ydieresis iacute -55 +KPX Ydieresis iogonek -55 +KPX Ydieresis o -110 +KPX Ydieresis oacute -110 +KPX Ydieresis ocircumflex -110 +KPX Ydieresis odieresis -70 +KPX Ydieresis ograve -70 +KPX Ydieresis ohungarumlaut -110 +KPX Ydieresis omacron -70 +KPX Ydieresis oslash -110 +KPX Ydieresis otilde -70 +KPX Ydieresis period -129 +KPX Ydieresis semicolon -92 +KPX Ydieresis u -111 +KPX Ydieresis uacute -111 +KPX Ydieresis ucircumflex -111 +KPX Ydieresis udieresis -71 +KPX Ydieresis ugrave -71 +KPX Ydieresis uhungarumlaut -111 +KPX Ydieresis umacron -71 +KPX Ydieresis uogonek -111 +KPX Ydieresis uring -111 +KPX a v -20 +KPX a w -15 +KPX aacute v -20 +KPX aacute w -15 +KPX abreve v -20 +KPX abreve w -15 +KPX acircumflex v -20 +KPX acircumflex w -15 +KPX adieresis v -20 +KPX adieresis w -15 +KPX agrave v -20 +KPX agrave w -15 +KPX amacron v -20 +KPX amacron w -15 +KPX aogonek v -20 +KPX aogonek w -15 +KPX aring v -20 +KPX aring w -15 +KPX atilde v -20 +KPX atilde w -15 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -15 +KPX c y -15 +KPX c yacute -15 +KPX c ydieresis -15 +KPX cacute y -15 +KPX cacute yacute -15 +KPX cacute ydieresis -15 +KPX ccaron y -15 +KPX ccaron yacute -15 +KPX ccaron ydieresis -15 +KPX ccedilla y -15 +KPX ccedilla yacute -15 +KPX ccedilla ydieresis -15 +KPX comma quotedblright -70 +KPX comma quoteright -70 +KPX e g -15 +KPX e gbreve -15 +KPX e gcommaaccent -15 +KPX e v -25 +KPX e w -25 +KPX e x -15 +KPX e y -15 +KPX e yacute -15 +KPX e ydieresis -15 +KPX eacute g -15 +KPX eacute gbreve -15 +KPX eacute gcommaaccent -15 +KPX eacute v -25 +KPX eacute w -25 +KPX eacute x -15 +KPX eacute y -15 +KPX eacute yacute -15 +KPX eacute ydieresis -15 +KPX ecaron g -15 +KPX ecaron gbreve -15 +KPX ecaron gcommaaccent -15 +KPX ecaron v -25 +KPX ecaron w -25 +KPX ecaron x -15 +KPX ecaron y -15 +KPX ecaron yacute -15 +KPX ecaron ydieresis -15 +KPX ecircumflex g -15 +KPX ecircumflex gbreve -15 +KPX ecircumflex gcommaaccent -15 +KPX ecircumflex v -25 +KPX ecircumflex w -25 +KPX ecircumflex x -15 +KPX ecircumflex y -15 +KPX ecircumflex yacute -15 +KPX ecircumflex ydieresis -15 +KPX edieresis g -15 +KPX edieresis gbreve -15 +KPX edieresis gcommaaccent -15 +KPX edieresis v -25 +KPX edieresis w -25 +KPX edieresis x -15 +KPX edieresis y -15 +KPX edieresis yacute -15 +KPX edieresis ydieresis -15 +KPX edotaccent g -15 +KPX edotaccent gbreve -15 +KPX edotaccent gcommaaccent -15 +KPX edotaccent v -25 +KPX edotaccent w -25 +KPX edotaccent x -15 +KPX edotaccent y -15 +KPX edotaccent yacute -15 +KPX edotaccent ydieresis -15 +KPX egrave g -15 +KPX egrave gbreve -15 +KPX egrave gcommaaccent -15 +KPX egrave v -25 +KPX egrave w -25 +KPX egrave x -15 +KPX egrave y -15 +KPX egrave yacute -15 +KPX egrave ydieresis -15 +KPX emacron g -15 +KPX emacron gbreve -15 +KPX emacron gcommaaccent -15 +KPX emacron v -25 +KPX emacron w -25 +KPX emacron x -15 +KPX emacron y -15 +KPX emacron yacute -15 +KPX emacron ydieresis -15 +KPX eogonek g -15 +KPX eogonek gbreve -15 +KPX eogonek gcommaaccent -15 +KPX eogonek v -25 +KPX eogonek w -25 +KPX eogonek x -15 +KPX eogonek y -15 +KPX eogonek yacute -15 +KPX eogonek ydieresis -15 +KPX f a -10 +KPX f aacute -10 +KPX f abreve -10 +KPX f acircumflex -10 +KPX f adieresis -10 +KPX f agrave -10 +KPX f amacron -10 +KPX f aogonek -10 +KPX f aring -10 +KPX f atilde -10 +KPX f dotlessi -50 +KPX f f -25 +KPX f i -20 +KPX f iacute -20 +KPX f quoteright 55 +KPX g a -5 +KPX g aacute -5 +KPX g abreve -5 +KPX g acircumflex -5 +KPX g adieresis -5 +KPX g agrave -5 +KPX g amacron -5 +KPX g aogonek -5 +KPX g aring -5 +KPX g atilde -5 +KPX gbreve a -5 +KPX gbreve aacute -5 +KPX gbreve abreve -5 +KPX gbreve acircumflex -5 +KPX gbreve adieresis -5 +KPX gbreve agrave -5 +KPX gbreve amacron -5 +KPX gbreve aogonek -5 +KPX gbreve aring -5 +KPX gbreve atilde -5 +KPX gcommaaccent a -5 +KPX gcommaaccent aacute -5 +KPX gcommaaccent abreve -5 +KPX gcommaaccent acircumflex -5 +KPX gcommaaccent adieresis -5 +KPX gcommaaccent agrave -5 +KPX gcommaaccent amacron -5 +KPX gcommaaccent aogonek -5 +KPX gcommaaccent aring -5 +KPX gcommaaccent atilde -5 +KPX h y -5 +KPX h yacute -5 +KPX h ydieresis -5 +KPX i v -25 +KPX iacute v -25 +KPX icircumflex v -25 +KPX idieresis v -25 +KPX igrave v -25 +KPX imacron v -25 +KPX iogonek v -25 +KPX k e -10 +KPX k eacute -10 +KPX k ecaron -10 +KPX k ecircumflex -10 +KPX k edieresis -10 +KPX k edotaccent -10 +KPX k egrave -10 +KPX k emacron -10 +KPX k eogonek -10 +KPX k o -10 +KPX k oacute -10 +KPX k ocircumflex -10 +KPX k odieresis -10 +KPX k ograve -10 +KPX k ohungarumlaut -10 +KPX k omacron -10 +KPX k oslash -10 +KPX k otilde -10 +KPX k y -15 +KPX k yacute -15 +KPX k ydieresis -15 +KPX kcommaaccent e -10 +KPX kcommaaccent eacute -10 +KPX kcommaaccent ecaron -10 +KPX kcommaaccent ecircumflex -10 +KPX kcommaaccent edieresis -10 +KPX kcommaaccent edotaccent -10 +KPX kcommaaccent egrave -10 +KPX kcommaaccent emacron -10 +KPX kcommaaccent eogonek -10 +KPX kcommaaccent o -10 +KPX kcommaaccent oacute -10 +KPX kcommaaccent ocircumflex -10 +KPX kcommaaccent odieresis -10 +KPX kcommaaccent ograve -10 +KPX kcommaaccent ohungarumlaut -10 +KPX kcommaaccent omacron -10 +KPX kcommaaccent oslash -10 +KPX kcommaaccent otilde -10 +KPX kcommaaccent y -15 +KPX kcommaaccent yacute -15 +KPX kcommaaccent ydieresis -15 +KPX l w -10 +KPX lacute w -10 +KPX lcommaaccent w -10 +KPX lslash w -10 +KPX n v -40 +KPX n y -15 +KPX n yacute -15 +KPX n ydieresis -15 +KPX nacute v -40 +KPX nacute y -15 +KPX nacute yacute -15 +KPX nacute ydieresis -15 +KPX ncaron v -40 +KPX ncaron y -15 +KPX ncaron yacute -15 +KPX ncaron ydieresis -15 +KPX ncommaaccent v -40 +KPX ncommaaccent y -15 +KPX ncommaaccent yacute -15 +KPX ncommaaccent ydieresis -15 +KPX ntilde v -40 +KPX ntilde y -15 +KPX ntilde yacute -15 +KPX ntilde ydieresis -15 +KPX o v -15 +KPX o w -25 +KPX o y -10 +KPX o yacute -10 +KPX o ydieresis -10 +KPX oacute v -15 +KPX oacute w -25 +KPX oacute y -10 +KPX oacute yacute -10 +KPX oacute ydieresis -10 +KPX ocircumflex v -15 +KPX ocircumflex w -25 +KPX ocircumflex y -10 +KPX ocircumflex yacute -10 +KPX ocircumflex ydieresis -10 +KPX odieresis v -15 +KPX odieresis w -25 +KPX odieresis y -10 +KPX odieresis yacute -10 +KPX odieresis ydieresis -10 +KPX ograve v -15 +KPX ograve w -25 +KPX ograve y -10 +KPX ograve yacute -10 +KPX ograve ydieresis -10 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -25 +KPX ohungarumlaut y -10 +KPX ohungarumlaut yacute -10 +KPX ohungarumlaut ydieresis -10 +KPX omacron v -15 +KPX omacron w -25 +KPX omacron y -10 +KPX omacron yacute -10 +KPX omacron ydieresis -10 +KPX oslash v -15 +KPX oslash w -25 +KPX oslash y -10 +KPX oslash yacute -10 +KPX oslash ydieresis -10 +KPX otilde v -15 +KPX otilde w -25 +KPX otilde y -10 +KPX otilde yacute -10 +KPX otilde ydieresis -10 +KPX p y -10 +KPX p yacute -10 +KPX p ydieresis -10 +KPX period quotedblright -70 +KPX period quoteright -70 +KPX quotedblleft A -80 +KPX quotedblleft Aacute -80 +KPX quotedblleft Abreve -80 +KPX quotedblleft Acircumflex -80 +KPX quotedblleft Adieresis -80 +KPX quotedblleft Agrave -80 +KPX quotedblleft Amacron -80 +KPX quotedblleft Aogonek -80 +KPX quotedblleft Aring -80 +KPX quotedblleft Atilde -80 +KPX quoteleft A -80 +KPX quoteleft Aacute -80 +KPX quoteleft Abreve -80 +KPX quoteleft Acircumflex -80 +KPX quoteleft Adieresis -80 +KPX quoteleft Agrave -80 +KPX quoteleft Amacron -80 +KPX quoteleft Aogonek -80 +KPX quoteleft Aring -80 +KPX quoteleft Atilde -80 +KPX quoteleft quoteleft -74 +KPX quoteright d -50 +KPX quoteright dcroat -50 +KPX quoteright l -10 +KPX quoteright lacute -10 +KPX quoteright lcommaaccent -10 +KPX quoteright lslash -10 +KPX quoteright quoteright -74 +KPX quoteright r -50 +KPX quoteright racute -50 +KPX quoteright rcaron -50 +KPX quoteright rcommaaccent -50 +KPX quoteright s -55 +KPX quoteright sacute -55 +KPX quoteright scaron -55 +KPX quoteright scedilla -55 +KPX quoteright scommaaccent -55 +KPX quoteright space -74 +KPX quoteright t -18 +KPX quoteright tcommaaccent -18 +KPX quoteright v -50 +KPX r comma -40 +KPX r g -18 +KPX r gbreve -18 +KPX r gcommaaccent -18 +KPX r hyphen -20 +KPX r period -55 +KPX racute comma -40 +KPX racute g -18 +KPX racute gbreve -18 +KPX racute gcommaaccent -18 +KPX racute hyphen -20 +KPX racute period -55 +KPX rcaron comma -40 +KPX rcaron g -18 +KPX rcaron gbreve -18 +KPX rcaron gcommaaccent -18 +KPX rcaron hyphen -20 +KPX rcaron period -55 +KPX rcommaaccent comma -40 +KPX rcommaaccent g -18 +KPX rcommaaccent gbreve -18 +KPX rcommaaccent gcommaaccent -18 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent period -55 +KPX space A -55 +KPX space Aacute -55 +KPX space Abreve -55 +KPX space Acircumflex -55 +KPX space Adieresis -55 +KPX space Agrave -55 +KPX space Amacron -55 +KPX space Aogonek -55 +KPX space Aring -55 +KPX space Atilde -55 +KPX space T -18 +KPX space Tcaron -18 +KPX space Tcommaaccent -18 +KPX space V -50 +KPX space W -30 +KPX space Y -90 +KPX space Yacute -90 +KPX space Ydieresis -90 +KPX v a -25 +KPX v aacute -25 +KPX v abreve -25 +KPX v acircumflex -25 +KPX v adieresis -25 +KPX v agrave -25 +KPX v amacron -25 +KPX v aogonek -25 +KPX v aring -25 +KPX v atilde -25 +KPX v comma -65 +KPX v e -15 +KPX v eacute -15 +KPX v ecaron -15 +KPX v ecircumflex -15 +KPX v edieresis -15 +KPX v edotaccent -15 +KPX v egrave -15 +KPX v emacron -15 +KPX v eogonek -15 +KPX v o -20 +KPX v oacute -20 +KPX v ocircumflex -20 +KPX v odieresis -20 +KPX v ograve -20 +KPX v ohungarumlaut -20 +KPX v omacron -20 +KPX v oslash -20 +KPX v otilde -20 +KPX v period -65 +KPX w a -10 +KPX w aacute -10 +KPX w abreve -10 +KPX w acircumflex -10 +KPX w adieresis -10 +KPX w agrave -10 +KPX w amacron -10 +KPX w aogonek -10 +KPX w aring -10 +KPX w atilde -10 +KPX w comma -65 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -65 +KPX x e -15 +KPX x eacute -15 +KPX x ecaron -15 +KPX x ecircumflex -15 +KPX x edieresis -15 +KPX x edotaccent -15 +KPX x egrave -15 +KPX x emacron -15 +KPX x eogonek -15 +KPX y comma -65 +KPX y period -65 +KPX yacute comma -65 +KPX yacute period -65 +KPX ydieresis comma -65 +KPX ydieresis period -65 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/internal/pdf/model/fonts/afms/ZapfDingbats.afm b/internal/pdf/model/fonts/afms/ZapfDingbats.afm new file mode 100644 index 0000000..dc5662e --- /dev/null +++ b/internal/pdf/model/fonts/afms/ZapfDingbats.afm @@ -0,0 +1,225 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 15:14:13 1997 +Comment UniqueID 43082 +Comment VMusage 45775 55535 +FontName ZapfDingbats +FullName ITC Zapf Dingbats +FamilyName ZapfDingbats +Weight Medium +ItalicAngle 0 +IsFixedPitch false +CharacterSet Special +FontBBox -1 -143 981 820 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation. +EncodingScheme FontSpecific +StdHW 28 +StdVW 90 +StartCharMetrics 202 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ; +C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ; +C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ; +C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ; +C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ; +C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ; +C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ; +C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ; +C 41 ; WX 690 ; N a117 ; B 34 138 655 553 ; +C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ; +C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ; +C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ; +C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ; +C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ; +C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ; +C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ; +C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ; +C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ; +C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ; +C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ; +C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ; +C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ; +C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ; +C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ; +C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ; +C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ; +C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ; +C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ; +C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ; +C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ; +C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ; +C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ; +C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ; +C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ; +C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ; +C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ; +C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ; +C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ; +C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ; +C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ; +C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ; +C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ; +C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ; +C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ; +C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ; +C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ; +C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ; +C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ; +C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ; +C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ; +C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ; +C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ; +C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ; +C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ; +C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ; +C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ; +C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ; +C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ; +C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ; +C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ; +C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ; +C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ; +C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ; +C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ; +C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ; +C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ; +C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ; +C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ; +C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ; +C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ; +C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ; +C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ; +C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ; +C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ; +C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ; +C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ; +C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ; +C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ; +C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ; +C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ; +C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ; +C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ; +C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ; +C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ; +C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ; +C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ; +C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ; +C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ; +C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ; +C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ; +C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ; +C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ; +C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ; +C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ; +C 128 ; WX 390 ; N a89 ; B 35 -14 356 705 ; +C 129 ; WX 390 ; N a90 ; B 35 -14 355 705 ; +C 130 ; WX 317 ; N a93 ; B 35 0 283 692 ; +C 131 ; WX 317 ; N a94 ; B 35 0 283 692 ; +C 132 ; WX 276 ; N a91 ; B 35 0 242 692 ; +C 133 ; WX 276 ; N a92 ; B 35 0 242 692 ; +C 134 ; WX 509 ; N a205 ; B 35 0 475 692 ; +C 135 ; WX 509 ; N a85 ; B 35 0 475 692 ; +C 136 ; WX 410 ; N a206 ; B 35 0 375 692 ; +C 137 ; WX 410 ; N a86 ; B 35 0 375 692 ; +C 138 ; WX 234 ; N a87 ; B 35 -14 199 705 ; +C 139 ; WX 234 ; N a88 ; B 35 -14 199 705 ; +C 140 ; WX 334 ; N a95 ; B 35 0 299 692 ; +C 141 ; WX 334 ; N a96 ; B 35 0 299 692 ; +C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ; +C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ; +C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ; +C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ; +C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ; +C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ; +C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ; +C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ; +C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ; +C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ; +C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ; +C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ; +C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ; +C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ; +C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ; +C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ; +C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ; +C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ; +C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ; +C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ; +C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ; +C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ; +C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ; +C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ; +C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ; +C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ; +C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ; +C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ; +C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ; +C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ; +C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ; +C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ; +C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ; +C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ; +C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ; +C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ; +C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ; +C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ; +C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ; +C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ; +C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ; +C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ; +C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ; +C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ; +C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ; +C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ; +C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ; +C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ; +C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ; +C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ; +C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ; +C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ; +C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ; +C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ; +C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ; +C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ; +C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ; +C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ; +C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ; +C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ; +C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ; +C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ; +C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ; +C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ; +C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ; +C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ; +C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ; +C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ; +C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ; +C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ; +C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ; +C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ; +C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ; +C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ; +C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ; +C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ; +C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ; +C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ; +C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ; +C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ; +C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ; +C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ; +C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ; +C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ; +C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ; +C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ; +C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ; +C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ; +C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ; +C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ; +C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ; +C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ; +C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ; +EndCharMetrics +EndFontMetrics diff --git a/internal/pdf/model/fonts/courier.go b/internal/pdf/model/fonts/courier.go new file mode 100644 index 0000000..1842ca5 --- /dev/null +++ b/internal/pdf/model/fonts/courier.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Courier. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontCourier struct { + encoder textencoding.TextEncoder +} + +func NewFontCourier() fontCourier { + font := fontCourier{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontCourier) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontCourier) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := courierCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontCourier) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Courier")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var courierCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 600.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 600.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 600.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 600.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 600.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 600.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 600.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 600.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 600.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 600.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 600.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 600.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 600.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 600.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 600.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 600.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 600.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 600.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 600.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 600.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 600.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 600.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 600.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 600.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 600.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 600.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 600.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 600.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 600.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 600.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 600.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 600.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 600.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 600.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 600.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 600.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 600.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 600.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 600.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 600.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 600.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 600.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 600.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 600.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 600.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 600.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 600.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 600.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 600.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 600.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 600.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 600.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 600.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 600.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 600.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 600.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 600.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 600.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 600.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 600.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 600.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 600.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 600.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 600.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 600.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 600.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 600.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 600.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 600.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 600.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 600.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 600.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 600.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 600.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 600.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 600.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 600.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 600.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 600.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 600.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 600.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 600.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 600.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 600.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 600.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 600.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 600.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 600.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 600.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 600.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 600.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 600.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 600.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 600.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 600.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 600.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 600.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 600.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 600.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 600.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 600.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 600.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 600.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 600.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 600.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 600.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 600.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 600.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 600.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 600.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 600.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 600.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 600.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 600.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 600.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 600.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 600.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 600.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 600.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 600.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 600.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 600.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 600.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 600.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 600.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 600.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 600.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 600.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 600.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 600.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 600.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 600.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 600.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 600.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 600.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 600.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 600.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 600.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 600.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 600.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 600.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 600.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 600.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 600.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 600.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 600.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 600.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 600.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 600.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 600.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 600.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 600.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 600.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 600.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 600.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 600.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 600.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 600.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 600.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 600.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 600.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 600.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 600.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 600.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 600.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 600.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 600.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 600.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 600.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 600.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 600.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 600.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 600.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 600.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 600.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 600.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 600.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 600.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 600.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 600.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 600.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 600.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 600.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 600.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 600.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 600.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 600.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 600.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 600.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 600.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 600.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 600.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 600.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 600.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 600.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 600.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 600.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 600.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 600.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 600.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 600.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 600.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 600.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 600.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 600.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 600.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 600.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 600.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 600.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 600.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 600.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 600.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 600.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 600.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 600.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 600.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 600.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 600.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 600.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 600.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 600.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 600.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 600.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 600.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 600.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 600.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 600.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 600.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 600.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 600.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 600.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 600.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 600.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 600.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 600.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 600.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 600.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 600.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 600.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 600.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 600.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 600.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 600.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 600.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 600.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 600.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 600.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 600.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 600.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 600.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 600.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 600.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 600.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 600.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 600.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 600.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 600.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 600.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 600.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 600.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 600.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 600.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 600.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 600.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 600.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 600.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 600.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 600.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 600.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 600.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 600.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 600.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 600.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 600.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 600.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 600.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 600.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 600.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 600.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 600.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 600.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 600.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 600.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 600.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 600.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 600.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 600.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/courier_bold.go b/internal/pdf/model/fonts/courier_bold.go new file mode 100644 index 0000000..1455143 --- /dev/null +++ b/internal/pdf/model/fonts/courier_bold.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Courier-Bold. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontCourierBold struct { + encoder textencoding.TextEncoder +} + +func NewFontCourierBold() fontCourierBold { + font := fontCourierBold{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontCourierBold) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontCourierBold) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := courierBoldCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontCourierBold) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Courier-Bold")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var courierBoldCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 600.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 600.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 600.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 600.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 600.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 600.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 600.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 600.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 600.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 600.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 600.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 600.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 600.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 600.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 600.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 600.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 600.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 600.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 600.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 600.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 600.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 600.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 600.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 600.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 600.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 600.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 600.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 600.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 600.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 600.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 600.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 600.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 600.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 600.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 600.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 600.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 600.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 600.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 600.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 600.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 600.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 600.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 600.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 600.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 600.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 600.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 600.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 600.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 600.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 600.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 600.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 600.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 600.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 600.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 600.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 600.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 600.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 600.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 600.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 600.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 600.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 600.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 600.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 600.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 600.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 600.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 600.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 600.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 600.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 600.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 600.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 600.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 600.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 600.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 600.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 600.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 600.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 600.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 600.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 600.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 600.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 600.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 600.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 600.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 600.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 600.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 600.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 600.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 600.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 600.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 600.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 600.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 600.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 600.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 600.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 600.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 600.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 600.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 600.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 600.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 600.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 600.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 600.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 600.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 600.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 600.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 600.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 600.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 600.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 600.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 600.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 600.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 600.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 600.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 600.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 600.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 600.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 600.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 600.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 600.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 600.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 600.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 600.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 600.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 600.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 600.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 600.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 600.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 600.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 600.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 600.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 600.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 600.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 600.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 600.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 600.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 600.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 600.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 600.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 600.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 600.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 600.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 600.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 600.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 600.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 600.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 600.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 600.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 600.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 600.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 600.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 600.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 600.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 600.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 600.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 600.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 600.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 600.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 600.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 600.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 600.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 600.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 600.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 600.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 600.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 600.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 600.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 600.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 600.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 600.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 600.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 600.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 600.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 600.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 600.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 600.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 600.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 600.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 600.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 600.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 600.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 600.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 600.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 600.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 600.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 600.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 600.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 600.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 600.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 600.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 600.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 600.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 600.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 600.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 600.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 600.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 600.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 600.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 600.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 600.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 600.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 600.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 600.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 600.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 600.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 600.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 600.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 600.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 600.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 600.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 600.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 600.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 600.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 600.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 600.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 600.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 600.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 600.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 600.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 600.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 600.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 600.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 600.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 600.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 600.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 600.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 600.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 600.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 600.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 600.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 600.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 600.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 600.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 600.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 600.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 600.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 600.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 600.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 600.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 600.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 600.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 600.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 600.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 600.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 600.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 600.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 600.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 600.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 600.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 600.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 600.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 600.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 600.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 600.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 600.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 600.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 600.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 600.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 600.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 600.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 600.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 600.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 600.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 600.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 600.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 600.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 600.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 600.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 600.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 600.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 600.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 600.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 600.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 600.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 600.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 600.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 600.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 600.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 600.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 600.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 600.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 600.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 600.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 600.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 600.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 600.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 600.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/courier_bold_oblique.go b/internal/pdf/model/fonts/courier_bold_oblique.go new file mode 100644 index 0000000..5d74daa --- /dev/null +++ b/internal/pdf/model/fonts/courier_bold_oblique.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Courier-BoldOblique. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontCourierBoldOblique struct { + encoder textencoding.TextEncoder +} + +func NewFontCourierBoldOblique() fontCourierBoldOblique { + font := fontCourierBoldOblique{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontCourierBoldOblique) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontCourierBoldOblique) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := courierBoldObliqueCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontCourierBoldOblique) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Courier-BoldOblique")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var courierBoldObliqueCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 600.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 600.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 600.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 600.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 600.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 600.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 600.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 600.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 600.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 600.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 600.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 600.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 600.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 600.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 600.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 600.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 600.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 600.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 600.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 600.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 600.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 600.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 600.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 600.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 600.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 600.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 600.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 600.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 600.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 600.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 600.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 600.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 600.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 600.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 600.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 600.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 600.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 600.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 600.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 600.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 600.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 600.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 600.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 600.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 600.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 600.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 600.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 600.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 600.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 600.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 600.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 600.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 600.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 600.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 600.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 600.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 600.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 600.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 600.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 600.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 600.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 600.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 600.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 600.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 600.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 600.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 600.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 600.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 600.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 600.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 600.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 600.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 600.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 600.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 600.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 600.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 600.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 600.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 600.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 600.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 600.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 600.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 600.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 600.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 600.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 600.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 600.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 600.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 600.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 600.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 600.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 600.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 600.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 600.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 600.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 600.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 600.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 600.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 600.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 600.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 600.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 600.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 600.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 600.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 600.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 600.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 600.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 600.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 600.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 600.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 600.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 600.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 600.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 600.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 600.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 600.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 600.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 600.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 600.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 600.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 600.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 600.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 600.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 600.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 600.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 600.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 600.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 600.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 600.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 600.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 600.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 600.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 600.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 600.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 600.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 600.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 600.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 600.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 600.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 600.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 600.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 600.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 600.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 600.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 600.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 600.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 600.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 600.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 600.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 600.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 600.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 600.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 600.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 600.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 600.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 600.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 600.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 600.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 600.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 600.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 600.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 600.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 600.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 600.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 600.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 600.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 600.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 600.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 600.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 600.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 600.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 600.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 600.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 600.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 600.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 600.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 600.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 600.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 600.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 600.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 600.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 600.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 600.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 600.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 600.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 600.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 600.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 600.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 600.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 600.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 600.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 600.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 600.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 600.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 600.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 600.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 600.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 600.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 600.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 600.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 600.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 600.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 600.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 600.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 600.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 600.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 600.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 600.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 600.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 600.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 600.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 600.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 600.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 600.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 600.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 600.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 600.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 600.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 600.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 600.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 600.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 600.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 600.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 600.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 600.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 600.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 600.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 600.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 600.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 600.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 600.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 600.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 600.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 600.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 600.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 600.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 600.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 600.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 600.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 600.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 600.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 600.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 600.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 600.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 600.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 600.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 600.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 600.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 600.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 600.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 600.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 600.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 600.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 600.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 600.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 600.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 600.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 600.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 600.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 600.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 600.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 600.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 600.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 600.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 600.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 600.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 600.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 600.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 600.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 600.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 600.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 600.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 600.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 600.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 600.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 600.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 600.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 600.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 600.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 600.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 600.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 600.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 600.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 600.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 600.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 600.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 600.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/courier_oblique.go b/internal/pdf/model/fonts/courier_oblique.go new file mode 100644 index 0000000..734a47a --- /dev/null +++ b/internal/pdf/model/fonts/courier_oblique.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Courier-Oblique. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontCourierOblique struct { + encoder textencoding.TextEncoder +} + +func NewFontCourierOblique() fontCourierOblique { + font := fontCourierOblique{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontCourierOblique) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontCourierOblique) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := courierObliqueCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontCourierOblique) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Courier-Oblique")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var courierObliqueCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 600.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 600.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 600.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 600.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 600.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 600.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 600.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 600.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 600.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 600.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 600.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 600.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 600.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 600.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 600.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 600.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 600.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 600.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 600.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 600.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 600.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 600.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 600.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 600.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 600.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 600.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 600.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 600.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 600.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 600.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 600.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 600.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 600.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 600.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 600.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 600.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 600.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 600.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 600.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 600.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 600.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 600.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 600.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 600.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 600.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 600.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 600.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 600.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 600.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 600.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 600.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 600.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 600.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 600.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 600.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 600.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 600.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 600.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 600.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 600.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 600.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 600.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 600.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 600.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 600.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 600.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 600.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 600.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 600.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 600.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 600.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 600.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 600.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 600.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 600.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 600.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 600.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 600.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 600.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 600.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 600.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 600.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 600.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 600.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 600.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 600.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 600.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 600.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 600.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 600.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 600.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 600.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 600.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 600.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 600.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 600.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 600.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 600.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 600.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 600.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 600.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 600.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 600.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 600.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 600.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 600.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 600.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 600.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 600.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 600.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 600.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 600.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 600.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 600.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 600.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 600.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 600.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 600.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 600.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 600.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 600.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 600.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 600.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 600.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 600.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 600.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 600.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 600.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 600.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 600.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 600.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 600.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 600.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 600.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 600.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 600.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 600.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 600.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 600.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 600.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 600.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 600.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 600.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 600.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 600.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 600.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 600.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 600.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 600.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 600.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 600.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 600.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 600.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 600.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 600.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 600.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 600.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 600.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 600.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 600.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 600.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 600.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 600.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 600.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 600.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 600.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 600.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 600.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 600.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 600.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 600.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 600.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 600.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 600.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 600.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 600.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 600.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 600.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 600.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 600.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 600.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 600.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 600.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 600.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 600.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 600.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 600.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 600.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 600.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 600.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 600.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 600.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 600.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 600.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 600.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 600.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 600.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 600.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 600.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 600.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 600.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 600.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 600.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 600.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 600.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 600.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 600.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 600.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 600.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 600.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 600.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 600.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 600.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 600.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 600.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 600.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 600.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 600.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 600.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 600.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 600.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 600.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 600.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 600.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 600.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 600.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 600.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 600.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 600.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 600.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 600.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 600.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 600.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 600.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 600.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 600.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 600.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 600.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 600.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 600.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 600.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 600.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 600.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 600.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 600.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 600.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 600.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 600.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 600.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 600.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 600.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 600.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 600.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 600.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 600.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 600.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 600.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 600.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 600.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 600.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 600.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 600.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 600.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 600.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 600.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 600.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 600.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 600.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 600.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 600.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 600.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 600.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 600.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 600.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 600.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 600.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 600.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 600.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 600.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 600.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 600.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 600.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 600.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 600.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 600.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 600.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 600.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 600.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 600.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 600.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 600.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 600.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 600.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 600.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 600.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/font.go b/internal/pdf/model/fonts/font.go new file mode 100644 index 0000000..a93d859 --- /dev/null +++ b/internal/pdf/model/fonts/font.go @@ -0,0 +1,18 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +type Font interface { + SetEncoder(encoder textencoding.TextEncoder) + GetGlyphCharMetrics(glyph string) (CharMetrics, bool) + ToPdfObject() core.PdfObject +} + +type CharMetrics struct { + GlyphName string + Wx float64 + Wy float64 +} diff --git a/internal/pdf/model/fonts/helvetica.go b/internal/pdf/model/fonts/helvetica.go new file mode 100644 index 0000000..39bdfeb --- /dev/null +++ b/internal/pdf/model/fonts/helvetica.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Helvetica. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontHelvetica struct { + encoder textencoding.TextEncoder +} + +func NewFontHelvetica() fontHelvetica { + font := fontHelvetica{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontHelvetica) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontHelvetica) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := helveticaCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontHelvetica) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Helvetica")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var helveticaCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 667.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 1000.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 667.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 667.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 667.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 667.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 667.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 667.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 667.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 667.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 667.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 667.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 722.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 722.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 722.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 722.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 667.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 667.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 667.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 667.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 667.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 667.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 667.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 667.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 667.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 556.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 611.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 778.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 778.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 778.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 722.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 278.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 278.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 278.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 278.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 278.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 278.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 278.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 278.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 500.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 667.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 556.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 556.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 556.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 556.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 833.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 778.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 1000.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 778.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 778.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 778.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 778.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 778.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 778.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 778.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 778.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 667.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 778.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 722.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 722.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 722.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 667.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 667.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 667.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 667.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 667.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 611.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 611.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 667.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 667.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 944.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 667.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 667.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 667.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 667.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 611.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 611.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 611.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 611.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 556.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 556.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 556.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 556.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 556.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 889.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 556.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 556.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 667.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 556.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 556.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 469.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 584.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 389.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 1015.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 556.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 556.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 260.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 334.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 334.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 278.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 278.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 260.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 500.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 500.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 500.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 500.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 556.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 278.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 278.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 737.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 556.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 556.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 556.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 556.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 643.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 556.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 584.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 556.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 556.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 556.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 556.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 556.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 556.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 556.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 556.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 556.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 556.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 556.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 556.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 584.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 556.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 278.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 333.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 278.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 500.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 556.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 500.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 556.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 556.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 556.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 556.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 611.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 584.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 556.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 556.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 556.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 222.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 222.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 222.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 500.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 222.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 222.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 299.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 222.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 584.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 584.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 471.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 222.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 833.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 584.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 556.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 584.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 556.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 556.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 556.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 556.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 556.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 556.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 556.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 556.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 556.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 556.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 556.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 944.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 556.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 556.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 556.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 556.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 834.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 834.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 333.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 370.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 365.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 611.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 556.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 556.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 537.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 476.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 889.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 278.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 278.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 584.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 584.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 556.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 556.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 611.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 355.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 333.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 333.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 333.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 222.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 222.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 222.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 191.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 333.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 333.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 453.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 333.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 333.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 737.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 500.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 500.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 500.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 500.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 500.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 556.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 278.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 556.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 556.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 278.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 556.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 278.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 317.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 556.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 556.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 834.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 333.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 1000.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 556.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 333.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 556.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 556.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 556.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 556.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 556.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 556.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 556.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 556.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 556.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 556.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 500.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 722.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 500.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 500.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 500.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 500.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 556.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 500.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 500.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 500.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 500.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 556.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/helvetica_bold.go b/internal/pdf/model/fonts/helvetica_bold.go new file mode 100644 index 0000000..28be4fe --- /dev/null +++ b/internal/pdf/model/fonts/helvetica_bold.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Helvetica-Bold. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontHelveticaBold struct { + encoder textencoding.TextEncoder +} + +func NewFontHelveticaBold() fontHelveticaBold { + font := fontHelveticaBold{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontHelveticaBold) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontHelveticaBold) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := helveticaBoldCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontHelveticaBold) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Helvetica-Bold")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var helveticaBoldCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 722.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 1000.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 722.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 722.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 722.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 722.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 722.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 722.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 722.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 722.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 722.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 722.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 722.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 722.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 722.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 722.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 667.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 667.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 667.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 667.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 667.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 667.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 667.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 667.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 667.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 556.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 611.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 778.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 778.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 778.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 722.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 278.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 278.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 278.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 278.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 278.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 278.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 278.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 278.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 556.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 722.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 611.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 611.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 611.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 611.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 833.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 778.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 1000.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 778.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 778.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 778.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 778.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 778.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 778.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 778.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 778.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 667.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 778.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 722.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 722.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 722.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 667.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 667.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 667.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 667.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 667.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 611.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 611.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 667.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 667.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 944.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 667.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 667.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 667.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 667.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 611.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 611.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 611.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 611.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 556.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 556.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 556.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 556.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 556.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 889.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 556.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 556.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 722.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 556.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 556.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 584.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 584.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 389.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 975.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 556.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 611.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 280.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 389.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 389.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 333.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 333.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 280.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 556.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 556.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 556.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 556.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 556.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 333.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 278.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 737.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 556.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 611.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 556.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 556.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 743.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 611.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 584.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 556.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 556.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 556.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 556.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 556.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 556.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 556.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 556.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 556.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 556.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 556.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 556.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 584.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 611.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 333.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 333.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 333.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 611.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 556.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 611.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 556.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 556.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 611.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 611.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 611.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 584.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 556.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 556.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 611.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 278.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 278.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 278.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 556.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 278.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 278.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 400.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 584.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 584.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 494.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 278.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 889.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 584.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 611.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 584.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 611.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 611.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 611.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 611.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 556.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 611.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 556.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 611.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 611.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 611.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 611.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 944.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 611.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 611.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 611.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 556.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 834.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 834.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 333.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 370.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 365.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 611.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 611.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 611.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 556.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 494.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 889.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 278.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 278.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 584.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 584.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 611.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 611.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 611.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 474.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 500.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 500.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 500.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 278.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 278.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 278.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 238.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 389.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 389.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 549.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 389.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 389.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 737.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 556.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 556.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 556.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 556.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 556.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 556.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 333.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 556.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 556.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 278.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 556.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 333.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 389.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 333.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 611.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 556.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 834.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 333.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 1000.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 556.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 333.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 611.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 611.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 611.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 611.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 611.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 611.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 611.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 556.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 611.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 611.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 556.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 778.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 556.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 556.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 556.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 556.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 556.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 500.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 500.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 500.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 500.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 556.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/helvetica_bold_oblique.go b/internal/pdf/model/fonts/helvetica_bold_oblique.go new file mode 100644 index 0000000..a704357 --- /dev/null +++ b/internal/pdf/model/fonts/helvetica_bold_oblique.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Helvetica-BoldOblique. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontHelveticaBoldOblique struct { + encoder textencoding.TextEncoder +} + +func NewFontHelveticaBoldOblique() fontHelveticaBoldOblique { + font := fontHelveticaBoldOblique{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontHelveticaBoldOblique) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontHelveticaBoldOblique) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := helveticaBoldObliqueCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontHelveticaBoldOblique) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Helvetica-BoldOblique")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var helveticaBoldObliqueCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 722.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 1000.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 722.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 722.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 722.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 722.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 722.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 722.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 722.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 722.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 722.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 722.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 722.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 722.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 722.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 722.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 667.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 667.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 667.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 667.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 667.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 667.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 667.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 667.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 667.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 556.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 611.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 778.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 778.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 778.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 722.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 278.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 278.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 278.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 278.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 278.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 278.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 278.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 278.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 556.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 722.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 611.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 611.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 611.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 611.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 833.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 778.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 1000.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 778.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 778.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 778.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 778.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 778.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 778.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 778.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 778.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 667.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 778.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 722.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 722.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 722.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 667.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 667.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 667.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 667.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 667.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 611.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 611.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 667.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 667.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 944.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 667.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 667.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 667.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 667.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 611.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 611.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 611.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 611.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 556.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 556.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 556.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 556.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 556.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 889.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 556.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 556.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 722.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 556.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 556.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 584.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 584.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 389.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 975.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 556.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 611.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 280.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 389.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 389.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 333.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 333.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 280.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 556.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 556.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 556.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 556.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 556.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 333.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 278.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 737.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 556.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 611.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 556.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 556.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 743.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 611.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 584.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 556.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 556.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 556.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 556.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 556.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 556.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 556.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 556.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 556.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 556.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 556.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 556.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 584.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 611.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 333.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 333.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 333.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 611.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 556.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 611.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 556.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 556.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 611.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 611.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 611.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 584.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 556.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 556.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 611.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 278.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 278.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 278.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 556.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 278.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 278.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 400.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 584.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 584.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 494.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 278.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 889.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 584.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 611.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 584.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 611.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 611.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 611.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 611.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 556.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 611.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 556.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 611.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 611.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 611.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 611.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 944.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 611.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 611.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 611.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 556.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 834.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 834.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 333.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 370.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 365.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 611.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 611.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 611.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 556.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 494.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 889.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 278.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 278.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 584.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 584.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 611.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 611.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 611.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 474.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 500.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 500.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 500.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 278.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 278.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 278.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 238.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 389.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 389.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 549.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 389.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 389.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 737.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 556.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 556.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 556.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 556.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 556.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 556.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 333.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 556.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 556.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 278.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 556.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 333.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 389.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 333.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 611.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 556.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 834.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 333.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 1000.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 556.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 333.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 611.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 611.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 611.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 611.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 611.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 611.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 611.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 556.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 611.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 611.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 556.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 778.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 556.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 556.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 556.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 556.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 556.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 500.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 500.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 500.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 500.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 556.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/helvetica_oblique.go b/internal/pdf/model/fonts/helvetica_oblique.go new file mode 100644 index 0000000..5d82783 --- /dev/null +++ b/internal/pdf/model/fonts/helvetica_oblique.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Helvetica-Oblique. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontHelveticaOblique struct { + encoder textencoding.TextEncoder +} + +func NewFontHelveticaOblique() fontHelveticaOblique { + font := fontHelveticaOblique{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontHelveticaOblique) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontHelveticaOblique) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := helveticaObliqueCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontHelveticaOblique) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Helvetica-Oblique")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var helveticaObliqueCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 667.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 1000.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 667.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 667.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 667.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 667.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 667.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 667.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 667.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 667.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 667.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 667.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 722.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 722.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 722.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 722.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 667.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 667.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 667.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 667.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 667.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 667.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 667.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 667.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 667.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 556.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 611.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 778.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 778.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 778.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 722.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 278.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 278.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 278.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 278.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 278.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 278.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 278.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 278.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 500.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 667.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 556.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 556.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 556.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 556.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 833.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 778.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 1000.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 778.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 778.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 778.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 778.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 778.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 778.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 778.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 778.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 667.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 778.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 722.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 722.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 722.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 667.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 667.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 667.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 667.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 667.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 611.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 611.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 667.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 667.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 944.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 667.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 667.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 667.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 667.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 611.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 611.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 611.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 611.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 556.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 556.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 556.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 556.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 556.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 889.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 556.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 556.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 667.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 556.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 556.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 469.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 584.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 389.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 1015.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 556.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 556.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 260.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 334.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 334.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 278.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 278.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 260.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 500.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 500.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 500.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 500.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 556.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 278.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 278.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 737.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 556.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 556.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 556.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 556.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 643.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 556.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 584.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 556.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 556.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 556.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 556.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 556.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 556.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 556.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 556.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 556.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 556.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 556.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 556.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 584.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 556.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 278.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 333.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 278.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 500.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 556.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 500.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 556.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 556.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 556.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 556.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 611.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 584.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 556.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 556.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 556.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 222.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 222.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 222.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 500.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 222.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 222.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 299.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 222.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 584.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 584.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 471.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 222.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 833.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 584.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 556.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 584.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 556.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 556.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 556.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 556.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 556.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 556.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 556.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 556.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 556.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 556.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 556.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 944.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 556.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 556.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 556.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 556.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 834.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 834.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 333.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 370.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 365.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 611.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 556.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 556.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 537.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 476.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 889.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 278.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 278.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 584.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 584.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 556.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 556.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 611.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 355.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 333.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 333.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 333.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 222.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 222.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 222.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 191.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 333.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 333.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 453.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 333.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 333.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 737.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 500.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 500.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 500.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 500.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 500.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 556.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 278.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 556.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 556.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 278.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 556.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 278.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 317.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 556.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 556.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 834.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 333.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 1000.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 556.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 333.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 556.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 556.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 556.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 556.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 556.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 556.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 556.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 556.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 556.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 556.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 500.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 722.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 500.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 500.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 500.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 500.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 556.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 500.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 500.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 500.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 500.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 556.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/symbol.go b/internal/pdf/model/fonts/symbol.go new file mode 100644 index 0000000..a4d9e3d --- /dev/null +++ b/internal/pdf/model/fonts/symbol.go @@ -0,0 +1,239 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Symbol. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontSymbol struct { + // By default encoder is not set, which means that we use the font's built in encoding. + encoder textencoding.TextEncoder +} + +func NewFontSymbol() fontSymbol { + font := fontSymbol{} + return font +} + +func (font fontSymbol) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontSymbol) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := symbolCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontSymbol) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Symbol")) + if font.encoder != nil { + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + } + + obj.PdfObject = fontDict + return obj +} + +var symbolCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "Alpha": {GlyphName: "Alpha", Wx: 722.000000, Wy: 0.000000}, + "Beta": {GlyphName: "Beta", Wx: 667.000000, Wy: 0.000000}, + "Chi": {GlyphName: "Chi", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "Epsilon": {GlyphName: "Epsilon", Wx: 611.000000, Wy: 0.000000}, + "Eta": {GlyphName: "Eta", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 750.000000, Wy: 0.000000}, + "Gamma": {GlyphName: "Gamma", Wx: 603.000000, Wy: 0.000000}, + "Ifraktur": {GlyphName: "Ifraktur", Wx: 686.000000, Wy: 0.000000}, + "Iota": {GlyphName: "Iota", Wx: 333.000000, Wy: 0.000000}, + "Kappa": {GlyphName: "Kappa", Wx: 722.000000, Wy: 0.000000}, + "Lambda": {GlyphName: "Lambda", Wx: 686.000000, Wy: 0.000000}, + "Mu": {GlyphName: "Mu", Wx: 889.000000, Wy: 0.000000}, + "Nu": {GlyphName: "Nu", Wx: 722.000000, Wy: 0.000000}, + "Omega": {GlyphName: "Omega", Wx: 768.000000, Wy: 0.000000}, + "Omicron": {GlyphName: "Omicron", Wx: 722.000000, Wy: 0.000000}, + "Phi": {GlyphName: "Phi", Wx: 763.000000, Wy: 0.000000}, + "Pi": {GlyphName: "Pi", Wx: 768.000000, Wy: 0.000000}, + "Psi": {GlyphName: "Psi", Wx: 795.000000, Wy: 0.000000}, + "Rfraktur": {GlyphName: "Rfraktur", Wx: 795.000000, Wy: 0.000000}, + "Rho": {GlyphName: "Rho", Wx: 556.000000, Wy: 0.000000}, + "Sigma": {GlyphName: "Sigma", Wx: 592.000000, Wy: 0.000000}, + "Tau": {GlyphName: "Tau", Wx: 611.000000, Wy: 0.000000}, + "Theta": {GlyphName: "Theta", Wx: 741.000000, Wy: 0.000000}, + "Upsilon": {GlyphName: "Upsilon", Wx: 690.000000, Wy: 0.000000}, + "Upsilon1": {GlyphName: "Upsilon1", Wx: 620.000000, Wy: 0.000000}, + "Xi": {GlyphName: "Xi", Wx: 645.000000, Wy: 0.000000}, + "Zeta": {GlyphName: "Zeta", Wx: 611.000000, Wy: 0.000000}, + "aleph": {GlyphName: "aleph", Wx: 823.000000, Wy: 0.000000}, + "alpha": {GlyphName: "alpha", Wx: 631.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 778.000000, Wy: 0.000000}, + "angle": {GlyphName: "angle", Wx: 768.000000, Wy: 0.000000}, + "angleleft": {GlyphName: "angleleft", Wx: 329.000000, Wy: 0.000000}, + "angleright": {GlyphName: "angleright", Wx: 329.000000, Wy: 0.000000}, + "apple": {GlyphName: "apple", Wx: 790.000000, Wy: 0.000000}, + "approxequal": {GlyphName: "approxequal", Wx: 549.000000, Wy: 0.000000}, + "arrowboth": {GlyphName: "arrowboth", Wx: 1042.000000, Wy: 0.000000}, + "arrowdblboth": {GlyphName: "arrowdblboth", Wx: 1042.000000, Wy: 0.000000}, + "arrowdbldown": {GlyphName: "arrowdbldown", Wx: 603.000000, Wy: 0.000000}, + "arrowdblleft": {GlyphName: "arrowdblleft", Wx: 987.000000, Wy: 0.000000}, + "arrowdblright": {GlyphName: "arrowdblright", Wx: 987.000000, Wy: 0.000000}, + "arrowdblup": {GlyphName: "arrowdblup", Wx: 603.000000, Wy: 0.000000}, + "arrowdown": {GlyphName: "arrowdown", Wx: 603.000000, Wy: 0.000000}, + "arrowhorizex": {GlyphName: "arrowhorizex", Wx: 1000.000000, Wy: 0.000000}, + "arrowleft": {GlyphName: "arrowleft", Wx: 987.000000, Wy: 0.000000}, + "arrowright": {GlyphName: "arrowright", Wx: 987.000000, Wy: 0.000000}, + "arrowup": {GlyphName: "arrowup", Wx: 603.000000, Wy: 0.000000}, + "arrowvertex": {GlyphName: "arrowvertex", Wx: 603.000000, Wy: 0.000000}, + "asteriskmath": {GlyphName: "asteriskmath", Wx: 500.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 200.000000, Wy: 0.000000}, + "beta": {GlyphName: "beta", Wx: 549.000000, Wy: 0.000000}, + "braceex": {GlyphName: "braceex", Wx: 494.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 480.000000, Wy: 0.000000}, + "braceleftbt": {GlyphName: "braceleftbt", Wx: 494.000000, Wy: 0.000000}, + "braceleftmid": {GlyphName: "braceleftmid", Wx: 494.000000, Wy: 0.000000}, + "bracelefttp": {GlyphName: "bracelefttp", Wx: 494.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 480.000000, Wy: 0.000000}, + "bracerightbt": {GlyphName: "bracerightbt", Wx: 494.000000, Wy: 0.000000}, + "bracerightmid": {GlyphName: "bracerightmid", Wx: 494.000000, Wy: 0.000000}, + "bracerighttp": {GlyphName: "bracerighttp", Wx: 494.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 333.000000, Wy: 0.000000}, + "bracketleftbt": {GlyphName: "bracketleftbt", Wx: 384.000000, Wy: 0.000000}, + "bracketleftex": {GlyphName: "bracketleftex", Wx: 384.000000, Wy: 0.000000}, + "bracketlefttp": {GlyphName: "bracketlefttp", Wx: 384.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 333.000000, Wy: 0.000000}, + "bracketrightbt": {GlyphName: "bracketrightbt", Wx: 384.000000, Wy: 0.000000}, + "bracketrightex": {GlyphName: "bracketrightex", Wx: 384.000000, Wy: 0.000000}, + "bracketrighttp": {GlyphName: "bracketrighttp", Wx: 384.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 460.000000, Wy: 0.000000}, + "carriagereturn": {GlyphName: "carriagereturn", Wx: 658.000000, Wy: 0.000000}, + "chi": {GlyphName: "chi", Wx: 549.000000, Wy: 0.000000}, + "circlemultiply": {GlyphName: "circlemultiply", Wx: 768.000000, Wy: 0.000000}, + "circleplus": {GlyphName: "circleplus", Wx: 768.000000, Wy: 0.000000}, + "club": {GlyphName: "club", Wx: 753.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 278.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 250.000000, Wy: 0.000000}, + "congruent": {GlyphName: "congruent", Wx: 549.000000, Wy: 0.000000}, + "copyrightsans": {GlyphName: "copyrightsans", Wx: 790.000000, Wy: 0.000000}, + "copyrightserif": {GlyphName: "copyrightserif", Wx: 790.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "delta": {GlyphName: "delta", Wx: 494.000000, Wy: 0.000000}, + "diamond": {GlyphName: "diamond", Wx: 753.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 549.000000, Wy: 0.000000}, + "dotmath": {GlyphName: "dotmath", Wx: 250.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 500.000000, Wy: 0.000000}, + "element": {GlyphName: "element", Wx: 713.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emptyset": {GlyphName: "emptyset", Wx: 823.000000, Wy: 0.000000}, + "epsilon": {GlyphName: "epsilon", Wx: 439.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 549.000000, Wy: 0.000000}, + "equivalence": {GlyphName: "equivalence", Wx: 549.000000, Wy: 0.000000}, + "eta": {GlyphName: "eta", Wx: 603.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 333.000000, Wy: 0.000000}, + "existential": {GlyphName: "existential", Wx: 549.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 500.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 500.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 500.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "gamma": {GlyphName: "gamma", Wx: 411.000000, Wy: 0.000000}, + "gradient": {GlyphName: "gradient", Wx: 713.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 549.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "heart": {GlyphName: "heart", Wx: 753.000000, Wy: 0.000000}, + "infinity": {GlyphName: "infinity", Wx: 713.000000, Wy: 0.000000}, + "integral": {GlyphName: "integral", Wx: 274.000000, Wy: 0.000000}, + "integralbt": {GlyphName: "integralbt", Wx: 686.000000, Wy: 0.000000}, + "integralex": {GlyphName: "integralex", Wx: 686.000000, Wy: 0.000000}, + "integraltp": {GlyphName: "integraltp", Wx: 686.000000, Wy: 0.000000}, + "intersection": {GlyphName: "intersection", Wx: 768.000000, Wy: 0.000000}, + "iota": {GlyphName: "iota", Wx: 329.000000, Wy: 0.000000}, + "kappa": {GlyphName: "kappa", Wx: 549.000000, Wy: 0.000000}, + "lambda": {GlyphName: "lambda", Wx: 549.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 549.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicaland": {GlyphName: "logicaland", Wx: 603.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 713.000000, Wy: 0.000000}, + "logicalor": {GlyphName: "logicalor", Wx: 603.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 494.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 549.000000, Wy: 0.000000}, + "minute": {GlyphName: "minute", Wx: 247.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 576.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 549.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 500.000000, Wy: 0.000000}, + "notelement": {GlyphName: "notelement", Wx: 713.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "notsubset": {GlyphName: "notsubset", Wx: 713.000000, Wy: 0.000000}, + "nu": {GlyphName: "nu", Wx: 521.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 500.000000, Wy: 0.000000}, + "omega": {GlyphName: "omega", Wx: 686.000000, Wy: 0.000000}, + "omega1": {GlyphName: "omega1", Wx: 713.000000, Wy: 0.000000}, + "omicron": {GlyphName: "omicron", Wx: 549.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 500.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenleftbt": {GlyphName: "parenleftbt", Wx: 384.000000, Wy: 0.000000}, + "parenleftex": {GlyphName: "parenleftex", Wx: 384.000000, Wy: 0.000000}, + "parenlefttp": {GlyphName: "parenlefttp", Wx: 384.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "parenrightbt": {GlyphName: "parenrightbt", Wx: 384.000000, Wy: 0.000000}, + "parenrightex": {GlyphName: "parenrightex", Wx: 384.000000, Wy: 0.000000}, + "parenrighttp": {GlyphName: "parenrighttp", Wx: 384.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 494.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 833.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 250.000000, Wy: 0.000000}, + "perpendicular": {GlyphName: "perpendicular", Wx: 658.000000, Wy: 0.000000}, + "phi": {GlyphName: "phi", Wx: 521.000000, Wy: 0.000000}, + "phi1": {GlyphName: "phi1", Wx: 603.000000, Wy: 0.000000}, + "pi": {GlyphName: "pi", Wx: 549.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 549.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 549.000000, Wy: 0.000000}, + "product": {GlyphName: "product", Wx: 823.000000, Wy: 0.000000}, + "propersubset": {GlyphName: "propersubset", Wx: 713.000000, Wy: 0.000000}, + "propersuperset": {GlyphName: "propersuperset", Wx: 713.000000, Wy: 0.000000}, + "proportional": {GlyphName: "proportional", Wx: 713.000000, Wy: 0.000000}, + "psi": {GlyphName: "psi", Wx: 686.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 444.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 549.000000, Wy: 0.000000}, + "radicalex": {GlyphName: "radicalex", Wx: 500.000000, Wy: 0.000000}, + "reflexsubset": {GlyphName: "reflexsubset", Wx: 713.000000, Wy: 0.000000}, + "reflexsuperset": {GlyphName: "reflexsuperset", Wx: 713.000000, Wy: 0.000000}, + "registersans": {GlyphName: "registersans", Wx: 790.000000, Wy: 0.000000}, + "registerserif": {GlyphName: "registerserif", Wx: 790.000000, Wy: 0.000000}, + "rho": {GlyphName: "rho", Wx: 549.000000, Wy: 0.000000}, + "second": {GlyphName: "second", Wx: 411.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 278.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 500.000000, Wy: 0.000000}, + "sigma": {GlyphName: "sigma", Wx: 603.000000, Wy: 0.000000}, + "sigma1": {GlyphName: "sigma1", Wx: 439.000000, Wy: 0.000000}, + "similar": {GlyphName: "similar", Wx: 549.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 500.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 250.000000, Wy: 0.000000}, + "spade": {GlyphName: "spade", Wx: 753.000000, Wy: 0.000000}, + "suchthat": {GlyphName: "suchthat", Wx: 439.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 713.000000, Wy: 0.000000}, + "tau": {GlyphName: "tau", Wx: 439.000000, Wy: 0.000000}, + "therefore": {GlyphName: "therefore", Wx: 863.000000, Wy: 0.000000}, + "theta": {GlyphName: "theta", Wx: 521.000000, Wy: 0.000000}, + "theta1": {GlyphName: "theta1", Wx: 631.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 500.000000, Wy: 0.000000}, + "trademarksans": {GlyphName: "trademarksans", Wx: 786.000000, Wy: 0.000000}, + "trademarkserif": {GlyphName: "trademarkserif", Wx: 890.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 500.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 500.000000, Wy: 0.000000}, + "union": {GlyphName: "union", Wx: 768.000000, Wy: 0.000000}, + "universal": {GlyphName: "universal", Wx: 713.000000, Wy: 0.000000}, + "upsilon": {GlyphName: "upsilon", Wx: 576.000000, Wy: 0.000000}, + "weierstrass": {GlyphName: "weierstrass", Wx: 987.000000, Wy: 0.000000}, + "xi": {GlyphName: "xi", Wx: 493.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 500.000000, Wy: 0.000000}, + "zeta": {GlyphName: "zeta", Wx: 494.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/times_bold.go b/internal/pdf/model/fonts/times_bold.go new file mode 100644 index 0000000..2f60b99 --- /dev/null +++ b/internal/pdf/model/fonts/times_bold.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Times-Bold. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontTimesBold struct { + encoder textencoding.TextEncoder +} + +func NewFontTimesBold() fontTimesBold { + font := fontTimesBold{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontTimesBold) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontTimesBold) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := timesBoldCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontTimesBold) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Times-Bold")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var timesBoldCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 722.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 1000.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 722.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 722.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 722.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 722.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 722.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 722.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 722.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 722.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 722.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 667.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 722.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 722.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 722.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 722.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 667.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 667.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 667.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 667.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 667.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 667.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 667.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 667.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 667.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 500.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 611.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 778.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 778.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 778.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 778.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 389.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 389.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 389.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 389.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 389.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 389.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 389.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 389.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 500.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 778.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 778.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 667.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 667.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 667.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 667.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 944.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 778.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 1000.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 778.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 778.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 778.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 778.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 778.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 778.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 778.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 778.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 611.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 778.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 722.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 722.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 722.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 556.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 556.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 556.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 556.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 556.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 667.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 667.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 611.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 722.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 1000.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 722.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 722.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 722.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 722.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 667.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 667.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 667.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 667.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 500.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 500.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 500.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 500.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 500.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 722.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 500.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 500.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 833.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 500.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 500.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 581.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 520.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 500.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 930.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 500.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 556.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 220.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 394.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 394.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 333.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 333.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 220.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 444.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 444.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 444.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 444.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 500.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 333.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 250.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 747.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 500.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 556.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 500.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 500.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 672.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 556.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 570.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 500.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 444.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 444.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 444.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 444.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 444.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 444.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 444.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 500.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 444.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 500.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 444.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 570.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 500.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 333.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 333.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 333.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 556.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 500.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 556.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 500.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 500.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 500.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 500.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 556.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 570.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 500.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 500.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 556.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 278.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 278.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 333.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 556.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 278.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 278.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 394.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 570.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 570.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 494.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 278.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 833.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 570.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 556.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 570.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 556.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 556.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 556.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 556.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 500.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 556.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 500.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 500.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 500.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 500.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 500.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 722.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 500.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 500.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 500.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 500.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 750.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 750.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 300.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 300.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 330.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 500.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 500.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 556.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 540.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 494.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 1000.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 250.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 250.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 570.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 570.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 556.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 500.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 500.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 555.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 500.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 500.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 500.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 333.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 333.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 333.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 278.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 444.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 444.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 549.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 444.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 444.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 747.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 389.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 389.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 389.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 389.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 389.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 500.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 333.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 500.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 500.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 250.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 500.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 333.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 416.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 333.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 556.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 500.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 750.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 300.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 1000.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 500.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 300.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 556.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 556.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 556.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 556.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 556.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 556.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 556.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 500.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 556.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 556.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 500.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 722.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 500.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 500.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 500.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 500.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 500.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 444.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 444.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 444.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 444.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 500.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/times_bold_italic.go b/internal/pdf/model/fonts/times_bold_italic.go new file mode 100644 index 0000000..8956e6b --- /dev/null +++ b/internal/pdf/model/fonts/times_bold_italic.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Times-BoldItalic. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontTimesBoldItalic struct { + encoder textencoding.TextEncoder +} + +func NewFontTimesBoldItalic() fontTimesBoldItalic { + font := fontTimesBoldItalic{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontTimesBoldItalic) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontTimesBoldItalic) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := timesBoldItalicCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontTimesBoldItalic) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Times-BoldItalic")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var timesBoldItalicCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 667.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 944.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 667.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 667.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 667.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 667.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 667.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 667.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 667.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 667.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 667.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 667.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 667.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 667.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 667.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 667.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 667.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 667.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 667.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 667.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 667.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 667.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 667.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 667.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 667.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 500.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 667.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 722.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 722.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 778.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 389.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 389.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 389.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 389.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 389.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 389.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 389.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 389.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 500.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 667.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 611.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 611.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 611.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 611.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 889.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 722.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 944.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 722.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 722.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 722.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 722.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 722.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 722.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 722.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 611.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 722.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 667.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 667.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 667.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 556.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 556.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 556.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 556.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 556.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 611.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 611.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 611.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 667.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 889.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 667.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 611.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 611.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 611.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 611.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 611.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 611.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 611.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 500.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 500.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 500.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 500.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 500.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 722.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 500.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 500.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 778.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 500.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 500.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 570.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 570.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 500.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 832.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 500.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 500.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 220.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 348.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 348.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 333.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 333.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 220.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 444.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 444.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 444.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 444.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 500.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 333.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 250.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 747.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 500.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 500.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 500.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 500.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 608.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 500.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 570.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 500.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 444.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 444.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 444.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 444.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 444.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 444.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 444.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 500.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 444.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 500.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 444.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 570.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 500.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 389.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 389.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 333.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 556.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 500.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 556.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 500.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 500.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 500.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 500.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 500.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 570.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 500.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 500.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 556.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 278.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 278.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 278.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 500.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 278.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 278.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 382.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 570.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 606.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 494.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 278.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 778.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 606.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 576.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 570.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 556.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 556.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 556.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 556.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 500.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 556.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 500.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 500.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 500.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 500.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 500.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 722.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 500.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 500.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 500.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 500.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 750.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 750.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 300.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 266.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 300.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 500.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 500.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 500.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 500.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 494.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 833.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 250.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 250.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 570.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 570.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 500.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 500.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 500.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 555.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 500.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 500.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 500.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 333.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 333.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 333.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 278.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 389.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 389.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 549.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 389.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 389.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 747.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 389.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 389.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 389.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 389.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 389.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 500.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 333.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 500.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 500.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 250.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 500.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 278.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 366.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 500.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 500.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 750.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 300.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 1000.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 500.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 300.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 556.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 556.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 556.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 556.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 556.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 556.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 556.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 500.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 556.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 556.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 444.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 667.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 500.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 444.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 444.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 444.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 500.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 389.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 389.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 389.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 389.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 500.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/times_italic.go b/internal/pdf/model/fonts/times_italic.go new file mode 100644 index 0000000..1277ba8 --- /dev/null +++ b/internal/pdf/model/fonts/times_italic.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Times-Italic. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontTimesItalic struct { + encoder textencoding.TextEncoder +} + +func NewFontTimesItalic() fontTimesItalic { + font := fontTimesItalic{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontTimesItalic) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontTimesItalic) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := timesItalicCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontTimesItalic) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Times-Italic")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var timesItalicCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 611.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 889.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 611.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 611.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 611.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 611.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 611.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 611.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 611.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 611.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 611.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 611.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 667.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 667.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 667.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 667.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 611.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 611.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 611.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 611.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 611.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 611.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 611.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 611.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 611.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 500.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 611.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 722.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 722.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 722.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 333.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 333.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 333.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 333.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 333.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 333.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 333.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 333.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 444.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 667.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 556.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 556.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 611.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 556.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 833.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 667.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 667.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 667.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 667.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 667.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 722.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 944.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 722.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 722.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 722.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 722.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 722.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 722.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 722.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 611.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 722.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 611.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 611.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 611.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 500.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 500.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 500.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 500.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 500.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 556.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 556.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 556.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 611.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 611.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 833.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 611.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 556.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 556.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 556.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 556.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 556.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 556.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 556.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 500.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 500.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 500.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 500.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 500.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 667.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 500.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 500.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 778.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 500.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 500.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 422.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 541.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 500.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 920.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 500.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 500.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 275.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 400.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 400.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 389.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 389.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 275.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 444.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 444.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 444.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 444.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 500.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 333.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 250.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 760.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 500.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 500.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 500.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 500.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 544.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 500.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 675.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 500.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 444.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 444.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 444.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 444.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 444.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 444.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 444.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 500.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 889.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 444.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 889.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 500.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 444.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 675.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 500.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 333.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 389.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 278.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 500.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 500.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 500.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 500.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 500.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 500.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 500.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 500.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 675.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 500.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 500.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 500.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 278.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 278.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 278.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 444.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 444.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 278.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 278.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 300.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 675.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 675.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 471.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 278.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 722.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 675.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 500.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 675.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 500.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 500.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 500.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 500.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 500.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 500.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 500.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 500.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 500.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 500.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 500.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 667.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 500.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 500.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 500.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 500.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 750.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 750.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 300.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 276.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 310.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 500.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 500.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 500.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 523.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 476.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 833.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 250.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 250.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 675.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 675.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 500.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 500.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 500.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 420.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 556.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 556.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 556.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 333.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 333.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 333.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 214.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 389.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 389.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 453.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 389.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 389.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 760.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 389.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 389.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 389.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 389.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 389.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 500.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 333.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 500.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 500.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 250.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 500.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 278.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 300.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 500.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 500.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 750.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 300.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 980.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 500.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 300.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 500.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 500.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 500.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 500.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 500.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 500.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 500.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 500.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 500.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 500.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 444.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 667.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 444.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 444.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 444.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 444.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 500.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 389.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 389.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 389.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 389.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 500.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/times_roman.go b/internal/pdf/model/fonts/times_roman.go new file mode 100644 index 0000000..915835b --- /dev/null +++ b/internal/pdf/model/fonts/times_roman.go @@ -0,0 +1,362 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font Times-Roman. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontTimesRoman struct { + encoder textencoding.TextEncoder +} + +func NewFontTimesRoman() fontTimesRoman { + font := fontTimesRoman{} + font.encoder = textencoding.NewWinAnsiTextEncoder() // Default + return font +} + +func (font fontTimesRoman) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontTimesRoman) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := timesRomanCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontTimesRoman) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("Times-Roman")) + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + + obj.PdfObject = fontDict + return obj +} + +var timesRomanCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "A": {GlyphName: "A", Wx: 722.000000, Wy: 0.000000}, + "AE": {GlyphName: "AE", Wx: 889.000000, Wy: 0.000000}, + "Aacute": {GlyphName: "Aacute", Wx: 722.000000, Wy: 0.000000}, + "Abreve": {GlyphName: "Abreve", Wx: 722.000000, Wy: 0.000000}, + "Acircumflex": {GlyphName: "Acircumflex", Wx: 722.000000, Wy: 0.000000}, + "Adieresis": {GlyphName: "Adieresis", Wx: 722.000000, Wy: 0.000000}, + "Agrave": {GlyphName: "Agrave", Wx: 722.000000, Wy: 0.000000}, + "Amacron": {GlyphName: "Amacron", Wx: 722.000000, Wy: 0.000000}, + "Aogonek": {GlyphName: "Aogonek", Wx: 722.000000, Wy: 0.000000}, + "Aring": {GlyphName: "Aring", Wx: 722.000000, Wy: 0.000000}, + "Atilde": {GlyphName: "Atilde", Wx: 722.000000, Wy: 0.000000}, + "B": {GlyphName: "B", Wx: 667.000000, Wy: 0.000000}, + "C": {GlyphName: "C", Wx: 667.000000, Wy: 0.000000}, + "Cacute": {GlyphName: "Cacute", Wx: 667.000000, Wy: 0.000000}, + "Ccaron": {GlyphName: "Ccaron", Wx: 667.000000, Wy: 0.000000}, + "Ccedilla": {GlyphName: "Ccedilla", Wx: 667.000000, Wy: 0.000000}, + "D": {GlyphName: "D", Wx: 722.000000, Wy: 0.000000}, + "Dcaron": {GlyphName: "Dcaron", Wx: 722.000000, Wy: 0.000000}, + "Dcroat": {GlyphName: "Dcroat", Wx: 722.000000, Wy: 0.000000}, + "Delta": {GlyphName: "Delta", Wx: 612.000000, Wy: 0.000000}, + "E": {GlyphName: "E", Wx: 611.000000, Wy: 0.000000}, + "Eacute": {GlyphName: "Eacute", Wx: 611.000000, Wy: 0.000000}, + "Ecaron": {GlyphName: "Ecaron", Wx: 611.000000, Wy: 0.000000}, + "Ecircumflex": {GlyphName: "Ecircumflex", Wx: 611.000000, Wy: 0.000000}, + "Edieresis": {GlyphName: "Edieresis", Wx: 611.000000, Wy: 0.000000}, + "Edotaccent": {GlyphName: "Edotaccent", Wx: 611.000000, Wy: 0.000000}, + "Egrave": {GlyphName: "Egrave", Wx: 611.000000, Wy: 0.000000}, + "Emacron": {GlyphName: "Emacron", Wx: 611.000000, Wy: 0.000000}, + "Eogonek": {GlyphName: "Eogonek", Wx: 611.000000, Wy: 0.000000}, + "Eth": {GlyphName: "Eth", Wx: 722.000000, Wy: 0.000000}, + "Euro": {GlyphName: "Euro", Wx: 500.000000, Wy: 0.000000}, + "F": {GlyphName: "F", Wx: 556.000000, Wy: 0.000000}, + "G": {GlyphName: "G", Wx: 722.000000, Wy: 0.000000}, + "Gbreve": {GlyphName: "Gbreve", Wx: 722.000000, Wy: 0.000000}, + "Gcommaaccent": {GlyphName: "Gcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "H": {GlyphName: "H", Wx: 722.000000, Wy: 0.000000}, + "I": {GlyphName: "I", Wx: 333.000000, Wy: 0.000000}, + "Iacute": {GlyphName: "Iacute", Wx: 333.000000, Wy: 0.000000}, + "Icircumflex": {GlyphName: "Icircumflex", Wx: 333.000000, Wy: 0.000000}, + "Idieresis": {GlyphName: "Idieresis", Wx: 333.000000, Wy: 0.000000}, + "Idotaccent": {GlyphName: "Idotaccent", Wx: 333.000000, Wy: 0.000000}, + "Igrave": {GlyphName: "Igrave", Wx: 333.000000, Wy: 0.000000}, + "Imacron": {GlyphName: "Imacron", Wx: 333.000000, Wy: 0.000000}, + "Iogonek": {GlyphName: "Iogonek", Wx: 333.000000, Wy: 0.000000}, + "J": {GlyphName: "J", Wx: 389.000000, Wy: 0.000000}, + "K": {GlyphName: "K", Wx: 722.000000, Wy: 0.000000}, + "Kcommaaccent": {GlyphName: "Kcommaaccent", Wx: 722.000000, Wy: 0.000000}, + "L": {GlyphName: "L", Wx: 611.000000, Wy: 0.000000}, + "Lacute": {GlyphName: "Lacute", Wx: 611.000000, Wy: 0.000000}, + "Lcaron": {GlyphName: "Lcaron", Wx: 611.000000, Wy: 0.000000}, + "Lcommaaccent": {GlyphName: "Lcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Lslash": {GlyphName: "Lslash", Wx: 611.000000, Wy: 0.000000}, + "M": {GlyphName: "M", Wx: 889.000000, Wy: 0.000000}, + "N": {GlyphName: "N", Wx: 722.000000, Wy: 0.000000}, + "Nacute": {GlyphName: "Nacute", Wx: 722.000000, Wy: 0.000000}, + "Ncaron": {GlyphName: "Ncaron", Wx: 722.000000, Wy: 0.000000}, + "Ncommaaccent": {GlyphName: "Ncommaaccent", Wx: 722.000000, Wy: 0.000000}, + "Ntilde": {GlyphName: "Ntilde", Wx: 722.000000, Wy: 0.000000}, + "O": {GlyphName: "O", Wx: 722.000000, Wy: 0.000000}, + "OE": {GlyphName: "OE", Wx: 889.000000, Wy: 0.000000}, + "Oacute": {GlyphName: "Oacute", Wx: 722.000000, Wy: 0.000000}, + "Ocircumflex": {GlyphName: "Ocircumflex", Wx: 722.000000, Wy: 0.000000}, + "Odieresis": {GlyphName: "Odieresis", Wx: 722.000000, Wy: 0.000000}, + "Ograve": {GlyphName: "Ograve", Wx: 722.000000, Wy: 0.000000}, + "Ohungarumlaut": {GlyphName: "Ohungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Omacron": {GlyphName: "Omacron", Wx: 722.000000, Wy: 0.000000}, + "Oslash": {GlyphName: "Oslash", Wx: 722.000000, Wy: 0.000000}, + "Otilde": {GlyphName: "Otilde", Wx: 722.000000, Wy: 0.000000}, + "P": {GlyphName: "P", Wx: 556.000000, Wy: 0.000000}, + "Q": {GlyphName: "Q", Wx: 722.000000, Wy: 0.000000}, + "R": {GlyphName: "R", Wx: 667.000000, Wy: 0.000000}, + "Racute": {GlyphName: "Racute", Wx: 667.000000, Wy: 0.000000}, + "Rcaron": {GlyphName: "Rcaron", Wx: 667.000000, Wy: 0.000000}, + "Rcommaaccent": {GlyphName: "Rcommaaccent", Wx: 667.000000, Wy: 0.000000}, + "S": {GlyphName: "S", Wx: 556.000000, Wy: 0.000000}, + "Sacute": {GlyphName: "Sacute", Wx: 556.000000, Wy: 0.000000}, + "Scaron": {GlyphName: "Scaron", Wx: 556.000000, Wy: 0.000000}, + "Scedilla": {GlyphName: "Scedilla", Wx: 556.000000, Wy: 0.000000}, + "Scommaaccent": {GlyphName: "Scommaaccent", Wx: 556.000000, Wy: 0.000000}, + "T": {GlyphName: "T", Wx: 611.000000, Wy: 0.000000}, + "Tcaron": {GlyphName: "Tcaron", Wx: 611.000000, Wy: 0.000000}, + "Tcommaaccent": {GlyphName: "Tcommaaccent", Wx: 611.000000, Wy: 0.000000}, + "Thorn": {GlyphName: "Thorn", Wx: 556.000000, Wy: 0.000000}, + "U": {GlyphName: "U", Wx: 722.000000, Wy: 0.000000}, + "Uacute": {GlyphName: "Uacute", Wx: 722.000000, Wy: 0.000000}, + "Ucircumflex": {GlyphName: "Ucircumflex", Wx: 722.000000, Wy: 0.000000}, + "Udieresis": {GlyphName: "Udieresis", Wx: 722.000000, Wy: 0.000000}, + "Ugrave": {GlyphName: "Ugrave", Wx: 722.000000, Wy: 0.000000}, + "Uhungarumlaut": {GlyphName: "Uhungarumlaut", Wx: 722.000000, Wy: 0.000000}, + "Umacron": {GlyphName: "Umacron", Wx: 722.000000, Wy: 0.000000}, + "Uogonek": {GlyphName: "Uogonek", Wx: 722.000000, Wy: 0.000000}, + "Uring": {GlyphName: "Uring", Wx: 722.000000, Wy: 0.000000}, + "V": {GlyphName: "V", Wx: 722.000000, Wy: 0.000000}, + "W": {GlyphName: "W", Wx: 944.000000, Wy: 0.000000}, + "X": {GlyphName: "X", Wx: 722.000000, Wy: 0.000000}, + "Y": {GlyphName: "Y", Wx: 722.000000, Wy: 0.000000}, + "Yacute": {GlyphName: "Yacute", Wx: 722.000000, Wy: 0.000000}, + "Ydieresis": {GlyphName: "Ydieresis", Wx: 722.000000, Wy: 0.000000}, + "Z": {GlyphName: "Z", Wx: 611.000000, Wy: 0.000000}, + "Zacute": {GlyphName: "Zacute", Wx: 611.000000, Wy: 0.000000}, + "Zcaron": {GlyphName: "Zcaron", Wx: 611.000000, Wy: 0.000000}, + "Zdotaccent": {GlyphName: "Zdotaccent", Wx: 611.000000, Wy: 0.000000}, + "a": {GlyphName: "a", Wx: 444.000000, Wy: 0.000000}, + "aacute": {GlyphName: "aacute", Wx: 444.000000, Wy: 0.000000}, + "abreve": {GlyphName: "abreve", Wx: 444.000000, Wy: 0.000000}, + "acircumflex": {GlyphName: "acircumflex", Wx: 444.000000, Wy: 0.000000}, + "acute": {GlyphName: "acute", Wx: 333.000000, Wy: 0.000000}, + "adieresis": {GlyphName: "adieresis", Wx: 444.000000, Wy: 0.000000}, + "ae": {GlyphName: "ae", Wx: 667.000000, Wy: 0.000000}, + "agrave": {GlyphName: "agrave", Wx: 444.000000, Wy: 0.000000}, + "amacron": {GlyphName: "amacron", Wx: 444.000000, Wy: 0.000000}, + "ampersand": {GlyphName: "ampersand", Wx: 778.000000, Wy: 0.000000}, + "aogonek": {GlyphName: "aogonek", Wx: 444.000000, Wy: 0.000000}, + "aring": {GlyphName: "aring", Wx: 444.000000, Wy: 0.000000}, + "asciicircum": {GlyphName: "asciicircum", Wx: 469.000000, Wy: 0.000000}, + "asciitilde": {GlyphName: "asciitilde", Wx: 541.000000, Wy: 0.000000}, + "asterisk": {GlyphName: "asterisk", Wx: 500.000000, Wy: 0.000000}, + "at": {GlyphName: "at", Wx: 921.000000, Wy: 0.000000}, + "atilde": {GlyphName: "atilde", Wx: 444.000000, Wy: 0.000000}, + "b": {GlyphName: "b", Wx: 500.000000, Wy: 0.000000}, + "backslash": {GlyphName: "backslash", Wx: 278.000000, Wy: 0.000000}, + "bar": {GlyphName: "bar", Wx: 200.000000, Wy: 0.000000}, + "braceleft": {GlyphName: "braceleft", Wx: 480.000000, Wy: 0.000000}, + "braceright": {GlyphName: "braceright", Wx: 480.000000, Wy: 0.000000}, + "bracketleft": {GlyphName: "bracketleft", Wx: 333.000000, Wy: 0.000000}, + "bracketright": {GlyphName: "bracketright", Wx: 333.000000, Wy: 0.000000}, + "breve": {GlyphName: "breve", Wx: 333.000000, Wy: 0.000000}, + "brokenbar": {GlyphName: "brokenbar", Wx: 200.000000, Wy: 0.000000}, + "bullet": {GlyphName: "bullet", Wx: 350.000000, Wy: 0.000000}, + "c": {GlyphName: "c", Wx: 444.000000, Wy: 0.000000}, + "cacute": {GlyphName: "cacute", Wx: 444.000000, Wy: 0.000000}, + "caron": {GlyphName: "caron", Wx: 333.000000, Wy: 0.000000}, + "ccaron": {GlyphName: "ccaron", Wx: 444.000000, Wy: 0.000000}, + "ccedilla": {GlyphName: "ccedilla", Wx: 444.000000, Wy: 0.000000}, + "cedilla": {GlyphName: "cedilla", Wx: 333.000000, Wy: 0.000000}, + "cent": {GlyphName: "cent", Wx: 500.000000, Wy: 0.000000}, + "circumflex": {GlyphName: "circumflex", Wx: 333.000000, Wy: 0.000000}, + "colon": {GlyphName: "colon", Wx: 278.000000, Wy: 0.000000}, + "comma": {GlyphName: "comma", Wx: 250.000000, Wy: 0.000000}, + "commaaccent": {GlyphName: "commaaccent", Wx: 250.000000, Wy: 0.000000}, + "copyright": {GlyphName: "copyright", Wx: 760.000000, Wy: 0.000000}, + "currency": {GlyphName: "currency", Wx: 500.000000, Wy: 0.000000}, + "d": {GlyphName: "d", Wx: 500.000000, Wy: 0.000000}, + "dagger": {GlyphName: "dagger", Wx: 500.000000, Wy: 0.000000}, + "daggerdbl": {GlyphName: "daggerdbl", Wx: 500.000000, Wy: 0.000000}, + "dcaron": {GlyphName: "dcaron", Wx: 588.000000, Wy: 0.000000}, + "dcroat": {GlyphName: "dcroat", Wx: 500.000000, Wy: 0.000000}, + "degree": {GlyphName: "degree", Wx: 400.000000, Wy: 0.000000}, + "dieresis": {GlyphName: "dieresis", Wx: 333.000000, Wy: 0.000000}, + "divide": {GlyphName: "divide", Wx: 564.000000, Wy: 0.000000}, + "dollar": {GlyphName: "dollar", Wx: 500.000000, Wy: 0.000000}, + "dotaccent": {GlyphName: "dotaccent", Wx: 333.000000, Wy: 0.000000}, + "dotlessi": {GlyphName: "dotlessi", Wx: 278.000000, Wy: 0.000000}, + "e": {GlyphName: "e", Wx: 444.000000, Wy: 0.000000}, + "eacute": {GlyphName: "eacute", Wx: 444.000000, Wy: 0.000000}, + "ecaron": {GlyphName: "ecaron", Wx: 444.000000, Wy: 0.000000}, + "ecircumflex": {GlyphName: "ecircumflex", Wx: 444.000000, Wy: 0.000000}, + "edieresis": {GlyphName: "edieresis", Wx: 444.000000, Wy: 0.000000}, + "edotaccent": {GlyphName: "edotaccent", Wx: 444.000000, Wy: 0.000000}, + "egrave": {GlyphName: "egrave", Wx: 444.000000, Wy: 0.000000}, + "eight": {GlyphName: "eight", Wx: 500.000000, Wy: 0.000000}, + "ellipsis": {GlyphName: "ellipsis", Wx: 1000.000000, Wy: 0.000000}, + "emacron": {GlyphName: "emacron", Wx: 444.000000, Wy: 0.000000}, + "emdash": {GlyphName: "emdash", Wx: 1000.000000, Wy: 0.000000}, + "endash": {GlyphName: "endash", Wx: 500.000000, Wy: 0.000000}, + "eogonek": {GlyphName: "eogonek", Wx: 444.000000, Wy: 0.000000}, + "equal": {GlyphName: "equal", Wx: 564.000000, Wy: 0.000000}, + "eth": {GlyphName: "eth", Wx: 500.000000, Wy: 0.000000}, + "exclam": {GlyphName: "exclam", Wx: 333.000000, Wy: 0.000000}, + "exclamdown": {GlyphName: "exclamdown", Wx: 333.000000, Wy: 0.000000}, + "f": {GlyphName: "f", Wx: 333.000000, Wy: 0.000000}, + "fi": {GlyphName: "fi", Wx: 556.000000, Wy: 0.000000}, + "five": {GlyphName: "five", Wx: 500.000000, Wy: 0.000000}, + "fl": {GlyphName: "fl", Wx: 556.000000, Wy: 0.000000}, + "florin": {GlyphName: "florin", Wx: 500.000000, Wy: 0.000000}, + "four": {GlyphName: "four", Wx: 500.000000, Wy: 0.000000}, + "fraction": {GlyphName: "fraction", Wx: 167.000000, Wy: 0.000000}, + "g": {GlyphName: "g", Wx: 500.000000, Wy: 0.000000}, + "gbreve": {GlyphName: "gbreve", Wx: 500.000000, Wy: 0.000000}, + "gcommaaccent": {GlyphName: "gcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "germandbls": {GlyphName: "germandbls", Wx: 500.000000, Wy: 0.000000}, + "grave": {GlyphName: "grave", Wx: 333.000000, Wy: 0.000000}, + "greater": {GlyphName: "greater", Wx: 564.000000, Wy: 0.000000}, + "greaterequal": {GlyphName: "greaterequal", Wx: 549.000000, Wy: 0.000000}, + "guillemotleft": {GlyphName: "guillemotleft", Wx: 500.000000, Wy: 0.000000}, + "guillemotright": {GlyphName: "guillemotright", Wx: 500.000000, Wy: 0.000000}, + "guilsinglleft": {GlyphName: "guilsinglleft", Wx: 333.000000, Wy: 0.000000}, + "guilsinglright": {GlyphName: "guilsinglright", Wx: 333.000000, Wy: 0.000000}, + "h": {GlyphName: "h", Wx: 500.000000, Wy: 0.000000}, + "hungarumlaut": {GlyphName: "hungarumlaut", Wx: 333.000000, Wy: 0.000000}, + "hyphen": {GlyphName: "hyphen", Wx: 333.000000, Wy: 0.000000}, + "i": {GlyphName: "i", Wx: 278.000000, Wy: 0.000000}, + "iacute": {GlyphName: "iacute", Wx: 278.000000, Wy: 0.000000}, + "icircumflex": {GlyphName: "icircumflex", Wx: 278.000000, Wy: 0.000000}, + "idieresis": {GlyphName: "idieresis", Wx: 278.000000, Wy: 0.000000}, + "igrave": {GlyphName: "igrave", Wx: 278.000000, Wy: 0.000000}, + "imacron": {GlyphName: "imacron", Wx: 278.000000, Wy: 0.000000}, + "iogonek": {GlyphName: "iogonek", Wx: 278.000000, Wy: 0.000000}, + "j": {GlyphName: "j", Wx: 278.000000, Wy: 0.000000}, + "k": {GlyphName: "k", Wx: 500.000000, Wy: 0.000000}, + "kcommaaccent": {GlyphName: "kcommaaccent", Wx: 500.000000, Wy: 0.000000}, + "l": {GlyphName: "l", Wx: 278.000000, Wy: 0.000000}, + "lacute": {GlyphName: "lacute", Wx: 278.000000, Wy: 0.000000}, + "lcaron": {GlyphName: "lcaron", Wx: 344.000000, Wy: 0.000000}, + "lcommaaccent": {GlyphName: "lcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "less": {GlyphName: "less", Wx: 564.000000, Wy: 0.000000}, + "lessequal": {GlyphName: "lessequal", Wx: 549.000000, Wy: 0.000000}, + "logicalnot": {GlyphName: "logicalnot", Wx: 564.000000, Wy: 0.000000}, + "lozenge": {GlyphName: "lozenge", Wx: 471.000000, Wy: 0.000000}, + "lslash": {GlyphName: "lslash", Wx: 278.000000, Wy: 0.000000}, + "m": {GlyphName: "m", Wx: 778.000000, Wy: 0.000000}, + "macron": {GlyphName: "macron", Wx: 333.000000, Wy: 0.000000}, + "minus": {GlyphName: "minus", Wx: 564.000000, Wy: 0.000000}, + "mu": {GlyphName: "mu", Wx: 500.000000, Wy: 0.000000}, + "multiply": {GlyphName: "multiply", Wx: 564.000000, Wy: 0.000000}, + "n": {GlyphName: "n", Wx: 500.000000, Wy: 0.000000}, + "nacute": {GlyphName: "nacute", Wx: 500.000000, Wy: 0.000000}, + "ncaron": {GlyphName: "ncaron", Wx: 500.000000, Wy: 0.000000}, + "ncommaaccent": {GlyphName: "ncommaaccent", Wx: 500.000000, Wy: 0.000000}, + "nine": {GlyphName: "nine", Wx: 500.000000, Wy: 0.000000}, + "notequal": {GlyphName: "notequal", Wx: 549.000000, Wy: 0.000000}, + "ntilde": {GlyphName: "ntilde", Wx: 500.000000, Wy: 0.000000}, + "numbersign": {GlyphName: "numbersign", Wx: 500.000000, Wy: 0.000000}, + "o": {GlyphName: "o", Wx: 500.000000, Wy: 0.000000}, + "oacute": {GlyphName: "oacute", Wx: 500.000000, Wy: 0.000000}, + "ocircumflex": {GlyphName: "ocircumflex", Wx: 500.000000, Wy: 0.000000}, + "odieresis": {GlyphName: "odieresis", Wx: 500.000000, Wy: 0.000000}, + "oe": {GlyphName: "oe", Wx: 722.000000, Wy: 0.000000}, + "ogonek": {GlyphName: "ogonek", Wx: 333.000000, Wy: 0.000000}, + "ograve": {GlyphName: "ograve", Wx: 500.000000, Wy: 0.000000}, + "ohungarumlaut": {GlyphName: "ohungarumlaut", Wx: 500.000000, Wy: 0.000000}, + "omacron": {GlyphName: "omacron", Wx: 500.000000, Wy: 0.000000}, + "one": {GlyphName: "one", Wx: 500.000000, Wy: 0.000000}, + "onehalf": {GlyphName: "onehalf", Wx: 750.000000, Wy: 0.000000}, + "onequarter": {GlyphName: "onequarter", Wx: 750.000000, Wy: 0.000000}, + "onesuperior": {GlyphName: "onesuperior", Wx: 300.000000, Wy: 0.000000}, + "ordfeminine": {GlyphName: "ordfeminine", Wx: 276.000000, Wy: 0.000000}, + "ordmasculine": {GlyphName: "ordmasculine", Wx: 310.000000, Wy: 0.000000}, + "oslash": {GlyphName: "oslash", Wx: 500.000000, Wy: 0.000000}, + "otilde": {GlyphName: "otilde", Wx: 500.000000, Wy: 0.000000}, + "p": {GlyphName: "p", Wx: 500.000000, Wy: 0.000000}, + "paragraph": {GlyphName: "paragraph", Wx: 453.000000, Wy: 0.000000}, + "parenleft": {GlyphName: "parenleft", Wx: 333.000000, Wy: 0.000000}, + "parenright": {GlyphName: "parenright", Wx: 333.000000, Wy: 0.000000}, + "partialdiff": {GlyphName: "partialdiff", Wx: 476.000000, Wy: 0.000000}, + "percent": {GlyphName: "percent", Wx: 833.000000, Wy: 0.000000}, + "period": {GlyphName: "period", Wx: 250.000000, Wy: 0.000000}, + "periodcentered": {GlyphName: "periodcentered", Wx: 250.000000, Wy: 0.000000}, + "perthousand": {GlyphName: "perthousand", Wx: 1000.000000, Wy: 0.000000}, + "plus": {GlyphName: "plus", Wx: 564.000000, Wy: 0.000000}, + "plusminus": {GlyphName: "plusminus", Wx: 564.000000, Wy: 0.000000}, + "q": {GlyphName: "q", Wx: 500.000000, Wy: 0.000000}, + "question": {GlyphName: "question", Wx: 444.000000, Wy: 0.000000}, + "questiondown": {GlyphName: "questiondown", Wx: 444.000000, Wy: 0.000000}, + "quotedbl": {GlyphName: "quotedbl", Wx: 408.000000, Wy: 0.000000}, + "quotedblbase": {GlyphName: "quotedblbase", Wx: 444.000000, Wy: 0.000000}, + "quotedblleft": {GlyphName: "quotedblleft", Wx: 444.000000, Wy: 0.000000}, + "quotedblright": {GlyphName: "quotedblright", Wx: 444.000000, Wy: 0.000000}, + "quoteleft": {GlyphName: "quoteleft", Wx: 333.000000, Wy: 0.000000}, + "quoteright": {GlyphName: "quoteright", Wx: 333.000000, Wy: 0.000000}, + "quotesinglbase": {GlyphName: "quotesinglbase", Wx: 333.000000, Wy: 0.000000}, + "quotesingle": {GlyphName: "quotesingle", Wx: 180.000000, Wy: 0.000000}, + "r": {GlyphName: "r", Wx: 333.000000, Wy: 0.000000}, + "racute": {GlyphName: "racute", Wx: 333.000000, Wy: 0.000000}, + "radical": {GlyphName: "radical", Wx: 453.000000, Wy: 0.000000}, + "rcaron": {GlyphName: "rcaron", Wx: 333.000000, Wy: 0.000000}, + "rcommaaccent": {GlyphName: "rcommaaccent", Wx: 333.000000, Wy: 0.000000}, + "registered": {GlyphName: "registered", Wx: 760.000000, Wy: 0.000000}, + "ring": {GlyphName: "ring", Wx: 333.000000, Wy: 0.000000}, + "s": {GlyphName: "s", Wx: 389.000000, Wy: 0.000000}, + "sacute": {GlyphName: "sacute", Wx: 389.000000, Wy: 0.000000}, + "scaron": {GlyphName: "scaron", Wx: 389.000000, Wy: 0.000000}, + "scedilla": {GlyphName: "scedilla", Wx: 389.000000, Wy: 0.000000}, + "scommaaccent": {GlyphName: "scommaaccent", Wx: 389.000000, Wy: 0.000000}, + "section": {GlyphName: "section", Wx: 500.000000, Wy: 0.000000}, + "semicolon": {GlyphName: "semicolon", Wx: 278.000000, Wy: 0.000000}, + "seven": {GlyphName: "seven", Wx: 500.000000, Wy: 0.000000}, + "six": {GlyphName: "six", Wx: 500.000000, Wy: 0.000000}, + "slash": {GlyphName: "slash", Wx: 278.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 250.000000, Wy: 0.000000}, + "sterling": {GlyphName: "sterling", Wx: 500.000000, Wy: 0.000000}, + "summation": {GlyphName: "summation", Wx: 600.000000, Wy: 0.000000}, + "t": {GlyphName: "t", Wx: 278.000000, Wy: 0.000000}, + "tcaron": {GlyphName: "tcaron", Wx: 326.000000, Wy: 0.000000}, + "tcommaaccent": {GlyphName: "tcommaaccent", Wx: 278.000000, Wy: 0.000000}, + "thorn": {GlyphName: "thorn", Wx: 500.000000, Wy: 0.000000}, + "three": {GlyphName: "three", Wx: 500.000000, Wy: 0.000000}, + "threequarters": {GlyphName: "threequarters", Wx: 750.000000, Wy: 0.000000}, + "threesuperior": {GlyphName: "threesuperior", Wx: 300.000000, Wy: 0.000000}, + "tilde": {GlyphName: "tilde", Wx: 333.000000, Wy: 0.000000}, + "trademark": {GlyphName: "trademark", Wx: 980.000000, Wy: 0.000000}, + "two": {GlyphName: "two", Wx: 500.000000, Wy: 0.000000}, + "twosuperior": {GlyphName: "twosuperior", Wx: 300.000000, Wy: 0.000000}, + "u": {GlyphName: "u", Wx: 500.000000, Wy: 0.000000}, + "uacute": {GlyphName: "uacute", Wx: 500.000000, Wy: 0.000000}, + "ucircumflex": {GlyphName: "ucircumflex", Wx: 500.000000, Wy: 0.000000}, + "udieresis": {GlyphName: "udieresis", Wx: 500.000000, Wy: 0.000000}, + "ugrave": {GlyphName: "ugrave", Wx: 500.000000, Wy: 0.000000}, + "uhungarumlaut": {GlyphName: "uhungarumlaut", Wx: 500.000000, Wy: 0.000000}, + "umacron": {GlyphName: "umacron", Wx: 500.000000, Wy: 0.000000}, + "underscore": {GlyphName: "underscore", Wx: 500.000000, Wy: 0.000000}, + "uogonek": {GlyphName: "uogonek", Wx: 500.000000, Wy: 0.000000}, + "uring": {GlyphName: "uring", Wx: 500.000000, Wy: 0.000000}, + "v": {GlyphName: "v", Wx: 500.000000, Wy: 0.000000}, + "w": {GlyphName: "w", Wx: 722.000000, Wy: 0.000000}, + "x": {GlyphName: "x", Wx: 500.000000, Wy: 0.000000}, + "y": {GlyphName: "y", Wx: 500.000000, Wy: 0.000000}, + "yacute": {GlyphName: "yacute", Wx: 500.000000, Wy: 0.000000}, + "ydieresis": {GlyphName: "ydieresis", Wx: 500.000000, Wy: 0.000000}, + "yen": {GlyphName: "yen", Wx: 500.000000, Wy: 0.000000}, + "z": {GlyphName: "z", Wx: 444.000000, Wy: 0.000000}, + "zacute": {GlyphName: "zacute", Wx: 444.000000, Wy: 0.000000}, + "zcaron": {GlyphName: "zcaron", Wx: 444.000000, Wy: 0.000000}, + "zdotaccent": {GlyphName: "zdotaccent", Wx: 444.000000, Wy: 0.000000}, + "zero": {GlyphName: "zero", Wx: 500.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/fonts/ttfparser.go b/internal/pdf/model/fonts/ttfparser.go new file mode 100644 index 0000000..967b524 --- /dev/null +++ b/internal/pdf/model/fonts/ttfparser.go @@ -0,0 +1,374 @@ +/* + * 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 fonts + +// Utility to parse TTF font files +// Version: 1.0 +// Date: 2011-06-18 +// Author: Olivier PLATHEY +// Port to Go: Kurt Jung, 2013-07-15 + +import ( + "encoding/binary" + "fmt" + "os" + "regexp" + "strings" +) + +// TtfType contains metrics of a TrueType font. +type TtfType struct { + Embeddable bool + UnitsPerEm uint16 + PostScriptName string + Bold bool + ItalicAngle int16 + IsFixedPitch bool + TypoAscender int16 + TypoDescender int16 + UnderlinePosition int16 + UnderlineThickness int16 + Xmin, Ymin, Xmax, Ymax int16 + CapHeight int16 + Widths []uint16 + Chars map[uint16]uint16 +} + +type ttfParser struct { + rec TtfType + f *os.File + tables map[string]uint32 + numberOfHMetrics uint16 + numGlyphs uint16 +} + +// TtfParse extracts various metrics from a TrueType font file. +func TtfParse(fileStr string) (TtfRec TtfType, err error) { + var t ttfParser + t.f, err = os.Open(fileStr) + if err != nil { + return + } + version, err := t.ReadStr(4) + if err != nil { + return + } + if version == "OTTO" { + err = fmt.Errorf("fonts based on PostScript outlines are not supported") + return + } + if version != "\x00\x01\x00\x00" { + err = fmt.Errorf("unrecognized file format") + return + } + numTables := int(t.ReadUShort()) + t.Skip(3 * 2) // searchRange, entrySelector, rangeShift + t.tables = make(map[string]uint32) + var tag string + for j := 0; j < numTables; j++ { + tag, err = t.ReadStr(4) + if err != nil { + return + } + t.Skip(4) // checkSum + offset := t.ReadULong() + t.Skip(4) // length + t.tables[tag] = offset + } + err = t.ParseComponents() + if err != nil { + return + } + t.f.Close() + TtfRec = t.rec + return +} + +func (t *ttfParser) ParseComponents() (err error) { + err = t.ParseHead() + if err == nil { + err = t.ParseHhea() + if err == nil { + err = t.ParseMaxp() + if err == nil { + err = t.ParseHmtx() + if err == nil { + err = t.ParseCmap() + if err == nil { + err = t.ParseName() + if err == nil { + err = t.ParseOS2() + if err == nil { + err = t.ParsePost() + } + } + } + } + } + } + } + return +} + +func (t *ttfParser) ParseHead() (err error) { + err = t.Seek("head") + t.Skip(3 * 4) // version, fontRevision, checkSumAdjustment + magicNumber := t.ReadULong() + if magicNumber != 0x5F0F3CF5 { + err = fmt.Errorf("incorrect magic number") + return + } + t.Skip(2) // flags + t.rec.UnitsPerEm = t.ReadUShort() + t.Skip(2 * 8) // created, modified + t.rec.Xmin = t.ReadShort() + t.rec.Ymin = t.ReadShort() + t.rec.Xmax = t.ReadShort() + t.rec.Ymax = t.ReadShort() + return +} + +func (t *ttfParser) ParseHhea() (err error) { + err = t.Seek("hhea") + if err == nil { + t.Skip(4 + 15*2) + t.numberOfHMetrics = t.ReadUShort() + } + return +} + +func (t *ttfParser) ParseMaxp() (err error) { + err = t.Seek("maxp") + if err == nil { + t.Skip(4) + t.numGlyphs = t.ReadUShort() + } + return +} + +func (t *ttfParser) ParseHmtx() (err error) { + err = t.Seek("hmtx") + if err == nil { + t.rec.Widths = make([]uint16, 0, 8) + for j := uint16(0); j < t.numberOfHMetrics; j++ { + t.rec.Widths = append(t.rec.Widths, t.ReadUShort()) + t.Skip(2) // lsb + } + if t.numberOfHMetrics < t.numGlyphs { + lastWidth := t.rec.Widths[t.numberOfHMetrics-1] + for j := t.numberOfHMetrics; j < t.numGlyphs; j++ { + t.rec.Widths = append(t.rec.Widths, lastWidth) + } + } + } + return +} + +func (t *ttfParser) ParseCmap() (err error) { + var offset int64 + if err = t.Seek("cmap"); err != nil { + return + } + t.Skip(2) // version + numTables := int(t.ReadUShort()) + offset31 := int64(0) + for j := 0; j < numTables; j++ { + platformID := t.ReadUShort() + encodingID := t.ReadUShort() + offset = int64(t.ReadULong()) + if platformID == 3 && encodingID == 1 { + offset31 = offset + } + } + if offset31 == 0 { + err = fmt.Errorf("no Unicode encoding found") + return + } + startCount := make([]uint16, 0, 8) + endCount := make([]uint16, 0, 8) + idDelta := make([]int16, 0, 8) + idRangeOffset := make([]uint16, 0, 8) + t.rec.Chars = make(map[uint16]uint16) + t.f.Seek(int64(t.tables["cmap"])+offset31, os.SEEK_SET) + format := t.ReadUShort() + if format != 4 { + err = fmt.Errorf("unexpected subtable format: %d", format) + return + } + t.Skip(2 * 2) // length, language + segCount := int(t.ReadUShort() / 2) + t.Skip(3 * 2) // searchRange, entrySelector, rangeShift + for j := 0; j < segCount; j++ { + endCount = append(endCount, t.ReadUShort()) + } + t.Skip(2) // reservedPad + for j := 0; j < segCount; j++ { + startCount = append(startCount, t.ReadUShort()) + } + for j := 0; j < segCount; j++ { + idDelta = append(idDelta, t.ReadShort()) + } + offset, _ = t.f.Seek(int64(0), os.SEEK_CUR) + for j := 0; j < segCount; j++ { + idRangeOffset = append(idRangeOffset, t.ReadUShort()) + } + for j := 0; j < segCount; j++ { + c1 := startCount[j] + c2 := endCount[j] + d := idDelta[j] + ro := idRangeOffset[j] + if ro > 0 { + t.f.Seek(offset+2*int64(j)+int64(ro), os.SEEK_SET) + } + for c := c1; c <= c2; c++ { + if c == 0xFFFF { + break + } + var gid int32 + if ro > 0 { + gid = int32(t.ReadUShort()) + if gid > 0 { + gid += int32(d) + } + } else { + gid = int32(c) + int32(d) + } + if gid >= 65536 { + gid -= 65536 + } + if gid > 0 { + t.rec.Chars[c] = uint16(gid) + } + } + } + return +} + +func (t *ttfParser) ParseName() (err error) { + err = t.Seek("name") + if err == nil { + tableOffset, _ := t.f.Seek(0, os.SEEK_CUR) + t.rec.PostScriptName = "" + t.Skip(2) // format + count := t.ReadUShort() + stringOffset := t.ReadUShort() + for j := uint16(0); j < count && t.rec.PostScriptName == ""; j++ { + t.Skip(3 * 2) // platformID, encodingID, languageID + nameID := t.ReadUShort() + length := t.ReadUShort() + offset := t.ReadUShort() + if nameID == 6 { + // PostScript name + t.f.Seek(int64(tableOffset)+int64(stringOffset)+int64(offset), os.SEEK_SET) + var s string + s, err = t.ReadStr(int(length)) + if err != nil { + return + } + s = strings.Replace(s, "\x00", "", -1) + var re *regexp.Regexp + if re, err = regexp.Compile("[(){}<> /%[\\]]"); err != nil { + return + } + t.rec.PostScriptName = re.ReplaceAllString(s, "") + } + } + if t.rec.PostScriptName == "" { + err = fmt.Errorf("the name PostScript was not found") + } + } + return +} + +func (t *ttfParser) ParseOS2() (err error) { + err = t.Seek("OS/2") + if err == nil { + version := t.ReadUShort() + t.Skip(3 * 2) // xAvgCharWidth, usWeightClass, usWidthClass + fsType := t.ReadUShort() + t.rec.Embeddable = (fsType != 2) && (fsType&0x200) == 0 + t.Skip(11*2 + 10 + 4*4 + 4) + fsSelection := t.ReadUShort() + t.rec.Bold = (fsSelection & 32) != 0 + t.Skip(2 * 2) // usFirstCharIndex, usLastCharIndex + t.rec.TypoAscender = t.ReadShort() + t.rec.TypoDescender = t.ReadShort() + if version >= 2 { + t.Skip(3*2 + 2*4 + 2) + t.rec.CapHeight = t.ReadShort() + } else { + t.rec.CapHeight = 0 + } + } + return +} + +func (t *ttfParser) ParsePost() (err error) { + err = t.Seek("post") + if err == nil { + t.Skip(4) // version + t.rec.ItalicAngle = t.ReadShort() + t.Skip(2) // Skip decimal part + t.rec.UnderlinePosition = t.ReadShort() + t.rec.UnderlineThickness = t.ReadShort() + t.rec.IsFixedPitch = t.ReadULong() != 0 + } + return +} + +func (t *ttfParser) Seek(tag string) (err error) { + ofs, ok := t.tables[tag] + if ok { + t.f.Seek(int64(ofs), os.SEEK_SET) + } else { + err = fmt.Errorf("table not found: %s", tag) + } + return +} + +func (t *ttfParser) Skip(n int) { + t.f.Seek(int64(n), os.SEEK_CUR) +} + +func (t *ttfParser) ReadStr(length int) (str string, err error) { + var n int + buf := make([]byte, length) + n, err = t.f.Read(buf) + if err == nil { + if n == length { + str = string(buf) + } else { + err = fmt.Errorf("unable to read %d bytes", length) + } + } + return +} + +func (t *ttfParser) ReadUShort() (val uint16) { + binary.Read(t.f, binary.BigEndian, &val) + return +} + +func (t *ttfParser) ReadShort() (val int16) { + binary.Read(t.f, binary.BigEndian, &val) + return +} + +func (t *ttfParser) ReadULong() (val uint32) { + binary.Read(t.f, binary.BigEndian, &val) + return +} diff --git a/internal/pdf/model/fonts/zapfdingbats.go b/internal/pdf/model/fonts/zapfdingbats.go new file mode 100644 index 0000000..052c10a --- /dev/null +++ b/internal/pdf/model/fonts/zapfdingbats.go @@ -0,0 +1,251 @@ +package fonts + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/textencoding" +) + +// Font ZapfDingbats. Implements Font interface. +// This is a built-in font and it is assumed that every reader has access to it. +type fontZapfDingbats struct { + // By default encoder is not set, which means that we use the font's built in encoding. + encoder textencoding.TextEncoder +} + +func NewFontZapfDingbats() fontZapfDingbats { + font := fontZapfDingbats{} + return font +} + +func (font fontZapfDingbats) SetEncoder(encoder textencoding.TextEncoder) { + font.encoder = encoder +} + +func (font fontZapfDingbats) GetGlyphCharMetrics(glyph string) (CharMetrics, bool) { + metrics, has := zapfDingbatsCharMetrics[glyph] + if !has { + return metrics, false + } + + return metrics, true +} + +func (font fontZapfDingbats) ToPdfObject() core.PdfObject { + obj := &core.PdfIndirectObject{} + + fontDict := core.MakeDict() + fontDict.Set("Type", core.MakeName("Font")) + fontDict.Set("Subtype", core.MakeName("Type1")) + fontDict.Set("BaseFont", core.MakeName("ZapfDingbats")) + if font.encoder != nil { + fontDict.Set("Encoding", font.encoder.ToPdfObject()) + } + + obj.PdfObject = fontDict + return obj +} + +var zapfDingbatsCharMetrics map[string]CharMetrics = map[string]CharMetrics{ + "a1": {GlyphName: "a1", Wx: 974.000000, Wy: 0.000000}, + "a10": {GlyphName: "a10", Wx: 692.000000, Wy: 0.000000}, + "a100": {GlyphName: "a100", Wx: 668.000000, Wy: 0.000000}, + "a101": {GlyphName: "a101", Wx: 732.000000, Wy: 0.000000}, + "a102": {GlyphName: "a102", Wx: 544.000000, Wy: 0.000000}, + "a103": {GlyphName: "a103", Wx: 544.000000, Wy: 0.000000}, + "a104": {GlyphName: "a104", Wx: 910.000000, Wy: 0.000000}, + "a105": {GlyphName: "a105", Wx: 911.000000, Wy: 0.000000}, + "a106": {GlyphName: "a106", Wx: 667.000000, Wy: 0.000000}, + "a107": {GlyphName: "a107", Wx: 760.000000, Wy: 0.000000}, + "a108": {GlyphName: "a108", Wx: 760.000000, Wy: 0.000000}, + "a109": {GlyphName: "a109", Wx: 626.000000, Wy: 0.000000}, + "a11": {GlyphName: "a11", Wx: 960.000000, Wy: 0.000000}, + "a110": {GlyphName: "a110", Wx: 694.000000, Wy: 0.000000}, + "a111": {GlyphName: "a111", Wx: 595.000000, Wy: 0.000000}, + "a112": {GlyphName: "a112", Wx: 776.000000, Wy: 0.000000}, + "a117": {GlyphName: "a117", Wx: 690.000000, Wy: 0.000000}, + "a118": {GlyphName: "a118", Wx: 791.000000, Wy: 0.000000}, + "a119": {GlyphName: "a119", Wx: 790.000000, Wy: 0.000000}, + "a12": {GlyphName: "a12", Wx: 939.000000, Wy: 0.000000}, + "a120": {GlyphName: "a120", Wx: 788.000000, Wy: 0.000000}, + "a121": {GlyphName: "a121", Wx: 788.000000, Wy: 0.000000}, + "a122": {GlyphName: "a122", Wx: 788.000000, Wy: 0.000000}, + "a123": {GlyphName: "a123", Wx: 788.000000, Wy: 0.000000}, + "a124": {GlyphName: "a124", Wx: 788.000000, Wy: 0.000000}, + "a125": {GlyphName: "a125", Wx: 788.000000, Wy: 0.000000}, + "a126": {GlyphName: "a126", Wx: 788.000000, Wy: 0.000000}, + "a127": {GlyphName: "a127", Wx: 788.000000, Wy: 0.000000}, + "a128": {GlyphName: "a128", Wx: 788.000000, Wy: 0.000000}, + "a129": {GlyphName: "a129", Wx: 788.000000, Wy: 0.000000}, + "a13": {GlyphName: "a13", Wx: 549.000000, Wy: 0.000000}, + "a130": {GlyphName: "a130", Wx: 788.000000, Wy: 0.000000}, + "a131": {GlyphName: "a131", Wx: 788.000000, Wy: 0.000000}, + "a132": {GlyphName: "a132", Wx: 788.000000, Wy: 0.000000}, + "a133": {GlyphName: "a133", Wx: 788.000000, Wy: 0.000000}, + "a134": {GlyphName: "a134", Wx: 788.000000, Wy: 0.000000}, + "a135": {GlyphName: "a135", Wx: 788.000000, Wy: 0.000000}, + "a136": {GlyphName: "a136", Wx: 788.000000, Wy: 0.000000}, + "a137": {GlyphName: "a137", Wx: 788.000000, Wy: 0.000000}, + "a138": {GlyphName: "a138", Wx: 788.000000, Wy: 0.000000}, + "a139": {GlyphName: "a139", Wx: 788.000000, Wy: 0.000000}, + "a14": {GlyphName: "a14", Wx: 855.000000, Wy: 0.000000}, + "a140": {GlyphName: "a140", Wx: 788.000000, Wy: 0.000000}, + "a141": {GlyphName: "a141", Wx: 788.000000, Wy: 0.000000}, + "a142": {GlyphName: "a142", Wx: 788.000000, Wy: 0.000000}, + "a143": {GlyphName: "a143", Wx: 788.000000, Wy: 0.000000}, + "a144": {GlyphName: "a144", Wx: 788.000000, Wy: 0.000000}, + "a145": {GlyphName: "a145", Wx: 788.000000, Wy: 0.000000}, + "a146": {GlyphName: "a146", Wx: 788.000000, Wy: 0.000000}, + "a147": {GlyphName: "a147", Wx: 788.000000, Wy: 0.000000}, + "a148": {GlyphName: "a148", Wx: 788.000000, Wy: 0.000000}, + "a149": {GlyphName: "a149", Wx: 788.000000, Wy: 0.000000}, + "a15": {GlyphName: "a15", Wx: 911.000000, Wy: 0.000000}, + "a150": {GlyphName: "a150", Wx: 788.000000, Wy: 0.000000}, + "a151": {GlyphName: "a151", Wx: 788.000000, Wy: 0.000000}, + "a152": {GlyphName: "a152", Wx: 788.000000, Wy: 0.000000}, + "a153": {GlyphName: "a153", Wx: 788.000000, Wy: 0.000000}, + "a154": {GlyphName: "a154", Wx: 788.000000, Wy: 0.000000}, + "a155": {GlyphName: "a155", Wx: 788.000000, Wy: 0.000000}, + "a156": {GlyphName: "a156", Wx: 788.000000, Wy: 0.000000}, + "a157": {GlyphName: "a157", Wx: 788.000000, Wy: 0.000000}, + "a158": {GlyphName: "a158", Wx: 788.000000, Wy: 0.000000}, + "a159": {GlyphName: "a159", Wx: 788.000000, Wy: 0.000000}, + "a16": {GlyphName: "a16", Wx: 933.000000, Wy: 0.000000}, + "a160": {GlyphName: "a160", Wx: 894.000000, Wy: 0.000000}, + "a161": {GlyphName: "a161", Wx: 838.000000, Wy: 0.000000}, + "a162": {GlyphName: "a162", Wx: 924.000000, Wy: 0.000000}, + "a163": {GlyphName: "a163", Wx: 1016.000000, Wy: 0.000000}, + "a164": {GlyphName: "a164", Wx: 458.000000, Wy: 0.000000}, + "a165": {GlyphName: "a165", Wx: 924.000000, Wy: 0.000000}, + "a166": {GlyphName: "a166", Wx: 918.000000, Wy: 0.000000}, + "a167": {GlyphName: "a167", Wx: 927.000000, Wy: 0.000000}, + "a168": {GlyphName: "a168", Wx: 928.000000, Wy: 0.000000}, + "a169": {GlyphName: "a169", Wx: 928.000000, Wy: 0.000000}, + "a17": {GlyphName: "a17", Wx: 945.000000, Wy: 0.000000}, + "a170": {GlyphName: "a170", Wx: 834.000000, Wy: 0.000000}, + "a171": {GlyphName: "a171", Wx: 873.000000, Wy: 0.000000}, + "a172": {GlyphName: "a172", Wx: 828.000000, Wy: 0.000000}, + "a173": {GlyphName: "a173", Wx: 924.000000, Wy: 0.000000}, + "a174": {GlyphName: "a174", Wx: 917.000000, Wy: 0.000000}, + "a175": {GlyphName: "a175", Wx: 930.000000, Wy: 0.000000}, + "a176": {GlyphName: "a176", Wx: 931.000000, Wy: 0.000000}, + "a177": {GlyphName: "a177", Wx: 463.000000, Wy: 0.000000}, + "a178": {GlyphName: "a178", Wx: 883.000000, Wy: 0.000000}, + "a179": {GlyphName: "a179", Wx: 836.000000, Wy: 0.000000}, + "a18": {GlyphName: "a18", Wx: 974.000000, Wy: 0.000000}, + "a180": {GlyphName: "a180", Wx: 867.000000, Wy: 0.000000}, + "a181": {GlyphName: "a181", Wx: 696.000000, Wy: 0.000000}, + "a182": {GlyphName: "a182", Wx: 874.000000, Wy: 0.000000}, + "a183": {GlyphName: "a183", Wx: 760.000000, Wy: 0.000000}, + "a184": {GlyphName: "a184", Wx: 946.000000, Wy: 0.000000}, + "a185": {GlyphName: "a185", Wx: 865.000000, Wy: 0.000000}, + "a186": {GlyphName: "a186", Wx: 967.000000, Wy: 0.000000}, + "a187": {GlyphName: "a187", Wx: 831.000000, Wy: 0.000000}, + "a188": {GlyphName: "a188", Wx: 873.000000, Wy: 0.000000}, + "a189": {GlyphName: "a189", Wx: 927.000000, Wy: 0.000000}, + "a19": {GlyphName: "a19", Wx: 755.000000, Wy: 0.000000}, + "a190": {GlyphName: "a190", Wx: 970.000000, Wy: 0.000000}, + "a191": {GlyphName: "a191", Wx: 918.000000, Wy: 0.000000}, + "a192": {GlyphName: "a192", Wx: 748.000000, Wy: 0.000000}, + "a193": {GlyphName: "a193", Wx: 836.000000, Wy: 0.000000}, + "a194": {GlyphName: "a194", Wx: 771.000000, Wy: 0.000000}, + "a195": {GlyphName: "a195", Wx: 888.000000, Wy: 0.000000}, + "a196": {GlyphName: "a196", Wx: 748.000000, Wy: 0.000000}, + "a197": {GlyphName: "a197", Wx: 771.000000, Wy: 0.000000}, + "a198": {GlyphName: "a198", Wx: 888.000000, Wy: 0.000000}, + "a199": {GlyphName: "a199", Wx: 867.000000, Wy: 0.000000}, + "a2": {GlyphName: "a2", Wx: 961.000000, Wy: 0.000000}, + "a20": {GlyphName: "a20", Wx: 846.000000, Wy: 0.000000}, + "a200": {GlyphName: "a200", Wx: 696.000000, Wy: 0.000000}, + "a201": {GlyphName: "a201", Wx: 874.000000, Wy: 0.000000}, + "a202": {GlyphName: "a202", Wx: 974.000000, Wy: 0.000000}, + "a203": {GlyphName: "a203", Wx: 762.000000, Wy: 0.000000}, + "a204": {GlyphName: "a204", Wx: 759.000000, Wy: 0.000000}, + "a205": {GlyphName: "a205", Wx: 509.000000, Wy: 0.000000}, + "a206": {GlyphName: "a206", Wx: 410.000000, Wy: 0.000000}, + "a21": {GlyphName: "a21", Wx: 762.000000, Wy: 0.000000}, + "a22": {GlyphName: "a22", Wx: 761.000000, Wy: 0.000000}, + "a23": {GlyphName: "a23", Wx: 571.000000, Wy: 0.000000}, + "a24": {GlyphName: "a24", Wx: 677.000000, Wy: 0.000000}, + "a25": {GlyphName: "a25", Wx: 763.000000, Wy: 0.000000}, + "a26": {GlyphName: "a26", Wx: 760.000000, Wy: 0.000000}, + "a27": {GlyphName: "a27", Wx: 759.000000, Wy: 0.000000}, + "a28": {GlyphName: "a28", Wx: 754.000000, Wy: 0.000000}, + "a29": {GlyphName: "a29", Wx: 786.000000, Wy: 0.000000}, + "a3": {GlyphName: "a3", Wx: 980.000000, Wy: 0.000000}, + "a30": {GlyphName: "a30", Wx: 788.000000, Wy: 0.000000}, + "a31": {GlyphName: "a31", Wx: 788.000000, Wy: 0.000000}, + "a32": {GlyphName: "a32", Wx: 790.000000, Wy: 0.000000}, + "a33": {GlyphName: "a33", Wx: 793.000000, Wy: 0.000000}, + "a34": {GlyphName: "a34", Wx: 794.000000, Wy: 0.000000}, + "a35": {GlyphName: "a35", Wx: 816.000000, Wy: 0.000000}, + "a36": {GlyphName: "a36", Wx: 823.000000, Wy: 0.000000}, + "a37": {GlyphName: "a37", Wx: 789.000000, Wy: 0.000000}, + "a38": {GlyphName: "a38", Wx: 841.000000, Wy: 0.000000}, + "a39": {GlyphName: "a39", Wx: 823.000000, Wy: 0.000000}, + "a4": {GlyphName: "a4", Wx: 719.000000, Wy: 0.000000}, + "a40": {GlyphName: "a40", Wx: 833.000000, Wy: 0.000000}, + "a41": {GlyphName: "a41", Wx: 816.000000, Wy: 0.000000}, + "a42": {GlyphName: "a42", Wx: 831.000000, Wy: 0.000000}, + "a43": {GlyphName: "a43", Wx: 923.000000, Wy: 0.000000}, + "a44": {GlyphName: "a44", Wx: 744.000000, Wy: 0.000000}, + "a45": {GlyphName: "a45", Wx: 723.000000, Wy: 0.000000}, + "a46": {GlyphName: "a46", Wx: 749.000000, Wy: 0.000000}, + "a47": {GlyphName: "a47", Wx: 790.000000, Wy: 0.000000}, + "a48": {GlyphName: "a48", Wx: 792.000000, Wy: 0.000000}, + "a49": {GlyphName: "a49", Wx: 695.000000, Wy: 0.000000}, + "a5": {GlyphName: "a5", Wx: 789.000000, Wy: 0.000000}, + "a50": {GlyphName: "a50", Wx: 776.000000, Wy: 0.000000}, + "a51": {GlyphName: "a51", Wx: 768.000000, Wy: 0.000000}, + "a52": {GlyphName: "a52", Wx: 792.000000, Wy: 0.000000}, + "a53": {GlyphName: "a53", Wx: 759.000000, Wy: 0.000000}, + "a54": {GlyphName: "a54", Wx: 707.000000, Wy: 0.000000}, + "a55": {GlyphName: "a55", Wx: 708.000000, Wy: 0.000000}, + "a56": {GlyphName: "a56", Wx: 682.000000, Wy: 0.000000}, + "a57": {GlyphName: "a57", Wx: 701.000000, Wy: 0.000000}, + "a58": {GlyphName: "a58", Wx: 826.000000, Wy: 0.000000}, + "a59": {GlyphName: "a59", Wx: 815.000000, Wy: 0.000000}, + "a6": {GlyphName: "a6", Wx: 494.000000, Wy: 0.000000}, + "a60": {GlyphName: "a60", Wx: 789.000000, Wy: 0.000000}, + "a61": {GlyphName: "a61", Wx: 789.000000, Wy: 0.000000}, + "a62": {GlyphName: "a62", Wx: 707.000000, Wy: 0.000000}, + "a63": {GlyphName: "a63", Wx: 687.000000, Wy: 0.000000}, + "a64": {GlyphName: "a64", Wx: 696.000000, Wy: 0.000000}, + "a65": {GlyphName: "a65", Wx: 689.000000, Wy: 0.000000}, + "a66": {GlyphName: "a66", Wx: 786.000000, Wy: 0.000000}, + "a67": {GlyphName: "a67", Wx: 787.000000, Wy: 0.000000}, + "a68": {GlyphName: "a68", Wx: 713.000000, Wy: 0.000000}, + "a69": {GlyphName: "a69", Wx: 791.000000, Wy: 0.000000}, + "a7": {GlyphName: "a7", Wx: 552.000000, Wy: 0.000000}, + "a70": {GlyphName: "a70", Wx: 785.000000, Wy: 0.000000}, + "a71": {GlyphName: "a71", Wx: 791.000000, Wy: 0.000000}, + "a72": {GlyphName: "a72", Wx: 873.000000, Wy: 0.000000}, + "a73": {GlyphName: "a73", Wx: 761.000000, Wy: 0.000000}, + "a74": {GlyphName: "a74", Wx: 762.000000, Wy: 0.000000}, + "a75": {GlyphName: "a75", Wx: 759.000000, Wy: 0.000000}, + "a76": {GlyphName: "a76", Wx: 892.000000, Wy: 0.000000}, + "a77": {GlyphName: "a77", Wx: 892.000000, Wy: 0.000000}, + "a78": {GlyphName: "a78", Wx: 788.000000, Wy: 0.000000}, + "a79": {GlyphName: "a79", Wx: 784.000000, Wy: 0.000000}, + "a8": {GlyphName: "a8", Wx: 537.000000, Wy: 0.000000}, + "a81": {GlyphName: "a81", Wx: 438.000000, Wy: 0.000000}, + "a82": {GlyphName: "a82", Wx: 138.000000, Wy: 0.000000}, + "a83": {GlyphName: "a83", Wx: 277.000000, Wy: 0.000000}, + "a84": {GlyphName: "a84", Wx: 415.000000, Wy: 0.000000}, + "a85": {GlyphName: "a85", Wx: 509.000000, Wy: 0.000000}, + "a86": {GlyphName: "a86", Wx: 410.000000, Wy: 0.000000}, + "a87": {GlyphName: "a87", Wx: 234.000000, Wy: 0.000000}, + "a88": {GlyphName: "a88", Wx: 234.000000, Wy: 0.000000}, + "a89": {GlyphName: "a89", Wx: 390.000000, Wy: 0.000000}, + "a9": {GlyphName: "a9", Wx: 577.000000, Wy: 0.000000}, + "a90": {GlyphName: "a90", Wx: 390.000000, Wy: 0.000000}, + "a91": {GlyphName: "a91", Wx: 276.000000, Wy: 0.000000}, + "a92": {GlyphName: "a92", Wx: 276.000000, Wy: 0.000000}, + "a93": {GlyphName: "a93", Wx: 317.000000, Wy: 0.000000}, + "a94": {GlyphName: "a94", Wx: 317.000000, Wy: 0.000000}, + "a95": {GlyphName: "a95", Wx: 334.000000, Wy: 0.000000}, + "a96": {GlyphName: "a96", Wx: 334.000000, Wy: 0.000000}, + "a97": {GlyphName: "a97", Wx: 392.000000, Wy: 0.000000}, + "a98": {GlyphName: "a98", Wx: 392.000000, Wy: 0.000000}, + "a99": {GlyphName: "a99", Wx: 668.000000, Wy: 0.000000}, + "space": {GlyphName: "space", Wx: 278.000000, Wy: 0.000000}, +} diff --git a/internal/pdf/model/forms.go b/internal/pdf/model/forms.go new file mode 100644 index 0000000..1f7289c --- /dev/null +++ b/internal/pdf/model/forms.go @@ -0,0 +1,412 @@ +package model + +import ( + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// High level manipulation of forms (AcroForm). +type PdfAcroForm struct { + Fields *[]*PdfField + NeedAppearances *core.PdfObjectBool + SigFlags *core.PdfObjectInteger + CO *core.PdfObjectArray + DR *PdfPageResources + DA *core.PdfObjectString + Q *core.PdfObjectInteger + XFA core.PdfObject + + primitive *core.PdfIndirectObject +} + +func NewPdfAcroForm() *PdfAcroForm { + acroForm := &PdfAcroForm{} + + container := &core.PdfIndirectObject{} + container.PdfObject = core.MakeDict() + + acroForm.primitive = container + return acroForm +} + +// Used when loading forms from PDF files. +func (r *PdfReader) newPdfAcroFormFromDict(d *core.PdfObjectDictionary) (*PdfAcroForm, error) { + acroForm := NewPdfAcroForm() + + if obj := d.Get("Fields"); obj != nil { + obj, err := r.traceToObject(obj) + if err != nil { + return nil, err + } + fieldArray, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("fields not an array (%T)", obj) + } + + fields := []*PdfField{} + for _, obj := range *fieldArray { + obj, err := r.traceToObject(obj) + if err != nil { + return nil, err + } + container, isIndirect := obj.(*core.PdfIndirectObject) + if !isIndirect { + if _, isNull := obj.(*core.PdfObjectNull); isNull { + common.Log.Trace("Skipping over null field") + continue + } + common.Log.Debug("Field not contained in indirect object %T", obj) + return nil, fmt.Errorf("field not in an indirect object") + } + field, err := r.newPdfFieldFromIndirectObject(container, nil) + if err != nil { + return nil, err + } + common.Log.Trace("AcroForm Field: %+v", *field) + fields = append(fields, field) + } + acroForm.Fields = &fields + } + + if obj := d.Get("NeedAppearances"); obj != nil { + val, ok := obj.(*core.PdfObjectBool) + if ok { + acroForm.NeedAppearances = val + } else { + common.Log.Debug("error: NeedAppearances invalid (got %T)", obj) + } + } + + if obj := d.Get("SigFlags"); obj != nil { + val, ok := obj.(*core.PdfObjectInteger) + if ok { + acroForm.SigFlags = val + } else { + common.Log.Debug("error: SigFlags invalid (got %T)", obj) + } + } + + if obj := d.Get("CO"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if ok { + acroForm.CO = arr + } else { + common.Log.Debug("error: CO invalid (got %T)", obj) + } + } + + if obj := d.Get("DR"); obj != nil { + obj = core.TraceToDirectObject(obj) + if d, ok := obj.(*core.PdfObjectDictionary); ok { + resources, err := NewPdfPageResourcesFromDict(d) + if err != nil { + common.Log.Error("invalid DR: %v", err) + return nil, err + } + + acroForm.DR = resources + } else { + common.Log.Debug("error: DR invalid (got %T)", obj) + } + } + + if obj := d.Get("DA"); obj != nil { + str, ok := obj.(*core.PdfObjectString) + if ok { + acroForm.DA = str + } else { + common.Log.Debug("error: DA invalid (got %T)", obj) + } + } + + if obj := d.Get("Q"); obj != nil { + val, ok := obj.(*core.PdfObjectInteger) + if ok { + acroForm.Q = val + } else { + common.Log.Debug("error: Q invalid (got %T)", obj) + } + } + + if obj := d.Get("XFA"); obj != nil { + acroForm.XFA = obj + } + + return acroForm, nil +} + +func (af *PdfAcroForm) GetContainingPdfObject() core.PdfObject { + return af.primitive +} + +func (af *PdfAcroForm) ToPdfObject() core.PdfObject { + container := af.primitive + dict := container.PdfObject.(*core.PdfObjectDictionary) + + if af.Fields != nil { + arr := core.PdfObjectArray{} + for _, field := range *af.Fields { + arr = append(arr, field.ToPdfObject()) + } + dict.Set("Fields", &arr) + } + + if af.NeedAppearances != nil { + dict.Set("NeedAppearances", af.NeedAppearances) + } + if af.SigFlags != nil { + dict.Set("SigFlags", af.SigFlags) + + } + if af.CO != nil { + dict.Set("CO", af.CO) + } + if af.DR != nil { + dict.Set("DR", af.DR.ToPdfObject()) + } + if af.DA != nil { + dict.Set("DA", af.DA) + } + if af.Q != nil { + dict.Set("Q", af.Q) + } + if af.XFA != nil { + dict.Set("XFA", af.XFA) + } + + return container +} + +// PdfField represents a field of an interactive form. +// Implements PdfModel interface. +type PdfField struct { + FT *core.PdfObjectName // field type + Parent *PdfField + // In a non-terminal field, the Kids array shall refer to field dictionaries that are immediate descendants of this field. + // In a terminal field, the Kids array ordinarily shall refer to one or more separate widget annotations that are associated + // with this field. However, if there is only one associated widget annotation, and its contents have been merged into the field + // dictionary, Kids shall be omitted. + KidsF []PdfModel // Kids can be array of other fields or widgets (PdfModel). + KidsA []*PdfAnnotation + T core.PdfObject + TU core.PdfObject + TM core.PdfObject + Ff core.PdfObject // field flag + V core.PdfObject //value + DV core.PdfObject + AA core.PdfObject + + // Variable Text: + DA core.PdfObject + Q core.PdfObject + DS core.PdfObject + RV core.PdfObject + + primitive *core.PdfIndirectObject +} + +func NewPdfField() *PdfField { + field := &PdfField{} + + container := &core.PdfIndirectObject{} + container.PdfObject = core.MakeDict() + + field.primitive = container + return field +} + +// Used when loading fields from PDF files. +func (r *PdfReader) newPdfFieldFromIndirectObject(container *core.PdfIndirectObject, parent *PdfField) (*PdfField, error) { + d, isDict := container.PdfObject.(*core.PdfObjectDictionary) + if !isDict { + return nil, fmt.Errorf("pdf Field indirect object not containing a dictionary") + } + + field := NewPdfField() + + // Field type (required in terminal fields). + // Can be /Btn /Tx /Ch /Sig + // Required for a terminal field (inheritable). + var err error + if obj := d.Get("FT"); obj != nil { + obj, err = r.traceToObject(obj) + if err != nil { + return nil, err + } + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("invalid type of FT field (%T)", obj) + } + + field.FT = name + } + + // Partial field name (Optional) + field.T = d.Get("T") + // Alternate description (Optional) + field.TU = d.Get("TU") + // Mapping name (Optional) + field.TM = d.Get("TM") + // Field flag. (Optional; inheritable) + field.Ff = d.Get("Ff") + // Value (Optional; inheritable) - Various types depending on the field type. + field.V = d.Get("V") + // Default value for reset (Optional; inheritable) + field.DV = d.Get("DV") + // Additional actions dictionary (Optional) + field.AA = d.Get("AA") + + // Variable text: + field.DA = d.Get("DA") + field.Q = d.Get("Q") + field.DS = d.Get("DS") + field.RV = d.Get("RV") + + // In a non-terminal field, the Kids array shall refer to field dictionaries that are immediate descendants of this field. + // In a terminal field, the Kids array ordinarily shall refer to one or more separate widget annotations that are associated + // with this field. However, if there is only one associated widget annotation, and its contents have been merged into the field + // dictionary, Kids shall be omitted. + + // Set ourself? + if parent != nil { + field.Parent = parent + } + + // Has a merged-in widget annotation? + if obj := d.Get("Subtype"); obj != nil { + obj, err = r.traceToObject(obj) + if err != nil { + return nil, err + } + common.Log.Trace("Merged in annotation (%T)", obj) + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, fmt.Errorf("invalid type of Subtype (%T)", obj) + } + if *name == "Widget" { + // Is a merged field / widget dict. + + // Check if the annotation has already been loaded? + // Most likely referenced to by a page... Could be in either direction. + // r.newPdfAnnotationFromIndirectObject acts as a caching mechanism. + annot, err := r.newPdfAnnotationFromIndirectObject(container) + if err != nil { + return nil, err + } + widget, ok := annot.GetContext().(*PdfAnnotationWidget) + if !ok { + return nil, fmt.Errorf("invalid widget") + } + + widget.Parent = field.GetContainingPdfObject() + field.KidsA = append(field.KidsA, annot) + return field, nil + } + } + + if obj := d.Get("Kids"); obj != nil { + obj, err := r.traceToObject(obj) + if err != nil { + return nil, err + } + fieldArray, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("kids not an array (%T)", obj) + } + + field.KidsF = []PdfModel{} + for _, obj := range *fieldArray { + obj, err := r.traceToObject(obj) + if err != nil { + return nil, err + } + + container, isIndirect := obj.(*core.PdfIndirectObject) + if !isIndirect { + return nil, fmt.Errorf("not an indirect object (form field)") + } + + childField, err := r.newPdfFieldFromIndirectObject(container, field) + if err != nil { + return nil, err + } + + field.KidsF = append(field.KidsF, childField) + } + } + + return field, nil +} + +func (pf *PdfField) GetContainingPdfObject() core.PdfObject { + return pf.primitive +} + +// If Kids refer only to a single pdf widget annotation widget, then can merge it in. +// Currently not merging it in. +func (pf *PdfField) ToPdfObject() core.PdfObject { + container := pf.primitive + dict := container.PdfObject.(*core.PdfObjectDictionary) + + if pf.Parent != nil { + dict.Set("Parent", pf.Parent.GetContainingPdfObject()) + } + + if pf.KidsF != nil { + // Create an array of the kids (fields or widgets). + common.Log.Trace("KidsF: %+v", pf.KidsF) + arr := core.PdfObjectArray{} + for _, child := range pf.KidsF { + arr = append(arr, child.ToPdfObject()) + } + dict.Set("Kids", &arr) + } + if pf.KidsA != nil { + common.Log.Trace("KidsA: %+v", pf.KidsA) + _, hasKids := dict.Get("Kids").(*core.PdfObjectArray) + if !hasKids { + dict.Set("Kids", &core.PdfObjectArray{}) + } + arr := dict.Get("Kids").(*core.PdfObjectArray) + for _, child := range pf.KidsA { + *arr = append(*arr, child.GetContext().ToPdfObject()) + } + } + + if pf.FT != nil { + dict.Set("FT", pf.FT) + } + + if pf.T != nil { + dict.Set("T", pf.T) + } + if pf.TU != nil { + dict.Set("TU", pf.TU) + } + if pf.TM != nil { + dict.Set("TM", pf.TM) + } + if pf.Ff != nil { + dict.Set("Ff", pf.Ff) + } + if pf.V != nil { + dict.Set("V", pf.V) + } + if pf.DV != nil { + dict.Set("DV", pf.DV) + } + if pf.AA != nil { + dict.Set("AA", pf.AA) + } + + // Variable text: + dict.SetIfNotNil("DA", pf.DA) + dict.SetIfNotNil("Q", pf.Q) + dict.SetIfNotNil("DS", pf.DS) + dict.SetIfNotNil("RV", pf.RV) + + return container +} diff --git a/internal/pdf/model/functions.go b/internal/pdf/model/functions.go new file mode 100644 index 0000000..f1b1e18 --- /dev/null +++ b/internal/pdf/model/functions.go @@ -0,0 +1,853 @@ +package model + +import ( + "errors" + "math" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/sampling" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/ps" +) + +type PdfValue any + +type PdfFunction interface { + Evaluate([]float64) ([]float64, error) + ToPdfObject() core.PdfObject +} + +// In PDF: A function object may be a dictionary or a stream, depending on the type of function. +// - Stream: Type 0, Type 4 +// - Dictionary: Type 2, Type 3. + +// Loads a PDF Function from a PdfObject (can be either stream or dictionary). +func newPdfFunctionFromPdfObject(obj core.PdfObject) (PdfFunction, error) { + if stream, is := obj.(*core.PdfObjectStream); is { + dict := stream.PdfObjectDictionary + + ftype, ok := dict.Get("FunctionType").(*core.PdfObjectInteger) + if !ok { + common.Log.Error("FunctionType number missing") + return nil, errors.New("invalid parameter or missing") + } + + switch *ftype { + case 0: + return newPdfFunctionType0FromStream(stream) + case 4: + return newPdfFunctionType4FromStream(stream) + default: + return nil, errors.New("invalid function type") + } + + } else if indObj, is := obj.(*core.PdfIndirectObject); is { + // Indirect object containing a dictionary. + // The indirect object is the container (which is tracked). + dict, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + common.Log.Error("Function Indirect object not containing dictionary") + return nil, errors.New("invalid parameter or missing") + } + + ftype, ok := dict.Get("FunctionType").(*core.PdfObjectInteger) + if !ok { + common.Log.Error("FunctionType number missing") + return nil, errors.New("invalid parameter or missing") + } + + switch *ftype { + case 2: + return newPdfFunctionType2FromPdfObject(indObj) + case 3: + return newPdfFunctionType3FromPdfObject(indObj) + default: + return nil, errors.New("invalid function type") + } + } else if dict, is := obj.(*core.PdfObjectDictionary); is { + ftype, ok := dict.Get("FunctionType").(*core.PdfObjectInteger) + if !ok { + common.Log.Error("FunctionType number missing") + return nil, errors.New("invalid parameter or missing") + } + + switch *ftype { + case 2: + return newPdfFunctionType2FromPdfObject(dict) + case 3: + return newPdfFunctionType3FromPdfObject(dict) + default: + return nil, errors.New("invalid function type") + } + } else { + common.Log.Debug("Function Type error: %#v", obj) + return nil, errors.New("type error") + } +} + +// Simple linear interpolation from the PDF manual. +func interpolate(x, xmin, xmax, ymin, ymax float64) float64 { + if math.Abs(xmax-xmin) < 0.000001 { + return ymin + } + + y := ymin + (x-xmin)*(ymax-ymin)/(xmax-xmin) + return y +} + +// Type 0 functions use a sequence of sample values (contained in a stream) to provide an approximation +// for functions whose domains and ranges are bounded. The samples are organized as an m-dimensional +// table in which each entry has n components +type PdfFunctionType0 struct { + Domain []float64 // required; 2*m length; where m is the number of input values + Range []float64 // required (type 0); 2*n length; where n is the number of output values + + NumInputs int + NumOutputs int + + Size []int + BitsPerSample int + Order int // Values 1 or 3 (linear or cubic spline interpolation) + Encode []float64 + Decode []float64 + + rawData []byte + data []uint32 + + container *core.PdfObjectStream +} + +// Construct the PDF function object from a stream object (typically loaded from a PDF file). +func newPdfFunctionType0FromStream(stream *core.PdfObjectStream) (*PdfFunctionType0, error) { + fun := &PdfFunctionType0{} + + fun.container = stream + + dict := stream.PdfObjectDictionary + + // Domain + array, has := core.TraceToDirectObject(dict.Get("Domain")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Domain not specified") + return nil, errors.New("required attribute missing or invalid") + } + if len(*array)%2 != 0 { + common.Log.Error("Domain invalid") + return nil, errors.New("invalid domain range") + } + fun.NumInputs = len(*array) / 2 + domain, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Domain = domain + + // Range + array, has = core.TraceToDirectObject(dict.Get("Range")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Range not specified") + return nil, errors.New("required attribute missing or invalid") + } + if len(*array)%2 != 0 { + return nil, errors.New("invalid range") + } + fun.NumOutputs = len(*array) / 2 + rang, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Range = rang + + // Number of samples in each input dimension + array, has = core.TraceToDirectObject(dict.Get("Size")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Size not specified") + return nil, errors.New("required attribute missing or invalid") + } + tablesize, err := array.ToIntegerArray() + if err != nil { + return nil, err + } + if len(tablesize) != fun.NumInputs { + common.Log.Error("Table size not matching number of inputs") + return nil, errors.New("range check") + } + fun.Size = tablesize + + // BitsPerSample + bps, has := core.TraceToDirectObject(dict.Get("BitsPerSample")).(*core.PdfObjectInteger) + if !has { + common.Log.Error("BitsPerSample not specified") + return nil, errors.New("required attribute missing or invalid") + } + if *bps != 1 && *bps != 2 && *bps != 4 && *bps != 8 && *bps != 12 && *bps != 16 && *bps != 24 && *bps != 32 { + common.Log.Error("Bits per sample outside range (%d)", *bps) + return nil, errors.New("range check") + } + fun.BitsPerSample = int(*bps) + + fun.Order = 1 + order, has := core.TraceToDirectObject(dict.Get("Order")).(*core.PdfObjectInteger) + if has { + if *order != 1 && *order != 3 { + common.Log.Error("invalid order (%d)", *order) + return nil, errors.New("range check") + } + fun.Order = int(*order) + } + + // Encode: is a 2*m array specifying the linear mapping of input values into the domain of the function's + // sample table. + array, has = core.TraceToDirectObject(dict.Get("Encode")).(*core.PdfObjectArray) + if has { + encode, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Encode = encode + } + + // Decode + array, has = core.TraceToDirectObject(dict.Get("Decode")).(*core.PdfObjectArray) + if has { + decode, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Decode = decode + } + + data, err := core.DecodeStream(stream) + if err != nil { + return nil, err + } + fun.rawData = data + + return fun, nil +} + +func (pft *PdfFunctionType0) ToPdfObject() core.PdfObject { + container := pft.container + if container != nil { + pft.container = &core.PdfObjectStream{} + } + + dict := core.MakeDict() + dict.Set("FunctionType", core.MakeInteger(0)) + + // Domain (required). + domainArray := &core.PdfObjectArray{} + for _, val := range pft.Domain { + domainArray.Append(core.MakeFloat(val)) + } + dict.Set("Domain", domainArray) + + // Range (required). + rangeArray := &core.PdfObjectArray{} + for _, val := range pft.Range { + rangeArray.Append(core.MakeFloat(val)) + } + dict.Set("Range", rangeArray) + + // Size (required). + sizeArray := &core.PdfObjectArray{} + for _, val := range pft.Size { + sizeArray.Append(core.MakeInteger(int64(val))) + } + dict.Set("Size", sizeArray) + + dict.Set("BitsPerSample", core.MakeInteger(int64(pft.BitsPerSample))) + + if pft.Order != 1 { + dict.Set("Order", core.MakeInteger(int64(pft.Order))) + } + + // TODO: Encode. + // Either here, or automatically later on when writing out. + dict.Set("Length", core.MakeInteger(int64(len(pft.rawData)))) + container.Stream = pft.rawData + + container.PdfObjectDictionary = dict + return container +} + +func (pft *PdfFunctionType0) Evaluate(x []float64) ([]float64, error) { + if len(x) != pft.NumInputs { + common.Log.Error("Number of inputs not matching what is needed") + return nil, errors.New("range check error") + } + + if pft.data == nil { + // Process the samples if not already done. + err := pft.processSamples() + if err != nil { + return nil, err + } + } + + // Fall back to default Encode/Decode params if not set. + encode := pft.Encode + if encode == nil { + encode = []float64{} + for i := 0; i < len(pft.Size); i++ { + encode = append(encode, 0) + encode = append(encode, float64(pft.Size[i]-1)) + } + } + decode := pft.Decode + if decode == nil { + decode = pft.Range + } + + indices := []int{} + // Start with nearest neighbour interpolation. + for i := 0; i < len(x); i++ { + xi := x[i] + + xip := math.Min(math.Max(xi, pft.Domain[2*i]), pft.Domain[2*i+1]) + + ei := interpolate(xip, pft.Domain[2*i], pft.Domain[2*i+1], encode[2*i], encode[2*i+1]) + eip := math.Min(math.Max(ei, 0), float64(pft.Size[i])) + // eip represents coordinate into the data table. + // At this point it is real values. + + // Interpolation shall be used to to determine output values + // from the nearest surrounding values in the sample table. + + // Initial implementation is simply nearest neighbour. + // Then will add the linear and possibly bicubic/spline. + index := int(math.Floor(eip + 0.5)) + if index < 0 { + index = 0 + } else if index > pft.Size[i] { + index = pft.Size[i] - 1 + } + indices = append(indices, index) + + } + + // Calculate the index + m := indices[0] + for i := 1; i < pft.NumInputs; i++ { + add := indices[i] + for j := 0; j < i; j++ { + add *= pft.Size[j] + } + m += add + } + m *= pft.NumOutputs + + // Output values. + outputs := []float64{} + for j := 0; j < pft.NumOutputs; j++ { + rj := pft.data[m+j] + rjp := interpolate(float64(rj), 0, math.Pow(2, float64(pft.BitsPerSample)), decode[2*j], decode[2*j+1]) + yj := math.Min(math.Max(rjp, pft.Range[2*j]), pft.Range[2*j+1]) + outputs = append(outputs, yj) + } + + return outputs, nil +} + +// Convert raw data to data table. The maximum supported BitsPerSample is 32, so we store the resulting data +// in a uint32 array. This is somewhat wasteful in the case of a small BitsPerSample, but these tables are +// presumably not huge at any rate. +func (pft *PdfFunctionType0) processSamples() error { + data := sampling.ResampleBytes(pft.rawData, pft.BitsPerSample) + pft.data = data + + return nil +} + +// Type 2 functions define an exponential interpolation of one input value and n +// output values: +// +// f(x) = y_0, ..., y_(n-1) +// +// y_j = C0_j + x^N * (C1_j - C0_j); for 0 <= j < n +// When N=1 ; linear interpolation between C0 and C1. +type PdfFunctionType2 struct { + Domain []float64 + Range []float64 + + C0 []float64 + C1 []float64 + N float64 + + container *core.PdfIndirectObject +} + +// Can be either indirect object or dictionary. If indirect, then must be holding a dictionary, +// i.e. acting as a container. When converting back to pdf object, will use the container provided. + +func newPdfFunctionType2FromPdfObject(obj core.PdfObject) (*PdfFunctionType2, error) { + fun := &PdfFunctionType2{} + + var dict *core.PdfObjectDictionary + if indObj, is := obj.(*core.PdfIndirectObject); is { + d, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("type check error") + } + fun.container = indObj + dict = d + } else if d, is := obj.(*core.PdfObjectDictionary); is { + dict = d + } else { + return nil, errors.New("type check error") + } + + common.Log.Trace("FUNC2: %s", dict.String()) + + // Domain + array, has := core.TraceToDirectObject(dict.Get("Domain")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Domain not specified") + return nil, errors.New("required attribute missing or invalid") + } + if len(*array)%2 != 0 { + common.Log.Error("Domain range invalid") + return nil, errors.New("invalid domain range") + } + domain, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Domain = domain + + // Range + array, has = core.TraceToDirectObject(dict.Get("Range")).(*core.PdfObjectArray) + if has { + if len(*array)%2 != 0 { + return nil, errors.New("invalid range") + } + + rang, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Range = rang + } + + // C0. + array, has = core.TraceToDirectObject(dict.Get("C0")).(*core.PdfObjectArray) + if has { + c0, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.C0 = c0 + } + + // C1. + array, has = core.TraceToDirectObject(dict.Get("C1")).(*core.PdfObjectArray) + if has { + c1, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.C1 = c1 + } + + if len(fun.C0) != len(fun.C1) { + common.Log.Error("C0 and C1 not matching") + return nil, errors.New("range check") + } + + // Exponent. + N, err := getNumberAsFloat(core.TraceToDirectObject(dict.Get("N"))) + if err != nil { + common.Log.Error("N missing or invalid, dict: %s", dict.String()) + return nil, err + } + fun.N = N + + return fun, nil +} + +func (ftt *PdfFunctionType2) ToPdfObject() core.PdfObject { + dict := core.MakeDict() + + dict.Set("FunctionType", core.MakeInteger(2)) + + // Domain (required). + domainArray := &core.PdfObjectArray{} + for _, val := range ftt.Domain { + domainArray.Append(core.MakeFloat(val)) + } + dict.Set("Domain", domainArray) + + // Range (required). + if ftt.Range != nil { + rangeArray := &core.PdfObjectArray{} + for _, val := range ftt.Range { + rangeArray.Append(core.MakeFloat(val)) + } + dict.Set("Range", rangeArray) + } + + // C0. + if ftt.C0 != nil { + c0Array := &core.PdfObjectArray{} + for _, val := range ftt.C0 { + c0Array.Append(core.MakeFloat(val)) + } + dict.Set("C0", c0Array) + } + + // C1. + if ftt.C1 != nil { + c1Array := &core.PdfObjectArray{} + for _, val := range ftt.C1 { + c1Array.Append(core.MakeFloat(val)) + } + dict.Set("C1", c1Array) + } + + // exponent + dict.Set("N", core.MakeFloat(ftt.N)) + + // Wrap in a container if we have one already specified. + if ftt.container != nil { + ftt.container.PdfObject = dict + return ftt.container + } else { + return dict + } + +} + +func (ftt *PdfFunctionType2) Evaluate(x []float64) ([]float64, error) { + if len(x) != 1 { + common.Log.Error("Only one input allowed") + return nil, errors.New("range check") + } + + // Prepare. + c0 := []float64{0.0} + if ftt.C0 != nil { + c0 = ftt.C0 + } + c1 := []float64{1.0} + if ftt.C1 != nil { + c1 = ftt.C1 + } + + y := []float64{} + for i := 0; i < len(c0); i++ { + yi := c0[i] + math.Pow(x[0], ftt.N)*(c1[i]-c0[i]) + y = append(y, yi) + } + + return y, nil +} + +// Type 3 functions define stitching of the subdomains of serveral 1-input functions to produce +// a single new 1-input function. +type PdfFunctionType3 struct { + Domain []float64 + Range []float64 + + Functions []PdfFunction // k-1 input functions + Bounds []float64 // k-1 numbers; defines the intervals where each function applies + Encode []float64 // Array of 2k numbers.. + + container *core.PdfIndirectObject +} + +func (*PdfFunctionType3) Evaluate(x []float64) ([]float64, error) { + if len(x) != 1 { + common.Log.Error("Only one input allowed") + return nil, errors.New("range check") + } + + // Determine which function to use + + // Encode + + return nil, errors.New("not implemented yet") +} + +func newPdfFunctionType3FromPdfObject(obj core.PdfObject) (*PdfFunctionType3, error) { + fun := &PdfFunctionType3{} + + var dict *core.PdfObjectDictionary + if indObj, is := obj.(*core.PdfIndirectObject); is { + d, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("type check error") + } + fun.container = indObj + dict = d + } else if d, is := obj.(*core.PdfObjectDictionary); is { + dict = d + } else { + return nil, errors.New("type check error") + } + + // Domain + array, has := core.TraceToDirectObject(dict.Get("Domain")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Domain not specified") + return nil, errors.New("required attribute missing or invalid") + } + if len(*array) != 2 { + common.Log.Error("Domain invalid") + return nil, errors.New("invalid domain range") + } + domain, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Domain = domain + + // Range + array, has = core.TraceToDirectObject(dict.Get("Range")).(*core.PdfObjectArray) + if has { + if len(*array)%2 != 0 { + return nil, errors.New("invalid range") + } + rang, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Range = rang + } + + // Functions. + array, has = core.TraceToDirectObject(dict.Get("Functions")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Functions not specified") + return nil, errors.New("required attribute missing or invalid") + } + fun.Functions = []PdfFunction{} + for _, obj := range *array { + subf, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + return nil, err + } + fun.Functions = append(fun.Functions, subf) + } + + // Bounds + array, has = core.TraceToDirectObject(dict.Get("Bounds")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Bounds not specified") + return nil, errors.New("required attribute missing or invalid") + } + bounds, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Bounds = bounds + if len(fun.Bounds) != len(fun.Functions)-1 { + common.Log.Error("Bounds (%d) and num functions (%d) not matching", len(fun.Bounds), len(fun.Functions)) + return nil, errors.New("range check") + } + + // Encode. + array, has = core.TraceToDirectObject(dict.Get("Encode")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Encode not specified") + return nil, errors.New("required attribute missing or invalid") + } + encode, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Encode = encode + if len(fun.Encode) != 2*len(fun.Functions) { + common.Log.Error("Len encode (%d) and num functions (%d) not matching up", len(fun.Encode), len(fun.Functions)) + return nil, errors.New("range check") + } + + return fun, nil +} + +func (ftt *PdfFunctionType3) ToPdfObject() core.PdfObject { + dict := core.MakeDict() + + dict.Set("FunctionType", core.MakeInteger(3)) + + // Domain (required). + domainArray := &core.PdfObjectArray{} + for _, val := range ftt.Domain { + domainArray.Append(core.MakeFloat(val)) + } + dict.Set("Domain", domainArray) + + // Range (required). + if ftt.Range != nil { + rangeArray := &core.PdfObjectArray{} + for _, val := range ftt.Range { + rangeArray.Append(core.MakeFloat(val)) + } + dict.Set("Range", rangeArray) + } + + // Functions + if ftt.Functions != nil { + fArray := &core.PdfObjectArray{} + for _, fun := range ftt.Functions { + fArray.Append(fun.ToPdfObject()) + } + dict.Set("Functions", fArray) + } + + // Bounds. + if ftt.Bounds != nil { + bArray := &core.PdfObjectArray{} + for _, val := range ftt.Bounds { + bArray.Append(core.MakeFloat(val)) + } + dict.Set("Bounds", bArray) + } + + // Encode. + if ftt.Encode != nil { + eArray := &core.PdfObjectArray{} + for _, val := range ftt.Encode { + eArray.Append(core.MakeFloat(val)) + } + dict.Set("Encode", eArray) + } + + // Wrap in a container if we have one already specified. + if ftt.container != nil { + ftt.container.PdfObject = dict + return ftt.container + } else { + return dict + } +} + +// Type 4. Postscript calculator functions. +type PdfFunctionType4 struct { + Domain []float64 + Range []float64 + Program *ps.PSProgram + + executor *ps.PSExecutor + decodedData []byte + + container *core.PdfObjectStream +} + +// Input [x1 x2 x3] +func (ftt *PdfFunctionType4) Evaluate(xVec []float64) ([]float64, error) { + if ftt.executor == nil { + ftt.executor = ps.NewPSExecutor(ftt.Program) + } + + inputs := []ps.PSObject{} + for _, val := range xVec { + inputs = append(inputs, ps.MakeReal(val)) + } + + outputs, err := ftt.executor.Execute(inputs) + if err != nil { + return nil, err + } + + // After execution the outputs are on the stack [y1 ... yM] + // Convert to floats. + yVec, err := ps.PSObjectArrayToFloat64Array(outputs) + if err != nil { + return nil, err + } + + return yVec, nil +} + +// Load a type 4 function from a PDF stream object. +func newPdfFunctionType4FromStream(stream *core.PdfObjectStream) (*PdfFunctionType4, error) { + fun := &PdfFunctionType4{} + + fun.container = stream + + dict := stream.PdfObjectDictionary + + // Domain + array, has := core.TraceToDirectObject(dict.Get("Domain")).(*core.PdfObjectArray) + if !has { + common.Log.Error("Domain not specified") + return nil, errors.New("required attribute missing or invalid") + } + if len(*array)%2 != 0 { + common.Log.Error("Domain invalid") + return nil, errors.New("invalid domain range") + } + domain, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Domain = domain + + // Range + array, has = core.TraceToDirectObject(dict.Get("Range")).(*core.PdfObjectArray) + if has { + if len(*array)%2 != 0 { + return nil, errors.New("invalid range") + } + rang, err := array.ToFloat64Array() + if err != nil { + return nil, err + } + fun.Range = rang + } + + // Program. Decode the program and parse the PS code. + decoded, err := core.DecodeStream(stream) + if err != nil { + return nil, err + } + fun.decodedData = decoded + + psParser := ps.NewPSParser([]byte(decoded)) + prog, err := psParser.Parse() + if err != nil { + return nil, err + } + fun.Program = prog + + return fun, nil +} + +func (ftt *PdfFunctionType4) ToPdfObject() core.PdfObject { + container := ftt.container + if container == nil { + ftt.container = &core.PdfObjectStream{} + container = ftt.container + } + + dict := core.MakeDict() + dict.Set("FunctionType", core.MakeInteger(4)) + + // Domain (required). + domainArray := &core.PdfObjectArray{} + for _, val := range ftt.Domain { + domainArray.Append(core.MakeFloat(val)) + } + dict.Set("Domain", domainArray) + + // Range (required). + rangeArray := &core.PdfObjectArray{} + for _, val := range ftt.Range { + rangeArray.Append(core.MakeFloat(val)) + } + dict.Set("Range", rangeArray) + + if ftt.decodedData == nil && ftt.Program != nil { + // Update data. This is used for created functions (not parsed ones). + ftt.decodedData = []byte(ftt.Program.String()) + } + + // TODO: Encode. + // Either here, or automatically later on when writing out. + dict.Set("Length", core.MakeInteger(int64(len(ftt.decodedData)))) + + container.Stream = ftt.decodedData + container.PdfObjectDictionary = dict + + return container +} diff --git a/internal/pdf/model/image.go b/internal/pdf/model/image.go new file mode 100644 index 0000000..2a93ffd --- /dev/null +++ b/internal/pdf/model/image.go @@ -0,0 +1,294 @@ +package model + +import ( + "errors" + goimage "image" + gocolor "image/color" + "image/draw" + _ "image/gif" + _ "image/png" + "io" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/model/sampling" +) + +// Basic representation of an image. +// The colorspace is not specified, but must be known when handling the image. +type Image struct { + Width int64 // The width of the image in samples + Height int64 // The height of the image in samples + BitsPerComponent int64 // The number of bits per color component + ColorComponents int // Color components per pixel + Data []byte // Image data stored as bytes. + + // Transparency data: alpha channel. + // Stored in same bits per component as original data with 1 color component. + alphaData []byte // Alpha channel data. + hasAlpha bool // Indicates whether the alpha channel data is available. + + decode []float64 // [Dmin Dmax ... values for each color component] +} + +// Threshold alpha channel. Set all alpha values below threshold to transparent. +type AlphaMapFunc func(alpha byte) byte + +// Allow mapping of alpha data for transformations. Can allow custom filtering of alpha data etc. +func (img Image) AlphaMap(mapFunc AlphaMapFunc) { + for idx, alpha := range img.alphaData { + img.alphaData[idx] = mapFunc(alpha) + } +} + +// Convert the raw byte slice into samples which are stored in a uint32 bit array. +// Each sample is represented by BitsPerComponent consecutive bits in the raw data. +func (img *Image) GetSamples() []uint32 { + samples := sampling.ResampleBytes(img.Data, int(img.BitsPerComponent)) + + expectedLen := int(img.Width) * int(img.Height) * img.ColorComponents + if len(samples) < expectedLen { + // Return error, or fill with 0s? + common.Log.Debug("error: Too few samples (got %d, expecting %d)", len(samples), expectedLen) + return samples + } else if len(samples) > expectedLen { + samples = samples[:expectedLen] + } + return samples +} + +// Convert samples to byte-data. +func (img *Image) SetSamples(samples []uint32) { + resampled := sampling.ResampleUint32(samples, int(img.BitsPerComponent), 8) + data := []byte{} + for _, val := range resampled { + data = append(data, byte(val)) + } + + img.Data = data +} + +// Resample resamples the image data converting from current BitsPerComponent to a target BitsPerComponent +// value. Sets the image's BitsPerComponent to the target value following resampling. +// +// For example, converting an 8-bit RGB image to 1-bit grayscale (common for scanned images): +// +// // Convert RGB image to grayscale. +// rgbColorSpace := pdf.NewPdfColorspaceDeviceRGB() +// grayImage, err := rgbColorSpace.ImageToGray(rgbImage) +// if err != nil { +// return err +// } +// // Resample as 1 bit. +// grayImage.Resample(1) +func (img *Image) Resample(targetBitsPerComponent int64) { + samples := img.GetSamples() + + // Image data are stored row by row. If the number of bits per row is not a multiple of 8, the end of the + // row needs to be padded with extra bits to fill out the last byte. + // Thus the processing is done on a row by row basis below. + + // This one simply resamples the data so that each component has target bits per component... + // So if the original data was 10011010, then will have 1 0 0 1 1 0 1 0... much longer + // The key to resampling is that we need to upsample/downsample, + // i.e. 10011010 >> targetBitsPerComponent + // Current bits: 8, target bits: 1... need to downsample by 8-1 = 7 + + if targetBitsPerComponent < img.BitsPerComponent { + downsampling := img.BitsPerComponent - targetBitsPerComponent + for i := range samples { + samples[i] >>= uint(downsampling) + } + } else if targetBitsPerComponent > img.BitsPerComponent { + upsampling := targetBitsPerComponent - img.BitsPerComponent + for i := range samples { + samples[i] <<= uint(upsampling) + } + } else { + return + } + + // Write out row by row... + data := []byte{} + for i := int64(0); i < img.Height; i++ { + ind1 := i * img.Width * int64(img.ColorComponents) + ind2 := (i+1)*img.Width*int64(img.ColorComponents) - 1 + + resampled := sampling.ResampleUint32(samples[ind1:ind2], int(targetBitsPerComponent), 8) + for _, val := range resampled { + data = append(data, byte(val)) + } + } + + img.Data = data + img.BitsPerComponent = int64(targetBitsPerComponent) +} + +// Converts the Image to a golang Image structure. +func (im *Image) ToGoImage() (goimage.Image, error) { + common.Log.Trace("Converting to go image") + bounds := goimage.Rect(0, 0, int(im.Width), int(im.Height)) + var img core.DrawableImage + + switch im.ColorComponents { + case 1: + if im.BitsPerComponent == 16 { + img = goimage.NewGray16(bounds) + } else { + img = goimage.NewGray(bounds) + } + case 3: + if im.BitsPerComponent == 16 { + img = goimage.NewRGBA64(bounds) + } else { + img = goimage.NewRGBA(bounds) + } + case 4: + img = goimage.NewCMYK(bounds) + default: + // XXX? Force RGB convert? + common.Log.Debug("Unsupported number of colors components per sample: %d", im.ColorComponents) + return nil, errors.New("unsupported colors") + } + + // Draw the data on the image.. + x := 0 + y := 0 + aidx := 0 + + samples := im.GetSamples() + //bytesPerColor := colorComponents * int(this.BitsPerComponent) / 8 + bytesPerColor := im.ColorComponents + for i := 0; i+bytesPerColor-1 < len(samples); i += bytesPerColor { + var c gocolor.Color + switch im.ColorComponents { + case 1: + if im.BitsPerComponent == 16 { + val := uint16(samples[i])<<8 | uint16(samples[i+1]) + c = gocolor.Gray16{val} + } else { + val := uint8(samples[i] & 0xff) + c = gocolor.Gray{val} + } + case 3: + if im.BitsPerComponent == 16 { + r := uint16(samples[i])<<8 | uint16(samples[i+1]) + g := uint16(samples[i+2])<<8 | uint16(samples[i+3]) + b := uint16(samples[i+4])<<8 | uint16(samples[i+5]) + a := uint16(0xffff) // Default: solid (0xffff) whereas transparent=0. + if im.alphaData != nil && len(im.alphaData) > aidx+1 { + a = (uint16(im.alphaData[aidx]) << 8) | uint16(im.alphaData[aidx+1]) + aidx += 2 + } + c = gocolor.RGBA64{R: r, G: g, B: b, A: a} + } else { + r := uint8(samples[i] & 0xff) + g := uint8(samples[i+1] & 0xff) + b := uint8(samples[i+2] & 0xff) + a := uint8(0xff) // Default: solid (0xff) whereas transparent=0. + if im.alphaData != nil && len(im.alphaData) > aidx { + a = uint8(im.alphaData[aidx]) + aidx++ + } + c = gocolor.RGBA{R: r, G: g, B: b, A: a} + } + case 4: + c1 := uint8(samples[i] & 0xff) + m1 := uint8(samples[i+1] & 0xff) + y1 := uint8(samples[i+2] & 0xff) + k1 := uint8(samples[i+3] & 0xff) + c = gocolor.CMYK{C: c1, M: m1, Y: y1, K: k1} + } + + img.Set(x, y, c) + x++ + if x == int(im.Width) { + x = 0 + y++ + } + } + + return img, nil +} + +// The ImageHandler interface implements common image loading and processing tasks. +// Implementing as an interface allows for the possibility to use non-standard libraries for faster +// loading and processing of images. +type ImageHandler interface { + // Read any image type and load into a new Image object. + Read(r io.Reader) (*Image, error) + + // Load a Image from a standard Go image structure. + NewImageFromGoImage(goimg goimage.Image) (*Image, error) + + // Compress an image. + Compress(input *Image, quality int64) (*Image, error) +} + +// Default implementation. + +type DefaultImageHandler struct{} + +// Create a Image from a golang Image. +func (dih DefaultImageHandler) NewImageFromGoImage(goimg goimage.Image) (*Image, error) { + // Speed up jpeg encoding by converting to RGBA first. + // Will not be required once the golang image/jpeg package is optimized. + b := goimg.Bounds() + m := goimage.NewRGBA(goimage.Rect(0, 0, b.Dx(), b.Dy())) + draw.Draw(m, m.Bounds(), goimg, b.Min, draw.Src) + + alphaData := []byte{} + hasAlpha := false + + data := []byte{} + for i := 0; i < len(m.Pix); i += 4 { + data = append(data, m.Pix[i], m.Pix[i+1], m.Pix[i+2]) + + alpha := m.Pix[i+3] + if alpha != 255 { + // If all alpha values are 255 (opaque), means that the alpha transparency channel is unnecessary. + hasAlpha = true + } + alphaData = append(alphaData, alpha) + } + + imag := Image{} + imag.Width = int64(b.Dx()) + imag.Height = int64(b.Dy()) + imag.BitsPerComponent = 8 // RGBA colormap + imag.ColorComponents = 3 + imag.Data = data // buf.Bytes() + + imag.hasAlpha = hasAlpha + if hasAlpha { + imag.alphaData = alphaData + } + + return &imag, nil +} + +// Reads an image and loads into a new Image object with an RGB +// colormap and 8 bits per component. +func (dih DefaultImageHandler) Read(reader io.Reader) (*Image, error) { + // Load the image with the native implementation. + goimg, _, err := goimage.Decode(reader) + if err != nil { + common.Log.Debug("error decoding file: %s", err) + return nil, err + } + + return dih.NewImageFromGoImage(goimg) +} + +// To be implemented. +// Should be able to compress in terms of JPEG quality parameter, +// and DPI threshold (need to know bounding area dimensions). +func (DefaultImageHandler) Compress(input *Image, quality int64) (*Image, error) { + return input, nil +} + +var ImageHandling ImageHandler = DefaultImageHandler{} + +func SetImageHandler(imgHandling ImageHandler) { + ImageHandling = imgHandling +} diff --git a/internal/pdf/model/model.go b/internal/pdf/model/model.go new file mode 100644 index 0000000..86c2482 --- /dev/null +++ b/internal/pdf/model/model.go @@ -0,0 +1,56 @@ +package model + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// A PDFModel is a higher level PDF construct which can be collapsed into a PDF primitive. +// Each PDFModel has an underlying Primitive and vice versa. +// Copies can be made, but care must be taken to do it properly. +type PdfModel interface { + ToPdfObject() core.PdfObject + GetContainingPdfObject() core.PdfObject +} + +// The model manager is used to cache Primitive <-> Model mappings where needed. +// In many cases only Model -> Primitive mapping is needed and only a reference to the Primitive +// is stored in the Model. In some cases, the Model needs to be found from the Primitive, +// and that is where the ModelManager can be used (in both directions). +// +// Note that it is not always used, the Primitive <-> Model mapping needs to be registered +// for each time it is used. Thus, it is only used for special cases, commonly where the same +// object is used by two higher level objects. (Example PDF Widgets owned by both Page Annotations, +// and the interactive form - AcroForm). +type ModelManager struct { + primitiveCache map[PdfModel]core.PdfObject + modelCache map[core.PdfObject]PdfModel +} + +func NewModelManager() *ModelManager { + mm := ModelManager{} + mm.primitiveCache = map[PdfModel]core.PdfObject{} + mm.modelCache = map[core.PdfObject]PdfModel{} + return &mm +} + +// Register (cache) a model to primitive relationship. +func (mm *ModelManager) Register(primitive core.PdfObject, model PdfModel) { + mm.primitiveCache[model] = primitive + mm.modelCache[primitive] = model +} + +func (mm *ModelManager) GetPrimitiveFromModel(model PdfModel) core.PdfObject { + primitive, has := mm.primitiveCache[model] + if !has { + return nil + } + return primitive +} + +func (mm *ModelManager) GetModelFromPrimitive(primitive core.PdfObject) PdfModel { + model, has := mm.modelCache[primitive] + if !has { + return nil + } + return model +} diff --git a/internal/pdf/model/outlines.go b/internal/pdf/model/outlines.go new file mode 100644 index 0000000..5e7a366 --- /dev/null +++ b/internal/pdf/model/outlines.go @@ -0,0 +1,294 @@ +package model + +import ( + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +type PdfOutlineTreeNode struct { + context any // Allow accessing outer structure. + First *PdfOutlineTreeNode + Last *PdfOutlineTreeNode +} + +// PDF outline dictionary (Table 152 - p. 376). +type PdfOutline struct { + PdfOutlineTreeNode + Parent *PdfOutlineTreeNode + Count *int64 + + primitive *core.PdfIndirectObject +} + +// Pdf outline item dictionary (Table 153 - pp. 376 - 377). +type PdfOutlineItem struct { + PdfOutlineTreeNode + Title *core.PdfObjectString + Parent *PdfOutlineTreeNode + Prev *PdfOutlineTreeNode + Next *PdfOutlineTreeNode + Count *int64 + Dest core.PdfObject + A core.PdfObject + SE core.PdfObject + C core.PdfObject + F core.PdfObject + + primitive *core.PdfIndirectObject +} + +func NewPdfOutline() *PdfOutline { + outline := &PdfOutline{} + + container := &core.PdfIndirectObject{} + container.PdfObject = core.MakeDict() + + outline.primitive = container + + return outline +} + +func NewPdfOutlineTree() *PdfOutline { + outlineTree := NewPdfOutline() + outlineTree.context = &outlineTree + return outlineTree +} + +func NewPdfOutlineItem() *PdfOutlineItem { + outlineItem := &PdfOutlineItem{} + + container := &core.PdfIndirectObject{} + container.PdfObject = core.MakeDict() + + outlineItem.primitive = container + return outlineItem +} + +func NewOutlineBookmark(title string, page *core.PdfIndirectObject) *PdfOutlineItem { + bookmark := PdfOutlineItem{} + bookmark.context = &bookmark + + bookmark.Title = core.MakeString(title) + + destArray := core.PdfObjectArray{} + destArray = append(destArray, page) + destArray = append(destArray, core.MakeName("Fit")) + bookmark.Dest = &destArray + + return &bookmark +} + +// Does not traverse the tree. +func newPdfOutlineFromIndirectObject(container *core.PdfIndirectObject) (*PdfOutline, error) { + dict, isDict := container.PdfObject.(*core.PdfObjectDictionary) + if !isDict { + return nil, fmt.Errorf("outline object not a dictionary") + } + + outline := PdfOutline{} + outline.primitive = container + outline.context = &outline + + if obj := dict.Get("Type"); obj != nil { + typeVal, ok := obj.(*core.PdfObjectName) + if ok { + if *typeVal != "Outlines" { + common.Log.Debug("error Type != Outlines (%s)", *typeVal) + // Should be "Outlines" if there, but some files have other types + // Log as an error but do not quit. + // Might be a good idea to log this kind of deviation from the standard separately. + } + } + } + + if obj := dict.Get("Count"); obj != nil { + // This should always be an integer, but in a few cases has been a float. + count, err := getNumberAsInt64(obj) + if err != nil { + return nil, err + } + outline.Count = &count + } + + return &outline, nil +} + +// Does not traverse the tree. +func (pr *PdfReader) newPdfOutlineItemFromIndirectObject(container *core.PdfIndirectObject) (*PdfOutlineItem, error) { + dict, isDict := container.PdfObject.(*core.PdfObjectDictionary) + if !isDict { + return nil, fmt.Errorf("outline object not a dictionary") + } + + item := PdfOutlineItem{} + item.primitive = container + item.context = &item + + // Title (required). + obj := dict.Get("Title") + if obj == nil { + return nil, fmt.Errorf("missing Title from Outline Item (required)") + } + obj, err := pr.traceToObject(obj) + if err != nil { + return nil, err + } + title, ok := core.TraceToDirectObject(obj).(*core.PdfObjectString) + if !ok { + return nil, fmt.Errorf("title not a string (%T)", obj) + } + item.Title = title + + // Count (optional). + if obj := dict.Get("Count"); obj != nil { + countVal, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, fmt.Errorf("count not an integer (%T)", obj) + } + count := int64(*countVal) + item.Count = &count + } + + // Other keys. + if obj := dict.Get("Dest"); obj != nil { + item.Dest, err = pr.traceToObject(obj) + if err != nil { + return nil, err + } + err := pr.traverseObjectData(item.Dest) + if err != nil { + return nil, err + } + } + if obj := dict.Get("A"); obj != nil { + item.A, err = pr.traceToObject(obj) + if err != nil { + return nil, err + } + err := pr.traverseObjectData(item.A) + if err != nil { + return nil, err + } + } + if obj := dict.Get("SE"); obj != nil { + // XXX: To add structure element support. + // Currently not supporting structure elements. + item.SE = nil + } + if obj := dict.Get("C"); obj != nil { + item.C, err = pr.traceToObject(obj) + if err != nil { + return nil, err + } + } + if obj := dict.Get("F"); obj != nil { + item.F, err = pr.traceToObject(obj) + if err != nil { + return nil, err + } + } + + return &item, nil +} + +// Get the outer object of the tree node (Outline or OutlineItem). +func (n *PdfOutlineTreeNode) getOuter() PdfModel { + if outline, isOutline := n.context.(*PdfOutline); isOutline { + return outline + } + if outlineItem, isOutlineItem := n.context.(*PdfOutlineItem); isOutlineItem { + return outlineItem + } + + common.Log.Debug("error Invalid outline tree node item") // Should never happen. + return nil +} + +func (pot *PdfOutlineTreeNode) GetContainingPdfObject() core.PdfObject { + return pot.getOuter().GetContainingPdfObject() +} + +func (pot *PdfOutlineTreeNode) ToPdfObject() core.PdfObject { + return pot.getOuter().ToPdfObject() +} + +func (po *PdfOutline) GetContainingPdfObject() core.PdfObject { + return po.primitive +} + +// Recursively build the Outline tree PDF object. +func (po *PdfOutline) ToPdfObject() core.PdfObject { + container := po.primitive + dict := container.PdfObject.(*core.PdfObjectDictionary) + + dict.Set("Type", core.MakeName("Outlines")) + + if po.First != nil { + dict.Set("First", po.First.ToPdfObject()) + } + + if po.Last != nil { + dict.Set("Last", po.Last.getOuter().GetContainingPdfObject()) + //PdfObjectConverterCache[this.Last.getOuter()] + } + + if po.Parent != nil { + dict.Set("Parent", po.Parent.getOuter().GetContainingPdfObject()) + } + + return container +} + +func (poi *PdfOutlineItem) GetContainingPdfObject() core.PdfObject { + return poi.primitive +} + +// Outline item. +// Recursively build the Outline tree PDF object. +func (poi *PdfOutlineItem) ToPdfObject() core.PdfObject { + container := poi.primitive + dict := container.PdfObject.(*core.PdfObjectDictionary) + + dict.Set("Title", poi.Title) + if poi.A != nil { + dict.Set("A", poi.A) + } + if obj := dict.Get("SE"); obj != nil { + // XXX: Currently not supporting structure element hierarchy. + // Remove it. + dict.Remove("SE") + // delete(*dict, "SE") + } + + if poi.C != nil { + dict.Set("C", poi.C) + } + if poi.Dest != nil { + dict.Set("Dest", poi.Dest) + } + if poi.F != nil { + dict.Set("F", poi.F) + } + if poi.Count != nil { + dict.Set("Count", core.MakeInteger(*poi.Count)) + } + if poi.Next != nil { + dict.Set("Next", poi.Next.ToPdfObject()) + } + if poi.First != nil { + dict.Set("First", poi.First.ToPdfObject()) + } + if poi.Prev != nil { + dict.Set("Prev", poi.Prev.getOuter().GetContainingPdfObject()) + } + if poi.Last != nil { + dict.Set("Last", poi.Last.getOuter().GetContainingPdfObject()) + } + if poi.Parent != nil { + dict.Set("Parent", poi.Parent.getOuter().GetContainingPdfObject()) + } + + return container +} diff --git a/internal/pdf/model/page.go b/internal/pdf/model/page.go new file mode 100644 index 0000000..a727a8c --- /dev/null +++ b/internal/pdf/model/page.go @@ -0,0 +1,908 @@ +package model + +import ( + "errors" + "fmt" + "strings" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// PDF page object (7.7.3.3 - Table 30). +type PdfPage struct { + Parent core.PdfObject + LastModified *PdfDate + Resources *PdfPageResources + CropBox *PdfRectangle + MediaBox *PdfRectangle + BleedBox *PdfRectangle + TrimBox *PdfRectangle + ArtBox *PdfRectangle + BoxColorInfo core.PdfObject + Contents core.PdfObject + Rotate *int64 + Group core.PdfObject + Thumb core.PdfObject + B core.PdfObject + Dur core.PdfObject + Trans core.PdfObject + AA core.PdfObject + Metadata core.PdfObject + PieceInfo core.PdfObject + StructParents core.PdfObject + ID core.PdfObject + PZ core.PdfObject + SeparationInfo core.PdfObject + Tabs core.PdfObject + TemplateInstantiated core.PdfObject + PresSteps core.PdfObject + UserUnit core.PdfObject + VP core.PdfObject + + Annotations []*PdfAnnotation + + // Primitive container. + pageDict *core.PdfObjectDictionary + primitive *core.PdfIndirectObject +} + +func NewPdfPage() *PdfPage { + page := PdfPage{} + page.pageDict = core.MakeDict() + + container := core.PdfIndirectObject{} + container.PdfObject = page.pageDict + page.primitive = &container + + return &page +} + +func (pp *PdfPage) setContainer(container *core.PdfIndirectObject) { + container.PdfObject = pp.pageDict + pp.primitive = container +} + +func (pp *PdfPage) Duplicate() *PdfPage { + dup := *pp + dup.pageDict = core.MakeDict() + dup.primitive = core.MakeIndirectObject(dup.pageDict) + + return &dup +} + +// Build a PdfPage based on the underlying dictionary. +// Used in loading existing PDF files. +// Note that a new container is created (indirect object). +func (reader *PdfReader) newPdfPageFromDict(p *core.PdfObjectDictionary) (*PdfPage, error) { + page := NewPdfPage() + page.pageDict = p //XXX? + + d := *p + + pType, ok := d.Get("Type").(*core.PdfObjectName) + if !ok { + return nil, errors.New("missing/Invalid Page dictionary Type") + } + if *pType != "Page" { + return nil, errors.New("page dictionary Type != Page") + } + + if obj := d.Get("Parent"); obj != nil { + page.Parent = obj + } + + if obj := d.Get("LastModified"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + strObj, ok := core.TraceToDirectObject(obj).(*core.PdfObjectString) + if !ok { + return nil, errors.New("page dictionary LastModified != string") + } + lastmod, err := NewPdfDate(string(*strObj)) + if err != nil { + return nil, err + } + page.LastModified = &lastmod + } + + if obj := d.Get("Resources"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + + dict, ok := core.TraceToDirectObject(obj).(*core.PdfObjectDictionary) + if !ok { + return nil, fmt.Errorf("invalid resource dictionary (%T)", obj) + } + + page.Resources, err = NewPdfPageResourcesFromDict(dict) + if err != nil { + return nil, err + } + } else { + // If Resources not explicitly defined, look up the tree (Parent objects) using + // the getResources() function. Resources should always be accessible. + resources, err := page.getResources() + if err != nil { + return nil, err + } + if resources == nil { + resources = NewPdfPageResources() + } + page.Resources = resources + } + + if obj := d.Get("MediaBox"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + boxArr, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, errors.New("page MediaBox not an array") + } + page.MediaBox, err = NewPdfRectangle(*boxArr) + if err != nil { + return nil, err + } + } + if obj := d.Get("CropBox"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + boxArr, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, errors.New("page CropBox not an array") + } + page.CropBox, err = NewPdfRectangle(*boxArr) + if err != nil { + return nil, err + } + } + if obj := d.Get("BleedBox"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + boxArr, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, errors.New("page BleedBox not an array") + } + page.BleedBox, err = NewPdfRectangle(*boxArr) + if err != nil { + return nil, err + } + } + if obj := d.Get("TrimBox"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + boxArr, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, errors.New("page TrimBox not an array") + } + page.TrimBox, err = NewPdfRectangle(*boxArr) + if err != nil { + return nil, err + } + } + if obj := d.Get("ArtBox"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + boxArr, ok := core.TraceToDirectObject(obj).(*core.PdfObjectArray) + if !ok { + return nil, errors.New("page ArtBox not an array") + } + page.ArtBox, err = NewPdfRectangle(*boxArr) + if err != nil { + return nil, err + } + } + if obj := d.Get("BoxColorInfo"); obj != nil { + page.BoxColorInfo = obj + } + if obj := d.Get("Contents"); obj != nil { + page.Contents = obj + } + if obj := d.Get("Rotate"); obj != nil { + var err error + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + iObj, ok := core.TraceToDirectObject(obj).(*core.PdfObjectInteger) + if !ok { + return nil, errors.New("invalid Page Rotate object") + } + iVal := int64(*iObj) + page.Rotate = &iVal + } + if obj := d.Get("Group"); obj != nil { + page.Group = obj + } + if obj := d.Get("Thumb"); obj != nil { + page.Thumb = obj + } + if obj := d.Get("B"); obj != nil { + page.B = obj + } + if obj := d.Get("Dur"); obj != nil { + page.Dur = obj + } + if obj := d.Get("Trans"); obj != nil { + page.Trans = obj + } + //if obj := d.Get("Annots"); obj != nil { + // page.Annots = obj + //} + if obj := d.Get("AA"); obj != nil { + page.AA = obj + } + if obj := d.Get("Metadata"); obj != nil { + page.Metadata = obj + } + if obj := d.Get("PieceInfo"); obj != nil { + page.PieceInfo = obj + } + if obj := d.Get("StructParents"); obj != nil { + page.StructParents = obj + } + if obj := d.Get("ID"); obj != nil { + page.ID = obj + } + if obj := d.Get("PZ"); obj != nil { + page.PZ = obj + } + if obj := d.Get("SeparationInfo"); obj != nil { + page.SeparationInfo = obj + } + if obj := d.Get("Tabs"); obj != nil { + page.Tabs = obj + } + if obj := d.Get("TemplateInstantiated"); obj != nil { + page.TemplateInstantiated = obj + } + if obj := d.Get("PresSteps"); obj != nil { + page.PresSteps = obj + } + if obj := d.Get("UserUnit"); obj != nil { + page.UserUnit = obj + } + if obj := d.Get("VP"); obj != nil { + page.VP = obj + } + + var err error + page.Annotations, err = reader.LoadAnnotations(&d) + if err != nil { + return nil, err + } + + return page, nil +} + +func (reader *PdfReader) LoadAnnotations(d *core.PdfObjectDictionary) ([]*PdfAnnotation, error) { + annotsObj := d.Get("Annots") + if annotsObj == nil { + return nil, nil + } + + var err error + annotsObj, err = reader.traceToObject(annotsObj) + if err != nil { + return nil, err + } + annotsArr, ok := core.TraceToDirectObject(annotsObj).(*core.PdfObjectArray) + if !ok { + return nil, fmt.Errorf("annots not an array") + } + + annotations := []*PdfAnnotation{} + for _, obj := range *annotsArr { + obj, err = reader.traceToObject(obj) + if err != nil { + return nil, err + } + + // Technically all annotation dictionaries should be inside indirect objects. + // In reality, sometimes the annotation dictionary is inline within the Annots array. + if _, isNull := obj.(*core.PdfObjectNull); isNull { + // Can safely ignore. + continue + } + + annotDict, isDict := obj.(*core.PdfObjectDictionary) + indirectObj, isIndirect := obj.(*core.PdfIndirectObject) + if isDict { + // Create a container; indirect object; around the dictionary. + indirectObj = &core.PdfIndirectObject{} + indirectObj.PdfObject = annotDict + } else { + if !isIndirect { + return nil, fmt.Errorf("annotation not in an indirect object") + } + } + + annot, err := reader.newPdfAnnotationFromIndirectObject(indirectObj) + if err != nil { + return nil, err + } + annotations = append(annotations, annot) + } + + return annotations, nil +} + +// Get the inheritable media box value, either from the page +// or a higher up page/pages struct. +func (pp *PdfPage) GetMediaBox() (*PdfRectangle, error) { + if pp.MediaBox != nil { + return pp.MediaBox, nil + } + + node := pp.Parent + for node != nil { + dictObj, ok := node.(*core.PdfIndirectObject) + if !ok { + return nil, errors.New("invalid parent object") + } + + dict, ok := dictObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("invalid parent objects dictionary") + } + + if obj := dict.Get("MediaBox"); obj != nil { + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + return nil, errors.New("invalid media box") + } + rect, err := NewPdfRectangle(*arr) + + if err != nil { + return nil, err + } + + return rect, nil + } + + node = dict.Get("Parent") + } + + return nil, errors.New("media box not defined") +} + +// Get the inheritable resources, either from the page or or a higher up page/pages struct. +func (pp *PdfPage) getResources() (*PdfPageResources, error) { + if pp.Resources != nil { + return pp.Resources, nil + } + + node := pp.Parent + for node != nil { + dictObj, ok := node.(*core.PdfIndirectObject) + if !ok { + return nil, errors.New("invalid parent object") + } + + dict, ok := dictObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("invalid parent objects dictionary") + } + + if obj := dict.Get("Resources"); obj != nil { + prDict, ok := core.TraceToDirectObject(obj).(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("invalid resource dict") + } + resources, err := NewPdfPageResourcesFromDict(prDict) + + if err != nil { + return nil, err + } + + return resources, nil + } + + // Keep moving up the tree... + node = dict.Get("Parent") + } + + // No resources defined... + return nil, nil +} + +// Convert the Page to a PDF object dictionary. +func (pp *PdfPage) GetPageDict() *core.PdfObjectDictionary { + p := pp.pageDict + p.Set("Type", core.MakeName("Page")) + p.Set("Parent", pp.Parent) + + if pp.LastModified != nil { + p.Set("LastModified", pp.LastModified.ToPdfObject()) + } + if pp.Resources != nil { + p.Set("Resources", pp.Resources.ToPdfObject()) + } + if pp.CropBox != nil { + p.Set("CropBox", pp.CropBox.ToPdfObject()) + } + if pp.MediaBox != nil { + p.Set("MediaBox", pp.MediaBox.ToPdfObject()) + } + if pp.BleedBox != nil { + p.Set("BleedBox", pp.BleedBox.ToPdfObject()) + } + if pp.TrimBox != nil { + p.Set("TrimBox", pp.TrimBox.ToPdfObject()) + } + if pp.ArtBox != nil { + p.Set("ArtBox", pp.ArtBox.ToPdfObject()) + } + p.SetIfNotNil("BoxColorInfo", pp.BoxColorInfo) + p.SetIfNotNil("Contents", pp.Contents) + + if pp.Rotate != nil { + p.Set("Rotate", core.MakeInteger(*pp.Rotate)) + } + + p.SetIfNotNil("Group", pp.Group) + p.SetIfNotNil("Thumb", pp.Thumb) + p.SetIfNotNil("B", pp.B) + p.SetIfNotNil("Dur", pp.Dur) + p.SetIfNotNil("Trans", pp.Trans) + p.SetIfNotNil("AA", pp.AA) + p.SetIfNotNil("Metadata", pp.Metadata) + p.SetIfNotNil("PieceInfo", pp.PieceInfo) + p.SetIfNotNil("StructParents", pp.StructParents) + p.SetIfNotNil("ID", pp.ID) + p.SetIfNotNil("PZ", pp.PZ) + p.SetIfNotNil("SeparationInfo", pp.SeparationInfo) + p.SetIfNotNil("Tabs", pp.Tabs) + p.SetIfNotNil("TemplateInstantiated", pp.TemplateInstantiated) + p.SetIfNotNil("PresSteps", pp.PresSteps) + p.SetIfNotNil("UserUnit", pp.UserUnit) + p.SetIfNotNil("VP", pp.VP) + + if pp.Annotations != nil { + arr := core.PdfObjectArray{} + for _, annot := range pp.Annotations { + if subannot := annot.GetContext(); subannot != nil { + arr = append(arr, subannot.ToPdfObject()) + } else { + // Generic annotation dict (without subtype). + arr = append(arr, annot.ToPdfObject()) + } + } + p.Set("Annots", &arr) + } + + return p +} + +// Get the page object as an indirect objects. Wraps the Page +// dictionary into an indirect object. +func (pp *PdfPage) GetPageAsIndirectObject() *core.PdfIndirectObject { + return pp.primitive +} + +func (pp *PdfPage) GetContainingPdfObject() core.PdfObject { + return pp.primitive +} + +func (pp *PdfPage) ToPdfObject() core.PdfObject { + container := pp.primitive + pp.GetPageDict() // update. + return container +} + +// Add an image to the XObject resources. +func (pp *PdfPage) AddImageResource(name core.PdfObjectName, ximg *XObjectImage) error { + var xresDict *core.PdfObjectDictionary + if pp.Resources.XObject == nil { + xresDict = core.MakeDict() + pp.Resources.XObject = xresDict + } else { + var ok bool + xresDict, ok = (pp.Resources.XObject).(*core.PdfObjectDictionary) + if !ok { + return errors.New("invalid xres dict type") + } + + } + // Make a stream object container. + xresDict.Set(name, ximg.ToPdfObject()) + + return nil +} + +// Check if has XObject resource by name. +func (pp *PdfPage) HasXObjectByName(name core.PdfObjectName) bool { + xresDict, has := pp.Resources.XObject.(*core.PdfObjectDictionary) + if !has { + return false + } + + if obj := xresDict.Get(name); obj != nil { + return true + } else { + return false + } +} + +// Get XObject by name. +func (pp *PdfPage) GetXObjectByName(name core.PdfObjectName) (core.PdfObject, bool) { + xresDict, has := pp.Resources.XObject.(*core.PdfObjectDictionary) + if !has { + return nil, false + } + + if obj := xresDict.Get(name); obj != nil { + return obj, true + } else { + return nil, false + } +} + +// Check if has font resource by name. +func (pp *PdfPage) HasFontByName(name core.PdfObjectName) bool { + fontDict, has := pp.Resources.Font.(*core.PdfObjectDictionary) + if !has { + return false + } + + if obj := fontDict.Get(name); obj != nil { + return true + } else { + return false + } +} + +// Check if ExtGState name is available. +func (pp *PdfPage) HasExtGState(name core.PdfObjectName) bool { + if pp.Resources == nil { + return false + } + + if pp.Resources.ExtGState == nil { + return false + } + + egsDict, ok := core.TraceToDirectObject(pp.Resources.ExtGState).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("Expected ExtGState dictionary is not a dictionary: %v", core.TraceToDirectObject(pp.Resources.ExtGState)) + return false + } + + // Update the dictionary. + obj := egsDict.Get(name) + has := obj != nil + + return has +} + +// Add a graphics state to the XObject resources. +func (pp *PdfPage) AddExtGState(name core.PdfObjectName, egs *core.PdfObjectDictionary) error { + if pp.Resources == nil { + //this.Resources = &PdfPageResources{} + pp.Resources = NewPdfPageResources() + } + + if pp.Resources.ExtGState == nil { + pp.Resources.ExtGState = core.MakeDict() + } + + egsDict, ok := core.TraceToDirectObject(pp.Resources.ExtGState).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("Expected ExtGState dictionary is not a dictionary: %v", core.TraceToDirectObject(pp.Resources.ExtGState)) + return errors.New("type check error") + } + + egsDict.Set(name, egs) + return nil +} + +// Add a font dictionary to the Font resources. +func (pp *PdfPage) AddFont(name core.PdfObjectName, font core.PdfObject) error { + if pp.Resources == nil { + pp.Resources = NewPdfPageResources() + } + + if pp.Resources.Font == nil { + pp.Resources.Font = core.MakeDict() + } + + fontDict, ok := core.TraceToDirectObject(pp.Resources.Font).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("Expected font dictionary is not a dictionary: %v", core.TraceToDirectObject(pp.Resources.Font)) + return errors.New("type check error") + } + + // Update the dictionary. + fontDict.Set(name, font) + + return nil +} + +type WatermarkImageOptions struct { + Alpha float64 + FitToWidth bool + PreserveAspectRatio bool +} + +// Add a watermark to the page. +func (pp *PdfPage) AddWatermarkImage(ximg *XObjectImage, opt WatermarkImageOptions) error { + // Page dimensions. + bbox, err := pp.GetMediaBox() + if err != nil { + return err + } + pWidth := bbox.Urx - bbox.Llx + pHeight := bbox.Ury - bbox.Lly + + wWidth := float64(*ximg.Width) + xOffset := (float64(pWidth) - float64(wWidth)) / 2 + if opt.FitToWidth { + wWidth = pWidth + xOffset = 0 + } + wHeight := pHeight + yOffset := float64(0) + if opt.PreserveAspectRatio { + wHeight = wWidth * float64(*ximg.Height) / float64(*ximg.Width) + yOffset = (pHeight - wHeight) / 2 + } + + if pp.Resources == nil { + pp.Resources = NewPdfPageResources() + } + + // Find available image name for this page. + i := 0 + imgName := core.PdfObjectName(fmt.Sprintf("Imw%d", i)) + for pp.Resources.HasXObjectByName(imgName) { + i++ + imgName = core.PdfObjectName(fmt.Sprintf("Imw%d", i)) + } + + err = pp.AddImageResource(imgName, ximg) + if err != nil { + return err + } + + i = 0 + gsName := core.PdfObjectName(fmt.Sprintf("GS%d", i)) + for pp.HasExtGState(gsName) { + i++ + gsName = core.PdfObjectName(fmt.Sprintf("GS%d", i)) + } + gs0 := core.MakeDict() + gs0.Set("BM", core.MakeName("Normal")) + gs0.Set("CA", core.MakeFloat(opt.Alpha)) + gs0.Set("ca", core.MakeFloat(opt.Alpha)) + err = pp.AddExtGState(gsName, gs0) + if err != nil { + return err + } + + contentStr := fmt.Sprintf("q\n"+ + "/%s gs\n"+ + "%.0f 0 0 %.0f %.4f %.4f cm\n"+ + "/%s Do\n"+ + "Q", gsName, wWidth, wHeight, xOffset, yOffset, imgName) + pp.AddContentStreamByString(contentStr) + + return nil +} + +// Add content stream by string. Puts the content string into a stream +// object and points the content stream towards it. +func (pp *PdfPage) AddContentStreamByString(contentStr string) { + stream := core.PdfObjectStream{} + + sDict := core.MakeDict() + stream.PdfObjectDictionary = sDict + + sDict.Set("Length", core.MakeInteger(int64(len(contentStr)))) + stream.Stream = []byte(contentStr) + + if pp.Contents == nil { + // If not set, place it directly. + pp.Contents = &stream + } else if contArray, isArray := core.TraceToDirectObject(pp.Contents).(*core.PdfObjectArray); isArray { + // If an array of content streams, append it. + *contArray = append(*contArray, &stream) + } else { + // Only 1 element in place. Wrap inside a new array and add the new one. + contArray := core.PdfObjectArray{} + contArray = append(contArray, pp.Contents) + contArray = append(contArray, &stream) + pp.Contents = &contArray + } +} + +// Set the content streams based on a string array. Will make 1 object stream +// for each string and reference from the page Contents. Each stream will be +// encoded using the encoding specified by the StreamEncoder, if empty, will +// use identity encoding (raw data). +func (pp *PdfPage) SetContentStreams(cStreams []string, encoder core.StreamEncoder) error { + if len(cStreams) == 0 { + pp.Contents = nil + return nil + } + + // If encoding is not set, use default raw encoder. + if encoder == nil { + encoder = core.NewRawEncoder() + } + + streamObjs := []*core.PdfObjectStream{} + for _, cStream := range cStreams { + stream := &core.PdfObjectStream{} + + // Make a new stream dict based on the encoding parameters. + sDict := encoder.MakeStreamDict() + + encoded, err := encoder.EncodeBytes([]byte(cStream)) + if err != nil { + return err + } + + sDict.Set("Length", core.MakeInteger(int64(len(encoded)))) + + stream.PdfObjectDictionary = sDict + stream.Stream = []byte(encoded) + + streamObjs = append(streamObjs, stream) + } + + // Set the page contents. + // Point directly to the object stream if only one, or embed in an array. + if len(streamObjs) == 1 { + pp.Contents = streamObjs[0] + } else { + contArray := core.PdfObjectArray{} + for _, streamObj := range streamObjs { + contArray = append(contArray, streamObj) + } + pp.Contents = &contArray + } + + return nil +} + +func getContentStreamAsString(cstreamObj core.PdfObject) (string, error) { + if cstream, ok := core.TraceToDirectObject(cstreamObj).(*core.PdfObjectString); ok { + return string(*cstream), nil + } + + if cstream, ok := core.TraceToDirectObject(cstreamObj).(*core.PdfObjectStream); ok { + buf, err := core.DecodeStream(cstream) + if err != nil { + return "", err + } + + return string(buf), nil + } + return "", fmt.Errorf("invalid content stream object holder (%T)", core.TraceToDirectObject(cstreamObj)) +} + +// Get Content Stream as an array of strings. +func (pp *PdfPage) GetContentStreams() ([]string, error) { + if pp.Contents == nil { + return nil, nil + } + + contents := core.TraceToDirectObject(pp.Contents) + if contArray, isArray := contents.(*core.PdfObjectArray); isArray { + // If an array of content streams, append it. + cstreams := []string{} + for _, cstreamObj := range *contArray { + cstreamStr, err := getContentStreamAsString(cstreamObj) + if err != nil { + return nil, err + } + cstreams = append(cstreams, cstreamStr) + } + return cstreams, nil + } else { + // Only 1 element in place. Wrap inside a new array and add the new one. + cstreamStr, err := getContentStreamAsString(contents) + if err != nil { + return nil, err + } + cstreams := []string{cstreamStr} + return cstreams, nil + } +} + +// Get all the content streams for a page as one string. +func (pp *PdfPage) GetAllContentStreams() (string, error) { + cstreams, err := pp.GetContentStreams() + if err != nil { + return "", err + } + return strings.Join(cstreams, " "), nil +} + +// Needs to have matching name and colorspace map entry. The Names define the order. +type PdfPageResourcesColorspaces struct { + Names []string + Colorspaces map[string]PdfColorspace + + container *core.PdfIndirectObject +} + +func NewPdfPageResourcesColorspaces() *PdfPageResourcesColorspaces { + colorspaces := &PdfPageResourcesColorspaces{} + colorspaces.Names = []string{} + colorspaces.Colorspaces = map[string]PdfColorspace{} + colorspaces.container = &core.PdfIndirectObject{} + return colorspaces +} + +// Set the colorspace corresponding to key. Add to Names if not set. +func (pp *PdfPageResourcesColorspaces) Set(key core.PdfObjectName, val PdfColorspace) { + if _, has := pp.Colorspaces[string(key)]; !has { + pp.Names = append(pp.Names, string(key)) + } + pp.Colorspaces[string(key)] = val +} + +func newPdfPageResourcesColorspacesFromPdfObject(obj core.PdfObject) (*PdfPageResourcesColorspaces, error) { + colorspaces := &PdfPageResourcesColorspaces{} + + if indObj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + colorspaces.container = indObj + obj = indObj.PdfObject + } + + dict, ok := obj.(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("CS attribute type error") + } + + colorspaces.Names = []string{} + colorspaces.Colorspaces = map[string]PdfColorspace{} + + for _, csName := range dict.Keys() { + csObj := dict.Get(csName) + colorspaces.Names = append(colorspaces.Names, string(csName)) + cs, err := NewPdfColorspaceFromPdfObject(csObj) + if err != nil { + return nil, err + } + colorspaces.Colorspaces[string(csName)] = cs + } + + return colorspaces, nil +} + +func (pp *PdfPageResourcesColorspaces) ToPdfObject() core.PdfObject { + dict := core.MakeDict() + for _, csName := range pp.Names { + dict.Set(core.PdfObjectName(csName), pp.Colorspaces[csName].ToPdfObject()) + } + + if pp.container != nil { + pp.container.PdfObject = dict + return pp.container + } + + return dict +} diff --git a/internal/pdf/model/pattern.go b/internal/pdf/model/pattern.go new file mode 100644 index 0000000..10d13c3 --- /dev/null +++ b/internal/pdf/model/pattern.go @@ -0,0 +1,420 @@ +package model + +import ( + "errors" + + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// A PdfPattern can represent a Pattern, either a tiling pattern or a shading pattern. +// Note that all patterns shall be treated as colours; a Pattern colour space shall be established with the CS or cs +// operator just like other colour spaces, and a particular pattern shall be installed as the current colour with the +// SCN or scn operator. +type PdfPattern struct { + // Type: Pattern + PatternType int64 + context PdfModel // The sub pattern, either PdfTilingPattern (Type 1) or PdfShadingPattern (Type 2). + + container core.PdfObject +} + +func (pp *PdfPattern) GetContainingPdfObject() core.PdfObject { + return pp.container +} + +// Context in this case is a reference to the subpattern entry: either PdfTilingPattern or PdfShadingPattern. +func (pp *PdfPattern) GetContext() PdfModel { + return pp.context +} + +// Set the sub pattern (context). Either PdfTilingPattern or PdfShadingPattern. +func (pp *PdfPattern) SetContext(ctx PdfModel) { + pp.context = ctx +} + +func (pp *PdfPattern) IsTiling() bool { + return pp.PatternType == 1 +} + +func (pp *PdfPattern) IsShading() bool { + return pp.PatternType == 2 +} + +// Check with IsTiling() prior to using this to ensure is a tiling pattern. +func (pp *PdfPattern) GetAsTilingPattern() *PdfTilingPattern { + return pp.context.(*PdfTilingPattern) +} + +// Check with IsShading() prior to using this, to ensure is a shading pattern. +func (pp *PdfPattern) GetAsShadingPattern() *PdfShadingPattern { + return pp.context.(*PdfShadingPattern) +} + +// A Tiling pattern consists of repetitions of a pattern cell with defined intervals. +// It is a type 1 pattern. (PatternType = 1). +// A tiling pattern is represented by a stream object, where the stream content is +// a content stream that describes the pattern cell. +type PdfTilingPattern struct { + *PdfPattern + PaintType *core.PdfObjectInteger // Colored or uncolored tiling pattern. + TilingType *core.PdfObjectInteger // Constant spacing, no distortion or constant spacing/faster tiling. + BBox *PdfRectangle + XStep *core.PdfObjectFloat + YStep *core.PdfObjectFloat + Resources *PdfPageResources + Matrix *core.PdfObjectArray // Pattern matrix (6 numbers). +} + +func (ptp *PdfTilingPattern) IsColored() bool { + if ptp.PaintType != nil && *ptp.PaintType == 1 { + return true + } else { + return false + } +} + +// GetContentStream returns the pattern cell's content stream +func (ptp *PdfTilingPattern) GetContentStream() ([]byte, error) { + decoded, _, err := ptp.GetContentStreamWithEncoder() + return decoded, err +} + +// GetContentStreamWithEncoder returns the pattern cell's content stream and its encoder +// TODO (v3): Change GetContentStreamWithEncoder to GetContentStream +func (ptp *PdfTilingPattern) GetContentStreamWithEncoder() ([]byte, core.StreamEncoder, error) { + streamObj, ok := ptp.container.(*core.PdfObjectStream) + if !ok { + common.Log.Debug("Tiling pattern container not a stream (got %T)", ptp.container) + return nil, nil, ErrTypeError + } + + decoded, err := core.DecodeStream(streamObj) + if err != nil { + common.Log.Debug("Failed decoding stream, err: %v", err) + return nil, nil, err + } + + encoder, err := core.NewEncoderFromStream(streamObj) + if err != nil { + common.Log.Debug("Failed finding decoding encoder: %v", err) + return nil, nil, err + } + + return decoded, encoder, nil +} + +// Set the pattern cell's content stream. +func (ptp *PdfTilingPattern) SetContentStream(content []byte, encoder core.StreamEncoder) error { + streamObj, ok := ptp.container.(*core.PdfObjectStream) + if !ok { + common.Log.Debug("Tiling pattern container not a stream (got %T)", ptp.container) + return ErrTypeError + } + + // If encoding is not set, use raw encoder. + if encoder == nil { + encoder = core.NewRawEncoder() + } + + streamDict := streamObj.PdfObjectDictionary + + // Make a new stream dict based on the encoding parameters. + encDict := encoder.MakeStreamDict() + // Merge the encoding dict into the stream dict. + streamDict.Merge(encDict) + + encoded, err := encoder.EncodeBytes(content) + if err != nil { + return err + } + + // Update length. + streamDict.Set("Length", core.MakeInteger(int64(len(encoded)))) + + streamObj.Stream = []byte(encoded) + + return nil +} + +// Shading patterns provide a smooth transition between colors across an area to be painted, i.e. +// color(x,y) = f(x,y) at each point. +// It is a type 2 pattern (PatternType = 2). +type PdfShadingPattern struct { + *PdfPattern + Shading *PdfShading + Matrix *core.PdfObjectArray + ExtGState core.PdfObject +} + +// Load a pdf pattern from an indirect object. Used in parsing/loading PDFs. +func newPdfPatternFromPdfObject(container core.PdfObject) (*PdfPattern, error) { + pattern := &PdfPattern{} + + var dict *core.PdfObjectDictionary + if indObj, is := container.(*core.PdfIndirectObject); is { + pattern.container = indObj + d, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("Pattern indirect object not containing dictionary (got %T)", indObj.PdfObject) + return nil, ErrTypeError + } + dict = d + } else if streamObj, is := container.(*core.PdfObjectStream); is { + pattern.container = streamObj + dict = streamObj.PdfObjectDictionary + } else { + common.Log.Debug("Pattern not an indirect object or stream") + return nil, ErrTypeError + } + + // PatternType. + obj := dict.Get("PatternType") + if obj == nil { + common.Log.Debug("Pdf Pattern not containing PatternType") + return nil, ErrRequiredAttributeMissing + } + patternType, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("Pattern type not an integer (got %T)", obj) + return nil, ErrTypeError + } + if *patternType != 1 && *patternType != 2 { + common.Log.Debug("Pattern type != 1/2 (got %d)", *patternType) + return nil, ErrRangeError + } + pattern.PatternType = int64(*patternType) + + switch *patternType { + case 1: // Tiling pattern. + ctx, err := newPdfTilingPatternFromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfPattern = pattern + pattern.context = ctx + return pattern, nil + case 2: // Shading pattern. + ctx, err := newPdfShadingPatternFromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfPattern = pattern + pattern.context = ctx + return pattern, nil + } + + return nil, errors.New("unknown pattern") +} + +// Load entries specific to a pdf tiling pattern from a dictionary. Used in parsing/loading PDFs. +func newPdfTilingPatternFromDictionary(dict *core.PdfObjectDictionary) (*PdfTilingPattern, error) { + pattern := &PdfTilingPattern{} + + // PaintType (required). + obj := dict.Get("PaintType") + if obj == nil { + common.Log.Debug("PaintType missing") + return nil, ErrRequiredAttributeMissing + } + paintType, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("PaintType not an integer (got %T)", obj) + return nil, ErrTypeError + } + pattern.PaintType = paintType + + // TilingType (required). + obj = dict.Get("TilingType") + if obj == nil { + common.Log.Debug("TilingType missing") + return nil, ErrRequiredAttributeMissing + } + tilingType, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("TilingType not an integer (got %T)", obj) + return nil, ErrTypeError + } + pattern.TilingType = tilingType + + // BBox (required). + obj = dict.Get("BBox") + if obj == nil { + common.Log.Debug("BBox missing") + return nil, ErrRequiredAttributeMissing + } + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("BBox should be specified by an array (got %T)", obj) + return nil, ErrTypeError + } + rect, err := NewPdfRectangle(*arr) + if err != nil { + common.Log.Debug("BBox error: %v", err) + return nil, err + } + pattern.BBox = rect + + // XStep (required). + obj = dict.Get("XStep") + if obj == nil { + common.Log.Debug("XStep missing") + return nil, ErrRequiredAttributeMissing + } + xStep, err := getNumberAsFloat(obj) + if err != nil { + common.Log.Debug("error getting XStep as float: %v", xStep) + return nil, err + } + pattern.XStep = core.MakeFloat(xStep) + + // YStep (required). + obj = dict.Get("YStep") + if obj == nil { + common.Log.Debug("YStep missing") + return nil, ErrRequiredAttributeMissing + } + yStep, err := getNumberAsFloat(obj) + if err != nil { + common.Log.Debug("error getting YStep as float: %v", yStep) + return nil, err + } + pattern.YStep = core.MakeFloat(yStep) + + // Resources (required). + obj = dict.Get("Resources") + if obj == nil { + common.Log.Debug("Resources missing") + return nil, ErrRequiredAttributeMissing + } + dict, ok = core.TraceToDirectObject(obj).(*core.PdfObjectDictionary) + if !ok { + return nil, fmt.Errorf("invalid resource dictionary (%T)", obj) + } + resources, err := NewPdfPageResourcesFromDict(dict) + if err != nil { + return nil, err + } + pattern.Resources = resources + + // Matrix (optional). + if obj := dict.Get("Matrix"); obj != nil { + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Matrix not an array (got %T)", obj) + return nil, ErrTypeError + } + pattern.Matrix = arr + } + + return pattern, nil +} + +// Load entries specific to a pdf shading pattern from a dictionary. Used in parsing/loading PDFs. +func newPdfShadingPatternFromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingPattern, error) { + pattern := &PdfShadingPattern{} + + // Shading (required). + obj := dict.Get("Shading") + if obj == nil { + common.Log.Debug("Shading missing") + return nil, ErrRequiredAttributeMissing + } + shading, err := newPdfShadingFromPdfObject(obj) + if err != nil { + common.Log.Debug("error loading shading: %v", err) + return nil, err + } + pattern.Shading = shading + + // Matrix (optional). + if obj := dict.Get("Matrix"); obj != nil { + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Matrix not an array (got %T)", obj) + return nil, ErrTypeError + } + pattern.Matrix = arr + } + + // ExtGState (optional). + if obj := dict.Get("ExtGState"); obj != nil { + pattern.ExtGState = obj + } + + return pattern, nil +} + +/* Conversions to pdf objects. */ + +func (pp *PdfPattern) getDict() *core.PdfObjectDictionary { + if indObj, is := pp.container.(*core.PdfIndirectObject); is { + dict, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil + } + return dict + } else if streamObj, is := pp.container.(*core.PdfObjectStream); is { + return streamObj.PdfObjectDictionary + } else { + common.Log.Debug("Trying to access pattern dictionary of invalid object type (%T)", pp.container) + return nil + } +} + +func (pp *PdfPattern) ToPdfObject() core.PdfObject { + d := pp.getDict() + d.Set("Type", core.MakeName("Pattern")) + d.Set("PatternType", core.MakeInteger(pp.PatternType)) + + return pp.container +} + +func (pt *PdfTilingPattern) ToPdfObject() core.PdfObject { + pt.PdfPattern.ToPdfObject() + + d := pt.getDict() + if pt.PaintType != nil { + d.Set("PaintType", pt.PaintType) + } + if pt.TilingType != nil { + d.Set("TilingType", pt.TilingType) + } + if pt.BBox != nil { + d.Set("BBox", pt.BBox.ToPdfObject()) + } + if pt.XStep != nil { + d.Set("XStep", pt.XStep) + } + if pt.YStep != nil { + d.Set("YStep", pt.YStep) + } + if pt.Resources != nil { + d.Set("Resources", pt.Resources.ToPdfObject()) + } + if pt.Matrix != nil { + d.Set("Matrix", pt.Matrix) + } + + return pt.container +} + +func (psp *PdfShadingPattern) ToPdfObject() core.PdfObject { + psp.PdfPattern.ToPdfObject() + d := psp.getDict() + + if psp.Shading != nil { + d.Set("Shading", psp.Shading.ToPdfObject()) + } + if psp.Matrix != nil { + d.Set("Matrix", psp.Matrix) + } + if psp.ExtGState != nil { + d.Set("ExtGState", psp.ExtGState) + } + + return psp.container +} diff --git a/internal/pdf/model/reader.go b/internal/pdf/model/reader.go new file mode 100644 index 0000000..7f34f76 --- /dev/null +++ b/internal/pdf/model/reader.go @@ -0,0 +1,763 @@ +package model + +import ( + "errors" + "fmt" + "io" + "strings" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// PdfReader represents a PDF file reader. It is a frontend to the lower level parsing mechanism and provides +// a higher level access to work with PDF structure and information, such as the page structure etc. +type PdfReader struct { + parser *core.PdfParser + root core.PdfObject + pages *core.PdfObjectDictionary + pageList []*core.PdfIndirectObject + PageList []*PdfPage + pageCount int + catalog *core.PdfObjectDictionary + outlineTree *PdfOutlineTreeNode + AcroForm *PdfAcroForm + + modelManager *ModelManager + + // For tracking traversal (cache). + traversed map[core.PdfObject]bool +} + +// NewPdfReader returns a new PdfReader for an input io.ReadSeeker interface. Can be used to read PDF from +// memory or file. Immediately loads and traverses the PDF structure including pages and page contents (if +// not encrypted). +func NewPdfReader(rs io.ReadSeeker) (*PdfReader, error) { + pdfReader := &PdfReader{} + pdfReader.traversed = map[core.PdfObject]bool{} + + pdfReader.modelManager = NewModelManager() + + // Create the parser, loads the cross reference table and trailer. + parser, err := core.NewParser(rs) + if err != nil { + return nil, err + } + pdfReader.parser = parser + + isEncrypted, err := pdfReader.IsEncrypted() + if err != nil { + return nil, err + } + + // Load pdf doc structure if not encrypted. + if !isEncrypted { + err = pdfReader.loadStructure() + if err != nil { + return nil, err + } + } + + return pdfReader, nil +} + +// IsEncrypted returns true if the PDF file is encrypted. +func (pp *PdfReader) IsEncrypted() (bool, error) { + return pp.parser.IsEncrypted() +} + +// GetEncryptionMethod returns a string containing some information about the encryption method used. +// XXX/TODO: May be better to return a standardized struct with information. +func (pp *PdfReader) GetEncryptionMethod() string { + crypter := pp.parser.GetCrypter() + str := crypter.Filter + " - " + + if crypter.V == 0 { + str += "Undocumented algorithm" + } else if crypter.V == 1 { + // RC4 or AES (bits: 40) + str += "RC4: 40 bits" + } else if crypter.V == 2 { + str += fmt.Sprintf("RC4: %d bits", crypter.Length) + } else if crypter.V == 3 { + str += "Unpublished algorithm" + } else if crypter.V >= 4 { + // Look at CF, StmF, StrF + str += fmt.Sprintf("Stream filter: %s - String filter: %s", crypter.StreamFilter, crypter.StringFilter) + str += "; Crypt filters:" + for name, cf := range crypter.CryptFilters { + str += fmt.Sprintf(" - %s: %s (%d)", name, cf.Cfm, cf.Length) + } + } + perms := crypter.GetAccessPermissions() + str += fmt.Sprintf(" - %#v", perms) + + return str +} + +// Decrypt decrypts the PDF file with a specified password. Also tries to +// decrypt with an empty password. Returns true if successful, +// false otherwise. +func (pp *PdfReader) Decrypt(password []byte) (bool, error) { + success, err := pp.parser.Decrypt(password) + if err != nil { + return false, err + } + if !success { + return false, nil + } + + err = pp.loadStructure() + if err != nil { + common.Log.Debug("error: Fail to load structure (%s)", err) + return false, err + } + + return true, nil +} + +// CheckAccessRights checks access rights and permissions for a specified password. If either user/owner +// password is specified, full rights are granted, otherwise the access rights are specified by the +// Permissions flag. +// +// The bool flag indicates that the user can access and view the file. +// The AccessPermissions shows what access the user has for editing etc. +// An error is returned if there was a problem performing the authentication. +func (pp *PdfReader) CheckAccessRights(password []byte) (bool, core.AccessPermissions, error) { + return pp.parser.CheckAccessRights(password) +} + +// Loads the structure of the pdf file: pages, outlines, etc. +func (pp *PdfReader) loadStructure() error { + if pp.parser.GetCrypter() != nil && !pp.parser.IsAuthenticated() { + return fmt.Errorf("file need to be decrypted first") + } + + trailerDict := pp.parser.GetTrailer() + if trailerDict == nil { + return fmt.Errorf("missing trailer") + } + + // Catalog. + root, ok := trailerDict.Get("Root").(*core.PdfObjectReference) + if !ok { + return fmt.Errorf("invalid Root (trailer: %s)", *trailerDict) + } + oc, err := pp.parser.LookupByReference(*root) + if err != nil { + common.Log.Debug("error: Failed to read root element catalog: %s", err) + return err + } + pcatalog, ok := oc.(*core.PdfIndirectObject) + if !ok { + common.Log.Debug("error: Missing catalog: (root %q) (trailer %s)", oc, *trailerDict) + return errors.New("missing catalog") + } + catalog, ok := (*pcatalog).PdfObject.(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("error: Invalid catalog (%s)", pcatalog.PdfObject) + return errors.New("invalid catalog") + } + common.Log.Trace("Catalog: %s", catalog) + + // Pages. + pagesRef, ok := catalog.Get("Pages").(*core.PdfObjectReference) + if !ok { + return errors.New("pages in catalog should be a reference") + } + op, err := pp.parser.LookupByReference(*pagesRef) + if err != nil { + common.Log.Debug("error: Failed to read pages") + return err + } + ppages, ok := op.(*core.PdfIndirectObject) + if !ok { + common.Log.Debug("error: Pages object invalid") + common.Log.Debug("op: %p", ppages) + return errors.New("pages object invalid") + } + pages, ok := ppages.PdfObject.(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("error: Pages object invalid (%s)", ppages) + return errors.New("pages object invalid") + } + pageCount, ok := pages.Get("Count").(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("error: Pages count object invalid") + return errors.New("pages count invalid") + } + + pp.root = root + pp.catalog = catalog + pp.pages = pages + pp.pageCount = int(*pageCount) + pp.pageList = []*core.PdfIndirectObject{} + + traversedPageNodes := map[core.PdfObject]bool{} + err = pp.buildPageList(ppages, nil, traversedPageNodes) + if err != nil { + return err + } + common.Log.Trace("---") + common.Log.Trace("TOC") + common.Log.Trace("Pages") + common.Log.Trace("%d: %s", len(pp.pageList), pp.pageList) + + // Outlines. + pp.outlineTree, err = pp.loadOutlines() + if err != nil { + common.Log.Debug("error: Failed to build outline tree (%s)", err) + return err + } + + // Load interactive forms and fields. + pp.AcroForm, err = pp.loadForms() + if err != nil { + return err + } + + return nil +} + +// Trace to object. Keeps a list of already visited references to avoid circular references. +// +// Example circular reference. +// 1 0 obj << /Next 2 0 R >> +// 2 0 obj << /Next 1 0 R >> +func (pp *PdfReader) traceToObjectWrapper(obj core.PdfObject, refList map[*core.PdfObjectReference]bool) (core.PdfObject, error) { + // Keep a list of references to avoid circular references. + + ref, isRef := obj.(*core.PdfObjectReference) + if isRef { + // Make sure not already visited (circular ref). + if _, alreadyTraversed := refList[ref]; alreadyTraversed { + return nil, errors.New("circular reference") + } + refList[ref] = true + obj, err := pp.parser.LookupByReference(*ref) + if err != nil { + return nil, err + } + return pp.traceToObjectWrapper(obj, refList) + } + + // Not a reference, an object. Can be indirect or any direct pdf object (other than reference). + return obj, nil +} + +func (pp *PdfReader) traceToObject(obj core.PdfObject) (core.PdfObject, error) { + refList := map[*core.PdfObjectReference]bool{} + return pp.traceToObjectWrapper(obj, refList) +} + +func (pp *PdfReader) loadOutlines() (*PdfOutlineTreeNode, error) { + if pp.parser.GetCrypter() != nil && !pp.parser.IsAuthenticated() { + return nil, fmt.Errorf("file need to be decrypted first") + } + + // Has outlines? Otherwise return an empty outlines structure. + catalog := pp.catalog + outlinesObj := catalog.Get("Outlines") + if outlinesObj == nil { + return nil, nil + } + + common.Log.Trace("-Has outlines") + // Trace references to the object. + outlineRootObj, err := pp.traceToObject(outlinesObj) + if err != nil { + common.Log.Debug("error: Failed to read outlines") + return nil, err + } + common.Log.Trace("Outline root: %v", outlineRootObj) + + if _, isNull := outlineRootObj.(*core.PdfObjectNull); isNull { + common.Log.Trace("Outline root is null - no outlines") + return nil, nil + } + + outlineRoot, ok := outlineRootObj.(*core.PdfIndirectObject) + if !ok { + return nil, errors.New("outline root should be an indirect object") + } + + dict, ok := outlineRoot.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, errors.New("outline indirect object should contain a dictionary") + } + + common.Log.Trace("Outline root dict: %v", dict) + + outlineTree, _, err := pp.buildOutlineTree(outlineRoot, nil, nil) + if err != nil { + return nil, err + } + common.Log.Trace("Resulting outline tree: %v", outlineTree) + + return outlineTree, nil +} + +// Recursive build outline tree. +// prev PdfObject, +// Input: The indirect object containing an Outlines or Outline item dictionary. +// Parent, Prev are the parent or previous node in the hierarchy. +// The function returns the corresponding tree node and the last node which is used +// for setting the Last pointer of the tree node structures. +func (pp *PdfReader) buildOutlineTree(obj core.PdfObject, parent *PdfOutlineTreeNode, prev *PdfOutlineTreeNode) (*PdfOutlineTreeNode, *PdfOutlineTreeNode, error) { + container, isInd := obj.(*core.PdfIndirectObject) + if !isInd { + return nil, nil, fmt.Errorf("outline container not an indirect object %T", obj) + } + dict, ok := container.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, nil, errors.New("not a dictionary object") + } + common.Log.Trace("build outline tree: dict: %v (%v) p: %p", dict, container, container) + + if obj := dict.Get("Title"); obj != nil { + // Outline item has a title. (required) + outlineItem, err := pp.newPdfOutlineItemFromIndirectObject(container) + if err != nil { + return nil, nil, err + } + outlineItem.Parent = parent + outlineItem.Prev = prev + + if firstObj := dict.Get("First"); firstObj != nil { + firstObj, err = pp.traceToObject(firstObj) + if err != nil { + return nil, nil, err + } + if _, isNull := firstObj.(*core.PdfObjectNull); !isNull { + first, last, err := pp.buildOutlineTree(firstObj, &outlineItem.PdfOutlineTreeNode, nil) + if err != nil { + return nil, nil, err + } + outlineItem.First = first + outlineItem.Last = last + } + } + + // Resolve the reference to next + if nextObj := dict.Get("Next"); nextObj != nil { + nextObj, err = pp.traceToObject(nextObj) + if err != nil { + return nil, nil, err + } + if _, isNull := nextObj.(*core.PdfObjectNull); !isNull { + next, last, err := pp.buildOutlineTree(nextObj, parent, &outlineItem.PdfOutlineTreeNode) + if err != nil { + return nil, nil, err + } + outlineItem.Next = next + return &outlineItem.PdfOutlineTreeNode, last, nil + } + } + + return &outlineItem.PdfOutlineTreeNode, &outlineItem.PdfOutlineTreeNode, nil + } else { + // Outline dictionary (structure element). + + outline, err := newPdfOutlineFromIndirectObject(container) + if err != nil { + return nil, nil, err + } + outline.Parent = parent + //outline.Prev = parent + + if firstObj := dict.Get("First"); firstObj != nil { + // Has children... + firstObj, err = pp.traceToObject(firstObj) + if err != nil { + return nil, nil, err + } + if _, isNull := firstObj.(*core.PdfObjectNull); !isNull { + first, last, err := pp.buildOutlineTree(firstObj, &outline.PdfOutlineTreeNode, nil) + if err != nil { + return nil, nil, err + } + outline.First = first + outline.Last = last + } + } + return &outline.PdfOutlineTreeNode, &outline.PdfOutlineTreeNode, nil + } +} + +// GetOutlineTree returns the outline tree. +func (pp *PdfReader) GetOutlineTree() *PdfOutlineTreeNode { + return pp.outlineTree +} + +// GetOutlinesFlattened returns a flattened list of tree nodes and titles. +func (pp *PdfReader) GetOutlinesFlattened() ([]*PdfOutlineTreeNode, []string, error) { + outlineNodeList := []*PdfOutlineTreeNode{} + flattenedTitleList := []string{} + + // Recursive flattening function. + var flattenFunc func(*PdfOutlineTreeNode, *[]*PdfOutlineTreeNode, *[]string, int) + flattenFunc = func(node *PdfOutlineTreeNode, outlineList *[]*PdfOutlineTreeNode, titleList *[]string, depth int) { + if node == nil { + return + } + if node.context == nil { + common.Log.Debug("error: Missing node.context") // Should not happen ever. + return + } + + if item, isItem := node.context.(*PdfOutlineItem); isItem { + *outlineList = append(*outlineList, &item.PdfOutlineTreeNode) + title := strings.Repeat(" ", depth*2) + string(*item.Title) + *titleList = append(*titleList, title) + if item.Next != nil { + flattenFunc(item.Next, outlineList, titleList, depth) + } + } + + if node.First != nil { + title := strings.Repeat(" ", depth*2) + "+" + *titleList = append(*titleList, title) + flattenFunc(node.First, outlineList, titleList, depth+1) + } + } + flattenFunc(pp.outlineTree, &outlineNodeList, &flattenedTitleList, 0) + return outlineNodeList, flattenedTitleList, nil +} + +// loadForms loads the AcroForm. +func (pp *PdfReader) loadForms() (*PdfAcroForm, error) { + if pp.parser.GetCrypter() != nil && !pp.parser.IsAuthenticated() { + return nil, fmt.Errorf("file need to be decrypted first") + } + + // Has forms? + catalog := pp.catalog + obj := catalog.Get("AcroForm") + if obj == nil { + // Nothing to load. + return nil, nil + } + var err error + obj, err = pp.traceToObject(obj) + if err != nil { + return nil, err + } + obj = core.TraceToDirectObject(obj) + if _, isNull := obj.(*core.PdfObjectNull); isNull { + common.Log.Trace("Acroform is a null object (empty)\n") + return nil, nil + } + + formsDict, ok := obj.(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("invalid AcroForm entry %T", obj) + common.Log.Debug("Does not have forms") + return nil, fmt.Errorf("invalid acroform entry %T", obj) + } + common.Log.Trace("Has Acro forms") + // Load it. + + // Ensure we have access to everything. + common.Log.Trace("Traverse the Acroforms structure") + err = pp.traverseObjectData(formsDict) + if err != nil { + common.Log.Debug("error: Unable to traverse AcroForms (%s)", err) + return nil, err + } + + // Create the acro forms object. + acroForm, err := pp.newPdfAcroFormFromDict(formsDict) + if err != nil { + return nil, err + } + + return acroForm, nil +} + +// Build the table of contents. +// tree, ex: Pages -> Pages -> Pages -> Page +// Traverse through the whole thing recursively. +func (pp *PdfReader) buildPageList(node *core.PdfIndirectObject, parent *core.PdfIndirectObject, traversedPageNodes map[core.PdfObject]bool) error { + if node == nil { + return nil + } + + if _, alreadyTraversed := traversedPageNodes[node]; alreadyTraversed { + common.Log.Debug("Cyclic recursion, skipping") + return nil + } + traversedPageNodes[node] = true + + nodeDict, ok := node.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return errors.New("node not a dictionary") + } + + objType, ok := (*nodeDict).Get("Type").(*core.PdfObjectName) + if !ok { + return errors.New("node missing Type (Required)") + } + common.Log.Trace("buildPageList node type: %s", *objType) + if *objType == "Page" { + p, err := pp.newPdfPageFromDict(nodeDict) + if err != nil { + return err + } + p.setContainer(node) + + if parent != nil { + // Set the parent (in case missing or incorrect). + nodeDict.Set("Parent", parent) + } + pp.pageList = append(pp.pageList, node) + pp.PageList = append(pp.PageList, p) + + return nil + } + if *objType != "Pages" { + common.Log.Debug("error: Table of content containing non Page/Pages object! (%s)", objType) + return errors.New("table of content containing non Page/Pages object") + } + + // A Pages object. Update the parent. + if parent != nil { + nodeDict.Set("Parent", parent) + } + + // Resolve the object recursively. + err := pp.traverseObjectData(node) + if err != nil { + return err + } + + kidsObj, err := pp.parser.Trace(nodeDict.Get("Kids")) + if err != nil { + common.Log.Debug("error: Failed loading Kids object") + return err + } + + var kids *core.PdfObjectArray + kids, ok = kidsObj.(*core.PdfObjectArray) + if !ok { + kidsIndirect, isIndirect := kidsObj.(*core.PdfIndirectObject) + if !isIndirect { + return errors.New("invalid Kids object") + } + kids, ok = kidsIndirect.PdfObject.(*core.PdfObjectArray) + if !ok { + return errors.New("invalid Kids indirect object") + } + } + common.Log.Trace("Kids: %s", kids) + for idx, child := range *kids { + child, ok := child.(*core.PdfIndirectObject) + if !ok { + common.Log.Debug("error: Page not indirect object - (%s)", child) + return errors.New("page not indirect object") + } + (*kids)[idx] = child + err = pp.buildPageList(child, node, traversedPageNodes) + if err != nil { + return err + } + } + + return nil +} + +// GetNumPages returns the number of pages in the document. +func (pp *PdfReader) GetNumPages() (int, error) { + if pp.parser.GetCrypter() != nil && !pp.parser.IsAuthenticated() { + return 0, fmt.Errorf("file need to be decrypted first") + } + return len(pp.pageList), nil +} + +// Resolves a reference, returning the object and indicates whether or not +// it was cached. +func (pp *PdfReader) resolveReference(ref *core.PdfObjectReference) (core.PdfObject, bool, error) { + cachedObj, isCached := pp.parser.ObjCache[int(ref.ObjectNumber)] + if !isCached { + common.Log.Trace("Reader Lookup ref: %s", ref) + obj, err := pp.parser.LookupByReference(*ref) + if err != nil { + return nil, false, err + } + pp.parser.ObjCache[int(ref.ObjectNumber)] = obj + return obj, false, nil + } + return cachedObj, true, nil +} + +/* + * Recursively traverse through the page object data and look up + * references to indirect objects. + * + * GH: Are we fully protected against circular references? (Add tests). + */ +func (pp *PdfReader) traverseObjectData(o core.PdfObject) error { + common.Log.Trace("Traverse object data") + if _, isTraversed := pp.traversed[o]; isTraversed { + common.Log.Trace("-Already traversed...") + return nil + } + pp.traversed[o] = true + + if io, isIndirectObj := o.(*core.PdfIndirectObject); isIndirectObj { + common.Log.Trace("io: %s", io) + common.Log.Trace("- %s", io.PdfObject) + err := pp.traverseObjectData(io.PdfObject) + return err + } + + if so, isStreamObj := o.(*core.PdfObjectStream); isStreamObj { + err := pp.traverseObjectData(so.PdfObjectDictionary) + return err + } + + if dict, isDict := o.(*core.PdfObjectDictionary); isDict { + common.Log.Trace("- dict: %s", dict) + for _, name := range dict.Keys() { + v := dict.Get(name) + if ref, isRef := v.(*core.PdfObjectReference); isRef { + resolvedObj, _, err := pp.resolveReference(ref) + if err != nil { + return err + } + dict.Set(name, resolvedObj) + err = pp.traverseObjectData(resolvedObj) + if err != nil { + return err + } + } else { + err := pp.traverseObjectData(v) + if err != nil { + return err + } + } + } + return nil + } + + if arr, isArray := o.(*core.PdfObjectArray); isArray { + common.Log.Trace("- array: %s", arr) + for idx, v := range *arr { + if ref, isRef := v.(*core.PdfObjectReference); isRef { + resolvedObj, _, err := pp.resolveReference(ref) + if err != nil { + return err + } + (*arr)[idx] = resolvedObj + + err = pp.traverseObjectData(resolvedObj) + if err != nil { + return err + } + } else { + err := pp.traverseObjectData(v) + if err != nil { + return err + } + } + } + return nil + } + + if _, isRef := o.(*core.PdfObjectReference); isRef { + common.Log.Debug("error: Reader tracing a reference!") + return errors.New("reader tracing a reference") + } + + return nil +} + +// GetPageAsIndirectObject returns an indirect object containing the page dictionary for a specified page number. +func (pp *PdfReader) GetPageAsIndirectObject(pageNumber int) (core.PdfObject, error) { + if pp.parser.GetCrypter() != nil && !pp.parser.IsAuthenticated() { + return nil, fmt.Errorf("file needs to be decrypted first") + } + if len(pp.pageList) < pageNumber { + return nil, errors.New("invalid page number (page count too short)") + } + page := pp.pageList[pageNumber-1] + + // Look up all references related to page and load everything. + err := pp.traverseObjectData(page) + if err != nil { + return nil, err + } + common.Log.Trace("Page: %T %s", page, page) + common.Log.Trace("- %T %s", page.PdfObject, page.PdfObject) + + return page, nil +} + +// GetPage returns the PdfPage model for the specified page number. +func (pp *PdfReader) GetPage(pageNumber int) (*PdfPage, error) { + if pp.parser.GetCrypter() != nil && !pp.parser.IsAuthenticated() { + return nil, fmt.Errorf("file needs to be decrypted first") + } + if len(pp.pageList) < pageNumber { + return nil, errors.New("invalid page number (page count too short)") + } + idx := pageNumber - 1 + if idx < 0 { + return nil, fmt.Errorf("page numbering must start at 1") + } + page := pp.PageList[idx] + + return page, nil +} + +// GetOCProperties returns the optional content properties PdfObject. +func (pp *PdfReader) GetOCProperties() (core.PdfObject, error) { + dict := pp.catalog + obj := dict.Get("OCProperties") + var err error + obj, err = pp.traceToObject(obj) + if err != nil { + return nil, err + } + + // Resolve all references... + // Should be pretty safe. Should not be referencing to pages or + // any large structures. Local structures and references + // to OC Groups. + err = pp.traverseObjectData(obj) + if err != nil { + return nil, err + } + + return obj, nil +} + +// Inspect inspects the object types, subtypes and content in the PDF file returning a map of +// object type to number of instances of each. +func (pp *PdfReader) Inspect() (map[string]int, error) { + return pp.parser.Inspect() +} + +// GetObjectNums returns the object numbers of the PDF objects in the file +// Numbered objects are either indirect objects or stream objects. +// e.g. objNums := pdfReader.GetObjectNums() +// The underlying objects can then be accessed with +// pdfReader.GetIndirectObjectByNumber(objNums[0]) for the first available object. +func (r *PdfReader) GetObjectNums() []int { + return r.parser.GetObjectNums() +} + +// GetIndirectObjectByNumber retrieves and returns a specific PdfObject by object number. +func (pp *PdfReader) GetIndirectObjectByNumber(number int) (core.PdfObject, error) { + obj, err := pp.parser.LookupByNumber(number) + return obj, err +} + +// GetTrailer returns the PDF's trailer dictionary. +func (pp *PdfReader) GetTrailer() (*core.PdfObjectDictionary, error) { + trailerDict := pp.parser.GetTrailer() + if trailerDict == nil { + return nil, errors.New("trailer missing") + } + + return trailerDict, nil +} diff --git a/internal/pdf/model/resources.go b/internal/pdf/model/resources.go new file mode 100644 index 0000000..569fc8b --- /dev/null +++ b/internal/pdf/model/resources.go @@ -0,0 +1,406 @@ +package model + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// Page resources model. +// Implements PdfModel. +type PdfPageResources struct { + ExtGState core.PdfObject + ColorSpace *PdfPageResourcesColorspaces + Pattern core.PdfObject + Shading core.PdfObject + XObject core.PdfObject + Font core.PdfObject + ProcSet core.PdfObject + Properties core.PdfObject + // Primitive reource container. + primitive *core.PdfObjectDictionary +} + +func NewPdfPageResources() *PdfPageResources { + r := &PdfPageResources{} + r.primitive = core.MakeDict() + return r +} + +func NewPdfPageResourcesFromDict(dict *core.PdfObjectDictionary) (*PdfPageResources, error) { + r := NewPdfPageResources() + + if obj := dict.Get("ExtGState"); obj != nil { + r.ExtGState = obj + } + if obj := dict.Get("ColorSpace"); obj != nil && !isNullObject(obj) { + colorspaces, err := newPdfPageResourcesColorspacesFromPdfObject(obj) + if err != nil { + return nil, err + } + r.ColorSpace = colorspaces + } + if obj := dict.Get("Pattern"); obj != nil { + r.Pattern = obj + } + if obj := dict.Get("Shading"); obj != nil { + r.Shading = obj + } + if obj := dict.Get("XObject"); obj != nil { + r.XObject = obj + } + if obj := dict.Get("Font"); obj != nil { + r.Font = obj + } + if obj := dict.Get("ProcSet"); obj != nil { + r.ProcSet = obj + } + if obj := dict.Get("Properties"); obj != nil { + r.Properties = obj + } + + return r, nil +} + +func (r *PdfPageResources) GetContainingPdfObject() core.PdfObject { + return r.primitive +} + +func (r *PdfPageResources) ToPdfObject() core.PdfObject { + d := r.primitive + d.SetIfNotNil("ExtGState", r.ExtGState) + if r.ColorSpace != nil { + d.SetIfNotNil("ColorSpace", r.ColorSpace.ToPdfObject()) + } + d.SetIfNotNil("Pattern", r.Pattern) + d.SetIfNotNil("Shading", r.Shading) + d.SetIfNotNil("XObject", r.XObject) + d.SetIfNotNil("Font", r.Font) + d.SetIfNotNil("ProcSet", r.ProcSet) + d.SetIfNotNil("Properties", r.Properties) + + return d +} + +// Add External Graphics State (GState). The gsDict can be specified either directly as a dictionary or an indirect +// object containing a dictionary. +func (r *PdfPageResources) AddExtGState(gsName core.PdfObjectName, gsDict core.PdfObject) error { + if r.ExtGState == nil { + r.ExtGState = core.MakeDict() + } + + obj := r.ExtGState + dict, ok := core.TraceToDirectObject(obj).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("ExtGState type error (got %T/%T)", obj, core.TraceToDirectObject(obj)) + return ErrTypeError + } + + dict.Set(gsName, gsDict) + return nil +} + +// Get the ExtGState specified by keyName. Returns a bool indicating whether it was found or not. +func (r *PdfPageResources) GetExtGState(keyName core.PdfObjectName) (core.PdfObject, bool) { + if r.ExtGState == nil { + return nil, false + } + + dict, ok := core.TraceToDirectObject(r.ExtGState).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("error: Invalid ExtGState entry - not a dict (got %T)", r.ExtGState) + return nil, false + } + + if obj := dict.Get(keyName); obj != nil { + return obj, true + } else { + return nil, false + } +} + +// Check whether a font is defined by the specified keyName. +func (r *PdfPageResources) HasExtGState(keyName core.PdfObjectName) bool { + _, has := r.GetFontByName(keyName) + return has +} + +// Get the shading specified by keyName. Returns nil if not existing. The bool flag indicated whether it was found +// or not. +func (r *PdfPageResources) GetShadingByName(keyName core.PdfObjectName) (*PdfShading, bool) { + if r.Shading == nil { + return nil, false + } + + shadingDict, ok := core.TraceToDirectObject(r.Shading).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("error: Invalid Shading entry - not a dict (got %T)", r.Shading) + return nil, false + } + + if obj := shadingDict.Get(keyName); obj != nil { + shading, err := newPdfShadingFromPdfObject(obj) + if err != nil { + common.Log.Debug("error: failed to load pdf shading: %v", err) + return nil, false + } + return shading, true + } else { + return nil, false + } +} + +// Set a shading resource specified by keyName. +func (r *PdfPageResources) SetShadingByName(keyName core.PdfObjectName, shadingObj core.PdfObject) error { + if r.Shading == nil { + r.Shading = core.MakeDict() + } + + shadingDict, has := r.Shading.(*core.PdfObjectDictionary) + if !has { + return ErrTypeError + } + + shadingDict.Set(keyName, shadingObj) + return nil +} + +// Get the pattern specified by keyName. Returns nil if not existing. The bool flag indicated whether it was found +// or not. +func (r *PdfPageResources) GetPatternByName(keyName core.PdfObjectName) (*PdfPattern, bool) { + if r.Pattern == nil { + return nil, false + } + + patternDict, ok := core.TraceToDirectObject(r.Pattern).(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("error: Invalid Pattern entry - not a dict (got %T)", r.Pattern) + return nil, false + } + + if obj := patternDict.Get(keyName); obj != nil { + pattern, err := newPdfPatternFromPdfObject(obj) + if err != nil { + common.Log.Debug("error: failed to load pdf pattern: %v", err) + return nil, false + } + + return pattern, true + } else { + return nil, false + } +} + +// Set a pattern resource specified by keyName. +func (r *PdfPageResources) SetPatternByName(keyName core.PdfObjectName, pattern core.PdfObject) error { + if r.Pattern == nil { + r.Pattern = core.MakeDict() + } + + patternDict, has := r.Pattern.(*core.PdfObjectDictionary) + if !has { + return ErrTypeError + } + + patternDict.Set(keyName, pattern) + return nil +} + +// Get the font specified by keyName. Returns the PdfObject which the entry refers to. +// Returns a bool value indicating whether or not the entry was found. +func (r *PdfPageResources) GetFontByName(keyName core.PdfObjectName) (core.PdfObject, bool) { + if r.Font == nil { + return nil, false + } + + fontDict, has := core.TraceToDirectObject(r.Font).(*core.PdfObjectDictionary) + if !has { + common.Log.Debug("error: Font not a dictionary! (got %T)", core.TraceToDirectObject(r.Font)) + return nil, false + } + + if obj := fontDict.Get(keyName); obj != nil { + return obj, true + } else { + return nil, false + } +} + +// Check whether a font is defined by the specified keyName. +func (r *PdfPageResources) HasFontByName(keyName core.PdfObjectName) bool { + _, has := r.GetFontByName(keyName) + return has +} + +// Set the font specified by keyName to the given object. +func (r *PdfPageResources) SetFontByName(keyName core.PdfObjectName, obj core.PdfObject) error { + if r.Font == nil { + // Create if not existing. + r.Font = core.MakeDict() + } + + fontDict, has := core.TraceToDirectObject(r.Font).(*core.PdfObjectDictionary) + if !has { + common.Log.Debug("error: Font not a dictionary! (got %T)", core.TraceToDirectObject(r.Font)) + return ErrTypeError + } + + fontDict.Set(keyName, obj) + return nil +} + +func (r *PdfPageResources) GetColorspaceByName(keyName core.PdfObjectName) (PdfColorspace, bool) { + if r.ColorSpace == nil { + return nil, false + } + + cs, has := r.ColorSpace.Colorspaces[string(keyName)] + if !has { + return nil, false + } + + return cs, true +} + +func (r *PdfPageResources) HasColorspaceByName(keyName core.PdfObjectName) bool { + if r.ColorSpace == nil { + return false + } + + _, has := r.ColorSpace.Colorspaces[string(keyName)] + return has +} + +func (r *PdfPageResources) SetColorspaceByName(keyName core.PdfObjectName, cs PdfColorspace) error { + if r.ColorSpace == nil { + r.ColorSpace = NewPdfPageResourcesColorspaces() + } + + r.ColorSpace.Set(keyName, cs) + return nil +} + +// Check if an XObject with a specified keyName is defined. +func (r *PdfPageResources) HasXObjectByName(keyName core.PdfObjectName) bool { + obj, _ := r.GetXObjectByName(keyName) + if obj != nil { + return true + } else { + return false + } +} + +type XObjectType int + +const ( + XObjectTypeUndefined XObjectType = iota + XObjectTypeImage XObjectType = iota + XObjectTypeForm XObjectType = iota + XObjectTypePS XObjectType = iota + XObjectTypeUnknown XObjectType = iota +) + +// Returns the XObject with the specified keyName and the object type. +func (r *PdfPageResources) GetXObjectByName(keyName core.PdfObjectName) (*core.PdfObjectStream, XObjectType) { + if r.XObject == nil { + return nil, XObjectTypeUndefined + } + + xresDict, has := core.TraceToDirectObject(r.XObject).(*core.PdfObjectDictionary) + if !has { + common.Log.Debug("error: XObject not a dictionary! (got %T)", core.TraceToDirectObject(r.XObject)) + return nil, XObjectTypeUndefined + } + + if obj := xresDict.Get(keyName); obj != nil { + stream, ok := obj.(*core.PdfObjectStream) + if !ok { + common.Log.Debug("XObject not pointing to a stream %T", obj) + return nil, XObjectTypeUndefined + } + dict := stream.PdfObjectDictionary + + name, ok := core.TraceToDirectObject(dict.Get("Subtype")).(*core.PdfObjectName) + if !ok { + common.Log.Debug("XObject Subtype not a Name, dict: %s", dict.String()) + return nil, XObjectTypeUndefined + } + + switch *name { + case "Image": + return stream, XObjectTypeImage + case "Form": + return stream, XObjectTypeForm + case "PS": + return stream, XObjectTypePS + default: + common.Log.Debug("XObject Subtype not known (%s)", *name) + return nil, XObjectTypeUndefined + } + } else { + return nil, XObjectTypeUndefined + } +} + +func (r *PdfPageResources) SetXObjectByName(keyName core.PdfObjectName, stream *core.PdfObjectStream) error { + if r.XObject == nil { + r.XObject = core.MakeDict() + } + + obj := core.TraceToDirectObject(r.XObject) + xresDict, has := obj.(*core.PdfObjectDictionary) + if !has { + common.Log.Debug("invalid XObject, got %T/%T", r.XObject, obj) + return errors.New("type check error") + } + + xresDict.Set(keyName, stream) + return nil +} + +func (r *PdfPageResources) GetXObjectImageByName(keyName core.PdfObjectName) (*XObjectImage, error) { + stream, xtype := r.GetXObjectByName(keyName) + if stream == nil { + return nil, nil + } + if xtype != XObjectTypeImage { + return nil, errors.New("not an image") + } + + ximg, err := NewXObjectImageFromStream(stream) + if err != nil { + return nil, err + } + + return ximg, nil +} + +func (r *PdfPageResources) SetXObjectImageByName(keyName core.PdfObjectName, ximg *XObjectImage) error { + stream := ximg.ToPdfObject().(*core.PdfObjectStream) + err := r.SetXObjectByName(keyName, stream) + return err +} + +func (r *PdfPageResources) GetXObjectFormByName(keyName core.PdfObjectName) (*XObjectForm, error) { + stream, xtype := r.GetXObjectByName(keyName) + if stream == nil { + return nil, nil + } + if xtype != XObjectTypeForm { + return nil, errors.New("not a form") + } + + xform, err := NewXObjectFormFromStream(stream) + if err != nil { + return nil, err + } + + return xform, nil +} + +func (r *PdfPageResources) SetXObjectFormByName(keyName core.PdfObjectName, xform *XObjectForm) error { + stream := xform.ToPdfObject().(*core.PdfObjectStream) + err := r.SetXObjectByName(keyName, stream) + return err +} diff --git a/internal/pdf/model/sampling/resample.go b/internal/pdf/model/sampling/resample.go new file mode 100644 index 0000000..4d49b24 --- /dev/null +++ b/internal/pdf/model/sampling/resample.go @@ -0,0 +1,191 @@ +package sampling + +// Resample the raw data which is in 8-bit (byte) format as a different +// bit count per sample, up to 32 bits (uint32). +func ResampleBytes(data []byte, bitsPerSample int) []uint32 { + samples := []uint32{} + + bitsLeftPerSample := bitsPerSample + var sample uint32 + var remainder byte + remainderBits := 0 + + index := 0 + + i := 0 + for i < len(data) { + // Start with the remainder. + if remainderBits > 0 { + take := remainderBits + if bitsLeftPerSample < take { + take = bitsLeftPerSample + } + + sample = (sample << uint(take)) | uint32(remainder>>uint(8-take)) + remainderBits -= take + if remainderBits > 0 { + remainder = remainder << uint(take) + } else { + remainder = 0 + } + bitsLeftPerSample -= take + if bitsLeftPerSample == 0 { + //samples[index] = sample + samples = append(samples, sample) + bitsLeftPerSample = bitsPerSample + sample = 0 + index++ + } + } else { + // Take next byte + b := data[i] + i++ + + // 8 bits. + take := 8 + if bitsLeftPerSample < take { + take = bitsLeftPerSample + } + remainderBits = 8 - take + sample = (sample << uint(take)) | uint32(b>>uint(remainderBits)) + + if take < 8 { + remainder = b << uint(take) + } + + bitsLeftPerSample -= take + if bitsLeftPerSample == 0 { + //samples[index] = sample + samples = append(samples, sample) + bitsLeftPerSample = bitsPerSample + sample = 0 + index++ + } + } + } + + // Take care of remaining samples (if enough data available). + for remainderBits >= bitsPerSample { + take := remainderBits + if bitsLeftPerSample < take { + take = bitsLeftPerSample + } + + sample = (sample << uint(take)) | uint32(remainder>>uint(8-take)) + remainderBits -= take + if remainderBits > 0 { + remainder = remainder << uint(take) + } else { + remainder = 0 + } + bitsLeftPerSample -= take + if bitsLeftPerSample == 0 { + //samples[index] = sample + samples = append(samples, sample) + bitsLeftPerSample = bitsPerSample + sample = 0 + index++ + } + } + + return samples +} + +// Resample the raw data which is in <=32-bit (uint32) format as a different +// bit count per sample, up to 32 bits (uint32). +// +// bitsPerOutputSample is the number of bits for each output sample (up to 32) +// bitsPerInputSample is the number of bits used in each input sample (up to 32) +func ResampleUint32(data []uint32, bitsPerInputSample int, bitsPerOutputSample int) []uint32 { + samples := []uint32{} + + bitsLeftPerSample := bitsPerOutputSample + var sample uint32 + var remainder uint32 + remainderBits := 0 + + index := 0 + + i := 0 + for i < len(data) { + // Start with the remainder. + if remainderBits > 0 { + take := remainderBits + if bitsLeftPerSample < take { + take = bitsLeftPerSample + } + + sample = (sample << uint(take)) | uint32(remainder>>uint(bitsPerInputSample-take)) + remainderBits -= take + if remainderBits > 0 { + remainder = remainder << uint(take) + } else { + remainder = 0 + } + bitsLeftPerSample -= take + if bitsLeftPerSample == 0 { + //samples[index] = sample + samples = append(samples, sample) + bitsLeftPerSample = bitsPerOutputSample + sample = 0 + index++ + } + } else { + // Take next byte + b := data[i] + i++ + + // 32 bits. + take := bitsPerInputSample + if bitsLeftPerSample < take { + take = bitsLeftPerSample + } + remainderBits = bitsPerInputSample - take + sample = (sample << uint(take)) | uint32(b>>uint(remainderBits)) + + if take < bitsPerInputSample { + remainder = b << uint(take) + } + + bitsLeftPerSample -= take + if bitsLeftPerSample == 0 { + //samples[index] = sample + samples = append(samples, sample) + bitsLeftPerSample = bitsPerOutputSample + sample = 0 + index++ + } + } + } + + // Take care of remaining samples (if enough data available). + for remainderBits >= bitsPerOutputSample { + take := remainderBits + if bitsLeftPerSample < take { + take = bitsLeftPerSample + } + + sample = (sample << uint(take)) | uint32(remainder>>uint(bitsPerInputSample-take)) + remainderBits -= take + if remainderBits > 0 { + remainder = remainder << uint(take) + } else { + remainder = 0 + } + bitsLeftPerSample -= take + if bitsLeftPerSample == 0 { + samples = append(samples, sample) + bitsLeftPerSample = bitsPerOutputSample + sample = 0 + index++ + } + } + + // If there are partial output samples, pad with 0s. + if bitsLeftPerSample > 0 && bitsLeftPerSample < bitsPerOutputSample { + sample <<= uint(bitsLeftPerSample) + samples = append(samples, sample) + } + + return samples +} diff --git a/internal/pdf/model/shading.go b/internal/pdf/model/shading.go new file mode 100644 index 0000000..772704f --- /dev/null +++ b/internal/pdf/model/shading.go @@ -0,0 +1,1102 @@ +package model + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// There are 7 types of shading, indicated by the shading type variable: +// 1: Function-based shading. +// 2: Axial shading. +// 3: Radial shading. +// 4: Free-form Gouraud-shaded triangle mesh. +// 5: Lattice-form Gouraud-shaded triangle mesh. +// 6: Coons patch mesh. +// 7: Tensor-product patch mesh. +// types 4-7 are contained in a stream object, where the dictionary is given by the stream dictionary. +type PdfShading struct { + ShadingType *core.PdfObjectInteger + ColorSpace PdfColorspace + Background *core.PdfObjectArray + BBox *PdfRectangle + AntiAlias *core.PdfObjectBool + + context PdfModel // The sub shading type entry (types 1-7). Represented by PdfShadingType1-7. + container core.PdfObject // The container. Can be stream, indirect object, or dictionary. +} + +func (ps *PdfShading) GetContainingPdfObject() core.PdfObject { + return ps.container +} + +// Context in this case is a reference to the subshading entry as represented by PdfShadingType1-7. +func (ps *PdfShading) GetContext() PdfModel { + return ps.context +} + +// Set the sub annotation (context). +func (ps *PdfShading) SetContext(ctx PdfModel) { + ps.context = ctx +} + +func (ps *PdfShading) getShadingDict() (*core.PdfObjectDictionary, error) { + obj := ps.container + + if indObj, isInd := obj.(*core.PdfIndirectObject); isInd { + d, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return nil, ErrTypeError + } + + return d, nil + } else if streamObj, isStream := obj.(*core.PdfObjectStream); isStream { + return streamObj.PdfObjectDictionary, nil + } else if d, isDict := obj.(*core.PdfObjectDictionary); isDict { + return d, nil + } else { + common.Log.Debug("Unable to access shading dictionary") + return nil, ErrTypeError + } +} + +// Shading type 1: Function-based shading. +type PdfShadingType1 struct { + *PdfShading + Domain *core.PdfObjectArray + Matrix *core.PdfObjectArray + Function []PdfFunction +} + +// Shading type 2: Axial shading. +type PdfShadingType2 struct { + *PdfShading + Coords *core.PdfObjectArray + Domain *core.PdfObjectArray + Function []PdfFunction + Extend *core.PdfObjectArray +} + +// Shading type 3: Radial shading. +type PdfShadingType3 struct { + *PdfShading + Coords *core.PdfObjectArray + Domain *core.PdfObjectArray + Function []PdfFunction + Extend *core.PdfObjectArray +} + +// Shading type 4: Free-form Gouraud-shaded triangle mesh. +type PdfShadingType4 struct { + *PdfShading + BitsPerCoordinate *core.PdfObjectInteger + BitsPerComponent *core.PdfObjectInteger + BitsPerFlag *core.PdfObjectInteger + Decode *core.PdfObjectArray + Function []PdfFunction +} + +// Shading type 5: Lattice-form Gouraud-shaded triangle mesh. +type PdfShadingType5 struct { + *PdfShading + BitsPerCoordinate *core.PdfObjectInteger + BitsPerComponent *core.PdfObjectInteger + VerticesPerRow *core.PdfObjectInteger + Decode *core.PdfObjectArray + Function []PdfFunction +} + +// Shading type 6: Coons patch mesh. +type PdfShadingType6 struct { + *PdfShading + BitsPerCoordinate *core.PdfObjectInteger + BitsPerComponent *core.PdfObjectInteger + BitsPerFlag *core.PdfObjectInteger + Decode *core.PdfObjectArray + Function []PdfFunction +} + +// Shading type 7: Tensor-product patch mesh. +type PdfShadingType7 struct { + *PdfShading + BitsPerCoordinate *core.PdfObjectInteger + BitsPerComponent *core.PdfObjectInteger + BitsPerFlag *core.PdfObjectInteger + Decode *core.PdfObjectArray + Function []PdfFunction +} + +// Used for PDF parsing. Loads the PDF shading from a PDF object. +// Can be either an indirect object (types 1-3) containing the dictionary, or a stream object with the stream +// dictionary containing the shading dictionary (types 4-7). +func newPdfShadingFromPdfObject(obj core.PdfObject) (*PdfShading, error) { + shading := &PdfShading{} + + var dict *core.PdfObjectDictionary + if indObj, isInd := obj.(*core.PdfIndirectObject); isInd { + shading.container = indObj + + d, ok := indObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("Object not a dictionary type") + return nil, ErrTypeError + } + + dict = d + } else if streamObj, isStream := obj.(*core.PdfObjectStream); isStream { + shading.container = streamObj + dict = streamObj.PdfObjectDictionary + } else if d, isDict := obj.(*core.PdfObjectDictionary); isDict { + shading.container = d + dict = d + } else { + common.Log.Debug("Object type unexpected (%T)", obj) + return nil, ErrTypeError + } + + if dict == nil { + common.Log.Debug("Dictionary missing") + return nil, errors.New("dict missing") + } + + // Shading type (required). + obj = dict.Get("ShadingType") + if obj == nil { + common.Log.Debug("Required shading type missing") + return nil, ErrRequiredAttributeMissing + } + obj = core.TraceToDirectObject(obj) + shadingType, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("invalid type for shading type (%T)", obj) + return nil, ErrTypeError + } + if *shadingType < 1 || *shadingType > 7 { + common.Log.Debug("invalid shading type, not 1-7 (got %d)", *shadingType) + return nil, ErrTypeError + } + shading.ShadingType = shadingType + + // Color space (required). + obj = dict.Get("ColorSpace") + if obj == nil { + common.Log.Debug("Required ColorSpace entry missing") + return nil, ErrRequiredAttributeMissing + } + cs, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + common.Log.Debug("Failed loading colorspace: %v", err) + return nil, err + } + shading.ColorSpace = cs + + // Background (optional). Array of color components. + obj = dict.Get("Background") + if obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Background should be specified by an array (got %T)", obj) + return nil, ErrTypeError + } + shading.Background = arr + } + + // BBox. + obj = dict.Get("BBox") + if obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Background should be specified by an array (got %T)", obj) + return nil, ErrTypeError + } + rect, err := NewPdfRectangle(*arr) + if err != nil { + common.Log.Debug("BBox error: %v", err) + return nil, err + } + shading.BBox = rect + } + + // AntiAlias. + obj = dict.Get("AntiAlias") + if obj != nil { + obj = core.TraceToDirectObject(obj) + val, ok := obj.(*core.PdfObjectBool) + if !ok { + common.Log.Debug("AntiAlias invalid type, should be bool (got %T)", obj) + return nil, ErrTypeError + } + shading.AntiAlias = val + } + + // Load specific shading type specific entries. + switch *shadingType { + case 1: + ctx, err := newPdfShadingType1FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + case 2: + ctx, err := newPdfShadingType2FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + case 3: + ctx, err := newPdfShadingType3FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + case 4: + ctx, err := newPdfShadingType4FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + case 5: + ctx, err := newPdfShadingType5FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + case 6: + ctx, err := newPdfShadingType6FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + case 7: + ctx, err := newPdfShadingType7FromDictionary(dict) + if err != nil { + return nil, err + } + ctx.PdfShading = shading + shading.context = ctx + return shading, nil + } + + return nil, errors.New("unknown shading type") +} + +// Load shading type 1 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType1FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType1, error) { + shading := PdfShadingType1{} + + // Domain (optional). + if obj := dict.Get("Domain"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Domain not an array (got %T)", obj) + return nil, errors.New("type check error") + } + shading.Domain = arr + } + + // Matrix (optional). + if obj := dict.Get("Matrix"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Matrix not an array (got %T)", obj) + return nil, errors.New("type check error") + } + shading.Matrix = arr + } + + // Function (required). + obj := dict.Get("Function") + if obj == nil { + common.Log.Debug("Required attribute missing: Function") + return nil, ErrRequiredAttributeMissing + } + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + + return &shading, nil +} + +// Load shading type 2 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType2FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType2, error) { + shading := PdfShadingType2{} + + // Coords (required). + obj := dict.Get("Coords") + if obj == nil { + common.Log.Debug("Required attribute missing: Coords") + return nil, ErrRequiredAttributeMissing + } + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Coords not an array (got %T)", obj) + return nil, errors.New("type check error") + } + if len(*arr) != 4 { + common.Log.Debug("Coords length not 4 (got %d)", len(*arr)) + return nil, errors.New("invalid attribute") + } + shading.Coords = arr + + // Domain (optional). + if obj := dict.Get("Domain"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Domain not an array (got %T)", obj) + return nil, errors.New("type check error") + } + shading.Domain = arr + } + + // Function (required). + obj = dict.Get("Function") + if obj == nil { + common.Log.Debug("Required attribute missing: Function") + return nil, ErrRequiredAttributeMissing + } + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + + // Extend (optional). + if obj := dict.Get("Extend"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Matrix not an array (got %T)", obj) + return nil, ErrTypeCheck + } + if len(*arr) != 2 { + common.Log.Debug("Extend length not 2 (got %d)", len(*arr)) + return nil, ErrInvalidAttribute + } + shading.Extend = arr + } + + return &shading, nil +} + +// Load shading type 3 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType3FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType3, error) { + shading := PdfShadingType3{} + + // Coords (required). + obj := dict.Get("Coords") + if obj == nil { + common.Log.Debug("Required attribute missing: Coords") + return nil, ErrRequiredAttributeMissing + } + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Coords not an array (got %T)", obj) + return nil, ErrTypeError + } + if len(*arr) != 6 { + common.Log.Debug("Coords length not 6 (got %d)", len(*arr)) + return nil, ErrInvalidAttribute + } + shading.Coords = arr + + // Domain (optional). + if obj := dict.Get("Domain"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Domain not an array (got %T)", obj) + return nil, ErrTypeError + } + shading.Domain = arr + } + + // Function (required). + obj = dict.Get("Function") + if obj == nil { + common.Log.Debug("Required attribute missing: Function") + return nil, ErrRequiredAttributeMissing + } + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + + // Extend (optional). + if obj := dict.Get("Extend"); obj != nil { + obj = core.TraceToDirectObject(obj) + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Matrix not an array (got %T)", obj) + return nil, ErrTypeError + } + if len(*arr) != 2 { + common.Log.Debug("Extend length not 2 (got %d)", len(*arr)) + return nil, ErrInvalidAttribute + } + shading.Extend = arr + } + + return &shading, nil +} + +// Load shading type 4 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType4FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType4, error) { + shading := PdfShadingType4{} + + // BitsPerCoordinate (required). + obj := dict.Get("BitsPerCoordinate") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerCoordinate") + return nil, ErrRequiredAttributeMissing + } + integer, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerCoordinate not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerCoordinate = integer + + // BitsPerComponent (required). + obj = dict.Get("BitsPerComponent") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerComponent") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerComponent not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // BitsPerFlag (required). + obj = dict.Get("BitsPerFlag") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerFlag") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerFlag not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // Decode (required). + obj = dict.Get("Decode") + if obj == nil { + common.Log.Debug("Required attribute missing: Decode") + return nil, ErrRequiredAttributeMissing + } + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Decode not an array (got %T)", obj) + return nil, ErrTypeError + } + shading.Decode = arr + + // Function (required). + obj = dict.Get("Function") + if obj == nil { + common.Log.Debug("Required attribute missing: Function") + return nil, ErrRequiredAttributeMissing + } + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + + return &shading, nil +} + +// Load shading type 5 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType5FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType5, error) { + shading := PdfShadingType5{} + + // BitsPerCoordinate (required). + obj := dict.Get("BitsPerCoordinate") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerCoordinate") + return nil, ErrRequiredAttributeMissing + } + integer, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerCoordinate not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerCoordinate = integer + + // BitsPerComponent (required). + obj = dict.Get("BitsPerComponent") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerComponent") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerComponent not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // VerticesPerRow (required). + obj = dict.Get("VerticesPerRow") + if obj == nil { + common.Log.Debug("Required attribute missing: VerticesPerRow") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("VerticesPerRow not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.VerticesPerRow = integer + + // Decode (required). + obj = dict.Get("Decode") + if obj == nil { + common.Log.Debug("Required attribute missing: Decode") + return nil, ErrRequiredAttributeMissing + } + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Decode not an array (got %T)", obj) + return nil, ErrTypeError + } + shading.Decode = arr + + // Function (optional). + if obj := dict.Get("Function"); obj != nil { + // Function (required). + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } + + return &shading, nil +} + +// Load shading type 6 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType6FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType6, error) { + shading := PdfShadingType6{} + + // BitsPerCoordinate (required). + obj := dict.Get("BitsPerCoordinate") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerCoordinate") + return nil, ErrRequiredAttributeMissing + } + integer, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerCoordinate not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerCoordinate = integer + + // BitsPerComponent (required). + obj = dict.Get("BitsPerComponent") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerComponent") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerComponent not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // BitsPerFlag (required). + obj = dict.Get("BitsPerFlag") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerFlag") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerFlag not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // Decode (required). + obj = dict.Get("Decode") + if obj == nil { + common.Log.Debug("Required attribute missing: Decode") + return nil, ErrRequiredAttributeMissing + } + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Decode not an array (got %T)", obj) + return nil, ErrTypeError + } + shading.Decode = arr + + // Function (optional). + if obj := dict.Get("Function"); obj != nil { + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } + + return &shading, nil +} + +// Load shading type 7 specific attributes from pdf object. Used in parsing/loading PDFs. +func newPdfShadingType7FromDictionary(dict *core.PdfObjectDictionary) (*PdfShadingType7, error) { + shading := PdfShadingType7{} + + // BitsPerCoordinate (required). + obj := dict.Get("BitsPerCoordinate") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerCoordinate") + return nil, ErrRequiredAttributeMissing + } + integer, ok := obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerCoordinate not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerCoordinate = integer + + // BitsPerComponent (required). + obj = dict.Get("BitsPerComponent") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerComponent") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerComponent not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // BitsPerFlag (required). + obj = dict.Get("BitsPerFlag") + if obj == nil { + common.Log.Debug("Required attribute missing: BitsPerFlag") + return nil, ErrRequiredAttributeMissing + } + integer, ok = obj.(*core.PdfObjectInteger) + if !ok { + common.Log.Debug("BitsPerFlag not an integer (got %T)", obj) + return nil, ErrTypeError + } + shading.BitsPerComponent = integer + + // Decode (required). + obj = dict.Get("Decode") + if obj == nil { + common.Log.Debug("Required attribute missing: Decode") + return nil, ErrRequiredAttributeMissing + } + arr, ok := obj.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("Decode not an array (got %T)", obj) + return nil, ErrTypeError + } + shading.Decode = arr + + // Function (optional). + if obj := dict.Get("Function"); obj != nil { + shading.Function = []PdfFunction{} + if array, is := obj.(*core.PdfObjectArray); is { + for _, obj := range *array { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } else { + function, err := newPdfFunctionFromPdfObject(obj) + if err != nil { + common.Log.Debug("error parsing function: %v", err) + return nil, err + } + shading.Function = append(shading.Function, function) + } + } + + return &shading, nil +} + +/* Conversion to pdf objects. */ + +func (ps *PdfShading) ToPdfObject() core.PdfObject { + container := ps.container + + d, err := ps.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if ps.ShadingType != nil { + d.Set("ShadingType", ps.ShadingType) + } + if ps.ColorSpace != nil { + d.Set("ColorSpace", ps.ColorSpace.ToPdfObject()) + } + if ps.Background != nil { + d.Set("Background", ps.Background) + } + if ps.BBox != nil { + d.Set("BBox", ps.BBox.ToPdfObject()) + } + if ps.AntiAlias != nil { + d.Set("AntiAlias", ps.AntiAlias) + } + + return container +} + +func (pst *PdfShadingType1) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if pst.Domain != nil { + d.Set("Domain", pst.Domain) + } + if pst.Matrix != nil { + d.Set("Matrix", pst.Matrix) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + + return pst.container +} + +func (pst *PdfShadingType2) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + if d == nil { + common.Log.Error("Shading dict is nil") + return nil + } + if pst.Coords != nil { + d.Set("Coords", pst.Coords) + } + if pst.Domain != nil { + d.Set("Domain", pst.Domain) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + if pst.Extend != nil { + d.Set("Extend", pst.Extend) + } + + return pst.container +} + +func (pst *PdfShadingType3) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if pst.Coords != nil { + d.Set("Coords", pst.Coords) + } + if pst.Domain != nil { + d.Set("Domain", pst.Domain) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + if pst.Extend != nil { + d.Set("Extend", pst.Extend) + } + + return pst.container +} + +func (pst *PdfShadingType4) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if pst.BitsPerCoordinate != nil { + d.Set("BitsPerCoordinate", pst.BitsPerCoordinate) + } + if pst.BitsPerComponent != nil { + d.Set("BitsPerComponent", pst.BitsPerComponent) + } + if pst.BitsPerFlag != nil { + d.Set("BitsPerFlag", pst.BitsPerFlag) + } + if pst.Decode != nil { + d.Set("Decode", pst.Decode) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + + return pst.container +} + +func (pst *PdfShadingType5) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if pst.BitsPerCoordinate != nil { + d.Set("BitsPerCoordinate", pst.BitsPerCoordinate) + } + if pst.BitsPerComponent != nil { + d.Set("BitsPerComponent", pst.BitsPerComponent) + } + if pst.VerticesPerRow != nil { + d.Set("VerticesPerRow", pst.VerticesPerRow) + } + if pst.Decode != nil { + d.Set("Decode", pst.Decode) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + + return pst.container +} + +func (pst *PdfShadingType6) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if pst.BitsPerCoordinate != nil { + d.Set("BitsPerCoordinate", pst.BitsPerCoordinate) + } + if pst.BitsPerComponent != nil { + d.Set("BitsPerComponent", pst.BitsPerComponent) + } + if pst.BitsPerFlag != nil { + d.Set("BitsPerFlag", pst.BitsPerFlag) + } + if pst.Decode != nil { + d.Set("Decode", pst.Decode) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + + return pst.container +} + +func (pst *PdfShadingType7) ToPdfObject() core.PdfObject { + pst.PdfShading.ToPdfObject() + + d, err := pst.getShadingDict() + if err != nil { + common.Log.Error("Unable to access shading dict") + return nil + } + + if pst.BitsPerCoordinate != nil { + d.Set("BitsPerCoordinate", pst.BitsPerCoordinate) + } + if pst.BitsPerComponent != nil { + d.Set("BitsPerComponent", pst.BitsPerComponent) + } + if pst.BitsPerFlag != nil { + d.Set("BitsPerFlag", pst.BitsPerFlag) + } + if pst.Decode != nil { + d.Set("Decode", pst.Decode) + } + if pst.Function != nil { + if len(pst.Function) == 1 { + d.Set("Function", pst.Function[0].ToPdfObject()) + } else { + farr := core.MakeArray() + for _, f := range pst.Function { + farr.Append(f.ToPdfObject()) + } + d.Set("Function", farr) + } + } + + return pst.container +} diff --git a/internal/pdf/model/structures.go b/internal/pdf/model/structures.go new file mode 100644 index 0000000..efe6faf --- /dev/null +++ b/internal/pdf/model/structures.go @@ -0,0 +1,129 @@ +package model + +// Common basic data structures: PdfRectangle, PdfDate, etc. +// These kinds of data structures can be copied, do not need a unique copy of each object. + +import ( + "errors" + "fmt" + "regexp" + "strconv" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// Definition of a rectangle. +type PdfRectangle struct { + Llx float64 // Lower left corner (ll). + Lly float64 + Urx float64 // Upper right corner (ur). + Ury float64 +} + +// Create a PDF rectangle object based on an input array of 4 integers. +// Defining the lower left (LL) and upper right (UR) corners with +// floating point numbers. +func NewPdfRectangle(arr core.PdfObjectArray) (*PdfRectangle, error) { + rect := PdfRectangle{} + if len(arr) != 4 { + return nil, errors.New("invalid rectangle array, len != 4") + } + + var err error + rect.Llx, err = getNumberAsFloat(arr[0]) + if err != nil { + return nil, err + } + + rect.Lly, err = getNumberAsFloat(arr[1]) + if err != nil { + return nil, err + } + + rect.Urx, err = getNumberAsFloat(arr[2]) + if err != nil { + return nil, err + } + + rect.Ury, err = getNumberAsFloat(arr[3]) + if err != nil { + return nil, err + } + + return &rect, nil +} + +// Convert to a PDF object. +func (rect *PdfRectangle) ToPdfObject() core.PdfObject { + arr := core.PdfObjectArray{} + arr = append(arr, core.MakeFloat(rect.Llx)) + arr = append(arr, core.MakeFloat(rect.Lly)) + arr = append(arr, core.MakeFloat(rect.Urx)) + arr = append(arr, core.MakeFloat(rect.Ury)) + return &arr +} + +// A date is a PDF string of the form: +// (D:YYYYMMDDHHmmSSOHH'mm) +type PdfDate struct { + year int64 // YYYY + month int64 // MM (01-12) + day int64 // DD (01-31) + hour int64 // HH (00-23) + minute int64 // mm (00-59) + second int64 // SS (00-59) + utOffsetSign byte // O ('+' / '-' / 'Z') + utOffsetHours int64 // HH' (00-23 followed by ') + utOffsetMins int64 // mm (00-59) +} + +var reDate = regexp.MustCompile(`\s*D\s*:\s*(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([+-Z])?(\d{2})?'?(\d{2})?`) + +// Make a new PdfDate object from a PDF date string (see 7.9.4 Dates). +// format: "D: YYYYMMDDHHmmSSOHH'mm" +func NewPdfDate(dateStr string) (PdfDate, error) { + d := PdfDate{} + + matches := reDate.FindAllStringSubmatch(dateStr, 1) + if len(matches) < 1 { + return d, fmt.Errorf("invalid date string (%s)", dateStr) + } + if len(matches[0]) != 10 { + return d, errors.New("invalid regexp group match length != 10") + } + + // No need to handle err from ParseInt, as pre-validated via regexp. + d.year, _ = strconv.ParseInt(matches[0][1], 10, 32) + d.month, _ = strconv.ParseInt(matches[0][2], 10, 32) + d.day, _ = strconv.ParseInt(matches[0][3], 10, 32) + d.hour, _ = strconv.ParseInt(matches[0][4], 10, 32) + d.minute, _ = strconv.ParseInt(matches[0][5], 10, 32) + d.second, _ = strconv.ParseInt(matches[0][6], 10, 32) + // Some poor implementations do not include the offset. + if len(matches[0][7]) > 0 { + d.utOffsetSign = matches[0][7][0] + } else { + d.utOffsetSign = '+' + } + if len(matches[0][8]) > 0 { + d.utOffsetHours, _ = strconv.ParseInt(matches[0][8], 10, 32) + } else { + d.utOffsetHours = 0 + } + if len(matches[0][9]) > 0 { + d.utOffsetMins, _ = strconv.ParseInt(matches[0][9], 10, 32) + } else { + d.utOffsetMins = 0 + } + + return d, nil +} + +// Convert to a PDF string object. +func (date *PdfDate) ToPdfObject() core.PdfObject { + str := fmt.Sprintf("D:%.4d%.2d%.2d%.2d%.2d%.2d%c%.2d'%.2d'", + date.year, date.month, date.day, date.hour, date.minute, date.second, + date.utOffsetSign, date.utOffsetHours, date.utOffsetMins) + pdfStr := core.PdfObjectString(str) + return &pdfStr +} diff --git a/internal/pdf/model/textencoding/encoder.go b/internal/pdf/model/textencoding/encoder.go new file mode 100644 index 0000000..76871b0 --- /dev/null +++ b/internal/pdf/model/textencoding/encoder.go @@ -0,0 +1,34 @@ +package textencoding + +import "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + +type TextEncoder interface { + // Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF. + Encode(raw string) string + + // Conversion between character code and glyph name. + // The bool return flag is true if there was a match, and false otherwise. + CharcodeToGlyph(code byte) (string, bool) + + // Conversion between glyph name and character code. + // The bool return flag is true if there was a match, and false otherwise. + GlyphToCharcode(glyph string) (byte, bool) + + // Convert rune to character code. + // The bool return flag is true if there was a match, and false otherwise. + RuneToCharcode(val rune) (byte, bool) + + // Convert character code to rune. + // The bool return flag is true if there was a match, and false otherwise. + CharcodeToRune(charcode byte) (rune, bool) + + // Convert rune to glyph name. + // The bool return flag is true if there was a match, and false otherwise. + RuneToGlyph(val rune) (string, bool) + + // Convert glyph to rune. + // The bool return flag is true if there was a match, and false otherwise. + GlyphToRune(glyph string) (rune, bool) + + ToPdfObject() core.PdfObject +} diff --git a/internal/pdf/model/textencoding/glyphs_glyphlist.go b/internal/pdf/model/textencoding/glyphs_glyphlist.go new file mode 100644 index 0000000..7480b97 --- /dev/null +++ b/internal/pdf/model/textencoding/glyphs_glyphlist.go @@ -0,0 +1,8569 @@ +package textencoding + +var glyphlistGlyphToRuneMap = map[string]rune{ + "A": '\u0041', + "AE": '\u00c6', + "AEacute": '\u01fc', + "AEmacron": '\u01e2', + "AEsmall": '\uf7e6', + "Aacute": '\u00c1', + "Aacutesmall": '\uf7e1', + "Abreve": '\u0102', + "Abreveacute": '\u1eae', + "Abrevecyrillic": '\u04d0', + "Abrevedotbelow": '\u1eb6', + "Abrevegrave": '\u1eb0', + "Abrevehookabove": '\u1eb2', + "Abrevetilde": '\u1eb4', + "Acaron": '\u01cd', + "Acircle": '\u24b6', + "Acircumflex": '\u00c2', + "Acircumflexacute": '\u1ea4', + "Acircumflexdotbelow": '\u1eac', + "Acircumflexgrave": '\u1ea6', + "Acircumflexhookabove": '\u1ea8', + "Acircumflexsmall": '\uf7e2', + "Acircumflextilde": '\u1eaa', + "Acute": '\uf6c9', + "Acutesmall": '\uf7b4', + "Acyrillic": '\u0410', + "Adblgrave": '\u0200', + "Adieresis": '\u00c4', + "Adieresiscyrillic": '\u04d2', + "Adieresismacron": '\u01de', + "Adieresissmall": '\uf7e4', + "Adotbelow": '\u1ea0', + "Adotmacron": '\u01e0', + "Agrave": '\u00c0', + "Agravesmall": '\uf7e0', + "Ahookabove": '\u1ea2', + "Aiecyrillic": '\u04d4', + "Ainvertedbreve": '\u0202', + "Alpha": '\u0391', + "Alphatonos": '\u0386', + "Amacron": '\u0100', + "Amonospace": '\uff21', + "Aogonek": '\u0104', + "Aring": '\u00c5', + "Aringacute": '\u01fa', + "Aringbelow": '\u1e00', + "Aringsmall": '\uf7e5', + "Asmall": '\uf761', + "Atilde": '\u00c3', + "Atildesmall": '\uf7e3', + "Aybarmenian": '\u0531', + "B": '\u0042', + "Bcircle": '\u24b7', + "Bdotaccent": '\u1e02', + "Bdotbelow": '\u1e04', + "Becyrillic": '\u0411', + "Benarmenian": '\u0532', + "Beta": '\u0392', + "Bhook": '\u0181', + "Blinebelow": '\u1e06', + "Bmonospace": '\uff22', + "Brevesmall": '\uf6f4', + "Bsmall": '\uf762', + "Btopbar": '\u0182', + "C": '\u0043', + "Caarmenian": '\u053e', + "Cacute": '\u0106', + "Caron": '\uf6ca', + "Caronsmall": '\uf6f5', + "Ccaron": '\u010c', + "Ccedilla": '\u00c7', + "Ccedillaacute": '\u1e08', + "Ccedillasmall": '\uf7e7', + "Ccircle": '\u24b8', + "Ccircumflex": '\u0108', + "Cdot": '\u010a', + "Cdotaccent": '\u010a', + "Cedillasmall": '\uf7b8', + "Chaarmenian": '\u0549', + "Cheabkhasiancyrillic": '\u04bc', + "Checyrillic": '\u0427', + "Chedescenderabkhasiancyrillic": '\u04be', + "Chedescendercyrillic": '\u04b6', + "Chedieresiscyrillic": '\u04f4', + "Cheharmenian": '\u0543', + "Chekhakassiancyrillic": '\u04cb', + "Cheverticalstrokecyrillic": '\u04b8', + "Chi": '\u03a7', + "Chook": '\u0187', + "Circumflexsmall": '\uf6f6', + "Cmonospace": '\uff23', + "Coarmenian": '\u0551', + "Csmall": '\uf763', + "D": '\u0044', + "DZ": '\u01f1', + "DZcaron": '\u01c4', + "Daarmenian": '\u0534', + "Dafrican": '\u0189', + "Dcaron": '\u010e', + "Dcedilla": '\u1e10', + "Dcircle": '\u24b9', + "Dcircumflexbelow": '\u1e12', + "Dcroat": '\u0110', + "Ddotaccent": '\u1e0a', + "Ddotbelow": '\u1e0c', + "Decyrillic": '\u0414', + "Deicoptic": '\u03ee', + "Delta": '\u2206', + "Deltagreek": '\u0394', + "Dhook": '\u018a', + "Dieresis": '\uf6cb', + "DieresisAcute": '\uf6cc', + "DieresisGrave": '\uf6cd', + "Dieresissmall": '\uf7a8', + "Digammagreek": '\u03dc', + "Djecyrillic": '\u0402', + "Dlinebelow": '\u1e0e', + "Dmonospace": '\uff24', + "Dotaccentsmall": '\uf6f7', + "Dslash": '\u0110', + "Dsmall": '\uf764', + "Dtopbar": '\u018b', + "Dz": '\u01f2', + "Dzcaron": '\u01c5', + "Dzeabkhasiancyrillic": '\u04e0', + "Dzecyrillic": '\u0405', + "Dzhecyrillic": '\u040f', + "E": '\u0045', + "Eacute": '\u00c9', + "Eacutesmall": '\uf7e9', + "Ebreve": '\u0114', + "Ecaron": '\u011a', + "Ecedillabreve": '\u1e1c', + "Echarmenian": '\u0535', + "Ecircle": '\u24ba', + "Ecircumflex": '\u00ca', + "Ecircumflexacute": '\u1ebe', + "Ecircumflexbelow": '\u1e18', + "Ecircumflexdotbelow": '\u1ec6', + "Ecircumflexgrave": '\u1ec0', + "Ecircumflexhookabove": '\u1ec2', + "Ecircumflexsmall": '\uf7ea', + "Ecircumflextilde": '\u1ec4', + "Ecyrillic": '\u0404', + "Edblgrave": '\u0204', + "Edieresis": '\u00cb', + "Edieresissmall": '\uf7eb', + "Edot": '\u0116', + "Edotaccent": '\u0116', + "Edotbelow": '\u1eb8', + "Efcyrillic": '\u0424', + "Egrave": '\u00c8', + "Egravesmall": '\uf7e8', + "Eharmenian": '\u0537', + "Ehookabove": '\u1eba', + "Eightroman": '\u2167', + "Einvertedbreve": '\u0206', + "Eiotifiedcyrillic": '\u0464', + "Elcyrillic": '\u041b', + "Elevenroman": '\u216a', + "Emacron": '\u0112', + "Emacronacute": '\u1e16', + "Emacrongrave": '\u1e14', + "Emcyrillic": '\u041c', + "Emonospace": '\uff25', + "Encyrillic": '\u041d', + "Endescendercyrillic": '\u04a2', + "Eng": '\u014a', + "Enghecyrillic": '\u04a4', + "Enhookcyrillic": '\u04c7', + "Eogonek": '\u0118', + "Eopen": '\u0190', + "Epsilon": '\u0395', + "Epsilontonos": '\u0388', + "Ercyrillic": '\u0420', + "Ereversed": '\u018e', + "Ereversedcyrillic": '\u042d', + "Escyrillic": '\u0421', + "Esdescendercyrillic": '\u04aa', + "Esh": '\u01a9', + "Esmall": '\uf765', + "Eta": '\u0397', + "Etarmenian": '\u0538', + "Etatonos": '\u0389', + "Eth": '\u00d0', + "Ethsmall": '\uf7f0', + "Etilde": '\u1ebc', + "Etildebelow": '\u1e1a', + "Euro": '\u20ac', + "Ezh": '\u01b7', + "Ezhcaron": '\u01ee', + "Ezhreversed": '\u01b8', + "F": '\u0046', + "Fcircle": '\u24bb', + "Fdotaccent": '\u1e1e', + "Feharmenian": '\u0556', + "Feicoptic": '\u03e4', + "Fhook": '\u0191', + "Fitacyrillic": '\u0472', + "Fiveroman": '\u2164', + "Fmonospace": '\uff26', + "Fourroman": '\u2163', + "Fsmall": '\uf766', + "G": '\u0047', + "GBsquare": '\u3387', + "Gacute": '\u01f4', + "Gamma": '\u0393', + "Gammaafrican": '\u0194', + "Gangiacoptic": '\u03ea', + "Gbreve": '\u011e', + "Gcaron": '\u01e6', + "Gcedilla": '\u0122', + "Gcircle": '\u24bc', + "Gcircumflex": '\u011c', + "Gcommaaccent": '\u0122', + "Gdot": '\u0120', + "Gdotaccent": '\u0120', + "Gecyrillic": '\u0413', + "Ghadarmenian": '\u0542', + "Ghemiddlehookcyrillic": '\u0494', + "Ghestrokecyrillic": '\u0492', + "Gheupturncyrillic": '\u0490', + "Ghook": '\u0193', + "Gimarmenian": '\u0533', + "Gjecyrillic": '\u0403', + "Gmacron": '\u1e20', + "Gmonospace": '\uff27', + "Grave": '\uf6ce', + "Gravesmall": '\uf760', + "Gsmall": '\uf767', + "Gsmallhook": '\u029b', + "Gstroke": '\u01e4', + "H": '\u0048', + "H18533": '\u25cf', + "H18543": '\u25aa', + "H18551": '\u25ab', + "H22073": '\u25a1', + "HPsquare": '\u33cb', + "Haabkhasiancyrillic": '\u04a8', + "Hadescendercyrillic": '\u04b2', + "Hardsigncyrillic": '\u042a', + "Hbar": '\u0126', + "Hbrevebelow": '\u1e2a', + "Hcedilla": '\u1e28', + "Hcircle": '\u24bd', + "Hcircumflex": '\u0124', + "Hdieresis": '\u1e26', + "Hdotaccent": '\u1e22', + "Hdotbelow": '\u1e24', + "Hmonospace": '\uff28', + "Hoarmenian": '\u0540', + "Horicoptic": '\u03e8', + "Hsmall": '\uf768', + "Hungarumlaut": '\uf6cf', + "Hungarumlautsmall": '\uf6f8', + "Hzsquare": '\u3390', + "I": '\u0049', + "IAcyrillic": '\u042f', + "IJ": '\u0132', + "IUcyrillic": '\u042e', + "Iacute": '\u00cd', + "Iacutesmall": '\uf7ed', + "Ibreve": '\u012c', + "Icaron": '\u01cf', + "Icircle": '\u24be', + "Icircumflex": '\u00ce', + "Icircumflexsmall": '\uf7ee', + "Icyrillic": '\u0406', + "Idblgrave": '\u0208', + "Idieresis": '\u00cf', + "Idieresisacute": '\u1e2e', + "Idieresiscyrillic": '\u04e4', + "Idieresissmall": '\uf7ef', + "Idot": '\u0130', + "Idotaccent": '\u0130', + "Idotbelow": '\u1eca', + "Iebrevecyrillic": '\u04d6', + "Iecyrillic": '\u0415', + "Ifraktur": '\u2111', + "Igrave": '\u00cc', + "Igravesmall": '\uf7ec', + "Ihookabove": '\u1ec8', + "Iicyrillic": '\u0418', + "Iinvertedbreve": '\u020a', + "Iishortcyrillic": '\u0419', + "Imacron": '\u012a', + "Imacroncyrillic": '\u04e2', + "Imonospace": '\uff29', + "Iniarmenian": '\u053b', + "Iocyrillic": '\u0401', + "Iogonek": '\u012e', + "Iota": '\u0399', + "Iotaafrican": '\u0196', + "Iotadieresis": '\u03aa', + "Iotatonos": '\u038a', + "Ismall": '\uf769', + "Istroke": '\u0197', + "Itilde": '\u0128', + "Itildebelow": '\u1e2c', + "Izhitsacyrillic": '\u0474', + "Izhitsadblgravecyrillic": '\u0476', + "J": '\u004a', + "Jaarmenian": '\u0541', + "Jcircle": '\u24bf', + "Jcircumflex": '\u0134', + "Jecyrillic": '\u0408', + "Jheharmenian": '\u054b', + "Jmonospace": '\uff2a', + "Jsmall": '\uf76a', + "K": '\u004b', + "KBsquare": '\u3385', + "KKsquare": '\u33cd', + "Kabashkircyrillic": '\u04a0', + "Kacute": '\u1e30', + "Kacyrillic": '\u041a', + "Kadescendercyrillic": '\u049a', + "Kahookcyrillic": '\u04c3', + "Kappa": '\u039a', + "Kastrokecyrillic": '\u049e', + "Kaverticalstrokecyrillic": '\u049c', + "Kcaron": '\u01e8', + "Kcedilla": '\u0136', + "Kcircle": '\u24c0', + "Kcommaaccent": '\u0136', + "Kdotbelow": '\u1e32', + "Keharmenian": '\u0554', + "Kenarmenian": '\u053f', + "Khacyrillic": '\u0425', + "Kheicoptic": '\u03e6', + "Khook": '\u0198', + "Kjecyrillic": '\u040c', + "Klinebelow": '\u1e34', + "Kmonospace": '\uff2b', + "Koppacyrillic": '\u0480', + "Koppagreek": '\u03de', + "Ksicyrillic": '\u046e', + "Ksmall": '\uf76b', + "L": '\u004c', + "LJ": '\u01c7', + "LL": '\uf6bf', + "Lacute": '\u0139', + "Lambda": '\u039b', + "Lcaron": '\u013d', + "Lcedilla": '\u013b', + "Lcircle": '\u24c1', + "Lcircumflexbelow": '\u1e3c', + "Lcommaaccent": '\u013b', + "Ldot": '\u013f', + "Ldotaccent": '\u013f', + "Ldotbelow": '\u1e36', + "Ldotbelowmacron": '\u1e38', + "Liwnarmenian": '\u053c', + "Lj": '\u01c8', + "Ljecyrillic": '\u0409', + "Llinebelow": '\u1e3a', + "Lmonospace": '\uff2c', + "Lslash": '\u0141', + "Lslashsmall": '\uf6f9', + "Lsmall": '\uf76c', + "M": '\u004d', + "MBsquare": '\u3386', + "Macron": '\uf6d0', + "Macronsmall": '\uf7af', + "Macute": '\u1e3e', + "Mcircle": '\u24c2', + "Mdotaccent": '\u1e40', + "Mdotbelow": '\u1e42', + "Menarmenian": '\u0544', + "Mmonospace": '\uff2d', + "Msmall": '\uf76d', + "Mturned": '\u019c', + "Mu": '\u039c', + "N": '\u004e', + "NJ": '\u01ca', + "Nacute": '\u0143', + "Ncaron": '\u0147', + "Ncedilla": '\u0145', + "Ncircle": '\u24c3', + "Ncircumflexbelow": '\u1e4a', + "Ncommaaccent": '\u0145', + "Ndotaccent": '\u1e44', + "Ndotbelow": '\u1e46', + "Nhookleft": '\u019d', + "Nineroman": '\u2168', + "Nj": '\u01cb', + "Njecyrillic": '\u040a', + "Nlinebelow": '\u1e48', + "Nmonospace": '\uff2e', + "Nowarmenian": '\u0546', + "Nsmall": '\uf76e', + "Ntilde": '\u00d1', + "Ntildesmall": '\uf7f1', + "Nu": '\u039d', + "O": '\u004f', + "OE": '\u0152', + "OEsmall": '\uf6fa', + "Oacute": '\u00d3', + "Oacutesmall": '\uf7f3', + "Obarredcyrillic": '\u04e8', + "Obarreddieresiscyrillic": '\u04ea', + "Obreve": '\u014e', + "Ocaron": '\u01d1', + "Ocenteredtilde": '\u019f', + "Ocircle": '\u24c4', + "Ocircumflex": '\u00d4', + "Ocircumflexacute": '\u1ed0', + "Ocircumflexdotbelow": '\u1ed8', + "Ocircumflexgrave": '\u1ed2', + "Ocircumflexhookabove": '\u1ed4', + "Ocircumflexsmall": '\uf7f4', + "Ocircumflextilde": '\u1ed6', + "Ocyrillic": '\u041e', + "Odblacute": '\u0150', + "Odblgrave": '\u020c', + "Odieresis": '\u00d6', + "Odieresiscyrillic": '\u04e6', + "Odieresissmall": '\uf7f6', + "Odotbelow": '\u1ecc', + "Ogoneksmall": '\uf6fb', + "Ograve": '\u00d2', + "Ogravesmall": '\uf7f2', + "Oharmenian": '\u0555', + "Ohm": '\u2126', + "Ohookabove": '\u1ece', + "Ohorn": '\u01a0', + "Ohornacute": '\u1eda', + "Ohorndotbelow": '\u1ee2', + "Ohorngrave": '\u1edc', + "Ohornhookabove": '\u1ede', + "Ohorntilde": '\u1ee0', + "Ohungarumlaut": '\u0150', + "Oi": '\u01a2', + "Oinvertedbreve": '\u020e', + "Omacron": '\u014c', + "Omacronacute": '\u1e52', + "Omacrongrave": '\u1e50', + "Omega": '\u2126', + "Omegacyrillic": '\u0460', + "Omegagreek": '\u03a9', + "Omegaroundcyrillic": '\u047a', + "Omegatitlocyrillic": '\u047c', + "Omegatonos": '\u038f', + "Omicron": '\u039f', + "Omicrontonos": '\u038c', + "Omonospace": '\uff2f', + "Oneroman": '\u2160', + "Oogonek": '\u01ea', + "Oogonekmacron": '\u01ec', + "Oopen": '\u0186', + "Oslash": '\u00d8', + "Oslashacute": '\u01fe', + "Oslashsmall": '\uf7f8', + "Osmall": '\uf76f', + "Ostrokeacute": '\u01fe', + "Otcyrillic": '\u047e', + "Otilde": '\u00d5', + "Otildeacute": '\u1e4c', + "Otildedieresis": '\u1e4e', + "Otildesmall": '\uf7f5', + "P": '\u0050', + "Pacute": '\u1e54', + "Pcircle": '\u24c5', + "Pdotaccent": '\u1e56', + "Pecyrillic": '\u041f', + "Peharmenian": '\u054a', + "Pemiddlehookcyrillic": '\u04a6', + "Phi": '\u03a6', + "Phook": '\u01a4', + "Pi": '\u03a0', + "Piwrarmenian": '\u0553', + "Pmonospace": '\uff30', + "Psi": '\u03a8', + "Psicyrillic": '\u0470', + "Psmall": '\uf770', + "Q": '\u0051', + "Qcircle": '\u24c6', + "Qmonospace": '\uff31', + "Qsmall": '\uf771', + "R": '\u0052', + "Raarmenian": '\u054c', + "Racute": '\u0154', + "Rcaron": '\u0158', + "Rcedilla": '\u0156', + "Rcircle": '\u24c7', + "Rcommaaccent": '\u0156', + "Rdblgrave": '\u0210', + "Rdotaccent": '\u1e58', + "Rdotbelow": '\u1e5a', + "Rdotbelowmacron": '\u1e5c', + "Reharmenian": '\u0550', + "Rfraktur": '\u211c', + "Rho": '\u03a1', + "Ringsmall": '\uf6fc', + "Rinvertedbreve": '\u0212', + "Rlinebelow": '\u1e5e', + "Rmonospace": '\uff32', + "Rsmall": '\uf772', + "Rsmallinverted": '\u0281', + "Rsmallinvertedsuperior": '\u02b6', + "S": '\u0053', + "SF010000": '\u250c', + "SF020000": '\u2514', + "SF030000": '\u2510', + "SF040000": '\u2518', + "SF050000": '\u253c', + "SF060000": '\u252c', + "SF070000": '\u2534', + "SF080000": '\u251c', + "SF090000": '\u2524', + "SF100000": '\u2500', + "SF110000": '\u2502', + "SF190000": '\u2561', + "SF200000": '\u2562', + "SF210000": '\u2556', + "SF220000": '\u2555', + "SF230000": '\u2563', + "SF240000": '\u2551', + "SF250000": '\u2557', + "SF260000": '\u255d', + "SF270000": '\u255c', + "SF280000": '\u255b', + "SF360000": '\u255e', + "SF370000": '\u255f', + "SF380000": '\u255a', + "SF390000": '\u2554', + "SF400000": '\u2569', + "SF410000": '\u2566', + "SF420000": '\u2560', + "SF430000": '\u2550', + "SF440000": '\u256c', + "SF450000": '\u2567', + "SF460000": '\u2568', + "SF470000": '\u2564', + "SF480000": '\u2565', + "SF490000": '\u2559', + "SF500000": '\u2558', + "SF510000": '\u2552', + "SF520000": '\u2553', + "SF530000": '\u256b', + "SF540000": '\u256a', + "Sacute": '\u015a', + "Sacutedotaccent": '\u1e64', + "Sampigreek": '\u03e0', + "Scaron": '\u0160', + "Scarondotaccent": '\u1e66', + "Scaronsmall": '\uf6fd', + "Scedilla": '\u015e', + "Schwa": '\u018f', + "Schwacyrillic": '\u04d8', + "Schwadieresiscyrillic": '\u04da', + "Scircle": '\u24c8', + "Scircumflex": '\u015c', + "Scommaaccent": '\u0218', + "Sdotaccent": '\u1e60', + "Sdotbelow": '\u1e62', + "Sdotbelowdotaccent": '\u1e68', + "Seharmenian": '\u054d', + "Sevenroman": '\u2166', + "Shaarmenian": '\u0547', + "Shacyrillic": '\u0428', + "Shchacyrillic": '\u0429', + "Sheicoptic": '\u03e2', + "Shhacyrillic": '\u04ba', + "Shimacoptic": '\u03ec', + "Sigma": '\u03a3', + "Sixroman": '\u2165', + "Smonospace": '\uff33', + "Softsigncyrillic": '\u042c', + "Ssmall": '\uf773', + "Stigmagreek": '\u03da', + "T": '\u0054', + "Tau": '\u03a4', + "Tbar": '\u0166', + "Tcaron": '\u0164', + "Tcedilla": '\u0162', + "Tcircle": '\u24c9', + "Tcircumflexbelow": '\u1e70', + "Tcommaaccent": '\u0162', + "Tdotaccent": '\u1e6a', + "Tdotbelow": '\u1e6c', + "Tecyrillic": '\u0422', + "Tedescendercyrillic": '\u04ac', + "Tenroman": '\u2169', + "Tetsecyrillic": '\u04b4', + "Theta": '\u0398', + "Thook": '\u01ac', + "Thorn": '\u00de', + "Thornsmall": '\uf7fe', + "Threeroman": '\u2162', + "Tildesmall": '\uf6fe', + "Tiwnarmenian": '\u054f', + "Tlinebelow": '\u1e6e', + "Tmonospace": '\uff34', + "Toarmenian": '\u0539', + "Tonefive": '\u01bc', + "Tonesix": '\u0184', + "Tonetwo": '\u01a7', + "Tretroflexhook": '\u01ae', + "Tsecyrillic": '\u0426', + "Tshecyrillic": '\u040b', + "Tsmall": '\uf774', + "Twelveroman": '\u216b', + "Tworoman": '\u2161', + "U": '\u0055', + "Uacute": '\u00da', + "Uacutesmall": '\uf7fa', + "Ubreve": '\u016c', + "Ucaron": '\u01d3', + "Ucircle": '\u24ca', + "Ucircumflex": '\u00db', + "Ucircumflexbelow": '\u1e76', + "Ucircumflexsmall": '\uf7fb', + "Ucyrillic": '\u0423', + "Udblacute": '\u0170', + "Udblgrave": '\u0214', + "Udieresis": '\u00dc', + "Udieresisacute": '\u01d7', + "Udieresisbelow": '\u1e72', + "Udieresiscaron": '\u01d9', + "Udieresiscyrillic": '\u04f0', + "Udieresisgrave": '\u01db', + "Udieresismacron": '\u01d5', + "Udieresissmall": '\uf7fc', + "Udotbelow": '\u1ee4', + "Ugrave": '\u00d9', + "Ugravesmall": '\uf7f9', + "Uhookabove": '\u1ee6', + "Uhorn": '\u01af', + "Uhornacute": '\u1ee8', + "Uhorndotbelow": '\u1ef0', + "Uhorngrave": '\u1eea', + "Uhornhookabove": '\u1eec', + "Uhorntilde": '\u1eee', + "Uhungarumlaut": '\u0170', + "Uhungarumlautcyrillic": '\u04f2', + "Uinvertedbreve": '\u0216', + "Ukcyrillic": '\u0478', + "Umacron": '\u016a', + "Umacroncyrillic": '\u04ee', + "Umacrondieresis": '\u1e7a', + "Umonospace": '\uff35', + "Uogonek": '\u0172', + "Upsilon": '\u03a5', + "Upsilon1": '\u03d2', + "Upsilonacutehooksymbolgreek": '\u03d3', + "Upsilonafrican": '\u01b1', + "Upsilondieresis": '\u03ab', + "Upsilondieresishooksymbolgreek": '\u03d4', + "Upsilonhooksymbol": '\u03d2', + "Upsilontonos": '\u038e', + "Uring": '\u016e', + "Ushortcyrillic": '\u040e', + "Usmall": '\uf775', + "Ustraightcyrillic": '\u04ae', + "Ustraightstrokecyrillic": '\u04b0', + "Utilde": '\u0168', + "Utildeacute": '\u1e78', + "Utildebelow": '\u1e74', + "V": '\u0056', + "Vcircle": '\u24cb', + "Vdotbelow": '\u1e7e', + "Vecyrillic": '\u0412', + "Vewarmenian": '\u054e', + "Vhook": '\u01b2', + "Vmonospace": '\uff36', + "Voarmenian": '\u0548', + "Vsmall": '\uf776', + "Vtilde": '\u1e7c', + "W": '\u0057', + "Wacute": '\u1e82', + "Wcircle": '\u24cc', + "Wcircumflex": '\u0174', + "Wdieresis": '\u1e84', + "Wdotaccent": '\u1e86', + "Wdotbelow": '\u1e88', + "Wgrave": '\u1e80', + "Wmonospace": '\uff37', + "Wsmall": '\uf777', + "X": '\u0058', + "Xcircle": '\u24cd', + "Xdieresis": '\u1e8c', + "Xdotaccent": '\u1e8a', + "Xeharmenian": '\u053d', + "Xi": '\u039e', + "Xmonospace": '\uff38', + "Xsmall": '\uf778', + "Y": '\u0059', + "Yacute": '\u00dd', + "Yacutesmall": '\uf7fd', + "Yatcyrillic": '\u0462', + "Ycircle": '\u24ce', + "Ycircumflex": '\u0176', + "Ydieresis": '\u0178', + "Ydieresissmall": '\uf7ff', + "Ydotaccent": '\u1e8e', + "Ydotbelow": '\u1ef4', + "Yericyrillic": '\u042b', + "Yerudieresiscyrillic": '\u04f8', + "Ygrave": '\u1ef2', + "Yhook": '\u01b3', + "Yhookabove": '\u1ef6', + "Yiarmenian": '\u0545', + "Yicyrillic": '\u0407', + "Yiwnarmenian": '\u0552', + "Ymonospace": '\uff39', + "Ysmall": '\uf779', + "Ytilde": '\u1ef8', + "Yusbigcyrillic": '\u046a', + "Yusbigiotifiedcyrillic": '\u046c', + "Yuslittlecyrillic": '\u0466', + "Yuslittleiotifiedcyrillic": '\u0468', + "Z": '\u005a', + "Zaarmenian": '\u0536', + "Zacute": '\u0179', + "Zcaron": '\u017d', + "Zcaronsmall": '\uf6ff', + "Zcircle": '\u24cf', + "Zcircumflex": '\u1e90', + "Zdot": '\u017b', + "Zdotaccent": '\u017b', + "Zdotbelow": '\u1e92', + "Zecyrillic": '\u0417', + "Zedescendercyrillic": '\u0498', + "Zedieresiscyrillic": '\u04de', + "Zeta": '\u0396', + "Zhearmenian": '\u053a', + "Zhebrevecyrillic": '\u04c1', + "Zhecyrillic": '\u0416', + "Zhedescendercyrillic": '\u0496', + "Zhedieresiscyrillic": '\u04dc', + "Zlinebelow": '\u1e94', + "Zmonospace": '\uff3a', + "Zsmall": '\uf77a', + "Zstroke": '\u01b5', + "a": '\u0061', + "aabengali": '\u0986', + "aacute": '\u00e1', + "aadeva": '\u0906', + "aagujarati": '\u0a86', + "aagurmukhi": '\u0a06', + "aamatragurmukhi": '\u0a3e', + "aarusquare": '\u3303', + "aavowelsignbengali": '\u09be', + "aavowelsigndeva": '\u093e', + "aavowelsigngujarati": '\u0abe', + "abbreviationmarkarmenian": '\u055f', + "abbreviationsigndeva": '\u0970', + "abengali": '\u0985', + "abopomofo": '\u311a', + "abreve": '\u0103', + "abreveacute": '\u1eaf', + "abrevecyrillic": '\u04d1', + "abrevedotbelow": '\u1eb7', + "abrevegrave": '\u1eb1', + "abrevehookabove": '\u1eb3', + "abrevetilde": '\u1eb5', + "acaron": '\u01ce', + "acircle": '\u24d0', + "acircumflex": '\u00e2', + "acircumflexacute": '\u1ea5', + "acircumflexdotbelow": '\u1ead', + "acircumflexgrave": '\u1ea7', + "acircumflexhookabove": '\u1ea9', + "acircumflextilde": '\u1eab', + "acute": '\u00b4', + "acutebelowcmb": '\u0317', + "acutecmb": '\u0301', + "acutecomb": '\u0301', + "acutedeva": '\u0954', + "acutelowmod": '\u02cf', + "acutetonecmb": '\u0341', + "acyrillic": '\u0430', + "adblgrave": '\u0201', + "addakgurmukhi": '\u0a71', + "adeva": '\u0905', + "adieresis": '\u00e4', + "adieresiscyrillic": '\u04d3', + "adieresismacron": '\u01df', + "adotbelow": '\u1ea1', + "adotmacron": '\u01e1', + "ae": '\u00e6', + "aeacute": '\u01fd', + "aekorean": '\u3150', + "aemacron": '\u01e3', + "afii00208": '\u2015', + "afii08941": '\u20a4', + "afii10017": '\u0410', + "afii10018": '\u0411', + "afii10019": '\u0412', + "afii10020": '\u0413', + "afii10021": '\u0414', + "afii10022": '\u0415', + "afii10023": '\u0401', + "afii10024": '\u0416', + "afii10025": '\u0417', + "afii10026": '\u0418', + "afii10027": '\u0419', + "afii10028": '\u041a', + "afii10029": '\u041b', + "afii10030": '\u041c', + "afii10031": '\u041d', + "afii10032": '\u041e', + "afii10033": '\u041f', + "afii10034": '\u0420', + "afii10035": '\u0421', + "afii10036": '\u0422', + "afii10037": '\u0423', + "afii10038": '\u0424', + "afii10039": '\u0425', + "afii10040": '\u0426', + "afii10041": '\u0427', + "afii10042": '\u0428', + "afii10043": '\u0429', + "afii10044": '\u042a', + "afii10045": '\u042b', + "afii10046": '\u042c', + "afii10047": '\u042d', + "afii10048": '\u042e', + "afii10049": '\u042f', + "afii10050": '\u0490', + "afii10051": '\u0402', + "afii10052": '\u0403', + "afii10053": '\u0404', + "afii10054": '\u0405', + "afii10055": '\u0406', + "afii10056": '\u0407', + "afii10057": '\u0408', + "afii10058": '\u0409', + "afii10059": '\u040a', + "afii10060": '\u040b', + "afii10061": '\u040c', + "afii10062": '\u040e', + "afii10063": '\uf6c4', + "afii10064": '\uf6c5', + "afii10065": '\u0430', + "afii10066": '\u0431', + "afii10067": '\u0432', + "afii10068": '\u0433', + "afii10069": '\u0434', + "afii10070": '\u0435', + "afii10071": '\u0451', + "afii10072": '\u0436', + "afii10073": '\u0437', + "afii10074": '\u0438', + "afii10075": '\u0439', + "afii10076": '\u043a', + "afii10077": '\u043b', + "afii10078": '\u043c', + "afii10079": '\u043d', + "afii10080": '\u043e', + "afii10081": '\u043f', + "afii10082": '\u0440', + "afii10083": '\u0441', + "afii10084": '\u0442', + "afii10085": '\u0443', + "afii10086": '\u0444', + "afii10087": '\u0445', + "afii10088": '\u0446', + "afii10089": '\u0447', + "afii10090": '\u0448', + "afii10091": '\u0449', + "afii10092": '\u044a', + "afii10093": '\u044b', + "afii10094": '\u044c', + "afii10095": '\u044d', + "afii10096": '\u044e', + "afii10097": '\u044f', + "afii10098": '\u0491', + "afii10099": '\u0452', + "afii10100": '\u0453', + "afii10101": '\u0454', + "afii10102": '\u0455', + "afii10103": '\u0456', + "afii10104": '\u0457', + "afii10105": '\u0458', + "afii10106": '\u0459', + "afii10107": '\u045a', + "afii10108": '\u045b', + "afii10109": '\u045c', + "afii10110": '\u045e', + "afii10145": '\u040f', + "afii10146": '\u0462', + "afii10147": '\u0472', + "afii10148": '\u0474', + "afii10192": '\uf6c6', + "afii10193": '\u045f', + "afii10194": '\u0463', + "afii10195": '\u0473', + "afii10196": '\u0475', + "afii10831": '\uf6c7', + "afii10832": '\uf6c8', + "afii10846": '\u04d9', + "afii299": '\u200e', + "afii300": '\u200f', + "afii301": '\u200d', + "afii57381": '\u066a', + "afii57388": '\u060c', + "afii57392": '\u0660', + "afii57393": '\u0661', + "afii57394": '\u0662', + "afii57395": '\u0663', + "afii57396": '\u0664', + "afii57397": '\u0665', + "afii57398": '\u0666', + "afii57399": '\u0667', + "afii57400": '\u0668', + "afii57401": '\u0669', + "afii57403": '\u061b', + "afii57407": '\u061f', + "afii57409": '\u0621', + "afii57410": '\u0622', + "afii57411": '\u0623', + "afii57412": '\u0624', + "afii57413": '\u0625', + "afii57414": '\u0626', + "afii57415": '\u0627', + "afii57416": '\u0628', + "afii57417": '\u0629', + "afii57418": '\u062a', + "afii57419": '\u062b', + "afii57420": '\u062c', + "afii57421": '\u062d', + "afii57422": '\u062e', + "afii57423": '\u062f', + "afii57424": '\u0630', + "afii57425": '\u0631', + "afii57426": '\u0632', + "afii57427": '\u0633', + "afii57428": '\u0634', + "afii57429": '\u0635', + "afii57430": '\u0636', + "afii57431": '\u0637', + "afii57432": '\u0638', + "afii57433": '\u0639', + "afii57434": '\u063a', + "afii57440": '\u0640', + "afii57441": '\u0641', + "afii57442": '\u0642', + "afii57443": '\u0643', + "afii57444": '\u0644', + "afii57445": '\u0645', + "afii57446": '\u0646', + "afii57448": '\u0648', + "afii57449": '\u0649', + "afii57450": '\u064a', + "afii57451": '\u064b', + "afii57452": '\u064c', + "afii57453": '\u064d', + "afii57454": '\u064e', + "afii57455": '\u064f', + "afii57456": '\u0650', + "afii57457": '\u0651', + "afii57458": '\u0652', + "afii57470": '\u0647', + "afii57505": '\u06a4', + "afii57506": '\u067e', + "afii57507": '\u0686', + "afii57508": '\u0698', + "afii57509": '\u06af', + "afii57511": '\u0679', + "afii57512": '\u0688', + "afii57513": '\u0691', + "afii57514": '\u06ba', + "afii57519": '\u06d2', + "afii57534": '\u06d5', + "afii57636": '\u20aa', + "afii57645": '\u05be', + "afii57658": '\u05c3', + "afii57664": '\u05d0', + "afii57665": '\u05d1', + "afii57666": '\u05d2', + "afii57667": '\u05d3', + "afii57668": '\u05d4', + "afii57669": '\u05d5', + "afii57670": '\u05d6', + "afii57671": '\u05d7', + "afii57672": '\u05d8', + "afii57673": '\u05d9', + "afii57674": '\u05da', + "afii57675": '\u05db', + "afii57676": '\u05dc', + "afii57677": '\u05dd', + "afii57678": '\u05de', + "afii57679": '\u05df', + "afii57680": '\u05e0', + "afii57681": '\u05e1', + "afii57682": '\u05e2', + "afii57683": '\u05e3', + "afii57684": '\u05e4', + "afii57685": '\u05e5', + "afii57686": '\u05e6', + "afii57687": '\u05e7', + "afii57688": '\u05e8', + "afii57689": '\u05e9', + "afii57690": '\u05ea', + "afii57694": '\ufb2a', + "afii57695": '\ufb2b', + "afii57700": '\ufb4b', + "afii57705": '\ufb1f', + "afii57716": '\u05f0', + "afii57717": '\u05f1', + "afii57718": '\u05f2', + "afii57723": '\ufb35', + "afii57793": '\u05b4', + "afii57794": '\u05b5', + "afii57795": '\u05b6', + "afii57796": '\u05bb', + "afii57797": '\u05b8', + "afii57798": '\u05b7', + "afii57799": '\u05b0', + "afii57800": '\u05b2', + "afii57801": '\u05b1', + "afii57802": '\u05b3', + "afii57803": '\u05c2', + "afii57804": '\u05c1', + "afii57806": '\u05b9', + "afii57807": '\u05bc', + "afii57839": '\u05bd', + "afii57841": '\u05bf', + "afii57842": '\u05c0', + "afii57929": '\u02bc', + "afii61248": '\u2105', + "afii61289": '\u2113', + "afii61352": '\u2116', + "afii61573": '\u202c', + "afii61574": '\u202d', + "afii61575": '\u202e', + "afii61664": '\u200c', + "afii63167": '\u066d', + "afii64937": '\u02bd', + "agrave": '\u00e0', + "agujarati": '\u0a85', + "agurmukhi": '\u0a05', + "ahiragana": '\u3042', + "ahookabove": '\u1ea3', + "aibengali": '\u0990', + "aibopomofo": '\u311e', + "aideva": '\u0910', + "aiecyrillic": '\u04d5', + "aigujarati": '\u0a90', + "aigurmukhi": '\u0a10', + "aimatragurmukhi": '\u0a48', + "ainarabic": '\u0639', + "ainfinalarabic": '\ufeca', + "aininitialarabic": '\ufecb', + "ainmedialarabic": '\ufecc', + "ainvertedbreve": '\u0203', + "aivowelsignbengali": '\u09c8', + "aivowelsigndeva": '\u0948', + "aivowelsigngujarati": '\u0ac8', + "akatakana": '\u30a2', + "akatakanahalfwidth": '\uff71', + "akorean": '\u314f', + "alef": '\u05d0', + "alefarabic": '\u0627', + "alefdageshhebrew": '\ufb30', + "aleffinalarabic": '\ufe8e', + "alefhamzaabovearabic": '\u0623', + "alefhamzaabovefinalarabic": '\ufe84', + "alefhamzabelowarabic": '\u0625', + "alefhamzabelowfinalarabic": '\ufe88', + "alefhebrew": '\u05d0', + "aleflamedhebrew": '\ufb4f', + "alefmaddaabovearabic": '\u0622', + "alefmaddaabovefinalarabic": '\ufe82', + "alefmaksuraarabic": '\u0649', + "alefmaksurafinalarabic": '\ufef0', + "alefmaksurainitialarabic": '\ufef3', + "alefmaksuramedialarabic": '\ufef4', + "alefpatahhebrew": '\ufb2e', + "alefqamatshebrew": '\ufb2f', + "aleph": '\u2135', + "allequal": '\u224c', + "alpha": '\u03b1', + "alphatonos": '\u03ac', + "amacron": '\u0101', + "amonospace": '\uff41', + "ampersand": '\u0026', + "ampersandmonospace": '\uff06', + "ampersandsmall": '\uf726', + "amsquare": '\u33c2', + "anbopomofo": '\u3122', + "angbopomofo": '\u3124', + "angkhankhuthai": '\u0e5a', + "angle": '\u2220', + "anglebracketleft": '\u3008', + "anglebracketleftvertical": '\ufe3f', + "anglebracketright": '\u3009', + "anglebracketrightvertical": '\ufe40', + "angleleft": '\u2329', + "angleright": '\u232a', + "angstrom": '\u212b', + "anoteleia": '\u0387', + "anudattadeva": '\u0952', + "anusvarabengali": '\u0982', + "anusvaradeva": '\u0902', + "anusvaragujarati": '\u0a82', + "aogonek": '\u0105', + "apaatosquare": '\u3300', + "aparen": '\u249c', + "apostrophearmenian": '\u055a', + "apostrophemod": '\u02bc', + "apple": '\uf8ff', + "approaches": '\u2250', + "approxequal": '\u2248', + "approxequalorimage": '\u2252', + "approximatelyequal": '\u2245', + "araeaekorean": '\u318e', + "araeakorean": '\u318d', + "arc": '\u2312', + "arighthalfring": '\u1e9a', + "aring": '\u00e5', + "aringacute": '\u01fb', + "aringbelow": '\u1e01', + "arrowboth": '\u2194', + "arrowdashdown": '\u21e3', + "arrowdashleft": '\u21e0', + "arrowdashright": '\u21e2', + "arrowdashup": '\u21e1', + "arrowdblboth": '\u21d4', + "arrowdbldown": '\u21d3', + "arrowdblleft": '\u21d0', + "arrowdblright": '\u21d2', + "arrowdblup": '\u21d1', + "arrowdown": '\u2193', + "arrowdownleft": '\u2199', + "arrowdownright": '\u2198', + "arrowdownwhite": '\u21e9', + "arrowheaddownmod": '\u02c5', + "arrowheadleftmod": '\u02c2', + "arrowheadrightmod": '\u02c3', + "arrowheadupmod": '\u02c4', + "arrowhorizex": '\uf8e7', + "arrowleft": '\u2190', + "arrowleftdbl": '\u21d0', + "arrowleftdblstroke": '\u21cd', + "arrowleftoverright": '\u21c6', + "arrowleftwhite": '\u21e6', + "arrowright": '\u2192', + "arrowrightdblstroke": '\u21cf', + "arrowrightheavy": '\u279e', + "arrowrightoverleft": '\u21c4', + "arrowrightwhite": '\u21e8', + "arrowtableft": '\u21e4', + "arrowtabright": '\u21e5', + "arrowup": '\u2191', + "arrowupdn": '\u2195', + "arrowupdnbse": '\u21a8', + "arrowupdownbase": '\u21a8', + "arrowupleft": '\u2196', + "arrowupleftofdown": '\u21c5', + "arrowupright": '\u2197', + "arrowupwhite": '\u21e7', + "arrowvertex": '\uf8e6', + "asciicircum": '\u005e', + "asciicircummonospace": '\uff3e', + "asciitilde": '\u007e', + "asciitildemonospace": '\uff5e', + "ascript": '\u0251', + "ascriptturned": '\u0252', + "asmallhiragana": '\u3041', + "asmallkatakana": '\u30a1', + "asmallkatakanahalfwidth": '\uff67', + "asterisk": '\u002a', + "asteriskaltonearabic": '\u066d', + "asteriskarabic": '\u066d', + "asteriskmath": '\u2217', + "asteriskmonospace": '\uff0a', + "asterisksmall": '\ufe61', + "asterism": '\u2042', + "asuperior": '\uf6e9', + "asymptoticallyequal": '\u2243', + "at": '\u0040', + "atilde": '\u00e3', + "atmonospace": '\uff20', + "atsmall": '\ufe6b', + "aturned": '\u0250', + "aubengali": '\u0994', + "aubopomofo": '\u3120', + "audeva": '\u0914', + "augujarati": '\u0a94', + "augurmukhi": '\u0a14', + "aulengthmarkbengali": '\u09d7', + "aumatragurmukhi": '\u0a4c', + "auvowelsignbengali": '\u09cc', + "auvowelsigndeva": '\u094c', + "auvowelsigngujarati": '\u0acc', + "avagrahadeva": '\u093d', + "aybarmenian": '\u0561', + "ayin": '\u05e2', + "ayinaltonehebrew": '\ufb20', + "ayinhebrew": '\u05e2', + "b": '\u0062', + "babengali": '\u09ac', + "backslash": '\u005c', + "backslashmonospace": '\uff3c', + "badeva": '\u092c', + "bagujarati": '\u0aac', + "bagurmukhi": '\u0a2c', + "bahiragana": '\u3070', + "bahtthai": '\u0e3f', + "bakatakana": '\u30d0', + "bar": '\u007c', + "barmonospace": '\uff5c', + "bbopomofo": '\u3105', + "bcircle": '\u24d1', + "bdotaccent": '\u1e03', + "bdotbelow": '\u1e05', + "beamedsixteenthnotes": '\u266c', + "because": '\u2235', + "becyrillic": '\u0431', + "beharabic": '\u0628', + "behfinalarabic": '\ufe90', + "behinitialarabic": '\ufe91', + "behiragana": '\u3079', + "behmedialarabic": '\ufe92', + "behmeeminitialarabic": '\ufc9f', + "behmeemisolatedarabic": '\ufc08', + "behnoonfinalarabic": '\ufc6d', + "bekatakana": '\u30d9', + "benarmenian": '\u0562', + "bet": '\u05d1', + "beta": '\u03b2', + "betasymbolgreek": '\u03d0', + "betdagesh": '\ufb31', + "betdageshhebrew": '\ufb31', + "bethebrew": '\u05d1', + "betrafehebrew": '\ufb4c', + "bhabengali": '\u09ad', + "bhadeva": '\u092d', + "bhagujarati": '\u0aad', + "bhagurmukhi": '\u0a2d', + "bhook": '\u0253', + "bihiragana": '\u3073', + "bikatakana": '\u30d3', + "bilabialclick": '\u0298', + "bindigurmukhi": '\u0a02', + "birusquare": '\u3331', + "blackcircle": '\u25cf', + "blackdiamond": '\u25c6', + "blackdownpointingtriangle": '\u25bc', + "blackleftpointingpointer": '\u25c4', + "blackleftpointingtriangle": '\u25c0', + "blacklenticularbracketleft": '\u3010', + "blacklenticularbracketleftvertical": '\ufe3b', + "blacklenticularbracketright": '\u3011', + "blacklenticularbracketrightvertical": '\ufe3c', + "blacklowerlefttriangle": '\u25e3', + "blacklowerrighttriangle": '\u25e2', + "blackrectangle": '\u25ac', + "blackrightpointingpointer": '\u25ba', + "blackrightpointingtriangle": '\u25b6', + "blacksmallsquare": '\u25aa', + "blacksmilingface": '\u263b', + "blacksquare": '\u25a0', + "blackstar": '\u2605', + "blackupperlefttriangle": '\u25e4', + "blackupperrighttriangle": '\u25e5', + "blackuppointingsmalltriangle": '\u25b4', + "blackuppointingtriangle": '\u25b2', + "blank": '\u2423', + "blinebelow": '\u1e07', + "block": '\u2588', + "bmonospace": '\uff42', + "bobaimaithai": '\u0e1a', + "bohiragana": '\u307c', + "bokatakana": '\u30dc', + "bparen": '\u249d', + "bqsquare": '\u33c3', + "braceex": '\uf8f4', + "braceleft": '\u007b', + "braceleftbt": '\uf8f3', + "braceleftmid": '\uf8f2', + "braceleftmonospace": '\uff5b', + "braceleftsmall": '\ufe5b', + "bracelefttp": '\uf8f1', + "braceleftvertical": '\ufe37', + "braceright": '\u007d', + "bracerightbt": '\uf8fe', + "bracerightmid": '\uf8fd', + "bracerightmonospace": '\uff5d', + "bracerightsmall": '\ufe5c', + "bracerighttp": '\uf8fc', + "bracerightvertical": '\ufe38', + "bracketleft": '\u005b', + "bracketleftbt": '\uf8f0', + "bracketleftex": '\uf8ef', + "bracketleftmonospace": '\uff3b', + "bracketlefttp": '\uf8ee', + "bracketright": '\u005d', + "bracketrightbt": '\uf8fb', + "bracketrightex": '\uf8fa', + "bracketrightmonospace": '\uff3d', + "bracketrighttp": '\uf8f9', + "breve": '\u02d8', + "brevebelowcmb": '\u032e', + "brevecmb": '\u0306', + "breveinvertedbelowcmb": '\u032f', + "breveinvertedcmb": '\u0311', + "breveinverteddoublecmb": '\u0361', + "bridgebelowcmb": '\u032a', + "bridgeinvertedbelowcmb": '\u033a', + "brokenbar": '\u00a6', + "bstroke": '\u0180', + "bsuperior": '\uf6ea', + "btopbar": '\u0183', + "buhiragana": '\u3076', + "bukatakana": '\u30d6', + "bullet": '\u2022', + "bulletinverse": '\u25d8', + "bulletoperator": '\u2219', + "bullseye": '\u25ce', + "c": '\u0063', + "caarmenian": '\u056e', + "cabengali": '\u099a', + "cacute": '\u0107', + "cadeva": '\u091a', + "cagujarati": '\u0a9a', + "cagurmukhi": '\u0a1a', + "calsquare": '\u3388', + "candrabindubengali": '\u0981', + "candrabinducmb": '\u0310', + "candrabindudeva": '\u0901', + "candrabindugujarati": '\u0a81', + "capslock": '\u21ea', + "careof": '\u2105', + "caron": '\u02c7', + "caronbelowcmb": '\u032c', + "caroncmb": '\u030c', + "carriagereturn": '\u21b5', + "cbopomofo": '\u3118', + "ccaron": '\u010d', + "ccedilla": '\u00e7', + "ccedillaacute": '\u1e09', + "ccircle": '\u24d2', + "ccircumflex": '\u0109', + "ccurl": '\u0255', + "cdot": '\u010b', + "cdotaccent": '\u010b', + "cdsquare": '\u33c5', + "cedilla": '\u00b8', + "cedillacmb": '\u0327', + "cent": '\u00a2', + "centigrade": '\u2103', + "centinferior": '\uf6df', + "centmonospace": '\uffe0', + "centoldstyle": '\uf7a2', + "centsuperior": '\uf6e0', + "chaarmenian": '\u0579', + "chabengali": '\u099b', + "chadeva": '\u091b', + "chagujarati": '\u0a9b', + "chagurmukhi": '\u0a1b', + "chbopomofo": '\u3114', + "cheabkhasiancyrillic": '\u04bd', + "checkmark": '\u2713', + "checyrillic": '\u0447', + "chedescenderabkhasiancyrillic": '\u04bf', + "chedescendercyrillic": '\u04b7', + "chedieresiscyrillic": '\u04f5', + "cheharmenian": '\u0573', + "chekhakassiancyrillic": '\u04cc', + "cheverticalstrokecyrillic": '\u04b9', + "chi": '\u03c7', + "chieuchacirclekorean": '\u3277', + "chieuchaparenkorean": '\u3217', + "chieuchcirclekorean": '\u3269', + "chieuchkorean": '\u314a', + "chieuchparenkorean": '\u3209', + "chochangthai": '\u0e0a', + "chochanthai": '\u0e08', + "chochingthai": '\u0e09', + "chochoethai": '\u0e0c', + "chook": '\u0188', + "cieucacirclekorean": '\u3276', + "cieucaparenkorean": '\u3216', + "cieuccirclekorean": '\u3268', + "cieuckorean": '\u3148', + "cieucparenkorean": '\u3208', + "cieucuparenkorean": '\u321c', + "circle": '\u25cb', + "circlemultiply": '\u2297', + "circleot": '\u2299', + "circleplus": '\u2295', + "circlepostalmark": '\u3036', + "circlewithlefthalfblack": '\u25d0', + "circlewithrighthalfblack": '\u25d1', + "circumflex": '\u02c6', + "circumflexbelowcmb": '\u032d', + "circumflexcmb": '\u0302', + "clear": '\u2327', + "clickalveolar": '\u01c2', + "clickdental": '\u01c0', + "clicklateral": '\u01c1', + "clickretroflex": '\u01c3', + "club": '\u2663', + "clubsuitblack": '\u2663', + "clubsuitwhite": '\u2667', + "cmcubedsquare": '\u33a4', + "cmonospace": '\uff43', + "cmsquaredsquare": '\u33a0', + "coarmenian": '\u0581', + "colon": '\u003a', + "colonmonetary": '\u20a1', + "colonmonospace": '\uff1a', + "colonsign": '\u20a1', + "colonsmall": '\ufe55', + "colontriangularhalfmod": '\u02d1', + "colontriangularmod": '\u02d0', + "comma": '\u002c', + "commaabovecmb": '\u0313', + "commaaboverightcmb": '\u0315', + "commaaccent": '\uf6c3', + "commaarabic": '\u060c', + "commaarmenian": '\u055d', + "commainferior": '\uf6e1', + "commamonospace": '\uff0c', + "commareversedabovecmb": '\u0314', + "commareversedmod": '\u02bd', + "commasmall": '\ufe50', + "commasuperior": '\uf6e2', + "commaturnedabovecmb": '\u0312', + "commaturnedmod": '\u02bb', + "compass": '\u263c', + "congruent": '\u2245', + "contourintegral": '\u222e', + "control": '\u2303', + "controlACK": '\u0006', + "controlBEL": '\u0007', + "controlBS": '\u0008', + "controlCAN": '\u0018', + "controlCR": '\u000d', + "controlDC1": '\u0011', + "controlDC2": '\u0012', + "controlDC3": '\u0013', + "controlDC4": '\u0014', + "controlDEL": '\u007f', + "controlDLE": '\u0010', + "controlEM": '\u0019', + "controlENQ": '\u0005', + "controlEOT": '\u0004', + "controlESC": '\u001b', + "controlETB": '\u0017', + "controlETX": '\u0003', + "controlFF": '\u000c', + "controlFS": '\u001c', + "controlGS": '\u001d', + "controlHT": '\u0009', + "controlLF": '\u000a', + "controlNAK": '\u0015', + "controlRS": '\u001e', + "controlSI": '\u000f', + "controlSO": '\u000e', + "controlSOT": '\u0002', + "controlSTX": '\u0001', + "controlSUB": '\u001a', + "controlSYN": '\u0016', + "controlUS": '\u001f', + "controlVT": '\u000b', + "copyright": '\u00a9', + "copyrightsans": '\uf8e9', + "copyrightserif": '\uf6d9', + "cornerbracketleft": '\u300c', + "cornerbracketlefthalfwidth": '\uff62', + "cornerbracketleftvertical": '\ufe41', + "cornerbracketright": '\u300d', + "cornerbracketrighthalfwidth": '\uff63', + "cornerbracketrightvertical": '\ufe42', + "corporationsquare": '\u337f', + "cosquare": '\u33c7', + "coverkgsquare": '\u33c6', + "cparen": '\u249e', + "cruzeiro": '\u20a2', + "cstretched": '\u0297', + "curlyand": '\u22cf', + "curlyor": '\u22ce', + "currency": '\u00a4', + "cyrBreve": '\uf6d1', + "cyrFlex": '\uf6d2', + "cyrbreve": '\uf6d4', + "cyrflex": '\uf6d5', + "d": '\u0064', + "daarmenian": '\u0564', + "dabengali": '\u09a6', + "dadarabic": '\u0636', + "dadeva": '\u0926', + "dadfinalarabic": '\ufebe', + "dadinitialarabic": '\ufebf', + "dadmedialarabic": '\ufec0', + "dagesh": '\u05bc', + "dageshhebrew": '\u05bc', + "dagger": '\u2020', + "daggerdbl": '\u2021', + "dagujarati": '\u0aa6', + "dagurmukhi": '\u0a26', + "dahiragana": '\u3060', + "dakatakana": '\u30c0', + "dalarabic": '\u062f', + "dalet": '\u05d3', + "daletdagesh": '\ufb33', + "daletdageshhebrew": '\ufb33', + "dalethatafpatah": '\u05b2', + "dalethatafpatahhebrew": '\u05b2', + "dalethatafsegol": '\u05b1', + "dalethatafsegolhebrew": '\u05b1', + "dalethebrew": '\u05d3', + "dalethiriq": '\u05b4', + "dalethiriqhebrew": '\u05b4', + "daletholam": '\u05b9', + "daletholamhebrew": '\u05b9', + "daletpatah": '\u05b7', + "daletpatahhebrew": '\u05b7', + "daletqamats": '\u05b8', + "daletqamatshebrew": '\u05b8', + "daletqubuts": '\u05bb', + "daletqubutshebrew": '\u05bb', + "daletsegol": '\u05b6', + "daletsegolhebrew": '\u05b6', + "daletsheva": '\u05b0', + "daletshevahebrew": '\u05b0', + "dalettsere": '\u05b5', + "dalettserehebrew": '\u05b5', + "dalfinalarabic": '\ufeaa', + "dammaarabic": '\u064f', + "dammalowarabic": '\u064f', + "dammatanaltonearabic": '\u064c', + "dammatanarabic": '\u064c', + "danda": '\u0964', + "dargahebrew": '\u05a7', + "dargalefthebrew": '\u05a7', + "dasiapneumatacyrilliccmb": '\u0485', + "dblGrave": '\uf6d3', + "dblanglebracketleft": '\u300a', + "dblanglebracketleftvertical": '\ufe3d', + "dblanglebracketright": '\u300b', + "dblanglebracketrightvertical": '\ufe3e', + "dblarchinvertedbelowcmb": '\u032b', + "dblarrowleft": '\u21d4', + "dblarrowright": '\u21d2', + "dbldanda": '\u0965', + "dblgrave": '\uf6d6', + "dblgravecmb": '\u030f', + "dblintegral": '\u222c', + "dbllowline": '\u2017', + "dbllowlinecmb": '\u0333', + "dbloverlinecmb": '\u033f', + "dblprimemod": '\u02ba', + "dblverticalbar": '\u2016', + "dblverticallineabovecmb": '\u030e', + "dbopomofo": '\u3109', + "dbsquare": '\u33c8', + "dcaron": '\u010f', + "dcedilla": '\u1e11', + "dcircle": '\u24d3', + "dcircumflexbelow": '\u1e13', + "dcroat": '\u0111', + "ddabengali": '\u09a1', + "ddadeva": '\u0921', + "ddagujarati": '\u0aa1', + "ddagurmukhi": '\u0a21', + "ddalarabic": '\u0688', + "ddalfinalarabic": '\ufb89', + "dddhadeva": '\u095c', + "ddhabengali": '\u09a2', + "ddhadeva": '\u0922', + "ddhagujarati": '\u0aa2', + "ddhagurmukhi": '\u0a22', + "ddotaccent": '\u1e0b', + "ddotbelow": '\u1e0d', + "decimalseparatorarabic": '\u066b', + "decimalseparatorpersian": '\u066b', + "decyrillic": '\u0434', + "degree": '\u00b0', + "dehihebrew": '\u05ad', + "dehiragana": '\u3067', + "deicoptic": '\u03ef', + "dekatakana": '\u30c7', + "deleteleft": '\u232b', + "deleteright": '\u2326', + "delta": '\u03b4', + "deltaturned": '\u018d', + "denominatorminusonenumeratorbengali": '\u09f8', + "dezh": '\u02a4', + "dhabengali": '\u09a7', + "dhadeva": '\u0927', + "dhagujarati": '\u0aa7', + "dhagurmukhi": '\u0a27', + "dhook": '\u0257', + "dialytikatonos": '\u0385', + "dialytikatonoscmb": '\u0344', + "diamond": '\u2666', + "diamondsuitwhite": '\u2662', + "dieresis": '\u00a8', + "dieresisacute": '\uf6d7', + "dieresisbelowcmb": '\u0324', + "dieresiscmb": '\u0308', + "dieresisgrave": '\uf6d8', + "dieresistonos": '\u0385', + "dihiragana": '\u3062', + "dikatakana": '\u30c2', + "dittomark": '\u3003', + "divide": '\u00f7', + "divides": '\u2223', + "divisionslash": '\u2215', + "djecyrillic": '\u0452', + "dkshade": '\u2593', + "dlinebelow": '\u1e0f', + "dlsquare": '\u3397', + "dmacron": '\u0111', + "dmonospace": '\uff44', + "dnblock": '\u2584', + "dochadathai": '\u0e0e', + "dodekthai": '\u0e14', + "dohiragana": '\u3069', + "dokatakana": '\u30c9', + "dollar": '\u0024', + "dollarinferior": '\uf6e3', + "dollarmonospace": '\uff04', + "dollaroldstyle": '\uf724', + "dollarsmall": '\ufe69', + "dollarsuperior": '\uf6e4', + "dong": '\u20ab', + "dorusquare": '\u3326', + "dotaccent": '\u02d9', + "dotaccentcmb": '\u0307', + "dotbelowcmb": '\u0323', + "dotbelowcomb": '\u0323', + "dotkatakana": '\u30fb', + "dotlessi": '\u0131', + "dotlessj": '\uf6be', + "dotlessjstrokehook": '\u0284', + "dotmath": '\u22c5', + "dottedcircle": '\u25cc', + "doubleyodpatah": '\ufb1f', + "doubleyodpatahhebrew": '\ufb1f', + "downtackbelowcmb": '\u031e', + "downtackmod": '\u02d5', + "dparen": '\u249f', + "dsuperior": '\uf6eb', + "dtail": '\u0256', + "dtopbar": '\u018c', + "duhiragana": '\u3065', + "dukatakana": '\u30c5', + "dz": '\u01f3', + "dzaltone": '\u02a3', + "dzcaron": '\u01c6', + "dzcurl": '\u02a5', + "dzeabkhasiancyrillic": '\u04e1', + "dzecyrillic": '\u0455', + "dzhecyrillic": '\u045f', + "e": '\u0065', + "eacute": '\u00e9', + "earth": '\u2641', + "ebengali": '\u098f', + "ebopomofo": '\u311c', + "ebreve": '\u0115', + "ecandradeva": '\u090d', + "ecandragujarati": '\u0a8d', + "ecandravowelsigndeva": '\u0945', + "ecandravowelsigngujarati": '\u0ac5', + "ecaron": '\u011b', + "ecedillabreve": '\u1e1d', + "echarmenian": '\u0565', + "echyiwnarmenian": '\u0587', + "ecircle": '\u24d4', + "ecircumflex": '\u00ea', + "ecircumflexacute": '\u1ebf', + "ecircumflexbelow": '\u1e19', + "ecircumflexdotbelow": '\u1ec7', + "ecircumflexgrave": '\u1ec1', + "ecircumflexhookabove": '\u1ec3', + "ecircumflextilde": '\u1ec5', + "ecyrillic": '\u0454', + "edblgrave": '\u0205', + "edeva": '\u090f', + "edieresis": '\u00eb', + "edot": '\u0117', + "edotaccent": '\u0117', + "edotbelow": '\u1eb9', + "eegurmukhi": '\u0a0f', + "eematragurmukhi": '\u0a47', + "efcyrillic": '\u0444', + "egrave": '\u00e8', + "egujarati": '\u0a8f', + "eharmenian": '\u0567', + "ehbopomofo": '\u311d', + "ehiragana": '\u3048', + "ehookabove": '\u1ebb', + "eibopomofo": '\u311f', + "eight": '\u0038', + "eightarabic": '\u0668', + "eightbengali": '\u09ee', + "eightcircle": '\u2467', + "eightcircleinversesansserif": '\u2791', + "eightdeva": '\u096e', + "eighteencircle": '\u2471', + "eighteenparen": '\u2485', + "eighteenperiod": '\u2499', + "eightgujarati": '\u0aee', + "eightgurmukhi": '\u0a6e', + "eighthackarabic": '\u0668', + "eighthangzhou": '\u3028', + "eighthnotebeamed": '\u266b', + "eightideographicparen": '\u3227', + "eightinferior": '\u2088', + "eightmonospace": '\uff18', + "eightoldstyle": '\uf738', + "eightparen": '\u247b', + "eightperiod": '\u248f', + "eightpersian": '\u06f8', + "eightroman": '\u2177', + "eightsuperior": '\u2078', + "eightthai": '\u0e58', + "einvertedbreve": '\u0207', + "eiotifiedcyrillic": '\u0465', + "ekatakana": '\u30a8', + "ekatakanahalfwidth": '\uff74', + "ekonkargurmukhi": '\u0a74', + "ekorean": '\u3154', + "elcyrillic": '\u043b', + "element": '\u2208', + "elevencircle": '\u246a', + "elevenparen": '\u247e', + "elevenperiod": '\u2492', + "elevenroman": '\u217a', + "ellipsis": '\u2026', + "ellipsisvertical": '\u22ee', + "emacron": '\u0113', + "emacronacute": '\u1e17', + "emacrongrave": '\u1e15', + "emcyrillic": '\u043c', + "emdash": '\u2014', + "emdashvertical": '\ufe31', + "emonospace": '\uff45', + "emphasismarkarmenian": '\u055b', + "emptyset": '\u2205', + "enbopomofo": '\u3123', + "encyrillic": '\u043d', + "endash": '\u2013', + "endashvertical": '\ufe32', + "endescendercyrillic": '\u04a3', + "eng": '\u014b', + "engbopomofo": '\u3125', + "enghecyrillic": '\u04a5', + "enhookcyrillic": '\u04c8', + "enspace": '\u2002', + "eogonek": '\u0119', + "eokorean": '\u3153', + "eopen": '\u025b', + "eopenclosed": '\u029a', + "eopenreversed": '\u025c', + "eopenreversedclosed": '\u025e', + "eopenreversedhook": '\u025d', + "eparen": '\u24a0', + "epsilon": '\u03b5', + "epsilontonos": '\u03ad', + "equal": '\u003d', + "equalmonospace": '\uff1d', + "equalsmall": '\ufe66', + "equalsuperior": '\u207c', + "equivalence": '\u2261', + "erbopomofo": '\u3126', + "ercyrillic": '\u0440', + "ereversed": '\u0258', + "ereversedcyrillic": '\u044d', + "escyrillic": '\u0441', + "esdescendercyrillic": '\u04ab', + "esh": '\u0283', + "eshcurl": '\u0286', + "eshortdeva": '\u090e', + "eshortvowelsigndeva": '\u0946', + "eshreversedloop": '\u01aa', + "eshsquatreversed": '\u0285', + "esmallhiragana": '\u3047', + "esmallkatakana": '\u30a7', + "esmallkatakanahalfwidth": '\uff6a', + "estimated": '\u212e', + "esuperior": '\uf6ec', + "eta": '\u03b7', + "etarmenian": '\u0568', + "etatonos": '\u03ae', + "eth": '\u00f0', + "etilde": '\u1ebd', + "etildebelow": '\u1e1b', + "etnahtafoukhhebrew": '\u0591', + "etnahtafoukhlefthebrew": '\u0591', + "etnahtahebrew": '\u0591', + "etnahtalefthebrew": '\u0591', + "eturned": '\u01dd', + "eukorean": '\u3161', + "euro": '\u20ac', + "evowelsignbengali": '\u09c7', + "evowelsigndeva": '\u0947', + "evowelsigngujarati": '\u0ac7', + "exclam": '\u0021', + "exclamarmenian": '\u055c', + "exclamdbl": '\u203c', + "exclamdown": '\u00a1', + "exclamdownsmall": '\uf7a1', + "exclammonospace": '\uff01', + "exclamsmall": '\uf721', + "existential": '\u2203', + "ezh": '\u0292', + "ezhcaron": '\u01ef', + "ezhcurl": '\u0293', + "ezhreversed": '\u01b9', + "ezhtail": '\u01ba', + "f": '\u0066', + "fadeva": '\u095e', + "fagurmukhi": '\u0a5e', + "fahrenheit": '\u2109', + "fathaarabic": '\u064e', + "fathalowarabic": '\u064e', + "fathatanarabic": '\u064b', + "fbopomofo": '\u3108', + "fcircle": '\u24d5', + "fdotaccent": '\u1e1f', + "feharabic": '\u0641', + "feharmenian": '\u0586', + "fehfinalarabic": '\ufed2', + "fehinitialarabic": '\ufed3', + "fehmedialarabic": '\ufed4', + "feicoptic": '\u03e5', + "female": '\u2640', + "ff": '\ufb00', + "ffi": '\ufb03', + "ffl": '\ufb04', + "fi": '\ufb01', + "fifteencircle": '\u246e', + "fifteenparen": '\u2482', + "fifteenperiod": '\u2496', + "figuredash": '\u2012', + "filledbox": '\u25a0', + "filledrect": '\u25ac', + "finalkaf": '\u05da', + "finalkafdagesh": '\ufb3a', + "finalkafdageshhebrew": '\ufb3a', + "finalkafhebrew": '\u05da', + "finalkafqamats": '\u05b8', + "finalkafqamatshebrew": '\u05b8', + "finalkafsheva": '\u05b0', + "finalkafshevahebrew": '\u05b0', + "finalmem": '\u05dd', + "finalmemhebrew": '\u05dd', + "finalnun": '\u05df', + "finalnunhebrew": '\u05df', + "finalpe": '\u05e3', + "finalpehebrew": '\u05e3', + "finaltsadi": '\u05e5', + "finaltsadihebrew": '\u05e5', + "firsttonechinese": '\u02c9', + "fisheye": '\u25c9', + "fitacyrillic": '\u0473', + "five": '\u0035', + "fivearabic": '\u0665', + "fivebengali": '\u09eb', + "fivecircle": '\u2464', + "fivecircleinversesansserif": '\u278e', + "fivedeva": '\u096b', + "fiveeighths": '\u215d', + "fivegujarati": '\u0aeb', + "fivegurmukhi": '\u0a6b', + "fivehackarabic": '\u0665', + "fivehangzhou": '\u3025', + "fiveideographicparen": '\u3224', + "fiveinferior": '\u2085', + "fivemonospace": '\uff15', + "fiveoldstyle": '\uf735', + "fiveparen": '\u2478', + "fiveperiod": '\u248c', + "fivepersian": '\u06f5', + "fiveroman": '\u2174', + "fivesuperior": '\u2075', + "fivethai": '\u0e55', + "fl": '\ufb02', + "florin": '\u0192', + "fmonospace": '\uff46', + "fmsquare": '\u3399', + "fofanthai": '\u0e1f', + "fofathai": '\u0e1d', + "fongmanthai": '\u0e4f', + "forall": '\u2200', + "four": '\u0034', + "fourarabic": '\u0664', + "fourbengali": '\u09ea', + "fourcircle": '\u2463', + "fourcircleinversesansserif": '\u278d', + "fourdeva": '\u096a', + "fourgujarati": '\u0aea', + "fourgurmukhi": '\u0a6a', + "fourhackarabic": '\u0664', + "fourhangzhou": '\u3024', + "fourideographicparen": '\u3223', + "fourinferior": '\u2084', + "fourmonospace": '\uff14', + "fournumeratorbengali": '\u09f7', + "fouroldstyle": '\uf734', + "fourparen": '\u2477', + "fourperiod": '\u248b', + "fourpersian": '\u06f4', + "fourroman": '\u2173', + "foursuperior": '\u2074', + "fourteencircle": '\u246d', + "fourteenparen": '\u2481', + "fourteenperiod": '\u2495', + "fourthai": '\u0e54', + "fourthtonechinese": '\u02cb', + "fparen": '\u24a1', + "fraction": '\u2044', + "franc": '\u20a3', + "g": '\u0067', + "gabengali": '\u0997', + "gacute": '\u01f5', + "gadeva": '\u0917', + "gafarabic": '\u06af', + "gaffinalarabic": '\ufb93', + "gafinitialarabic": '\ufb94', + "gafmedialarabic": '\ufb95', + "gagujarati": '\u0a97', + "gagurmukhi": '\u0a17', + "gahiragana": '\u304c', + "gakatakana": '\u30ac', + "gamma": '\u03b3', + "gammalatinsmall": '\u0263', + "gammasuperior": '\u02e0', + "gangiacoptic": '\u03eb', + "gbopomofo": '\u310d', + "gbreve": '\u011f', + "gcaron": '\u01e7', + "gcedilla": '\u0123', + "gcircle": '\u24d6', + "gcircumflex": '\u011d', + "gcommaaccent": '\u0123', + "gdot": '\u0121', + "gdotaccent": '\u0121', + "gecyrillic": '\u0433', + "gehiragana": '\u3052', + "gekatakana": '\u30b2', + "geometricallyequal": '\u2251', + "gereshaccenthebrew": '\u059c', + "gereshhebrew": '\u05f3', + "gereshmuqdamhebrew": '\u059d', + "germandbls": '\u00df', + "gershayimaccenthebrew": '\u059e', + "gershayimhebrew": '\u05f4', + "getamark": '\u3013', + "ghabengali": '\u0998', + "ghadarmenian": '\u0572', + "ghadeva": '\u0918', + "ghagujarati": '\u0a98', + "ghagurmukhi": '\u0a18', + "ghainarabic": '\u063a', + "ghainfinalarabic": '\ufece', + "ghaininitialarabic": '\ufecf', + "ghainmedialarabic": '\ufed0', + "ghemiddlehookcyrillic": '\u0495', + "ghestrokecyrillic": '\u0493', + "gheupturncyrillic": '\u0491', + "ghhadeva": '\u095a', + "ghhagurmukhi": '\u0a5a', + "ghook": '\u0260', + "ghzsquare": '\u3393', + "gihiragana": '\u304e', + "gikatakana": '\u30ae', + "gimarmenian": '\u0563', + "gimel": '\u05d2', + "gimeldagesh": '\ufb32', + "gimeldageshhebrew": '\ufb32', + "gimelhebrew": '\u05d2', + "gjecyrillic": '\u0453', + "glottalinvertedstroke": '\u01be', + "glottalstop": '\u0294', + "glottalstopinverted": '\u0296', + "glottalstopmod": '\u02c0', + "glottalstopreversed": '\u0295', + "glottalstopreversedmod": '\u02c1', + "glottalstopreversedsuperior": '\u02e4', + "glottalstopstroke": '\u02a1', + "glottalstopstrokereversed": '\u02a2', + "gmacron": '\u1e21', + "gmonospace": '\uff47', + "gohiragana": '\u3054', + "gokatakana": '\u30b4', + "gparen": '\u24a2', + "gpasquare": '\u33ac', + "gradient": '\u2207', + "grave": '\u0060', + "gravebelowcmb": '\u0316', + "gravecmb": '\u0300', + "gravecomb": '\u0300', + "gravedeva": '\u0953', + "gravelowmod": '\u02ce', + "gravemonospace": '\uff40', + "gravetonecmb": '\u0340', + "greater": '\u003e', + "greaterequal": '\u2265', + "greaterequalorless": '\u22db', + "greatermonospace": '\uff1e', + "greaterorequivalent": '\u2273', + "greaterorless": '\u2277', + "greateroverequal": '\u2267', + "greatersmall": '\ufe65', + "gscript": '\u0261', + "gstroke": '\u01e5', + "guhiragana": '\u3050', + "guillemotleft": '\u00ab', + "guillemotright": '\u00bb', + "guilsinglleft": '\u2039', + "guilsinglright": '\u203a', + "gukatakana": '\u30b0', + "guramusquare": '\u3318', + "gysquare": '\u33c9', + "h": '\u0068', + "haabkhasiancyrillic": '\u04a9', + "haaltonearabic": '\u06c1', + "habengali": '\u09b9', + "hadescendercyrillic": '\u04b3', + "hadeva": '\u0939', + "hagujarati": '\u0ab9', + "hagurmukhi": '\u0a39', + "haharabic": '\u062d', + "hahfinalarabic": '\ufea2', + "hahinitialarabic": '\ufea3', + "hahiragana": '\u306f', + "hahmedialarabic": '\ufea4', + "haitusquare": '\u332a', + "hakatakana": '\u30cf', + "hakatakanahalfwidth": '\uff8a', + "halantgurmukhi": '\u0a4d', + "hamzaarabic": '\u0621', + "hamzadammaarabic": '\u064f', + "hamzadammatanarabic": '\u064c', + "hamzafathaarabic": '\u064e', + "hamzafathatanarabic": '\u064b', + "hamzalowarabic": '\u0621', + "hamzalowkasraarabic": '\u0650', + "hamzalowkasratanarabic": '\u064d', + "hamzasukunarabic": '\u0652', + "hangulfiller": '\u3164', + "hardsigncyrillic": '\u044a', + "harpoonleftbarbup": '\u21bc', + "harpoonrightbarbup": '\u21c0', + "hasquare": '\u33ca', + "hatafpatah": '\u05b2', + "hatafpatah16": '\u05b2', + "hatafpatah23": '\u05b2', + "hatafpatah2f": '\u05b2', + "hatafpatahhebrew": '\u05b2', + "hatafpatahnarrowhebrew": '\u05b2', + "hatafpatahquarterhebrew": '\u05b2', + "hatafpatahwidehebrew": '\u05b2', + "hatafqamats": '\u05b3', + "hatafqamats1b": '\u05b3', + "hatafqamats28": '\u05b3', + "hatafqamats34": '\u05b3', + "hatafqamatshebrew": '\u05b3', + "hatafqamatsnarrowhebrew": '\u05b3', + "hatafqamatsquarterhebrew": '\u05b3', + "hatafqamatswidehebrew": '\u05b3', + "hatafsegol": '\u05b1', + "hatafsegol17": '\u05b1', + "hatafsegol24": '\u05b1', + "hatafsegol30": '\u05b1', + "hatafsegolhebrew": '\u05b1', + "hatafsegolnarrowhebrew": '\u05b1', + "hatafsegolquarterhebrew": '\u05b1', + "hatafsegolwidehebrew": '\u05b1', + "hbar": '\u0127', + "hbopomofo": '\u310f', + "hbrevebelow": '\u1e2b', + "hcedilla": '\u1e29', + "hcircle": '\u24d7', + "hcircumflex": '\u0125', + "hdieresis": '\u1e27', + "hdotaccent": '\u1e23', + "hdotbelow": '\u1e25', + "he": '\u05d4', + "heart": '\u2665', + "heartsuitblack": '\u2665', + "heartsuitwhite": '\u2661', + "hedagesh": '\ufb34', + "hedageshhebrew": '\ufb34', + "hehaltonearabic": '\u06c1', + "heharabic": '\u0647', + "hehebrew": '\u05d4', + "hehfinalaltonearabic": '\ufba7', + "hehfinalalttwoarabic": '\ufeea', + "hehfinalarabic": '\ufeea', + "hehhamzaabovefinalarabic": '\ufba5', + "hehhamzaaboveisolatedarabic": '\ufba4', + "hehinitialaltonearabic": '\ufba8', + "hehinitialarabic": '\ufeeb', + "hehiragana": '\u3078', + "hehmedialaltonearabic": '\ufba9', + "hehmedialarabic": '\ufeec', + "heiseierasquare": '\u337b', + "hekatakana": '\u30d8', + "hekatakanahalfwidth": '\uff8d', + "hekutaarusquare": '\u3336', + "henghook": '\u0267', + "herutusquare": '\u3339', + "het": '\u05d7', + "hethebrew": '\u05d7', + "hhook": '\u0266', + "hhooksuperior": '\u02b1', + "hieuhacirclekorean": '\u327b', + "hieuhaparenkorean": '\u321b', + "hieuhcirclekorean": '\u326d', + "hieuhkorean": '\u314e', + "hieuhparenkorean": '\u320d', + "hihiragana": '\u3072', + "hikatakana": '\u30d2', + "hikatakanahalfwidth": '\uff8b', + "hiriq": '\u05b4', + "hiriq14": '\u05b4', + "hiriq21": '\u05b4', + "hiriq2d": '\u05b4', + "hiriqhebrew": '\u05b4', + "hiriqnarrowhebrew": '\u05b4', + "hiriqquarterhebrew": '\u05b4', + "hiriqwidehebrew": '\u05b4', + "hlinebelow": '\u1e96', + "hmonospace": '\uff48', + "hoarmenian": '\u0570', + "hohipthai": '\u0e2b', + "hohiragana": '\u307b', + "hokatakana": '\u30db', + "hokatakanahalfwidth": '\uff8e', + "holam": '\u05b9', + "holam19": '\u05b9', + "holam26": '\u05b9', + "holam32": '\u05b9', + "holamhebrew": '\u05b9', + "holamnarrowhebrew": '\u05b9', + "holamquarterhebrew": '\u05b9', + "holamwidehebrew": '\u05b9', + "honokhukthai": '\u0e2e', + "hookabovecomb": '\u0309', + "hookcmb": '\u0309', + "hookpalatalizedbelowcmb": '\u0321', + "hookretroflexbelowcmb": '\u0322', + "hoonsquare": '\u3342', + "horicoptic": '\u03e9', + "horizontalbar": '\u2015', + "horncmb": '\u031b', + "hotsprings": '\u2668', + "house": '\u2302', + "hparen": '\u24a3', + "hsuperior": '\u02b0', + "hturned": '\u0265', + "huhiragana": '\u3075', + "huiitosquare": '\u3333', + "hukatakana": '\u30d5', + "hukatakanahalfwidth": '\uff8c', + "hungarumlaut": '\u02dd', + "hungarumlautcmb": '\u030b', + "hv": '\u0195', + "hyphen": '\u002d', + "hypheninferior": '\uf6e5', + "hyphenmonospace": '\uff0d', + "hyphensmall": '\ufe63', + "hyphensuperior": '\uf6e6', + "hyphentwo": '\u2010', + "i": '\u0069', + "iacute": '\u00ed', + "iacyrillic": '\u044f', + "ibengali": '\u0987', + "ibopomofo": '\u3127', + "ibreve": '\u012d', + "icaron": '\u01d0', + "icircle": '\u24d8', + "icircumflex": '\u00ee', + "icyrillic": '\u0456', + "idblgrave": '\u0209', + "ideographearthcircle": '\u328f', + "ideographfirecircle": '\u328b', + "ideographicallianceparen": '\u323f', + "ideographiccallparen": '\u323a', + "ideographiccentrecircle": '\u32a5', + "ideographicclose": '\u3006', + "ideographiccomma": '\u3001', + "ideographiccommaleft": '\uff64', + "ideographiccongratulationparen": '\u3237', + "ideographiccorrectcircle": '\u32a3', + "ideographicearthparen": '\u322f', + "ideographicenterpriseparen": '\u323d', + "ideographicexcellentcircle": '\u329d', + "ideographicfestivalparen": '\u3240', + "ideographicfinancialcircle": '\u3296', + "ideographicfinancialparen": '\u3236', + "ideographicfireparen": '\u322b', + "ideographichaveparen": '\u3232', + "ideographichighcircle": '\u32a4', + "ideographiciterationmark": '\u3005', + "ideographiclaborcircle": '\u3298', + "ideographiclaborparen": '\u3238', + "ideographicleftcircle": '\u32a7', + "ideographiclowcircle": '\u32a6', + "ideographicmedicinecircle": '\u32a9', + "ideographicmetalparen": '\u322e', + "ideographicmoonparen": '\u322a', + "ideographicnameparen": '\u3234', + "ideographicperiod": '\u3002', + "ideographicprintcircle": '\u329e', + "ideographicreachparen": '\u3243', + "ideographicrepresentparen": '\u3239', + "ideographicresourceparen": '\u323e', + "ideographicrightcircle": '\u32a8', + "ideographicsecretcircle": '\u3299', + "ideographicselfparen": '\u3242', + "ideographicsocietyparen": '\u3233', + "ideographicspace": '\u3000', + "ideographicspecialparen": '\u3235', + "ideographicstockparen": '\u3231', + "ideographicstudyparen": '\u323b', + "ideographicsunparen": '\u3230', + "ideographicsuperviseparen": '\u323c', + "ideographicwaterparen": '\u322c', + "ideographicwoodparen": '\u322d', + "ideographiczero": '\u3007', + "ideographmetalcircle": '\u328e', + "ideographmooncircle": '\u328a', + "ideographnamecircle": '\u3294', + "ideographsuncircle": '\u3290', + "ideographwatercircle": '\u328c', + "ideographwoodcircle": '\u328d', + "ideva": '\u0907', + "idieresis": '\u00ef', + "idieresisacute": '\u1e2f', + "idieresiscyrillic": '\u04e5', + "idotbelow": '\u1ecb', + "iebrevecyrillic": '\u04d7', + "iecyrillic": '\u0435', + "ieungacirclekorean": '\u3275', + "ieungaparenkorean": '\u3215', + "ieungcirclekorean": '\u3267', + "ieungkorean": '\u3147', + "ieungparenkorean": '\u3207', + "igrave": '\u00ec', + "igujarati": '\u0a87', + "igurmukhi": '\u0a07', + "ihiragana": '\u3044', + "ihookabove": '\u1ec9', + "iibengali": '\u0988', + "iicyrillic": '\u0438', + "iideva": '\u0908', + "iigujarati": '\u0a88', + "iigurmukhi": '\u0a08', + "iimatragurmukhi": '\u0a40', + "iinvertedbreve": '\u020b', + "iishortcyrillic": '\u0439', + "iivowelsignbengali": '\u09c0', + "iivowelsigndeva": '\u0940', + "iivowelsigngujarati": '\u0ac0', + "ij": '\u0133', + "ikatakana": '\u30a4', + "ikatakanahalfwidth": '\uff72', + "ikorean": '\u3163', + "ilde": '\u02dc', + "iluyhebrew": '\u05ac', + "imacron": '\u012b', + "imacroncyrillic": '\u04e3', + "imageorapproximatelyequal": '\u2253', + "imatragurmukhi": '\u0a3f', + "imonospace": '\uff49', + "increment": '\u2206', + "infinity": '\u221e', + "iniarmenian": '\u056b', + "integral": '\u222b', + "integralbottom": '\u2321', + "integralbt": '\u2321', + "integralex": '\uf8f5', + "integraltop": '\u2320', + "integraltp": '\u2320', + "intersection": '\u2229', + "intisquare": '\u3305', + "invbullet": '\u25d8', + "invcircle": '\u25d9', + "invsmileface": '\u263b', + "iocyrillic": '\u0451', + "iogonek": '\u012f', + "iota": '\u03b9', + "iotadieresis": '\u03ca', + "iotadieresistonos": '\u0390', + "iotalatin": '\u0269', + "iotatonos": '\u03af', + "iparen": '\u24a4', + "irigurmukhi": '\u0a72', + "ismallhiragana": '\u3043', + "ismallkatakana": '\u30a3', + "ismallkatakanahalfwidth": '\uff68', + "issharbengali": '\u09fa', + "istroke": '\u0268', + "isuperior": '\uf6ed', + "iterationhiragana": '\u309d', + "iterationkatakana": '\u30fd', + "itilde": '\u0129', + "itildebelow": '\u1e2d', + "iubopomofo": '\u3129', + "iucyrillic": '\u044e', + "ivowelsignbengali": '\u09bf', + "ivowelsigndeva": '\u093f', + "ivowelsigngujarati": '\u0abf', + "izhitsacyrillic": '\u0475', + "izhitsadblgravecyrillic": '\u0477', + "j": '\u006a', + "jaarmenian": '\u0571', + "jabengali": '\u099c', + "jadeva": '\u091c', + "jagujarati": '\u0a9c', + "jagurmukhi": '\u0a1c', + "jbopomofo": '\u3110', + "jcaron": '\u01f0', + "jcircle": '\u24d9', + "jcircumflex": '\u0135', + "jcrossedtail": '\u029d', + "jdotlessstroke": '\u025f', + "jecyrillic": '\u0458', + "jeemarabic": '\u062c', + "jeemfinalarabic": '\ufe9e', + "jeeminitialarabic": '\ufe9f', + "jeemmedialarabic": '\ufea0', + "jeharabic": '\u0698', + "jehfinalarabic": '\ufb8b', + "jhabengali": '\u099d', + "jhadeva": '\u091d', + "jhagujarati": '\u0a9d', + "jhagurmukhi": '\u0a1d', + "jheharmenian": '\u057b', + "jis": '\u3004', + "jmonospace": '\uff4a', + "jparen": '\u24a5', + "jsuperior": '\u02b2', + "k": '\u006b', + "kabashkircyrillic": '\u04a1', + "kabengali": '\u0995', + "kacute": '\u1e31', + "kacyrillic": '\u043a', + "kadescendercyrillic": '\u049b', + "kadeva": '\u0915', + "kaf": '\u05db', + "kafarabic": '\u0643', + "kafdagesh": '\ufb3b', + "kafdageshhebrew": '\ufb3b', + "kaffinalarabic": '\ufeda', + "kafhebrew": '\u05db', + "kafinitialarabic": '\ufedb', + "kafmedialarabic": '\ufedc', + "kafrafehebrew": '\ufb4d', + "kagujarati": '\u0a95', + "kagurmukhi": '\u0a15', + "kahiragana": '\u304b', + "kahookcyrillic": '\u04c4', + "kakatakana": '\u30ab', + "kakatakanahalfwidth": '\uff76', + "kappa": '\u03ba', + "kappasymbolgreek": '\u03f0', + "kapyeounmieumkorean": '\u3171', + "kapyeounphieuphkorean": '\u3184', + "kapyeounpieupkorean": '\u3178', + "kapyeounssangpieupkorean": '\u3179', + "karoriisquare": '\u330d', + "kashidaautoarabic": '\u0640', + "kashidaautonosidebearingarabic": '\u0640', + "kasmallkatakana": '\u30f5', + "kasquare": '\u3384', + "kasraarabic": '\u0650', + "kasratanarabic": '\u064d', + "kastrokecyrillic": '\u049f', + "katahiraprolongmarkhalfwidth": '\uff70', + "kaverticalstrokecyrillic": '\u049d', + "kbopomofo": '\u310e', + "kcalsquare": '\u3389', + "kcaron": '\u01e9', + "kcedilla": '\u0137', + "kcircle": '\u24da', + "kcommaaccent": '\u0137', + "kdotbelow": '\u1e33', + "keharmenian": '\u0584', + "kehiragana": '\u3051', + "kekatakana": '\u30b1', + "kekatakanahalfwidth": '\uff79', + "kenarmenian": '\u056f', + "kesmallkatakana": '\u30f6', + "kgreenlandic": '\u0138', + "khabengali": '\u0996', + "khacyrillic": '\u0445', + "khadeva": '\u0916', + "khagujarati": '\u0a96', + "khagurmukhi": '\u0a16', + "khaharabic": '\u062e', + "khahfinalarabic": '\ufea6', + "khahinitialarabic": '\ufea7', + "khahmedialarabic": '\ufea8', + "kheicoptic": '\u03e7', + "khhadeva": '\u0959', + "khhagurmukhi": '\u0a59', + "khieukhacirclekorean": '\u3278', + "khieukhaparenkorean": '\u3218', + "khieukhcirclekorean": '\u326a', + "khieukhkorean": '\u314b', + "khieukhparenkorean": '\u320a', + "khokhaithai": '\u0e02', + "khokhonthai": '\u0e05', + "khokhuatthai": '\u0e03', + "khokhwaithai": '\u0e04', + "khomutthai": '\u0e5b', + "khook": '\u0199', + "khorakhangthai": '\u0e06', + "khzsquare": '\u3391', + "kihiragana": '\u304d', + "kikatakana": '\u30ad', + "kikatakanahalfwidth": '\uff77', + "kiroguramusquare": '\u3315', + "kiromeetorusquare": '\u3316', + "kirosquare": '\u3314', + "kiyeokacirclekorean": '\u326e', + "kiyeokaparenkorean": '\u320e', + "kiyeokcirclekorean": '\u3260', + "kiyeokkorean": '\u3131', + "kiyeokparenkorean": '\u3200', + "kiyeoksioskorean": '\u3133', + "kjecyrillic": '\u045c', + "klinebelow": '\u1e35', + "klsquare": '\u3398', + "kmcubedsquare": '\u33a6', + "kmonospace": '\uff4b', + "kmsquaredsquare": '\u33a2', + "kohiragana": '\u3053', + "kohmsquare": '\u33c0', + "kokaithai": '\u0e01', + "kokatakana": '\u30b3', + "kokatakanahalfwidth": '\uff7a', + "kooposquare": '\u331e', + "koppacyrillic": '\u0481', + "koreanstandardsymbol": '\u327f', + "koroniscmb": '\u0343', + "kparen": '\u24a6', + "kpasquare": '\u33aa', + "ksicyrillic": '\u046f', + "ktsquare": '\u33cf', + "kturned": '\u029e', + "kuhiragana": '\u304f', + "kukatakana": '\u30af', + "kukatakanahalfwidth": '\uff78', + "kvsquare": '\u33b8', + "kwsquare": '\u33be', + "l": '\u006c', + "labengali": '\u09b2', + "lacute": '\u013a', + "ladeva": '\u0932', + "lagujarati": '\u0ab2', + "lagurmukhi": '\u0a32', + "lakkhangyaothai": '\u0e45', + "lamaleffinalarabic": '\ufefc', + "lamalefhamzaabovefinalarabic": '\ufef8', + "lamalefhamzaaboveisolatedarabic": '\ufef7', + "lamalefhamzabelowfinalarabic": '\ufefa', + "lamalefhamzabelowisolatedarabic": '\ufef9', + "lamalefisolatedarabic": '\ufefb', + "lamalefmaddaabovefinalarabic": '\ufef6', + "lamalefmaddaaboveisolatedarabic": '\ufef5', + "lamarabic": '\u0644', + "lambda": '\u03bb', + "lambdastroke": '\u019b', + "lamed": '\u05dc', + "lameddagesh": '\ufb3c', + "lameddageshhebrew": '\ufb3c', + "lamedhebrew": '\u05dc', + "lamedholam": '\u05b9', + "lamedholamdagesh": '\u05bc', + "lamedholamdageshhebrew": '\u05bc', + "lamedholamhebrew": '\u05b9', + "lamfinalarabic": '\ufede', + "lamhahinitialarabic": '\ufcca', + "laminitialarabic": '\ufedf', + "lamjeeminitialarabic": '\ufcc9', + "lamkhahinitialarabic": '\ufccb', + "lamlamhehisolatedarabic": '\ufdf2', + "lammedialarabic": '\ufee0', + "lammeemhahinitialarabic": '\ufd88', + "lammeeminitialarabic": '\ufccc', + "lammeemjeeminitialarabic": '\ufea0', + "lammeemkhahinitialarabic": '\ufea8', + "largecircle": '\u25ef', + "lbar": '\u019a', + "lbelt": '\u026c', + "lbopomofo": '\u310c', + "lcaron": '\u013e', + "lcedilla": '\u013c', + "lcircle": '\u24db', + "lcircumflexbelow": '\u1e3d', + "lcommaaccent": '\u013c', + "ldot": '\u0140', + "ldotaccent": '\u0140', + "ldotbelow": '\u1e37', + "ldotbelowmacron": '\u1e39', + "leftangleabovecmb": '\u031a', + "lefttackbelowcmb": '\u0318', + "less": '\u003c', + "lessequal": '\u2264', + "lessequalorgreater": '\u22da', + "lessmonospace": '\uff1c', + "lessorequivalent": '\u2272', + "lessorgreater": '\u2276', + "lessoverequal": '\u2266', + "lesssmall": '\ufe64', + "lezh": '\u026e', + "lfblock": '\u258c', + "lhookretroflex": '\u026d', + "lira": '\u20a4', + "liwnarmenian": '\u056c', + "lj": '\u01c9', + "ljecyrillic": '\u0459', + "ll": '\uf6c0', + "lladeva": '\u0933', + "llagujarati": '\u0ab3', + "llinebelow": '\u1e3b', + "llladeva": '\u0934', + "llvocalicbengali": '\u09e1', + "llvocalicdeva": '\u0961', + "llvocalicvowelsignbengali": '\u09e3', + "llvocalicvowelsigndeva": '\u0963', + "lmiddletilde": '\u026b', + "lmonospace": '\uff4c', + "lmsquare": '\u33d0', + "lochulathai": '\u0e2c', + "logicaland": '\u2227', + "logicalnot": '\u00ac', + "logicalnotreversed": '\u2310', + "logicalor": '\u2228', + "lolingthai": '\u0e25', + "longs": '\u017f', + "lowlinecenterline": '\ufe4e', + "lowlinecmb": '\u0332', + "lowlinedashed": '\ufe4d', + "lozenge": '\u25ca', + "lparen": '\u24a7', + "lslash": '\u0142', + "lsquare": '\u2113', + "lsuperior": '\uf6ee', + "ltshade": '\u2591', + "luthai": '\u0e26', + "lvocalicbengali": '\u098c', + "lvocalicdeva": '\u090c', + "lvocalicvowelsignbengali": '\u09e2', + "lvocalicvowelsigndeva": '\u0962', + "lxsquare": '\u33d3', + "m": '\u006d', + "mabengali": '\u09ae', + "macron": '\u00af', + "macronbelowcmb": '\u0331', + "macroncmb": '\u0304', + "macronlowmod": '\u02cd', + "macronmonospace": '\uffe3', + "macute": '\u1e3f', + "madeva": '\u092e', + "magujarati": '\u0aae', + "magurmukhi": '\u0a2e', + "mahapakhhebrew": '\u05a4', + "mahapakhlefthebrew": '\u05a4', + "mahiragana": '\u307e', + "maichattawalowleftthai": '\uf895', + "maichattawalowrightthai": '\uf894', + "maichattawathai": '\u0e4b', + "maichattawaupperleftthai": '\uf893', + "maieklowleftthai": '\uf88c', + "maieklowrightthai": '\uf88b', + "maiekthai": '\u0e48', + "maiekupperleftthai": '\uf88a', + "maihanakatleftthai": '\uf884', + "maihanakatthai": '\u0e31', + "maitaikhuleftthai": '\uf889', + "maitaikhuthai": '\u0e47', + "maitholowleftthai": '\uf88f', + "maitholowrightthai": '\uf88e', + "maithothai": '\u0e49', + "maithoupperleftthai": '\uf88d', + "maitrilowleftthai": '\uf892', + "maitrilowrightthai": '\uf891', + "maitrithai": '\u0e4a', + "maitriupperleftthai": '\uf890', + "maiyamokthai": '\u0e46', + "makatakana": '\u30de', + "makatakanahalfwidth": '\uff8f', + "male": '\u2642', + "mansyonsquare": '\u3347', + "maqafhebrew": '\u05be', + "mars": '\u2642', + "masoracirclehebrew": '\u05af', + "masquare": '\u3383', + "mbopomofo": '\u3107', + "mbsquare": '\u33d4', + "mcircle": '\u24dc', + "mcubedsquare": '\u33a5', + "mdotaccent": '\u1e41', + "mdotbelow": '\u1e43', + "meemarabic": '\u0645', + "meemfinalarabic": '\ufee2', + "meeminitialarabic": '\ufee3', + "meemmedialarabic": '\ufee4', + "meemmeeminitialarabic": '\ufcd1', + "meemmeemisolatedarabic": '\ufc48', + "meetorusquare": '\u334d', + "mehiragana": '\u3081', + "meizierasquare": '\u337e', + "mekatakana": '\u30e1', + "mekatakanahalfwidth": '\uff92', + "mem": '\u05de', + "memdagesh": '\ufb3e', + "memdageshhebrew": '\ufb3e', + "memhebrew": '\u05de', + "menarmenian": '\u0574', + "merkhahebrew": '\u05a5', + "merkhakefulahebrew": '\u05a6', + "merkhakefulalefthebrew": '\u05a6', + "merkhalefthebrew": '\u05a5', + "mhook": '\u0271', + "mhzsquare": '\u3392', + "middledotkatakanahalfwidth": '\uff65', + "middot": '\u00b7', + "mieumacirclekorean": '\u3272', + "mieumaparenkorean": '\u3212', + "mieumcirclekorean": '\u3264', + "mieumkorean": '\u3141', + "mieumpansioskorean": '\u3170', + "mieumparenkorean": '\u3204', + "mieumpieupkorean": '\u316e', + "mieumsioskorean": '\u316f', + "mihiragana": '\u307f', + "mikatakana": '\u30df', + "mikatakanahalfwidth": '\uff90', + "minus": '\u2212', + "minusbelowcmb": '\u0320', + "minuscircle": '\u2296', + "minusmod": '\u02d7', + "minusplus": '\u2213', + "minute": '\u2032', + "miribaarusquare": '\u334a', + "mirisquare": '\u3349', + "mlonglegturned": '\u0270', + "mlsquare": '\u3396', + "mmcubedsquare": '\u33a3', + "mmonospace": '\uff4d', + "mmsquaredsquare": '\u339f', + "mohiragana": '\u3082', + "mohmsquare": '\u33c1', + "mokatakana": '\u30e2', + "mokatakanahalfwidth": '\uff93', + "molsquare": '\u33d6', + "momathai": '\u0e21', + "moverssquare": '\u33a7', + "moverssquaredsquare": '\u33a8', + "mparen": '\u24a8', + "mpasquare": '\u33ab', + "mssquare": '\u33b3', + "msuperior": '\uf6ef', + "mturned": '\u026f', + "mu": '\u00b5', + "mu1": '\u00b5', + "muasquare": '\u3382', + "muchgreater": '\u226b', + "muchless": '\u226a', + "mufsquare": '\u338c', + "mugreek": '\u03bc', + "mugsquare": '\u338d', + "muhiragana": '\u3080', + "mukatakana": '\u30e0', + "mukatakanahalfwidth": '\uff91', + "mulsquare": '\u3395', + "multiply": '\u00d7', + "mumsquare": '\u339b', + "munahhebrew": '\u05a3', + "munahlefthebrew": '\u05a3', + "musicalnote": '\u266a', + "musicalnotedbl": '\u266b', + "musicflatsign": '\u266d', + "musicsharpsign": '\u266f', + "mussquare": '\u33b2', + "muvsquare": '\u33b6', + "muwsquare": '\u33bc', + "mvmegasquare": '\u33b9', + "mvsquare": '\u33b7', + "mwmegasquare": '\u33bf', + "mwsquare": '\u33bd', + "n": '\u006e', + "nabengali": '\u09a8', + "nabla": '\u2207', + "nacute": '\u0144', + "nadeva": '\u0928', + "nagujarati": '\u0aa8', + "nagurmukhi": '\u0a28', + "nahiragana": '\u306a', + "nakatakana": '\u30ca', + "nakatakanahalfwidth": '\uff85', + "napostrophe": '\u0149', + "nasquare": '\u3381', + "nbopomofo": '\u310b', + "nbspace": '\u00a0', + "ncaron": '\u0148', + "ncedilla": '\u0146', + "ncircle": '\u24dd', + "ncircumflexbelow": '\u1e4b', + "ncommaaccent": '\u0146', + "ndotaccent": '\u1e45', + "ndotbelow": '\u1e47', + "nehiragana": '\u306d', + "nekatakana": '\u30cd', + "nekatakanahalfwidth": '\uff88', + "newsheqelsign": '\u20aa', + "nfsquare": '\u338b', + "ngabengali": '\u0999', + "ngadeva": '\u0919', + "ngagujarati": '\u0a99', + "ngagurmukhi": '\u0a19', + "ngonguthai": '\u0e07', + "nhiragana": '\u3093', + "nhookleft": '\u0272', + "nhookretroflex": '\u0273', + "nieunacirclekorean": '\u326f', + "nieunaparenkorean": '\u320f', + "nieuncieuckorean": '\u3135', + "nieuncirclekorean": '\u3261', + "nieunhieuhkorean": '\u3136', + "nieunkorean": '\u3134', + "nieunpansioskorean": '\u3168', + "nieunparenkorean": '\u3201', + "nieunsioskorean": '\u3167', + "nieuntikeutkorean": '\u3166', + "nihiragana": '\u306b', + "nikatakana": '\u30cb', + "nikatakanahalfwidth": '\uff86', + "nikhahitleftthai": '\uf899', + "nikhahitthai": '\u0e4d', + "nine": '\u0039', + "ninearabic": '\u0669', + "ninebengali": '\u09ef', + "ninecircle": '\u2468', + "ninecircleinversesansserif": '\u2792', + "ninedeva": '\u096f', + "ninegujarati": '\u0aef', + "ninegurmukhi": '\u0a6f', + "ninehackarabic": '\u0669', + "ninehangzhou": '\u3029', + "nineideographicparen": '\u3228', + "nineinferior": '\u2089', + "ninemonospace": '\uff19', + "nineoldstyle": '\uf739', + "nineparen": '\u247c', + "nineperiod": '\u2490', + "ninepersian": '\u06f9', + "nineroman": '\u2178', + "ninesuperior": '\u2079', + "nineteencircle": '\u2472', + "nineteenparen": '\u2486', + "nineteenperiod": '\u249a', + "ninethai": '\u0e59', + "nj": '\u01cc', + "njecyrillic": '\u045a', + "nkatakana": '\u30f3', + "nkatakanahalfwidth": '\uff9d', + "nlegrightlong": '\u019e', + "nlinebelow": '\u1e49', + "nmonospace": '\uff4e', + "nmsquare": '\u339a', + "nnabengali": '\u09a3', + "nnadeva": '\u0923', + "nnagujarati": '\u0aa3', + "nnagurmukhi": '\u0a23', + "nnnadeva": '\u0929', + "nohiragana": '\u306e', + "nokatakana": '\u30ce', + "nokatakanahalfwidth": '\uff89', + "nonbreakingspace": '\u00a0', + "nonenthai": '\u0e13', + "nonuthai": '\u0e19', + "noonarabic": '\u0646', + "noonfinalarabic": '\ufee6', + "noonghunnaarabic": '\u06ba', + "noonghunnafinalarabic": '\ufb9f', + "noonhehinitialarabic": '\ufeec', + "nooninitialarabic": '\ufee7', + "noonjeeminitialarabic": '\ufcd2', + "noonjeemisolatedarabic": '\ufc4b', + "noonmedialarabic": '\ufee8', + "noonmeeminitialarabic": '\ufcd5', + "noonmeemisolatedarabic": '\ufc4e', + "noonnoonfinalarabic": '\ufc8d', + "notcontains": '\u220c', + "notelement": '\u2209', + "notelementof": '\u2209', + "notequal": '\u2260', + "notgreater": '\u226f', + "notgreaternorequal": '\u2271', + "notgreaternorless": '\u2279', + "notidentical": '\u2262', + "notless": '\u226e', + "notlessnorequal": '\u2270', + "notparallel": '\u2226', + "notprecedes": '\u2280', + "notsubset": '\u2284', + "notsucceeds": '\u2281', + "notsuperset": '\u2285', + "nowarmenian": '\u0576', + "nparen": '\u24a9', + "nssquare": '\u33b1', + "nsuperior": '\u207f', + "ntilde": '\u00f1', + "nu": '\u03bd', + "nuhiragana": '\u306c', + "nukatakana": '\u30cc', + "nukatakanahalfwidth": '\uff87', + "nuktabengali": '\u09bc', + "nuktadeva": '\u093c', + "nuktagujarati": '\u0abc', + "nuktagurmukhi": '\u0a3c', + "numbersign": '\u0023', + "numbersignmonospace": '\uff03', + "numbersignsmall": '\ufe5f', + "numeralsigngreek": '\u0374', + "numeralsignlowergreek": '\u0375', + "numero": '\u2116', + "nun": '\u05e0', + "nundagesh": '\ufb40', + "nundageshhebrew": '\ufb40', + "nunhebrew": '\u05e0', + "nvsquare": '\u33b5', + "nwsquare": '\u33bb', + "nyabengali": '\u099e', + "nyadeva": '\u091e', + "nyagujarati": '\u0a9e', + "nyagurmukhi": '\u0a1e', + "o": '\u006f', + "oacute": '\u00f3', + "oangthai": '\u0e2d', + "obarred": '\u0275', + "obarredcyrillic": '\u04e9', + "obarreddieresiscyrillic": '\u04eb', + "obengali": '\u0993', + "obopomofo": '\u311b', + "obreve": '\u014f', + "ocandradeva": '\u0911', + "ocandragujarati": '\u0a91', + "ocandravowelsigndeva": '\u0949', + "ocandravowelsigngujarati": '\u0ac9', + "ocaron": '\u01d2', + "ocircle": '\u24de', + "ocircumflex": '\u00f4', + "ocircumflexacute": '\u1ed1', + "ocircumflexdotbelow": '\u1ed9', + "ocircumflexgrave": '\u1ed3', + "ocircumflexhookabove": '\u1ed5', + "ocircumflextilde": '\u1ed7', + "ocyrillic": '\u043e', + "odblacute": '\u0151', + "odblgrave": '\u020d', + "odeva": '\u0913', + "odieresis": '\u00f6', + "odieresiscyrillic": '\u04e7', + "odotbelow": '\u1ecd', + "oe": '\u0153', + "oekorean": '\u315a', + "ogonek": '\u02db', + "ogonekcmb": '\u0328', + "ograve": '\u00f2', + "ogujarati": '\u0a93', + "oharmenian": '\u0585', + "ohiragana": '\u304a', + "ohookabove": '\u1ecf', + "ohorn": '\u01a1', + "ohornacute": '\u1edb', + "ohorndotbelow": '\u1ee3', + "ohorngrave": '\u1edd', + "ohornhookabove": '\u1edf', + "ohorntilde": '\u1ee1', + "ohungarumlaut": '\u0151', + "oi": '\u01a3', + "oinvertedbreve": '\u020f', + "okatakana": '\u30aa', + "okatakanahalfwidth": '\uff75', + "okorean": '\u3157', + "olehebrew": '\u05ab', + "omacron": '\u014d', + "omacronacute": '\u1e53', + "omacrongrave": '\u1e51', + "omdeva": '\u0950', + "omega": '\u03c9', + "omega1": '\u03d6', + "omegacyrillic": '\u0461', + "omegalatinclosed": '\u0277', + "omegaroundcyrillic": '\u047b', + "omegatitlocyrillic": '\u047d', + "omegatonos": '\u03ce', + "omgujarati": '\u0ad0', + "omicron": '\u03bf', + "omicrontonos": '\u03cc', + "omonospace": '\uff4f', + "one": '\u0031', + "onearabic": '\u0661', + "onebengali": '\u09e7', + "onecircle": '\u2460', + "onecircleinversesansserif": '\u278a', + "onedeva": '\u0967', + "onedotenleader": '\u2024', + "oneeighth": '\u215b', + "onefitted": '\uf6dc', + "onegujarati": '\u0ae7', + "onegurmukhi": '\u0a67', + "onehackarabic": '\u0661', + "onehalf": '\u00bd', + "onehangzhou": '\u3021', + "oneideographicparen": '\u3220', + "oneinferior": '\u2081', + "onemonospace": '\uff11', + "onenumeratorbengali": '\u09f4', + "oneoldstyle": '\uf731', + "oneparen": '\u2474', + "oneperiod": '\u2488', + "onepersian": '\u06f1', + "onequarter": '\u00bc', + "oneroman": '\u2170', + "onesuperior": '\u00b9', + "onethai": '\u0e51', + "onethird": '\u2153', + "oogonek": '\u01eb', + "oogonekmacron": '\u01ed', + "oogurmukhi": '\u0a13', + "oomatragurmukhi": '\u0a4b', + "oopen": '\u0254', + "oparen": '\u24aa', + "openbullet": '\u25e6', + "option": '\u2325', + "ordfeminine": '\u00aa', + "ordmasculine": '\u00ba', + "orthogonal": '\u221f', + "oshortdeva": '\u0912', + "oshortvowelsigndeva": '\u094a', + "oslash": '\u00f8', + "oslashacute": '\u01ff', + "osmallhiragana": '\u3049', + "osmallkatakana": '\u30a9', + "osmallkatakanahalfwidth": '\uff6b', + "ostrokeacute": '\u01ff', + "osuperior": '\uf6f0', + "otcyrillic": '\u047f', + "otilde": '\u00f5', + "otildeacute": '\u1e4d', + "otildedieresis": '\u1e4f', + "oubopomofo": '\u3121', + "overline": '\u203e', + "overlinecenterline": '\ufe4a', + "overlinecmb": '\u0305', + "overlinedashed": '\ufe49', + "overlinedblwavy": '\ufe4c', + "overlinewavy": '\ufe4b', + "overscore": '\u00af', + "ovowelsignbengali": '\u09cb', + "ovowelsigndeva": '\u094b', + "ovowelsigngujarati": '\u0acb', + "p": '\u0070', + "paampssquare": '\u3380', + "paasentosquare": '\u332b', + "pabengali": '\u09aa', + "pacute": '\u1e55', + "padeva": '\u092a', + "pagedown": '\u21df', + "pageup": '\u21de', + "pagujarati": '\u0aaa', + "pagurmukhi": '\u0a2a', + "pahiragana": '\u3071', + "paiyannoithai": '\u0e2f', + "pakatakana": '\u30d1', + "palatalizationcyrilliccmb": '\u0484', + "palochkacyrillic": '\u04c0', + "pansioskorean": '\u317f', + "paragraph": '\u00b6', + "parallel": '\u2225', + "parenleft": '\u0028', + "parenleftaltonearabic": '\ufd3e', + "parenleftbt": '\uf8ed', + "parenleftex": '\uf8ec', + "parenleftinferior": '\u208d', + "parenleftmonospace": '\uff08', + "parenleftsmall": '\ufe59', + "parenleftsuperior": '\u207d', + "parenlefttp": '\uf8eb', + "parenleftvertical": '\ufe35', + "parenright": '\u0029', + "parenrightaltonearabic": '\ufd3f', + "parenrightbt": '\uf8f8', + "parenrightex": '\uf8f7', + "parenrightinferior": '\u208e', + "parenrightmonospace": '\uff09', + "parenrightsmall": '\ufe5a', + "parenrightsuperior": '\u207e', + "parenrighttp": '\uf8f6', + "parenrightvertical": '\ufe36', + "partialdiff": '\u2202', + "paseqhebrew": '\u05c0', + "pashtahebrew": '\u0599', + "pasquare": '\u33a9', + "patah": '\u05b7', + "patah11": '\u05b7', + "patah1d": '\u05b7', + "patah2a": '\u05b7', + "patahhebrew": '\u05b7', + "patahnarrowhebrew": '\u05b7', + "patahquarterhebrew": '\u05b7', + "patahwidehebrew": '\u05b7', + "pazerhebrew": '\u05a1', + "pbopomofo": '\u3106', + "pcircle": '\u24df', + "pdotaccent": '\u1e57', + "pe": '\u05e4', + "pecyrillic": '\u043f', + "pedagesh": '\ufb44', + "pedageshhebrew": '\ufb44', + "peezisquare": '\u333b', + "pefinaldageshhebrew": '\ufb43', + "peharabic": '\u067e', + "peharmenian": '\u057a', + "pehebrew": '\u05e4', + "pehfinalarabic": '\ufb57', + "pehinitialarabic": '\ufb58', + "pehiragana": '\u307a', + "pehmedialarabic": '\ufb59', + "pekatakana": '\u30da', + "pemiddlehookcyrillic": '\u04a7', + "perafehebrew": '\ufb4e', + "percent": '\u0025', + "percentarabic": '\u066a', + "percentmonospace": '\uff05', + "percentsmall": '\ufe6a', + "period": '\u002e', + "periodarmenian": '\u0589', + "periodcentered": '\u00b7', + "periodhalfwidth": '\uff61', + "periodinferior": '\uf6e7', + "periodmonospace": '\uff0e', + "periodsmall": '\ufe52', + "periodsuperior": '\uf6e8', + "perispomenigreekcmb": '\u0342', + "perpendicular": '\u22a5', + "perthousand": '\u2030', + "peseta": '\u20a7', + "pfsquare": '\u338a', + "phabengali": '\u09ab', + "phadeva": '\u092b', + "phagujarati": '\u0aab', + "phagurmukhi": '\u0a2b', + "phi": '\u03c6', + "phi1": '\u03d5', + "phieuphacirclekorean": '\u327a', + "phieuphaparenkorean": '\u321a', + "phieuphcirclekorean": '\u326c', + "phieuphkorean": '\u314d', + "phieuphparenkorean": '\u320c', + "philatin": '\u0278', + "phinthuthai": '\u0e3a', + "phisymbolgreek": '\u03d5', + "phook": '\u01a5', + "phophanthai": '\u0e1e', + "phophungthai": '\u0e1c', + "phosamphaothai": '\u0e20', + "pi": '\u03c0', + "pieupacirclekorean": '\u3273', + "pieupaparenkorean": '\u3213', + "pieupcieuckorean": '\u3176', + "pieupcirclekorean": '\u3265', + "pieupkiyeokkorean": '\u3172', + "pieupkorean": '\u3142', + "pieupparenkorean": '\u3205', + "pieupsioskiyeokkorean": '\u3174', + "pieupsioskorean": '\u3144', + "pieupsiostikeutkorean": '\u3175', + "pieupthieuthkorean": '\u3177', + "pieuptikeutkorean": '\u3173', + "pihiragana": '\u3074', + "pikatakana": '\u30d4', + "pisymbolgreek": '\u03d6', + "piwrarmenian": '\u0583', + "plus": '\u002b', + "plusbelowcmb": '\u031f', + "pluscircle": '\u2295', + "plusminus": '\u00b1', + "plusmod": '\u02d6', + "plusmonospace": '\uff0b', + "plussmall": '\ufe62', + "plussuperior": '\u207a', + "pmonospace": '\uff50', + "pmsquare": '\u33d8', + "pohiragana": '\u307d', + "pointingindexdownwhite": '\u261f', + "pointingindexleftwhite": '\u261c', + "pointingindexrightwhite": '\u261e', + "pointingindexupwhite": '\u261d', + "pokatakana": '\u30dd', + "poplathai": '\u0e1b', + "postalmark": '\u3012', + "postalmarkface": '\u3020', + "pparen": '\u24ab', + "precedes": '\u227a', + "prescription": '\u211e', + "primemod": '\u02b9', + "primereversed": '\u2035', + "product": '\u220f', + "projective": '\u2305', + "prolongedkana": '\u30fc', + "propellor": '\u2318', + "propersubset": '\u2282', + "propersuperset": '\u2283', + "proportion": '\u2237', + "proportional": '\u221d', + "psi": '\u03c8', + "psicyrillic": '\u0471', + "psilipneumatacyrilliccmb": '\u0486', + "pssquare": '\u33b0', + "puhiragana": '\u3077', + "pukatakana": '\u30d7', + "pvsquare": '\u33b4', + "pwsquare": '\u33ba', + "q": '\u0071', + "qadeva": '\u0958', + "qadmahebrew": '\u05a8', + "qafarabic": '\u0642', + "qaffinalarabic": '\ufed6', + "qafinitialarabic": '\ufed7', + "qafmedialarabic": '\ufed8', + "qamats": '\u05b8', + "qamats10": '\u05b8', + "qamats1a": '\u05b8', + "qamats1c": '\u05b8', + "qamats27": '\u05b8', + "qamats29": '\u05b8', + "qamats33": '\u05b8', + "qamatsde": '\u05b8', + "qamatshebrew": '\u05b8', + "qamatsnarrowhebrew": '\u05b8', + "qamatsqatanhebrew": '\u05b8', + "qamatsqatannarrowhebrew": '\u05b8', + "qamatsqatanquarterhebrew": '\u05b8', + "qamatsqatanwidehebrew": '\u05b8', + "qamatsquarterhebrew": '\u05b8', + "qamatswidehebrew": '\u05b8', + "qarneyparahebrew": '\u059f', + "qbopomofo": '\u3111', + "qcircle": '\u24e0', + "qhook": '\u02a0', + "qmonospace": '\uff51', + "qof": '\u05e7', + "qofdagesh": '\ufb47', + "qofdageshhebrew": '\ufb47', + "qofhatafpatah": '\u05b2', + "qofhatafpatahhebrew": '\u05b2', + "qofhatafsegol": '\u05b1', + "qofhatafsegolhebrew": '\u05b1', + "qofhebrew": '\u05e7', + "qofhiriq": '\u05b4', + "qofhiriqhebrew": '\u05b4', + "qofholam": '\u05b9', + "qofholamhebrew": '\u05b9', + "qofpatah": '\u05b7', + "qofpatahhebrew": '\u05b7', + "qofqamats": '\u05b8', + "qofqamatshebrew": '\u05b8', + "qofqubuts": '\u05bb', + "qofqubutshebrew": '\u05bb', + "qofsegol": '\u05b6', + "qofsegolhebrew": '\u05b6', + "qofsheva": '\u05b0', + "qofshevahebrew": '\u05b0', + "qoftsere": '\u05b5', + "qoftserehebrew": '\u05b5', + "qparen": '\u24ac', + "quarternote": '\u2669', + "qubuts": '\u05bb', + "qubuts18": '\u05bb', + "qubuts25": '\u05bb', + "qubuts31": '\u05bb', + "qubutshebrew": '\u05bb', + "qubutsnarrowhebrew": '\u05bb', + "qubutsquarterhebrew": '\u05bb', + "qubutswidehebrew": '\u05bb', + "question": '\u003f', + "questionarabic": '\u061f', + "questionarmenian": '\u055e', + "questiondown": '\u00bf', + "questiondownsmall": '\uf7bf', + "questiongreek": '\u037e', + "questionmonospace": '\uff1f', + "questionsmall": '\uf73f', + "quotedbl": '\u0022', + "quotedblbase": '\u201e', + "quotedblleft": '\u201c', + "quotedblmonospace": '\uff02', + "quotedblprime": '\u301e', + "quotedblprimereversed": '\u301d', + "quotedblright": '\u201d', + "quoteleft": '\u2018', + "quoteleftreversed": '\u201b', + "quotereversed": '\u201b', + "quoteright": '\u2019', + "quoterightn": '\u0149', + "quotesinglbase": '\u201a', + "quotesingle": '\u0027', + "quotesinglemonospace": '\uff07', + "r": '\u0072', + "raarmenian": '\u057c', + "rabengali": '\u09b0', + "racute": '\u0155', + "radeva": '\u0930', + "radical": '\u221a', + "radicalex": '\uf8e5', + "radoverssquare": '\u33ae', + "radoverssquaredsquare": '\u33af', + "radsquare": '\u33ad', + "rafe": '\u05bf', + "rafehebrew": '\u05bf', + "ragujarati": '\u0ab0', + "ragurmukhi": '\u0a30', + "rahiragana": '\u3089', + "rakatakana": '\u30e9', + "rakatakanahalfwidth": '\uff97', + "ralowerdiagonalbengali": '\u09f1', + "ramiddlediagonalbengali": '\u09f0', + "ramshorn": '\u0264', + "ratio": '\u2236', + "rbopomofo": '\u3116', + "rcaron": '\u0159', + "rcedilla": '\u0157', + "rcircle": '\u24e1', + "rcommaaccent": '\u0157', + "rdblgrave": '\u0211', + "rdotaccent": '\u1e59', + "rdotbelow": '\u1e5b', + "rdotbelowmacron": '\u1e5d', + "referencemark": '\u203b', + "reflexsubset": '\u2286', + "reflexsuperset": '\u2287', + "registered": '\u00ae', + "registersans": '\uf8e8', + "registerserif": '\uf6da', + "reharabic": '\u0631', + "reharmenian": '\u0580', + "rehfinalarabic": '\ufeae', + "rehiragana": '\u308c', + "rehyehaleflamarabic": '\u0644', + "rekatakana": '\u30ec', + "rekatakanahalfwidth": '\uff9a', + "resh": '\u05e8', + "reshdageshhebrew": '\ufb48', + "reshhatafpatah": '\u05b2', + "reshhatafpatahhebrew": '\u05b2', + "reshhatafsegol": '\u05b1', + "reshhatafsegolhebrew": '\u05b1', + "reshhebrew": '\u05e8', + "reshhiriq": '\u05b4', + "reshhiriqhebrew": '\u05b4', + "reshholam": '\u05b9', + "reshholamhebrew": '\u05b9', + "reshpatah": '\u05b7', + "reshpatahhebrew": '\u05b7', + "reshqamats": '\u05b8', + "reshqamatshebrew": '\u05b8', + "reshqubuts": '\u05bb', + "reshqubutshebrew": '\u05bb', + "reshsegol": '\u05b6', + "reshsegolhebrew": '\u05b6', + "reshsheva": '\u05b0', + "reshshevahebrew": '\u05b0', + "reshtsere": '\u05b5', + "reshtserehebrew": '\u05b5', + "reversedtilde": '\u223d', + "reviahebrew": '\u0597', + "reviamugrashhebrew": '\u0597', + "revlogicalnot": '\u2310', + "rfishhook": '\u027e', + "rfishhookreversed": '\u027f', + "rhabengali": '\u09dd', + "rhadeva": '\u095d', + "rho": '\u03c1', + "rhook": '\u027d', + "rhookturned": '\u027b', + "rhookturnedsuperior": '\u02b5', + "rhosymbolgreek": '\u03f1', + "rhotichookmod": '\u02de', + "rieulacirclekorean": '\u3271', + "rieulaparenkorean": '\u3211', + "rieulcirclekorean": '\u3263', + "rieulhieuhkorean": '\u3140', + "rieulkiyeokkorean": '\u313a', + "rieulkiyeoksioskorean": '\u3169', + "rieulkorean": '\u3139', + "rieulmieumkorean": '\u313b', + "rieulpansioskorean": '\u316c', + "rieulparenkorean": '\u3203', + "rieulphieuphkorean": '\u313f', + "rieulpieupkorean": '\u313c', + "rieulpieupsioskorean": '\u316b', + "rieulsioskorean": '\u313d', + "rieulthieuthkorean": '\u313e', + "rieultikeutkorean": '\u316a', + "rieulyeorinhieuhkorean": '\u316d', + "rightangle": '\u221f', + "righttackbelowcmb": '\u0319', + "righttriangle": '\u22bf', + "rihiragana": '\u308a', + "rikatakana": '\u30ea', + "rikatakanahalfwidth": '\uff98', + "ring": '\u02da', + "ringbelowcmb": '\u0325', + "ringcmb": '\u030a', + "ringhalfleft": '\u02bf', + "ringhalfleftarmenian": '\u0559', + "ringhalfleftbelowcmb": '\u031c', + "ringhalfleftcentered": '\u02d3', + "ringhalfright": '\u02be', + "ringhalfrightbelowcmb": '\u0339', + "ringhalfrightcentered": '\u02d2', + "rinvertedbreve": '\u0213', + "rittorusquare": '\u3351', + "rlinebelow": '\u1e5f', + "rlongleg": '\u027c', + "rlonglegturned": '\u027a', + "rmonospace": '\uff52', + "rohiragana": '\u308d', + "rokatakana": '\u30ed', + "rokatakanahalfwidth": '\uff9b', + "roruathai": '\u0e23', + "rparen": '\u24ad', + "rrabengali": '\u09dc', + "rradeva": '\u0931', + "rragurmukhi": '\u0a5c', + "rreharabic": '\u0691', + "rrehfinalarabic": '\ufb8d', + "rrvocalicbengali": '\u09e0', + "rrvocalicdeva": '\u0960', + "rrvocalicgujarati": '\u0ae0', + "rrvocalicvowelsignbengali": '\u09c4', + "rrvocalicvowelsigndeva": '\u0944', + "rrvocalicvowelsigngujarati": '\u0ac4', + "rsuperior": '\uf6f1', + "rtblock": '\u2590', + "rturned": '\u0279', + "rturnedsuperior": '\u02b4', + "ruhiragana": '\u308b', + "rukatakana": '\u30eb', + "rukatakanahalfwidth": '\uff99', + "rupeemarkbengali": '\u09f2', + "rupeesignbengali": '\u09f3', + "rupiah": '\uf6dd', + "ruthai": '\u0e24', + "rvocalicbengali": '\u098b', + "rvocalicdeva": '\u090b', + "rvocalicgujarati": '\u0a8b', + "rvocalicvowelsignbengali": '\u09c3', + "rvocalicvowelsigndeva": '\u0943', + "rvocalicvowelsigngujarati": '\u0ac3', + "s": '\u0073', + "sabengali": '\u09b8', + "sacute": '\u015b', + "sacutedotaccent": '\u1e65', + "sadarabic": '\u0635', + "sadeva": '\u0938', + "sadfinalarabic": '\ufeba', + "sadinitialarabic": '\ufebb', + "sadmedialarabic": '\ufebc', + "sagujarati": '\u0ab8', + "sagurmukhi": '\u0a38', + "sahiragana": '\u3055', + "sakatakana": '\u30b5', + "sakatakanahalfwidth": '\uff7b', + "sallallahoualayhewasallamarabic": '\ufdfa', + "samekh": '\u05e1', + "samekhdagesh": '\ufb41', + "samekhdageshhebrew": '\ufb41', + "samekhhebrew": '\u05e1', + "saraaathai": '\u0e32', + "saraaethai": '\u0e41', + "saraaimaimalaithai": '\u0e44', + "saraaimaimuanthai": '\u0e43', + "saraamthai": '\u0e33', + "saraathai": '\u0e30', + "saraethai": '\u0e40', + "saraiileftthai": '\uf886', + "saraiithai": '\u0e35', + "saraileftthai": '\uf885', + "saraithai": '\u0e34', + "saraothai": '\u0e42', + "saraueeleftthai": '\uf888', + "saraueethai": '\u0e37', + "saraueleftthai": '\uf887', + "sarauethai": '\u0e36', + "sarauthai": '\u0e38', + "sarauuthai": '\u0e39', + "sbopomofo": '\u3119', + "scaron": '\u0161', + "scarondotaccent": '\u1e67', + "scedilla": '\u015f', + "schwa": '\u0259', + "schwacyrillic": '\u04d9', + "schwadieresiscyrillic": '\u04db', + "schwahook": '\u025a', + "scircle": '\u24e2', + "scircumflex": '\u015d', + "scommaaccent": '\u0219', + "sdotaccent": '\u1e61', + "sdotbelow": '\u1e63', + "sdotbelowdotaccent": '\u1e69', + "seagullbelowcmb": '\u033c', + "second": '\u2033', + "secondtonechinese": '\u02ca', + "section": '\u00a7', + "seenarabic": '\u0633', + "seenfinalarabic": '\ufeb2', + "seeninitialarabic": '\ufeb3', + "seenmedialarabic": '\ufeb4', + "segol": '\u05b6', + "segol13": '\u05b6', + "segol1f": '\u05b6', + "segol2c": '\u05b6', + "segolhebrew": '\u05b6', + "segolnarrowhebrew": '\u05b6', + "segolquarterhebrew": '\u05b6', + "segoltahebrew": '\u0592', + "segolwidehebrew": '\u05b6', + "seharmenian": '\u057d', + "sehiragana": '\u305b', + "sekatakana": '\u30bb', + "sekatakanahalfwidth": '\uff7e', + "semicolon": '\u003b', + "semicolonarabic": '\u061b', + "semicolonmonospace": '\uff1b', + "semicolonsmall": '\ufe54', + "semivoicedmarkkana": '\u309c', + "semivoicedmarkkanahalfwidth": '\uff9f', + "sentisquare": '\u3322', + "sentosquare": '\u3323', + "seven": '\u0037', + "sevenarabic": '\u0667', + "sevenbengali": '\u09ed', + "sevencircle": '\u2466', + "sevencircleinversesansserif": '\u2790', + "sevendeva": '\u096d', + "seveneighths": '\u215e', + "sevengujarati": '\u0aed', + "sevengurmukhi": '\u0a6d', + "sevenhackarabic": '\u0667', + "sevenhangzhou": '\u3027', + "sevenideographicparen": '\u3226', + "seveninferior": '\u2087', + "sevenmonospace": '\uff17', + "sevenoldstyle": '\uf737', + "sevenparen": '\u247a', + "sevenperiod": '\u248e', + "sevenpersian": '\u06f7', + "sevenroman": '\u2176', + "sevensuperior": '\u2077', + "seventeencircle": '\u2470', + "seventeenparen": '\u2484', + "seventeenperiod": '\u2498', + "seventhai": '\u0e57', + "sfthyphen": '\u00ad', + "shaarmenian": '\u0577', + "shabengali": '\u09b6', + "shacyrillic": '\u0448', + "shaddaarabic": '\u0651', + "shaddadammaarabic": '\ufc61', + "shaddadammatanarabic": '\ufc5e', + "shaddafathaarabic": '\ufc60', + "shaddafathatanarabic": '\u064b', + "shaddakasraarabic": '\ufc62', + "shaddakasratanarabic": '\ufc5f', + "shade": '\u2592', + "shadedark": '\u2593', + "shadelight": '\u2591', + "shademedium": '\u2592', + "shadeva": '\u0936', + "shagujarati": '\u0ab6', + "shagurmukhi": '\u0a36', + "shalshelethebrew": '\u0593', + "shbopomofo": '\u3115', + "shchacyrillic": '\u0449', + "sheenarabic": '\u0634', + "sheenfinalarabic": '\ufeb6', + "sheeninitialarabic": '\ufeb7', + "sheenmedialarabic": '\ufeb8', + "sheicoptic": '\u03e3', + "sheqel": '\u20aa', + "sheqelhebrew": '\u20aa', + "sheva": '\u05b0', + "sheva115": '\u05b0', + "sheva15": '\u05b0', + "sheva22": '\u05b0', + "sheva2e": '\u05b0', + "shevahebrew": '\u05b0', + "shevanarrowhebrew": '\u05b0', + "shevaquarterhebrew": '\u05b0', + "shevawidehebrew": '\u05b0', + "shhacyrillic": '\u04bb', + "shimacoptic": '\u03ed', + "shin": '\u05e9', + "shindagesh": '\ufb49', + "shindageshhebrew": '\ufb49', + "shindageshshindot": '\ufb2c', + "shindageshshindothebrew": '\ufb2c', + "shindageshsindot": '\ufb2d', + "shindageshsindothebrew": '\ufb2d', + "shindothebrew": '\u05c1', + "shinhebrew": '\u05e9', + "shinshindot": '\ufb2a', + "shinshindothebrew": '\ufb2a', + "shinsindot": '\ufb2b', + "shinsindothebrew": '\ufb2b', + "shook": '\u0282', + "sigma": '\u03c3', + "sigma1": '\u03c2', + "sigmafinal": '\u03c2', + "sigmalunatesymbolgreek": '\u03f2', + "sihiragana": '\u3057', + "sikatakana": '\u30b7', + "sikatakanahalfwidth": '\uff7c', + "siluqhebrew": '\u05bd', + "siluqlefthebrew": '\u05bd', + "similar": '\u223c', + "sindothebrew": '\u05c2', + "siosacirclekorean": '\u3274', + "siosaparenkorean": '\u3214', + "sioscieuckorean": '\u317e', + "sioscirclekorean": '\u3266', + "sioskiyeokkorean": '\u317a', + "sioskorean": '\u3145', + "siosnieunkorean": '\u317b', + "siosparenkorean": '\u3206', + "siospieupkorean": '\u317d', + "siostikeutkorean": '\u317c', + "six": '\u0036', + "sixarabic": '\u0666', + "sixbengali": '\u09ec', + "sixcircle": '\u2465', + "sixcircleinversesansserif": '\u278f', + "sixdeva": '\u096c', + "sixgujarati": '\u0aec', + "sixgurmukhi": '\u0a6c', + "sixhackarabic": '\u0666', + "sixhangzhou": '\u3026', + "sixideographicparen": '\u3225', + "sixinferior": '\u2086', + "sixmonospace": '\uff16', + "sixoldstyle": '\uf736', + "sixparen": '\u2479', + "sixperiod": '\u248d', + "sixpersian": '\u06f6', + "sixroman": '\u2175', + "sixsuperior": '\u2076', + "sixteencircle": '\u246f', + "sixteencurrencydenominatorbengali": '\u09f9', + "sixteenparen": '\u2483', + "sixteenperiod": '\u2497', + "sixthai": '\u0e56', + "slash": '\u002f', + "slashmonospace": '\uff0f', + "slong": '\u017f', + "slongdotaccent": '\u1e9b', + "smileface": '\u263a', + "smonospace": '\uff53', + "sofpasuqhebrew": '\u05c3', + "softhyphen": '\u00ad', + "softsigncyrillic": '\u044c', + "sohiragana": '\u305d', + "sokatakana": '\u30bd', + "sokatakanahalfwidth": '\uff7f', + "soliduslongoverlaycmb": '\u0338', + "solidusshortoverlaycmb": '\u0337', + "sorusithai": '\u0e29', + "sosalathai": '\u0e28', + "sosothai": '\u0e0b', + "sosuathai": '\u0e2a', + "space": '\u0020', + "spacehackarabic": '\u0020', + "spade": '\u2660', + "spadesuitblack": '\u2660', + "spadesuitwhite": '\u2664', + "sparen": '\u24ae', + "squarebelowcmb": '\u033b', + "squarecc": '\u33c4', + "squarecm": '\u339d', + "squarediagonalcrosshatchfill": '\u25a9', + "squarehorizontalfill": '\u25a4', + "squarekg": '\u338f', + "squarekm": '\u339e', + "squarekmcapital": '\u33ce', + "squareln": '\u33d1', + "squarelog": '\u33d2', + "squaremg": '\u338e', + "squaremil": '\u33d5', + "squaremm": '\u339c', + "squaremsquared": '\u33a1', + "squareorthogonalcrosshatchfill": '\u25a6', + "squareupperlefttolowerrightfill": '\u25a7', + "squareupperrighttolowerleftfill": '\u25a8', + "squareverticalfill": '\u25a5', + "squarewhitewithsmallblack": '\u25a3', + "srsquare": '\u33db', + "ssabengali": '\u09b7', + "ssadeva": '\u0937', + "ssagujarati": '\u0ab7', + "ssangcieuckorean": '\u3149', + "ssanghieuhkorean": '\u3185', + "ssangieungkorean": '\u3180', + "ssangkiyeokkorean": '\u3132', + "ssangnieunkorean": '\u3165', + "ssangpieupkorean": '\u3143', + "ssangsioskorean": '\u3146', + "ssangtikeutkorean": '\u3138', + "ssuperior": '\uf6f2', + "sterling": '\u00a3', + "sterlingmonospace": '\uffe1', + "strokelongoverlaycmb": '\u0336', + "strokeshortoverlaycmb": '\u0335', + "subset": '\u2282', + "subsetnotequal": '\u228a', + "subsetorequal": '\u2286', + "succeeds": '\u227b', + "suchthat": '\u220b', + "suhiragana": '\u3059', + "sukatakana": '\u30b9', + "sukatakanahalfwidth": '\uff7d', + "sukunarabic": '\u0652', + "summation": '\u2211', + "sun": '\u263c', + "superset": '\u2283', + "supersetnotequal": '\u228b', + "supersetorequal": '\u2287', + "svsquare": '\u33dc', + "syouwaerasquare": '\u337c', + "t": '\u0074', + "tabengali": '\u09a4', + "tackdown": '\u22a4', + "tackleft": '\u22a3', + "tadeva": '\u0924', + "tagujarati": '\u0aa4', + "tagurmukhi": '\u0a24', + "taharabic": '\u0637', + "tahfinalarabic": '\ufec2', + "tahinitialarabic": '\ufec3', + "tahiragana": '\u305f', + "tahmedialarabic": '\ufec4', + "taisyouerasquare": '\u337d', + "takatakana": '\u30bf', + "takatakanahalfwidth": '\uff80', + "tatweelarabic": '\u0640', + "tau": '\u03c4', + "tav": '\u05ea', + "tavdages": '\ufb4a', + "tavdagesh": '\ufb4a', + "tavdageshhebrew": '\ufb4a', + "tavhebrew": '\u05ea', + "tbar": '\u0167', + "tbopomofo": '\u310a', + "tcaron": '\u0165', + "tccurl": '\u02a8', + "tcedilla": '\u0163', + "tcheharabic": '\u0686', + "tchehfinalarabic": '\ufb7b', + "tchehinitialarabic": '\ufb7c', + "tchehmedialarabic": '\ufb7d', + "tchehmeeminitialarabic": '\ufee4', + "tcircle": '\u24e3', + "tcircumflexbelow": '\u1e71', + "tcommaaccent": '\u0163', + "tdieresis": '\u1e97', + "tdotaccent": '\u1e6b', + "tdotbelow": '\u1e6d', + "tecyrillic": '\u0442', + "tedescendercyrillic": '\u04ad', + "teharabic": '\u062a', + "tehfinalarabic": '\ufe96', + "tehhahinitialarabic": '\ufca2', + "tehhahisolatedarabic": '\ufc0c', + "tehinitialarabic": '\ufe97', + "tehiragana": '\u3066', + "tehjeeminitialarabic": '\ufca1', + "tehjeemisolatedarabic": '\ufc0b', + "tehmarbutaarabic": '\u0629', + "tehmarbutafinalarabic": '\ufe94', + "tehmedialarabic": '\ufe98', + "tehmeeminitialarabic": '\ufca4', + "tehmeemisolatedarabic": '\ufc0e', + "tehnoonfinalarabic": '\ufc73', + "tekatakana": '\u30c6', + "tekatakanahalfwidth": '\uff83', + "telephone": '\u2121', + "telephoneblack": '\u260e', + "telishagedolahebrew": '\u05a0', + "telishaqetanahebrew": '\u05a9', + "tencircle": '\u2469', + "tenideographicparen": '\u3229', + "tenparen": '\u247d', + "tenperiod": '\u2491', + "tenroman": '\u2179', + "tesh": '\u02a7', + "tet": '\u05d8', + "tetdagesh": '\ufb38', + "tetdageshhebrew": '\ufb38', + "tethebrew": '\u05d8', + "tetsecyrillic": '\u04b5', + "tevirhebrew": '\u059b', + "tevirlefthebrew": '\u059b', + "thabengali": '\u09a5', + "thadeva": '\u0925', + "thagujarati": '\u0aa5', + "thagurmukhi": '\u0a25', + "thalarabic": '\u0630', + "thalfinalarabic": '\ufeac', + "thanthakhatlowleftthai": '\uf898', + "thanthakhatlowrightthai": '\uf897', + "thanthakhatthai": '\u0e4c', + "thanthakhatupperleftthai": '\uf896', + "theharabic": '\u062b', + "thehfinalarabic": '\ufe9a', + "thehinitialarabic": '\ufe9b', + "thehmedialarabic": '\ufe9c', + "thereexists": '\u2203', + "therefore": '\u2234', + "theta": '\u03b8', + "theta1": '\u03d1', + "thetasymbolgreek": '\u03d1', + "thieuthacirclekorean": '\u3279', + "thieuthaparenkorean": '\u3219', + "thieuthcirclekorean": '\u326b', + "thieuthkorean": '\u314c', + "thieuthparenkorean": '\u320b', + "thirteencircle": '\u246c', + "thirteenparen": '\u2480', + "thirteenperiod": '\u2494', + "thonangmonthothai": '\u0e11', + "thook": '\u01ad', + "thophuthaothai": '\u0e12', + "thorn": '\u00fe', + "thothahanthai": '\u0e17', + "thothanthai": '\u0e10', + "thothongthai": '\u0e18', + "thothungthai": '\u0e16', + "thousandcyrillic": '\u0482', + "thousandsseparatorarabic": '\u066c', + "thousandsseparatorpersian": '\u066c', + "three": '\u0033', + "threearabic": '\u0663', + "threebengali": '\u09e9', + "threecircle": '\u2462', + "threecircleinversesansserif": '\u278c', + "threedeva": '\u0969', + "threeeighths": '\u215c', + "threegujarati": '\u0ae9', + "threegurmukhi": '\u0a69', + "threehackarabic": '\u0663', + "threehangzhou": '\u3023', + "threeideographicparen": '\u3222', + "threeinferior": '\u2083', + "threemonospace": '\uff13', + "threenumeratorbengali": '\u09f6', + "threeoldstyle": '\uf733', + "threeparen": '\u2476', + "threeperiod": '\u248a', + "threepersian": '\u06f3', + "threequarters": '\u00be', + "threequartersemdash": '\uf6de', + "threeroman": '\u2172', + "threesuperior": '\u00b3', + "threethai": '\u0e53', + "thzsquare": '\u3394', + "tihiragana": '\u3061', + "tikatakana": '\u30c1', + "tikatakanahalfwidth": '\uff81', + "tikeutacirclekorean": '\u3270', + "tikeutaparenkorean": '\u3210', + "tikeutcirclekorean": '\u3262', + "tikeutkorean": '\u3137', + "tikeutparenkorean": '\u3202', + "tilde": '\u02dc', + "tildebelowcmb": '\u0330', + "tildecmb": '\u0303', + "tildecomb": '\u0303', + "tildedoublecmb": '\u0360', + "tildeoperator": '\u223c', + "tildeoverlaycmb": '\u0334', + "tildeverticalcmb": '\u033e', + "timescircle": '\u2297', + "tipehahebrew": '\u0596', + "tipehalefthebrew": '\u0596', + "tippigurmukhi": '\u0a70', + "titlocyrilliccmb": '\u0483', + "tiwnarmenian": '\u057f', + "tlinebelow": '\u1e6f', + "tmonospace": '\uff54', + "toarmenian": '\u0569', + "tohiragana": '\u3068', + "tokatakana": '\u30c8', + "tokatakanahalfwidth": '\uff84', + "tonebarextrahighmod": '\u02e5', + "tonebarextralowmod": '\u02e9', + "tonebarhighmod": '\u02e6', + "tonebarlowmod": '\u02e8', + "tonebarmidmod": '\u02e7', + "tonefive": '\u01bd', + "tonesix": '\u0185', + "tonetwo": '\u01a8', + "tonos": '\u0384', + "tonsquare": '\u3327', + "topatakthai": '\u0e0f', + "tortoiseshellbracketleft": '\u3014', + "tortoiseshellbracketleftsmall": '\ufe5d', + "tortoiseshellbracketleftvertical": '\ufe39', + "tortoiseshellbracketright": '\u3015', + "tortoiseshellbracketrightsmall": '\ufe5e', + "tortoiseshellbracketrightvertical": '\ufe3a', + "totaothai": '\u0e15', + "tpalatalhook": '\u01ab', + "tparen": '\u24af', + "trademark": '\u2122', + "trademarksans": '\uf8ea', + "trademarkserif": '\uf6db', + "tretroflexhook": '\u0288', + "triagdn": '\u25bc', + "triaglf": '\u25c4', + "triagrt": '\u25ba', + "triagup": '\u25b2', + "ts": '\u02a6', + "tsadi": '\u05e6', + "tsadidagesh": '\ufb46', + "tsadidageshhebrew": '\ufb46', + "tsadihebrew": '\u05e6', + "tsecyrillic": '\u0446', + "tsere": '\u05b5', + "tsere12": '\u05b5', + "tsere1e": '\u05b5', + "tsere2b": '\u05b5', + "tserehebrew": '\u05b5', + "tserenarrowhebrew": '\u05b5', + "tserequarterhebrew": '\u05b5', + "tserewidehebrew": '\u05b5', + "tshecyrillic": '\u045b', + "tsuperior": '\uf6f3', + "ttabengali": '\u099f', + "ttadeva": '\u091f', + "ttagujarati": '\u0a9f', + "ttagurmukhi": '\u0a1f', + "tteharabic": '\u0679', + "ttehfinalarabic": '\ufb67', + "ttehinitialarabic": '\ufb68', + "ttehmedialarabic": '\ufb69', + "tthabengali": '\u09a0', + "tthadeva": '\u0920', + "tthagujarati": '\u0aa0', + "tthagurmukhi": '\u0a20', + "tturned": '\u0287', + "tuhiragana": '\u3064', + "tukatakana": '\u30c4', + "tukatakanahalfwidth": '\uff82', + "tusmallhiragana": '\u3063', + "tusmallkatakana": '\u30c3', + "tusmallkatakanahalfwidth": '\uff6f', + "twelvecircle": '\u246b', + "twelveparen": '\u247f', + "twelveperiod": '\u2493', + "twelveroman": '\u217b', + "twentycircle": '\u2473', + "twentyhangzhou": '\u5344', + "twentyparen": '\u2487', + "twentyperiod": '\u249b', + "two": '\u0032', + "twoarabic": '\u0662', + "twobengali": '\u09e8', + "twocircle": '\u2461', + "twocircleinversesansserif": '\u278b', + "twodeva": '\u0968', + "twodotenleader": '\u2025', + "twodotleader": '\u2025', + "twodotleadervertical": '\ufe30', + "twogujarati": '\u0ae8', + "twogurmukhi": '\u0a68', + "twohackarabic": '\u0662', + "twohangzhou": '\u3022', + "twoideographicparen": '\u3221', + "twoinferior": '\u2082', + "twomonospace": '\uff12', + "twonumeratorbengali": '\u09f5', + "twooldstyle": '\uf732', + "twoparen": '\u2475', + "twoperiod": '\u2489', + "twopersian": '\u06f2', + "tworoman": '\u2171', + "twostroke": '\u01bb', + "twosuperior": '\u00b2', + "twothai": '\u0e52', + "twothirds": '\u2154', + "u": '\u0075', + "uacute": '\u00fa', + "ubar": '\u0289', + "ubengali": '\u0989', + "ubopomofo": '\u3128', + "ubreve": '\u016d', + "ucaron": '\u01d4', + "ucircle": '\u24e4', + "ucircumflex": '\u00fb', + "ucircumflexbelow": '\u1e77', + "ucyrillic": '\u0443', + "udattadeva": '\u0951', + "udblacute": '\u0171', + "udblgrave": '\u0215', + "udeva": '\u0909', + "udieresis": '\u00fc', + "udieresisacute": '\u01d8', + "udieresisbelow": '\u1e73', + "udieresiscaron": '\u01da', + "udieresiscyrillic": '\u04f1', + "udieresisgrave": '\u01dc', + "udieresismacron": '\u01d6', + "udotbelow": '\u1ee5', + "ugrave": '\u00f9', + "ugujarati": '\u0a89', + "ugurmukhi": '\u0a09', + "uhiragana": '\u3046', + "uhookabove": '\u1ee7', + "uhorn": '\u01b0', + "uhornacute": '\u1ee9', + "uhorndotbelow": '\u1ef1', + "uhorngrave": '\u1eeb', + "uhornhookabove": '\u1eed', + "uhorntilde": '\u1eef', + "uhungarumlaut": '\u0171', + "uhungarumlautcyrillic": '\u04f3', + "uinvertedbreve": '\u0217', + "ukatakana": '\u30a6', + "ukatakanahalfwidth": '\uff73', + "ukcyrillic": '\u0479', + "ukorean": '\u315c', + "umacron": '\u016b', + "umacroncyrillic": '\u04ef', + "umacrondieresis": '\u1e7b', + "umatragurmukhi": '\u0a41', + "umonospace": '\uff55', + "underscore": '\u005f', + "underscoredbl": '\u2017', + "underscoremonospace": '\uff3f', + "underscorevertical": '\ufe33', + "underscorewavy": '\ufe4f', + "union": '\u222a', + "universal": '\u2200', + "uogonek": '\u0173', + "uparen": '\u24b0', + "upblock": '\u2580', + "upperdothebrew": '\u05c4', + "upsilon": '\u03c5', + "upsilondieresis": '\u03cb', + "upsilondieresistonos": '\u03b0', + "upsilonlatin": '\u028a', + "upsilontonos": '\u03cd', + "uptackbelowcmb": '\u031d', + "uptackmod": '\u02d4', + "uragurmukhi": '\u0a73', + "uring": '\u016f', + "ushortcyrillic": '\u045e', + "usmallhiragana": '\u3045', + "usmallkatakana": '\u30a5', + "usmallkatakanahalfwidth": '\uff69', + "ustraightcyrillic": '\u04af', + "ustraightstrokecyrillic": '\u04b1', + "utilde": '\u0169', + "utildeacute": '\u1e79', + "utildebelow": '\u1e75', + "uubengali": '\u098a', + "uudeva": '\u090a', + "uugujarati": '\u0a8a', + "uugurmukhi": '\u0a0a', + "uumatragurmukhi": '\u0a42', + "uuvowelsignbengali": '\u09c2', + "uuvowelsigndeva": '\u0942', + "uuvowelsigngujarati": '\u0ac2', + "uvowelsignbengali": '\u09c1', + "uvowelsigndeva": '\u0941', + "uvowelsigngujarati": '\u0ac1', + "v": '\u0076', + "vadeva": '\u0935', + "vagujarati": '\u0ab5', + "vagurmukhi": '\u0a35', + "vakatakana": '\u30f7', + "vav": '\u05d5', + "vavdagesh": '\ufb35', + "vavdagesh65": '\ufb35', + "vavdageshhebrew": '\ufb35', + "vavhebrew": '\u05d5', + "vavholam": '\ufb4b', + "vavholamhebrew": '\ufb4b', + "vavvavhebrew": '\u05f0', + "vavyodhebrew": '\u05f1', + "vcircle": '\u24e5', + "vdotbelow": '\u1e7f', + "vecyrillic": '\u0432', + "veharabic": '\u06a4', + "vehfinalarabic": '\ufb6b', + "vehinitialarabic": '\ufb6c', + "vehmedialarabic": '\ufb6d', + "vekatakana": '\u30f9', + "venus": '\u2640', + "verticalbar": '\u007c', + "verticallineabovecmb": '\u030d', + "verticallinebelowcmb": '\u0329', + "verticallinelowmod": '\u02cc', + "verticallinemod": '\u02c8', + "vewarmenian": '\u057e', + "vhook": '\u028b', + "vikatakana": '\u30f8', + "viramabengali": '\u09cd', + "viramadeva": '\u094d', + "viramagujarati": '\u0acd', + "visargabengali": '\u0983', + "visargadeva": '\u0903', + "visargagujarati": '\u0a83', + "vmonospace": '\uff56', + "voarmenian": '\u0578', + "voicediterationhiragana": '\u309e', + "voicediterationkatakana": '\u30fe', + "voicedmarkkana": '\u309b', + "voicedmarkkanahalfwidth": '\uff9e', + "vokatakana": '\u30fa', + "vparen": '\u24b1', + "vtilde": '\u1e7d', + "vturned": '\u028c', + "vuhiragana": '\u3094', + "vukatakana": '\u30f4', + "w": '\u0077', + "wacute": '\u1e83', + "waekorean": '\u3159', + "wahiragana": '\u308f', + "wakatakana": '\u30ef', + "wakatakanahalfwidth": '\uff9c', + "wakorean": '\u3158', + "wasmallhiragana": '\u308e', + "wasmallkatakana": '\u30ee', + "wattosquare": '\u3357', + "wavedash": '\u301c', + "wavyunderscorevertical": '\ufe34', + "wawarabic": '\u0648', + "wawfinalarabic": '\ufeee', + "wawhamzaabovearabic": '\u0624', + "wawhamzaabovefinalarabic": '\ufe86', + "wbsquare": '\u33dd', + "wcircle": '\u24e6', + "wcircumflex": '\u0175', + "wdieresis": '\u1e85', + "wdotaccent": '\u1e87', + "wdotbelow": '\u1e89', + "wehiragana": '\u3091', + "weierstrass": '\u2118', + "wekatakana": '\u30f1', + "wekorean": '\u315e', + "weokorean": '\u315d', + "wgrave": '\u1e81', + "whitebullet": '\u25e6', + "whitecircle": '\u25cb', + "whitecircleinverse": '\u25d9', + "whitecornerbracketleft": '\u300e', + "whitecornerbracketleftvertical": '\ufe43', + "whitecornerbracketright": '\u300f', + "whitecornerbracketrightvertical": '\ufe44', + "whitediamond": '\u25c7', + "whitediamondcontainingblacksmalldiamond": '\u25c8', + "whitedownpointingsmalltriangle": '\u25bf', + "whitedownpointingtriangle": '\u25bd', + "whiteleftpointingsmalltriangle": '\u25c3', + "whiteleftpointingtriangle": '\u25c1', + "whitelenticularbracketleft": '\u3016', + "whitelenticularbracketright": '\u3017', + "whiterightpointingsmalltriangle": '\u25b9', + "whiterightpointingtriangle": '\u25b7', + "whitesmallsquare": '\u25ab', + "whitesmilingface": '\u263a', + "whitesquare": '\u25a1', + "whitestar": '\u2606', + "whitetelephone": '\u260f', + "whitetortoiseshellbracketleft": '\u3018', + "whitetortoiseshellbracketright": '\u3019', + "whiteuppointingsmalltriangle": '\u25b5', + "whiteuppointingtriangle": '\u25b3', + "wihiragana": '\u3090', + "wikatakana": '\u30f0', + "wikorean": '\u315f', + "wmonospace": '\uff57', + "wohiragana": '\u3092', + "wokatakana": '\u30f2', + "wokatakanahalfwidth": '\uff66', + "won": '\u20a9', + "wonmonospace": '\uffe6', + "wowaenthai": '\u0e27', + "wparen": '\u24b2', + "wring": '\u1e98', + "wsuperior": '\u02b7', + "wturned": '\u028d', + "wynn": '\u01bf', + "x": '\u0078', + "xabovecmb": '\u033d', + "xbopomofo": '\u3112', + "xcircle": '\u24e7', + "xdieresis": '\u1e8d', + "xdotaccent": '\u1e8b', + "xeharmenian": '\u056d', + "xi": '\u03be', + "xmonospace": '\uff58', + "xparen": '\u24b3', + "xsuperior": '\u02e3', + "y": '\u0079', + "yaadosquare": '\u334e', + "yabengali": '\u09af', + "yacute": '\u00fd', + "yadeva": '\u092f', + "yaekorean": '\u3152', + "yagujarati": '\u0aaf', + "yagurmukhi": '\u0a2f', + "yahiragana": '\u3084', + "yakatakana": '\u30e4', + "yakatakanahalfwidth": '\uff94', + "yakorean": '\u3151', + "yamakkanthai": '\u0e4e', + "yasmallhiragana": '\u3083', + "yasmallkatakana": '\u30e3', + "yasmallkatakanahalfwidth": '\uff6c', + "yatcyrillic": '\u0463', + "ycircle": '\u24e8', + "ycircumflex": '\u0177', + "ydieresis": '\u00ff', + "ydotaccent": '\u1e8f', + "ydotbelow": '\u1ef5', + "yeharabic": '\u064a', + "yehbarreearabic": '\u06d2', + "yehbarreefinalarabic": '\ufbaf', + "yehfinalarabic": '\ufef2', + "yehhamzaabovearabic": '\u0626', + "yehhamzaabovefinalarabic": '\ufe8a', + "yehhamzaaboveinitialarabic": '\ufe8b', + "yehhamzaabovemedialarabic": '\ufe8c', + "yehinitialarabic": '\ufef3', + "yehmedialarabic": '\ufef4', + "yehmeeminitialarabic": '\ufcdd', + "yehmeemisolatedarabic": '\ufc58', + "yehnoonfinalarabic": '\ufc94', + "yehthreedotsbelowarabic": '\u06d1', + "yekorean": '\u3156', + "yen": '\u00a5', + "yenmonospace": '\uffe5', + "yeokorean": '\u3155', + "yeorinhieuhkorean": '\u3186', + "yerahbenyomohebrew": '\u05aa', + "yerahbenyomolefthebrew": '\u05aa', + "yericyrillic": '\u044b', + "yerudieresiscyrillic": '\u04f9', + "yesieungkorean": '\u3181', + "yesieungpansioskorean": '\u3183', + "yesieungsioskorean": '\u3182', + "yetivhebrew": '\u059a', + "ygrave": '\u1ef3', + "yhook": '\u01b4', + "yhookabove": '\u1ef7', + "yiarmenian": '\u0575', + "yicyrillic": '\u0457', + "yikorean": '\u3162', + "yinyang": '\u262f', + "yiwnarmenian": '\u0582', + "ymonospace": '\uff59', + "yod": '\u05d9', + "yoddagesh": '\ufb39', + "yoddageshhebrew": '\ufb39', + "yodhebrew": '\u05d9', + "yodyodhebrew": '\u05f2', + "yodyodpatahhebrew": '\ufb1f', + "yohiragana": '\u3088', + "yoikorean": '\u3189', + "yokatakana": '\u30e8', + "yokatakanahalfwidth": '\uff96', + "yokorean": '\u315b', + "yosmallhiragana": '\u3087', + "yosmallkatakana": '\u30e7', + "yosmallkatakanahalfwidth": '\uff6e', + "yotgreek": '\u03f3', + "yoyaekorean": '\u3188', + "yoyakorean": '\u3187', + "yoyakthai": '\u0e22', + "yoyingthai": '\u0e0d', + "yparen": '\u24b4', + "ypogegrammeni": '\u037a', + "ypogegrammenigreekcmb": '\u0345', + "yr": '\u01a6', + "yring": '\u1e99', + "ysuperior": '\u02b8', + "ytilde": '\u1ef9', + "yturned": '\u028e', + "yuhiragana": '\u3086', + "yuikorean": '\u318c', + "yukatakana": '\u30e6', + "yukatakanahalfwidth": '\uff95', + "yukorean": '\u3160', + "yusbigcyrillic": '\u046b', + "yusbigiotifiedcyrillic": '\u046d', + "yuslittlecyrillic": '\u0467', + "yuslittleiotifiedcyrillic": '\u0469', + "yusmallhiragana": '\u3085', + "yusmallkatakana": '\u30e5', + "yusmallkatakanahalfwidth": '\uff6d', + "yuyekorean": '\u318b', + "yuyeokorean": '\u318a', + "yyabengali": '\u09df', + "yyadeva": '\u095f', + "z": '\u007a', + "zaarmenian": '\u0566', + "zacute": '\u017a', + "zadeva": '\u095b', + "zagurmukhi": '\u0a5b', + "zaharabic": '\u0638', + "zahfinalarabic": '\ufec6', + "zahinitialarabic": '\ufec7', + "zahiragana": '\u3056', + "zahmedialarabic": '\ufec8', + "zainarabic": '\u0632', + "zainfinalarabic": '\ufeb0', + "zakatakana": '\u30b6', + "zaqefgadolhebrew": '\u0595', + "zaqefqatanhebrew": '\u0594', + "zarqahebrew": '\u0598', + "zayin": '\u05d6', + "zayindagesh": '\ufb36', + "zayindageshhebrew": '\ufb36', + "zayinhebrew": '\u05d6', + "zbopomofo": '\u3117', + "zcaron": '\u017e', + "zcircle": '\u24e9', + "zcircumflex": '\u1e91', + "zcurl": '\u0291', + "zdot": '\u017c', + "zdotaccent": '\u017c', + "zdotbelow": '\u1e93', + "zecyrillic": '\u0437', + "zedescendercyrillic": '\u0499', + "zedieresiscyrillic": '\u04df', + "zehiragana": '\u305c', + "zekatakana": '\u30bc', + "zero": '\u0030', + "zeroarabic": '\u0660', + "zerobengali": '\u09e6', + "zerodeva": '\u0966', + "zerogujarati": '\u0ae6', + "zerogurmukhi": '\u0a66', + "zerohackarabic": '\u0660', + "zeroinferior": '\u2080', + "zeromonospace": '\uff10', + "zerooldstyle": '\uf730', + "zeropersian": '\u06f0', + "zerosuperior": '\u2070', + "zerothai": '\u0e50', + "zerowidthjoiner": '\ufeff', + "zerowidthnonjoiner": '\u200c', + "zerowidthspace": '\u200b', + "zeta": '\u03b6', + "zhbopomofo": '\u3113', + "zhearmenian": '\u056a', + "zhebrevecyrillic": '\u04c2', + "zhecyrillic": '\u0436', + "zhedescendercyrillic": '\u0497', + "zhedieresiscyrillic": '\u04dd', + "zihiragana": '\u3058', + "zikatakana": '\u30b8', + "zinorhebrew": '\u05ae', + "zlinebelow": '\u1e95', + "zmonospace": '\uff5a', + "zohiragana": '\u305e', + "zokatakana": '\u30be', + "zparen": '\u24b5', + "zretroflexhook": '\u0290', + "zstroke": '\u01b6', + "zuhiragana": '\u305a', + "zukatakana": '\u30ba', +} + +var glyphlistRuneToGlyphMap = map[rune]string{ + '\u0041': "A", + '\u00c6': "AE", + '\u01fc': "AEacute", + '\u01e2': "AEmacron", + '\uf7e6': "AEsmall", + '\u00c1': "Aacute", + '\uf7e1': "Aacutesmall", + '\u0102': "Abreve", + '\u1eae': "Abreveacute", + '\u04d0': "Abrevecyrillic", + '\u1eb6': "Abrevedotbelow", + '\u1eb0': "Abrevegrave", + '\u1eb2': "Abrevehookabove", + '\u1eb4': "Abrevetilde", + '\u01cd': "Acaron", + '\u24b6': "Acircle", + '\u00c2': "Acircumflex", + '\u1ea4': "Acircumflexacute", + '\u1eac': "Acircumflexdotbelow", + '\u1ea6': "Acircumflexgrave", + '\u1ea8': "Acircumflexhookabove", + '\uf7e2': "Acircumflexsmall", + '\u1eaa': "Acircumflextilde", + '\uf6c9': "Acute", + '\uf7b4': "Acutesmall", + '\u0410': "Acyrillic", + '\u0200': "Adblgrave", + '\u00c4': "Adieresis", + '\u04d2': "Adieresiscyrillic", + '\u01de': "Adieresismacron", + '\uf7e4': "Adieresissmall", + '\u1ea0': "Adotbelow", + '\u01e0': "Adotmacron", + '\u00c0': "Agrave", + '\uf7e0': "Agravesmall", + '\u1ea2': "Ahookabove", + '\u04d4': "Aiecyrillic", + '\u0202': "Ainvertedbreve", + '\u0391': "Alpha", + '\u0386': "Alphatonos", + '\u0100': "Amacron", + '\uff21': "Amonospace", + '\u0104': "Aogonek", + '\u00c5': "Aring", + '\u01fa': "Aringacute", + '\u1e00': "Aringbelow", + '\uf7e5': "Aringsmall", + '\uf761': "Asmall", + '\u00c3': "Atilde", + '\uf7e3': "Atildesmall", + '\u0531': "Aybarmenian", + '\u0042': "B", + '\u24b7': "Bcircle", + '\u1e02': "Bdotaccent", + '\u1e04': "Bdotbelow", + '\u0411': "Becyrillic", + '\u0532': "Benarmenian", + '\u0392': "Beta", + '\u0181': "Bhook", + '\u1e06': "Blinebelow", + '\uff22': "Bmonospace", + '\uf6f4': "Brevesmall", + '\uf762': "Bsmall", + '\u0182': "Btopbar", + '\u0043': "C", + '\u053e': "Caarmenian", + '\u0106': "Cacute", + '\uf6ca': "Caron", + '\uf6f5': "Caronsmall", + '\u010c': "Ccaron", + '\u00c7': "Ccedilla", + '\u1e08': "Ccedillaacute", + '\uf7e7': "Ccedillasmall", + '\u24b8': "Ccircle", + '\u0108': "Ccircumflex", + '\u010a': "Cdot", + // '\u010a': "Cdotaccent", // duplicate + '\uf7b8': "Cedillasmall", + '\u0549': "Chaarmenian", + '\u04bc': "Cheabkhasiancyrillic", + '\u0427': "Checyrillic", + '\u04be': "Chedescenderabkhasiancyrillic", + '\u04b6': "Chedescendercyrillic", + '\u04f4': "Chedieresiscyrillic", + '\u0543': "Cheharmenian", + '\u04cb': "Chekhakassiancyrillic", + '\u04b8': "Cheverticalstrokecyrillic", + '\u03a7': "Chi", + '\u0187': "Chook", + '\uf6f6': "Circumflexsmall", + '\uff23': "Cmonospace", + '\u0551': "Coarmenian", + '\uf763': "Csmall", + '\u0044': "D", + '\u01f1': "DZ", + '\u01c4': "DZcaron", + '\u0534': "Daarmenian", + '\u0189': "Dafrican", + '\u010e': "Dcaron", + '\u1e10': "Dcedilla", + '\u24b9': "Dcircle", + '\u1e12': "Dcircumflexbelow", + '\u0110': "Dcroat", + '\u1e0a': "Ddotaccent", + '\u1e0c': "Ddotbelow", + '\u0414': "Decyrillic", + '\u03ee': "Deicoptic", + '\u2206': "Delta", + '\u0394': "Deltagreek", + '\u018a': "Dhook", + '\uf6cb': "Dieresis", + '\uf6cc': "DieresisAcute", + '\uf6cd': "DieresisGrave", + '\uf7a8': "Dieresissmall", + '\u03dc': "Digammagreek", + '\u0402': "Djecyrillic", + '\u1e0e': "Dlinebelow", + '\uff24': "Dmonospace", + '\uf6f7': "Dotaccentsmall", + // '\u0110': "Dslash", // duplicate + '\uf764': "Dsmall", + '\u018b': "Dtopbar", + '\u01f2': "Dz", + '\u01c5': "Dzcaron", + '\u04e0': "Dzeabkhasiancyrillic", + '\u0405': "Dzecyrillic", + '\u040f': "Dzhecyrillic", + '\u0045': "E", + '\u00c9': "Eacute", + '\uf7e9': "Eacutesmall", + '\u0114': "Ebreve", + '\u011a': "Ecaron", + '\u1e1c': "Ecedillabreve", + '\u0535': "Echarmenian", + '\u24ba': "Ecircle", + '\u00ca': "Ecircumflex", + '\u1ebe': "Ecircumflexacute", + '\u1e18': "Ecircumflexbelow", + '\u1ec6': "Ecircumflexdotbelow", + '\u1ec0': "Ecircumflexgrave", + '\u1ec2': "Ecircumflexhookabove", + '\uf7ea': "Ecircumflexsmall", + '\u1ec4': "Ecircumflextilde", + '\u0404': "Ecyrillic", + '\u0204': "Edblgrave", + '\u00cb': "Edieresis", + '\uf7eb': "Edieresissmall", + '\u0116': "Edot", + // '\u0116': "Edotaccent", // duplicate + '\u1eb8': "Edotbelow", + '\u0424': "Efcyrillic", + '\u00c8': "Egrave", + '\uf7e8': "Egravesmall", + '\u0537': "Eharmenian", + '\u1eba': "Ehookabove", + '\u2167': "Eightroman", + '\u0206': "Einvertedbreve", + '\u0464': "Eiotifiedcyrillic", + '\u041b': "Elcyrillic", + '\u216a': "Elevenroman", + '\u0112': "Emacron", + '\u1e16': "Emacronacute", + '\u1e14': "Emacrongrave", + '\u041c': "Emcyrillic", + '\uff25': "Emonospace", + '\u041d': "Encyrillic", + '\u04a2': "Endescendercyrillic", + '\u014a': "Eng", + '\u04a4': "Enghecyrillic", + '\u04c7': "Enhookcyrillic", + '\u0118': "Eogonek", + '\u0190': "Eopen", + '\u0395': "Epsilon", + '\u0388': "Epsilontonos", + '\u0420': "Ercyrillic", + '\u018e': "Ereversed", + '\u042d': "Ereversedcyrillic", + '\u0421': "Escyrillic", + '\u04aa': "Esdescendercyrillic", + '\u01a9': "Esh", + '\uf765': "Esmall", + '\u0397': "Eta", + '\u0538': "Etarmenian", + '\u0389': "Etatonos", + '\u00d0': "Eth", + '\uf7f0': "Ethsmall", + '\u1ebc': "Etilde", + '\u1e1a': "Etildebelow", + '\u20ac': "Euro", + '\u01b7': "Ezh", + '\u01ee': "Ezhcaron", + '\u01b8': "Ezhreversed", + '\u0046': "F", + '\u24bb': "Fcircle", + '\u1e1e': "Fdotaccent", + '\u0556': "Feharmenian", + '\u03e4': "Feicoptic", + '\u0191': "Fhook", + '\u0472': "Fitacyrillic", + '\u2164': "Fiveroman", + '\uff26': "Fmonospace", + '\u2163': "Fourroman", + '\uf766': "Fsmall", + '\u0047': "G", + '\u3387': "GBsquare", + '\u01f4': "Gacute", + '\u0393': "Gamma", + '\u0194': "Gammaafrican", + '\u03ea': "Gangiacoptic", + '\u011e': "Gbreve", + '\u01e6': "Gcaron", + '\u0122': "Gcedilla", + '\u24bc': "Gcircle", + '\u011c': "Gcircumflex", + // '\u0122': "Gcommaaccent", // duplicate + '\u0120': "Gdot", + // '\u0120': "Gdotaccent", // duplicate + '\u0413': "Gecyrillic", + '\u0542': "Ghadarmenian", + '\u0494': "Ghemiddlehookcyrillic", + '\u0492': "Ghestrokecyrillic", + '\u0490': "Gheupturncyrillic", + '\u0193': "Ghook", + '\u0533': "Gimarmenian", + '\u0403': "Gjecyrillic", + '\u1e20': "Gmacron", + '\uff27': "Gmonospace", + '\uf6ce': "Grave", + '\uf760': "Gravesmall", + '\uf767': "Gsmall", + '\u029b': "Gsmallhook", + '\u01e4': "Gstroke", + '\u0048': "H", + '\u25cf': "H18533", + '\u25aa': "H18543", + '\u25ab': "H18551", + '\u25a1': "H22073", + '\u33cb': "HPsquare", + '\u04a8': "Haabkhasiancyrillic", + '\u04b2': "Hadescendercyrillic", + '\u042a': "Hardsigncyrillic", + '\u0126': "Hbar", + '\u1e2a': "Hbrevebelow", + '\u1e28': "Hcedilla", + '\u24bd': "Hcircle", + '\u0124': "Hcircumflex", + '\u1e26': "Hdieresis", + '\u1e22': "Hdotaccent", + '\u1e24': "Hdotbelow", + '\uff28': "Hmonospace", + '\u0540': "Hoarmenian", + '\u03e8': "Horicoptic", + '\uf768': "Hsmall", + '\uf6cf': "Hungarumlaut", + '\uf6f8': "Hungarumlautsmall", + '\u3390': "Hzsquare", + '\u0049': "I", + '\u042f': "IAcyrillic", + '\u0132': "IJ", + '\u042e': "IUcyrillic", + '\u00cd': "Iacute", + '\uf7ed': "Iacutesmall", + '\u012c': "Ibreve", + '\u01cf': "Icaron", + '\u24be': "Icircle", + '\u00ce': "Icircumflex", + '\uf7ee': "Icircumflexsmall", + '\u0406': "Icyrillic", + '\u0208': "Idblgrave", + '\u00cf': "Idieresis", + '\u1e2e': "Idieresisacute", + '\u04e4': "Idieresiscyrillic", + '\uf7ef': "Idieresissmall", + '\u0130': "Idot", + // '\u0130': "Idotaccent", // duplicate + '\u1eca': "Idotbelow", + '\u04d6': "Iebrevecyrillic", + '\u0415': "Iecyrillic", + '\u2111': "Ifraktur", + '\u00cc': "Igrave", + '\uf7ec': "Igravesmall", + '\u1ec8': "Ihookabove", + '\u0418': "Iicyrillic", + '\u020a': "Iinvertedbreve", + '\u0419': "Iishortcyrillic", + '\u012a': "Imacron", + '\u04e2': "Imacroncyrillic", + '\uff29': "Imonospace", + '\u053b': "Iniarmenian", + '\u0401': "Iocyrillic", + '\u012e': "Iogonek", + '\u0399': "Iota", + '\u0196': "Iotaafrican", + '\u03aa': "Iotadieresis", + '\u038a': "Iotatonos", + '\uf769': "Ismall", + '\u0197': "Istroke", + '\u0128': "Itilde", + '\u1e2c': "Itildebelow", + '\u0474': "Izhitsacyrillic", + '\u0476': "Izhitsadblgravecyrillic", + '\u004a': "J", + '\u0541': "Jaarmenian", + '\u24bf': "Jcircle", + '\u0134': "Jcircumflex", + '\u0408': "Jecyrillic", + '\u054b': "Jheharmenian", + '\uff2a': "Jmonospace", + '\uf76a': "Jsmall", + '\u004b': "K", + '\u3385': "KBsquare", + '\u33cd': "KKsquare", + '\u04a0': "Kabashkircyrillic", + '\u1e30': "Kacute", + '\u041a': "Kacyrillic", + '\u049a': "Kadescendercyrillic", + '\u04c3': "Kahookcyrillic", + '\u039a': "Kappa", + '\u049e': "Kastrokecyrillic", + '\u049c': "Kaverticalstrokecyrillic", + '\u01e8': "Kcaron", + '\u0136': "Kcedilla", + '\u24c0': "Kcircle", + // '\u0136': "Kcommaaccent", // duplicate + '\u1e32': "Kdotbelow", + '\u0554': "Keharmenian", + '\u053f': "Kenarmenian", + '\u0425': "Khacyrillic", + '\u03e6': "Kheicoptic", + '\u0198': "Khook", + '\u040c': "Kjecyrillic", + '\u1e34': "Klinebelow", + '\uff2b': "Kmonospace", + '\u0480': "Koppacyrillic", + '\u03de': "Koppagreek", + '\u046e': "Ksicyrillic", + '\uf76b': "Ksmall", + '\u004c': "L", + '\u01c7': "LJ", + '\uf6bf': "LL", + '\u0139': "Lacute", + '\u039b': "Lambda", + '\u013d': "Lcaron", + '\u013b': "Lcedilla", + '\u24c1': "Lcircle", + '\u1e3c': "Lcircumflexbelow", + // '\u013b': "Lcommaaccent", // duplicate + '\u013f': "Ldot", + // '\u013f': "Ldotaccent", // duplicate + '\u1e36': "Ldotbelow", + '\u1e38': "Ldotbelowmacron", + '\u053c': "Liwnarmenian", + '\u01c8': "Lj", + '\u0409': "Ljecyrillic", + '\u1e3a': "Llinebelow", + '\uff2c': "Lmonospace", + '\u0141': "Lslash", + '\uf6f9': "Lslashsmall", + '\uf76c': "Lsmall", + '\u004d': "M", + '\u3386': "MBsquare", + '\uf6d0': "Macron", + '\uf7af': "Macronsmall", + '\u1e3e': "Macute", + '\u24c2': "Mcircle", + '\u1e40': "Mdotaccent", + '\u1e42': "Mdotbelow", + '\u0544': "Menarmenian", + '\uff2d': "Mmonospace", + '\uf76d': "Msmall", + '\u019c': "Mturned", + '\u039c': "Mu", + '\u004e': "N", + '\u01ca': "NJ", + '\u0143': "Nacute", + '\u0147': "Ncaron", + '\u0145': "Ncedilla", + '\u24c3': "Ncircle", + '\u1e4a': "Ncircumflexbelow", + // '\u0145': "Ncommaaccent", // duplicate + '\u1e44': "Ndotaccent", + '\u1e46': "Ndotbelow", + '\u019d': "Nhookleft", + '\u2168': "Nineroman", + '\u01cb': "Nj", + '\u040a': "Njecyrillic", + '\u1e48': "Nlinebelow", + '\uff2e': "Nmonospace", + '\u0546': "Nowarmenian", + '\uf76e': "Nsmall", + '\u00d1': "Ntilde", + '\uf7f1': "Ntildesmall", + '\u039d': "Nu", + '\u004f': "O", + '\u0152': "OE", + '\uf6fa': "OEsmall", + '\u00d3': "Oacute", + '\uf7f3': "Oacutesmall", + '\u04e8': "Obarredcyrillic", + '\u04ea': "Obarreddieresiscyrillic", + '\u014e': "Obreve", + '\u01d1': "Ocaron", + '\u019f': "Ocenteredtilde", + '\u24c4': "Ocircle", + '\u00d4': "Ocircumflex", + '\u1ed0': "Ocircumflexacute", + '\u1ed8': "Ocircumflexdotbelow", + '\u1ed2': "Ocircumflexgrave", + '\u1ed4': "Ocircumflexhookabove", + '\uf7f4': "Ocircumflexsmall", + '\u1ed6': "Ocircumflextilde", + '\u041e': "Ocyrillic", + '\u0150': "Odblacute", + '\u020c': "Odblgrave", + '\u00d6': "Odieresis", + '\u04e6': "Odieresiscyrillic", + '\uf7f6': "Odieresissmall", + '\u1ecc': "Odotbelow", + '\uf6fb': "Ogoneksmall", + '\u00d2': "Ograve", + '\uf7f2': "Ogravesmall", + '\u0555': "Oharmenian", + '\u2126': "Ohm", + '\u1ece': "Ohookabove", + '\u01a0': "Ohorn", + '\u1eda': "Ohornacute", + '\u1ee2': "Ohorndotbelow", + '\u1edc': "Ohorngrave", + '\u1ede': "Ohornhookabove", + '\u1ee0': "Ohorntilde", + // '\u0150': "Ohungarumlaut", // duplicate + '\u01a2': "Oi", + '\u020e': "Oinvertedbreve", + '\u014c': "Omacron", + '\u1e52': "Omacronacute", + '\u1e50': "Omacrongrave", + // '\u2126': "Omega", // duplicate + '\u0460': "Omegacyrillic", + '\u03a9': "Omegagreek", + '\u047a': "Omegaroundcyrillic", + '\u047c': "Omegatitlocyrillic", + '\u038f': "Omegatonos", + '\u039f': "Omicron", + '\u038c': "Omicrontonos", + '\uff2f': "Omonospace", + '\u2160': "Oneroman", + '\u01ea': "Oogonek", + '\u01ec': "Oogonekmacron", + '\u0186': "Oopen", + '\u00d8': "Oslash", + '\u01fe': "Oslashacute", + '\uf7f8': "Oslashsmall", + '\uf76f': "Osmall", + // '\u01fe': "Ostrokeacute", // duplicate + '\u047e': "Otcyrillic", + '\u00d5': "Otilde", + '\u1e4c': "Otildeacute", + '\u1e4e': "Otildedieresis", + '\uf7f5': "Otildesmall", + '\u0050': "P", + '\u1e54': "Pacute", + '\u24c5': "Pcircle", + '\u1e56': "Pdotaccent", + '\u041f': "Pecyrillic", + '\u054a': "Peharmenian", + '\u04a6': "Pemiddlehookcyrillic", + '\u03a6': "Phi", + '\u01a4': "Phook", + '\u03a0': "Pi", + '\u0553': "Piwrarmenian", + '\uff30': "Pmonospace", + '\u03a8': "Psi", + '\u0470': "Psicyrillic", + '\uf770': "Psmall", + '\u0051': "Q", + '\u24c6': "Qcircle", + '\uff31': "Qmonospace", + '\uf771': "Qsmall", + '\u0052': "R", + '\u054c': "Raarmenian", + '\u0154': "Racute", + '\u0158': "Rcaron", + '\u0156': "Rcedilla", + '\u24c7': "Rcircle", + // '\u0156': "Rcommaaccent", // duplicate + '\u0210': "Rdblgrave", + '\u1e58': "Rdotaccent", + '\u1e5a': "Rdotbelow", + '\u1e5c': "Rdotbelowmacron", + '\u0550': "Reharmenian", + '\u211c': "Rfraktur", + '\u03a1': "Rho", + '\uf6fc': "Ringsmall", + '\u0212': "Rinvertedbreve", + '\u1e5e': "Rlinebelow", + '\uff32': "Rmonospace", + '\uf772': "Rsmall", + '\u0281': "Rsmallinverted", + '\u02b6': "Rsmallinvertedsuperior", + '\u0053': "S", + '\u250c': "SF010000", + '\u2514': "SF020000", + '\u2510': "SF030000", + '\u2518': "SF040000", + '\u253c': "SF050000", + '\u252c': "SF060000", + '\u2534': "SF070000", + '\u251c': "SF080000", + '\u2524': "SF090000", + '\u2500': "SF100000", + '\u2502': "SF110000", + '\u2561': "SF190000", + '\u2562': "SF200000", + '\u2556': "SF210000", + '\u2555': "SF220000", + '\u2563': "SF230000", + '\u2551': "SF240000", + '\u2557': "SF250000", + '\u255d': "SF260000", + '\u255c': "SF270000", + '\u255b': "SF280000", + '\u255e': "SF360000", + '\u255f': "SF370000", + '\u255a': "SF380000", + '\u2554': "SF390000", + '\u2569': "SF400000", + '\u2566': "SF410000", + '\u2560': "SF420000", + '\u2550': "SF430000", + '\u256c': "SF440000", + '\u2567': "SF450000", + '\u2568': "SF460000", + '\u2564': "SF470000", + '\u2565': "SF480000", + '\u2559': "SF490000", + '\u2558': "SF500000", + '\u2552': "SF510000", + '\u2553': "SF520000", + '\u256b': "SF530000", + '\u256a': "SF540000", + '\u015a': "Sacute", + '\u1e64': "Sacutedotaccent", + '\u03e0': "Sampigreek", + '\u0160': "Scaron", + '\u1e66': "Scarondotaccent", + '\uf6fd': "Scaronsmall", + '\u015e': "Scedilla", + '\u018f': "Schwa", + '\u04d8': "Schwacyrillic", + '\u04da': "Schwadieresiscyrillic", + '\u24c8': "Scircle", + '\u015c': "Scircumflex", + '\u0218': "Scommaaccent", + '\u1e60': "Sdotaccent", + '\u1e62': "Sdotbelow", + '\u1e68': "Sdotbelowdotaccent", + '\u054d': "Seharmenian", + '\u2166': "Sevenroman", + '\u0547': "Shaarmenian", + '\u0428': "Shacyrillic", + '\u0429': "Shchacyrillic", + '\u03e2': "Sheicoptic", + '\u04ba': "Shhacyrillic", + '\u03ec': "Shimacoptic", + '\u03a3': "Sigma", + '\u2165': "Sixroman", + '\uff33': "Smonospace", + '\u042c': "Softsigncyrillic", + '\uf773': "Ssmall", + '\u03da': "Stigmagreek", + '\u0054': "T", + '\u03a4': "Tau", + '\u0166': "Tbar", + '\u0164': "Tcaron", + '\u0162': "Tcedilla", + '\u24c9': "Tcircle", + '\u1e70': "Tcircumflexbelow", + // '\u0162': "Tcommaaccent", // duplicate + '\u1e6a': "Tdotaccent", + '\u1e6c': "Tdotbelow", + '\u0422': "Tecyrillic", + '\u04ac': "Tedescendercyrillic", + '\u2169': "Tenroman", + '\u04b4': "Tetsecyrillic", + '\u0398': "Theta", + '\u01ac': "Thook", + '\u00de': "Thorn", + '\uf7fe': "Thornsmall", + '\u2162': "Threeroman", + '\uf6fe': "Tildesmall", + '\u054f': "Tiwnarmenian", + '\u1e6e': "Tlinebelow", + '\uff34': "Tmonospace", + '\u0539': "Toarmenian", + '\u01bc': "Tonefive", + '\u0184': "Tonesix", + '\u01a7': "Tonetwo", + '\u01ae': "Tretroflexhook", + '\u0426': "Tsecyrillic", + '\u040b': "Tshecyrillic", + '\uf774': "Tsmall", + '\u216b': "Twelveroman", + '\u2161': "Tworoman", + '\u0055': "U", + '\u00da': "Uacute", + '\uf7fa': "Uacutesmall", + '\u016c': "Ubreve", + '\u01d3': "Ucaron", + '\u24ca': "Ucircle", + '\u00db': "Ucircumflex", + '\u1e76': "Ucircumflexbelow", + '\uf7fb': "Ucircumflexsmall", + '\u0423': "Ucyrillic", + '\u0170': "Udblacute", + '\u0214': "Udblgrave", + '\u00dc': "Udieresis", + '\u01d7': "Udieresisacute", + '\u1e72': "Udieresisbelow", + '\u01d9': "Udieresiscaron", + '\u04f0': "Udieresiscyrillic", + '\u01db': "Udieresisgrave", + '\u01d5': "Udieresismacron", + '\uf7fc': "Udieresissmall", + '\u1ee4': "Udotbelow", + '\u00d9': "Ugrave", + '\uf7f9': "Ugravesmall", + '\u1ee6': "Uhookabove", + '\u01af': "Uhorn", + '\u1ee8': "Uhornacute", + '\u1ef0': "Uhorndotbelow", + '\u1eea': "Uhorngrave", + '\u1eec': "Uhornhookabove", + '\u1eee': "Uhorntilde", + // '\u0170': "Uhungarumlaut", // duplicate + '\u04f2': "Uhungarumlautcyrillic", + '\u0216': "Uinvertedbreve", + '\u0478': "Ukcyrillic", + '\u016a': "Umacron", + '\u04ee': "Umacroncyrillic", + '\u1e7a': "Umacrondieresis", + '\uff35': "Umonospace", + '\u0172': "Uogonek", + '\u03a5': "Upsilon", + '\u03d2': "Upsilon1", + '\u03d3': "Upsilonacutehooksymbolgreek", + '\u01b1': "Upsilonafrican", + '\u03ab': "Upsilondieresis", + '\u03d4': "Upsilondieresishooksymbolgreek", + // '\u03d2': "Upsilonhooksymbol", // duplicate + '\u038e': "Upsilontonos", + '\u016e': "Uring", + '\u040e': "Ushortcyrillic", + '\uf775': "Usmall", + '\u04ae': "Ustraightcyrillic", + '\u04b0': "Ustraightstrokecyrillic", + '\u0168': "Utilde", + '\u1e78': "Utildeacute", + '\u1e74': "Utildebelow", + '\u0056': "V", + '\u24cb': "Vcircle", + '\u1e7e': "Vdotbelow", + '\u0412': "Vecyrillic", + '\u054e': "Vewarmenian", + '\u01b2': "Vhook", + '\uff36': "Vmonospace", + '\u0548': "Voarmenian", + '\uf776': "Vsmall", + '\u1e7c': "Vtilde", + '\u0057': "W", + '\u1e82': "Wacute", + '\u24cc': "Wcircle", + '\u0174': "Wcircumflex", + '\u1e84': "Wdieresis", + '\u1e86': "Wdotaccent", + '\u1e88': "Wdotbelow", + '\u1e80': "Wgrave", + '\uff37': "Wmonospace", + '\uf777': "Wsmall", + '\u0058': "X", + '\u24cd': "Xcircle", + '\u1e8c': "Xdieresis", + '\u1e8a': "Xdotaccent", + '\u053d': "Xeharmenian", + '\u039e': "Xi", + '\uff38': "Xmonospace", + '\uf778': "Xsmall", + '\u0059': "Y", + '\u00dd': "Yacute", + '\uf7fd': "Yacutesmall", + '\u0462': "Yatcyrillic", + '\u24ce': "Ycircle", + '\u0176': "Ycircumflex", + '\u0178': "Ydieresis", + '\uf7ff': "Ydieresissmall", + '\u1e8e': "Ydotaccent", + '\u1ef4': "Ydotbelow", + '\u042b': "Yericyrillic", + '\u04f8': "Yerudieresiscyrillic", + '\u1ef2': "Ygrave", + '\u01b3': "Yhook", + '\u1ef6': "Yhookabove", + '\u0545': "Yiarmenian", + '\u0407': "Yicyrillic", + '\u0552': "Yiwnarmenian", + '\uff39': "Ymonospace", + '\uf779': "Ysmall", + '\u1ef8': "Ytilde", + '\u046a': "Yusbigcyrillic", + '\u046c': "Yusbigiotifiedcyrillic", + '\u0466': "Yuslittlecyrillic", + '\u0468': "Yuslittleiotifiedcyrillic", + '\u005a': "Z", + '\u0536': "Zaarmenian", + '\u0179': "Zacute", + '\u017d': "Zcaron", + '\uf6ff': "Zcaronsmall", + '\u24cf': "Zcircle", + '\u1e90': "Zcircumflex", + '\u017b': "Zdot", + // '\u017b': "Zdotaccent", // duplicate + '\u1e92': "Zdotbelow", + '\u0417': "Zecyrillic", + '\u0498': "Zedescendercyrillic", + '\u04de': "Zedieresiscyrillic", + '\u0396': "Zeta", + '\u053a': "Zhearmenian", + '\u04c1': "Zhebrevecyrillic", + '\u0416': "Zhecyrillic", + '\u0496': "Zhedescendercyrillic", + '\u04dc': "Zhedieresiscyrillic", + '\u1e94': "Zlinebelow", + '\uff3a': "Zmonospace", + '\uf77a': "Zsmall", + '\u01b5': "Zstroke", + '\u0061': "a", + '\u0986': "aabengali", + '\u00e1': "aacute", + '\u0906': "aadeva", + '\u0a86': "aagujarati", + '\u0a06': "aagurmukhi", + '\u0a3e': "aamatragurmukhi", + '\u3303': "aarusquare", + '\u09be': "aavowelsignbengali", + '\u093e': "aavowelsigndeva", + '\u0abe': "aavowelsigngujarati", + '\u055f': "abbreviationmarkarmenian", + '\u0970': "abbreviationsigndeva", + '\u0985': "abengali", + '\u311a': "abopomofo", + '\u0103': "abreve", + '\u1eaf': "abreveacute", + '\u04d1': "abrevecyrillic", + '\u1eb7': "abrevedotbelow", + '\u1eb1': "abrevegrave", + '\u1eb3': "abrevehookabove", + '\u1eb5': "abrevetilde", + '\u01ce': "acaron", + '\u24d0': "acircle", + '\u00e2': "acircumflex", + '\u1ea5': "acircumflexacute", + '\u1ead': "acircumflexdotbelow", + '\u1ea7': "acircumflexgrave", + '\u1ea9': "acircumflexhookabove", + '\u1eab': "acircumflextilde", + '\u00b4': "acute", + '\u0317': "acutebelowcmb", + '\u0301': "acutecmb", + // '\u0301': "acutecomb", // duplicate + '\u0954': "acutedeva", + '\u02cf': "acutelowmod", + '\u0341': "acutetonecmb", + '\u0430': "acyrillic", + '\u0201': "adblgrave", + '\u0a71': "addakgurmukhi", + '\u0905': "adeva", + '\u00e4': "adieresis", + '\u04d3': "adieresiscyrillic", + '\u01df': "adieresismacron", + '\u1ea1': "adotbelow", + '\u01e1': "adotmacron", + '\u00e6': "ae", + '\u01fd': "aeacute", + '\u3150': "aekorean", + '\u01e3': "aemacron", + '\u2015': "afii00208", + '\u20a4': "afii08941", + // '\u0410': "afii10017", // duplicate + // '\u0411': "afii10018", // duplicate + // '\u0412': "afii10019", // duplicate + // '\u0413': "afii10020", // duplicate + // '\u0414': "afii10021", // duplicate + // '\u0415': "afii10022", // duplicate + // '\u0401': "afii10023", // duplicate + // '\u0416': "afii10024", // duplicate + // '\u0417': "afii10025", // duplicate + // '\u0418': "afii10026", // duplicate + // '\u0419': "afii10027", // duplicate + // '\u041a': "afii10028", // duplicate + // '\u041b': "afii10029", // duplicate + // '\u041c': "afii10030", // duplicate + // '\u041d': "afii10031", // duplicate + // '\u041e': "afii10032", // duplicate + // '\u041f': "afii10033", // duplicate + // '\u0420': "afii10034", // duplicate + // '\u0421': "afii10035", // duplicate + // '\u0422': "afii10036", // duplicate + // '\u0423': "afii10037", // duplicate + // '\u0424': "afii10038", // duplicate + // '\u0425': "afii10039", // duplicate + // '\u0426': "afii10040", // duplicate + // '\u0427': "afii10041", // duplicate + // '\u0428': "afii10042", // duplicate + // '\u0429': "afii10043", // duplicate + // '\u042a': "afii10044", // duplicate + // '\u042b': "afii10045", // duplicate + // '\u042c': "afii10046", // duplicate + // '\u042d': "afii10047", // duplicate + // '\u042e': "afii10048", // duplicate + // '\u042f': "afii10049", // duplicate + // '\u0490': "afii10050", // duplicate + // '\u0402': "afii10051", // duplicate + // '\u0403': "afii10052", // duplicate + // '\u0404': "afii10053", // duplicate + // '\u0405': "afii10054", // duplicate + // '\u0406': "afii10055", // duplicate + // '\u0407': "afii10056", // duplicate + // '\u0408': "afii10057", // duplicate + // '\u0409': "afii10058", // duplicate + // '\u040a': "afii10059", // duplicate + // '\u040b': "afii10060", // duplicate + // '\u040c': "afii10061", // duplicate + // '\u040e': "afii10062", // duplicate + '\uf6c4': "afii10063", + '\uf6c5': "afii10064", + // '\u0430': "afii10065", // duplicate + '\u0431': "afii10066", + '\u0432': "afii10067", + '\u0433': "afii10068", + '\u0434': "afii10069", + '\u0435': "afii10070", + '\u0451': "afii10071", + '\u0436': "afii10072", + '\u0437': "afii10073", + '\u0438': "afii10074", + '\u0439': "afii10075", + '\u043a': "afii10076", + '\u043b': "afii10077", + '\u043c': "afii10078", + '\u043d': "afii10079", + '\u043e': "afii10080", + '\u043f': "afii10081", + '\u0440': "afii10082", + '\u0441': "afii10083", + '\u0442': "afii10084", + '\u0443': "afii10085", + '\u0444': "afii10086", + '\u0445': "afii10087", + '\u0446': "afii10088", + '\u0447': "afii10089", + '\u0448': "afii10090", + '\u0449': "afii10091", + '\u044a': "afii10092", + '\u044b': "afii10093", + '\u044c': "afii10094", + '\u044d': "afii10095", + '\u044e': "afii10096", + '\u044f': "afii10097", + '\u0491': "afii10098", + '\u0452': "afii10099", + '\u0453': "afii10100", + '\u0454': "afii10101", + '\u0455': "afii10102", + '\u0456': "afii10103", + '\u0457': "afii10104", + '\u0458': "afii10105", + '\u0459': "afii10106", + '\u045a': "afii10107", + '\u045b': "afii10108", + '\u045c': "afii10109", + '\u045e': "afii10110", + // '\u040f': "afii10145", // duplicate + // '\u0462': "afii10146", // duplicate + // '\u0472': "afii10147", // duplicate + // '\u0474': "afii10148", // duplicate + '\uf6c6': "afii10192", + '\u045f': "afii10193", + '\u0463': "afii10194", + '\u0473': "afii10195", + '\u0475': "afii10196", + '\uf6c7': "afii10831", + '\uf6c8': "afii10832", + '\u04d9': "afii10846", + '\u200e': "afii299", + '\u200f': "afii300", + '\u200d': "afii301", + '\u066a': "afii57381", + '\u060c': "afii57388", + '\u0660': "afii57392", + '\u0661': "afii57393", + '\u0662': "afii57394", + '\u0663': "afii57395", + '\u0664': "afii57396", + '\u0665': "afii57397", + '\u0666': "afii57398", + '\u0667': "afii57399", + '\u0668': "afii57400", + '\u0669': "afii57401", + '\u061b': "afii57403", + '\u061f': "afii57407", + '\u0621': "afii57409", + '\u0622': "afii57410", + '\u0623': "afii57411", + '\u0624': "afii57412", + '\u0625': "afii57413", + '\u0626': "afii57414", + '\u0627': "afii57415", + '\u0628': "afii57416", + '\u0629': "afii57417", + '\u062a': "afii57418", + '\u062b': "afii57419", + '\u062c': "afii57420", + '\u062d': "afii57421", + '\u062e': "afii57422", + '\u062f': "afii57423", + '\u0630': "afii57424", + '\u0631': "afii57425", + '\u0632': "afii57426", + '\u0633': "afii57427", + '\u0634': "afii57428", + '\u0635': "afii57429", + '\u0636': "afii57430", + '\u0637': "afii57431", + '\u0638': "afii57432", + '\u0639': "afii57433", + '\u063a': "afii57434", + '\u0640': "afii57440", + '\u0641': "afii57441", + '\u0642': "afii57442", + '\u0643': "afii57443", + '\u0644': "afii57444", + '\u0645': "afii57445", + '\u0646': "afii57446", + '\u0648': "afii57448", + '\u0649': "afii57449", + '\u064a': "afii57450", + '\u064b': "afii57451", + '\u064c': "afii57452", + '\u064d': "afii57453", + '\u064e': "afii57454", + '\u064f': "afii57455", + '\u0650': "afii57456", + '\u0651': "afii57457", + '\u0652': "afii57458", + '\u0647': "afii57470", + '\u06a4': "afii57505", + '\u067e': "afii57506", + '\u0686': "afii57507", + '\u0698': "afii57508", + '\u06af': "afii57509", + '\u0679': "afii57511", + '\u0688': "afii57512", + '\u0691': "afii57513", + '\u06ba': "afii57514", + '\u06d2': "afii57519", + '\u06d5': "afii57534", + '\u20aa': "afii57636", + '\u05be': "afii57645", + '\u05c3': "afii57658", + '\u05d0': "afii57664", + '\u05d1': "afii57665", + '\u05d2': "afii57666", + '\u05d3': "afii57667", + '\u05d4': "afii57668", + '\u05d5': "afii57669", + '\u05d6': "afii57670", + '\u05d7': "afii57671", + '\u05d8': "afii57672", + '\u05d9': "afii57673", + '\u05da': "afii57674", + '\u05db': "afii57675", + '\u05dc': "afii57676", + '\u05dd': "afii57677", + '\u05de': "afii57678", + '\u05df': "afii57679", + '\u05e0': "afii57680", + '\u05e1': "afii57681", + '\u05e2': "afii57682", + '\u05e3': "afii57683", + '\u05e4': "afii57684", + '\u05e5': "afii57685", + '\u05e6': "afii57686", + '\u05e7': "afii57687", + '\u05e8': "afii57688", + '\u05e9': "afii57689", + '\u05ea': "afii57690", + '\ufb2a': "afii57694", + '\ufb2b': "afii57695", + '\ufb4b': "afii57700", + '\ufb1f': "afii57705", + '\u05f0': "afii57716", + '\u05f1': "afii57717", + '\u05f2': "afii57718", + '\ufb35': "afii57723", + '\u05b4': "afii57793", + '\u05b5': "afii57794", + '\u05b6': "afii57795", + '\u05bb': "afii57796", + '\u05b8': "afii57797", + '\u05b7': "afii57798", + '\u05b0': "afii57799", + '\u05b2': "afii57800", + '\u05b1': "afii57801", + '\u05b3': "afii57802", + '\u05c2': "afii57803", + '\u05c1': "afii57804", + '\u05b9': "afii57806", + '\u05bc': "afii57807", + '\u05bd': "afii57839", + '\u05bf': "afii57841", + '\u05c0': "afii57842", + '\u02bc': "afii57929", + '\u2105': "afii61248", + '\u2113': "afii61289", + '\u2116': "afii61352", + '\u202c': "afii61573", + '\u202d': "afii61574", + '\u202e': "afii61575", + '\u200c': "afii61664", + '\u066d': "afii63167", + '\u02bd': "afii64937", + '\u00e0': "agrave", + '\u0a85': "agujarati", + '\u0a05': "agurmukhi", + '\u3042': "ahiragana", + '\u1ea3': "ahookabove", + '\u0990': "aibengali", + '\u311e': "aibopomofo", + '\u0910': "aideva", + '\u04d5': "aiecyrillic", + '\u0a90': "aigujarati", + '\u0a10': "aigurmukhi", + '\u0a48': "aimatragurmukhi", + // '\u0639': "ainarabic", // duplicate + '\ufeca': "ainfinalarabic", + '\ufecb': "aininitialarabic", + '\ufecc': "ainmedialarabic", + '\u0203': "ainvertedbreve", + '\u09c8': "aivowelsignbengali", + '\u0948': "aivowelsigndeva", + '\u0ac8': "aivowelsigngujarati", + '\u30a2': "akatakana", + '\uff71': "akatakanahalfwidth", + '\u314f': "akorean", + // '\u05d0': "alef", // duplicate + // '\u0627': "alefarabic", // duplicate + '\ufb30': "alefdageshhebrew", + '\ufe8e': "aleffinalarabic", + // '\u0623': "alefhamzaabovearabic", // duplicate + '\ufe84': "alefhamzaabovefinalarabic", + // '\u0625': "alefhamzabelowarabic", // duplicate + '\ufe88': "alefhamzabelowfinalarabic", + // '\u05d0': "alefhebrew", // duplicate + '\ufb4f': "aleflamedhebrew", + // '\u0622': "alefmaddaabovearabic", // duplicate + '\ufe82': "alefmaddaabovefinalarabic", + // '\u0649': "alefmaksuraarabic", // duplicate + '\ufef0': "alefmaksurafinalarabic", + '\ufef3': "alefmaksurainitialarabic", + '\ufef4': "alefmaksuramedialarabic", + '\ufb2e': "alefpatahhebrew", + '\ufb2f': "alefqamatshebrew", + '\u2135': "aleph", + '\u224c': "allequal", + '\u03b1': "alpha", + '\u03ac': "alphatonos", + '\u0101': "amacron", + '\uff41': "amonospace", + '\u0026': "ampersand", + '\uff06': "ampersandmonospace", + '\uf726': "ampersandsmall", + '\u33c2': "amsquare", + '\u3122': "anbopomofo", + '\u3124': "angbopomofo", + '\u0e5a': "angkhankhuthai", + '\u2220': "angle", + '\u3008': "anglebracketleft", + '\ufe3f': "anglebracketleftvertical", + '\u3009': "anglebracketright", + '\ufe40': "anglebracketrightvertical", + '\u2329': "angleleft", + '\u232a': "angleright", + '\u212b': "angstrom", + '\u0387': "anoteleia", + '\u0952': "anudattadeva", + '\u0982': "anusvarabengali", + '\u0902': "anusvaradeva", + '\u0a82': "anusvaragujarati", + '\u0105': "aogonek", + '\u3300': "apaatosquare", + '\u249c': "aparen", + '\u055a': "apostrophearmenian", + // '\u02bc': "apostrophemod", // duplicate + '\uf8ff': "apple", + '\u2250': "approaches", + '\u2248': "approxequal", + '\u2252': "approxequalorimage", + '\u2245': "approximatelyequal", + '\u318e': "araeaekorean", + '\u318d': "araeakorean", + '\u2312': "arc", + '\u1e9a': "arighthalfring", + '\u00e5': "aring", + '\u01fb': "aringacute", + '\u1e01': "aringbelow", + '\u2194': "arrowboth", + '\u21e3': "arrowdashdown", + '\u21e0': "arrowdashleft", + '\u21e2': "arrowdashright", + '\u21e1': "arrowdashup", + '\u21d4': "arrowdblboth", + '\u21d3': "arrowdbldown", + '\u21d0': "arrowdblleft", + '\u21d2': "arrowdblright", + '\u21d1': "arrowdblup", + '\u2193': "arrowdown", + '\u2199': "arrowdownleft", + '\u2198': "arrowdownright", + '\u21e9': "arrowdownwhite", + '\u02c5': "arrowheaddownmod", + '\u02c2': "arrowheadleftmod", + '\u02c3': "arrowheadrightmod", + '\u02c4': "arrowheadupmod", + '\uf8e7': "arrowhorizex", + '\u2190': "arrowleft", + // '\u21d0': "arrowleftdbl", // duplicate + '\u21cd': "arrowleftdblstroke", + '\u21c6': "arrowleftoverright", + '\u21e6': "arrowleftwhite", + '\u2192': "arrowright", + '\u21cf': "arrowrightdblstroke", + '\u279e': "arrowrightheavy", + '\u21c4': "arrowrightoverleft", + '\u21e8': "arrowrightwhite", + '\u21e4': "arrowtableft", + '\u21e5': "arrowtabright", + '\u2191': "arrowup", + '\u2195': "arrowupdn", + '\u21a8': "arrowupdnbse", + // '\u21a8': "arrowupdownbase", // duplicate + '\u2196': "arrowupleft", + '\u21c5': "arrowupleftofdown", + '\u2197': "arrowupright", + '\u21e7': "arrowupwhite", + '\uf8e6': "arrowvertex", + '\u005e': "asciicircum", + '\uff3e': "asciicircummonospace", + '\u007e': "asciitilde", + '\uff5e': "asciitildemonospace", + '\u0251': "ascript", + '\u0252': "ascriptturned", + '\u3041': "asmallhiragana", + '\u30a1': "asmallkatakana", + '\uff67': "asmallkatakanahalfwidth", + '\u002a': "asterisk", + // '\u066d': "asteriskaltonearabic", // duplicate + // '\u066d': "asteriskarabic", // duplicate + '\u2217': "asteriskmath", + '\uff0a': "asteriskmonospace", + '\ufe61': "asterisksmall", + '\u2042': "asterism", + '\uf6e9': "asuperior", + '\u2243': "asymptoticallyequal", + '\u0040': "at", + '\u00e3': "atilde", + '\uff20': "atmonospace", + '\ufe6b': "atsmall", + '\u0250': "aturned", + '\u0994': "aubengali", + '\u3120': "aubopomofo", + '\u0914': "audeva", + '\u0a94': "augujarati", + '\u0a14': "augurmukhi", + '\u09d7': "aulengthmarkbengali", + '\u0a4c': "aumatragurmukhi", + '\u09cc': "auvowelsignbengali", + '\u094c': "auvowelsigndeva", + '\u0acc': "auvowelsigngujarati", + '\u093d': "avagrahadeva", + '\u0561': "aybarmenian", + // '\u05e2': "ayin", // duplicate + '\ufb20': "ayinaltonehebrew", + // '\u05e2': "ayinhebrew", // duplicate + '\u0062': "b", + '\u09ac': "babengali", + '\u005c': "backslash", + '\uff3c': "backslashmonospace", + '\u092c': "badeva", + '\u0aac': "bagujarati", + '\u0a2c': "bagurmukhi", + '\u3070': "bahiragana", + '\u0e3f': "bahtthai", + '\u30d0': "bakatakana", + '\u007c': "bar", + '\uff5c': "barmonospace", + '\u3105': "bbopomofo", + '\u24d1': "bcircle", + '\u1e03': "bdotaccent", + '\u1e05': "bdotbelow", + '\u266c': "beamedsixteenthnotes", + '\u2235': "because", + // '\u0431': "becyrillic", // duplicate + // '\u0628': "beharabic", // duplicate + '\ufe90': "behfinalarabic", + '\ufe91': "behinitialarabic", + '\u3079': "behiragana", + '\ufe92': "behmedialarabic", + '\ufc9f': "behmeeminitialarabic", + '\ufc08': "behmeemisolatedarabic", + '\ufc6d': "behnoonfinalarabic", + '\u30d9': "bekatakana", + '\u0562': "benarmenian", + // '\u05d1': "bet", // duplicate + '\u03b2': "beta", + '\u03d0': "betasymbolgreek", + '\ufb31': "betdagesh", + // '\ufb31': "betdageshhebrew", // duplicate + // '\u05d1': "bethebrew", // duplicate + '\ufb4c': "betrafehebrew", + '\u09ad': "bhabengali", + '\u092d': "bhadeva", + '\u0aad': "bhagujarati", + '\u0a2d': "bhagurmukhi", + '\u0253': "bhook", + '\u3073': "bihiragana", + '\u30d3': "bikatakana", + '\u0298': "bilabialclick", + '\u0a02': "bindigurmukhi", + '\u3331': "birusquare", + // '\u25cf': "blackcircle", // duplicate + '\u25c6': "blackdiamond", + '\u25bc': "blackdownpointingtriangle", + '\u25c4': "blackleftpointingpointer", + '\u25c0': "blackleftpointingtriangle", + '\u3010': "blacklenticularbracketleft", + '\ufe3b': "blacklenticularbracketleftvertical", + '\u3011': "blacklenticularbracketright", + '\ufe3c': "blacklenticularbracketrightvertical", + '\u25e3': "blacklowerlefttriangle", + '\u25e2': "blacklowerrighttriangle", + '\u25ac': "blackrectangle", + '\u25ba': "blackrightpointingpointer", + '\u25b6': "blackrightpointingtriangle", + // '\u25aa': "blacksmallsquare", // duplicate + '\u263b': "blacksmilingface", + '\u25a0': "blacksquare", + '\u2605': "blackstar", + '\u25e4': "blackupperlefttriangle", + '\u25e5': "blackupperrighttriangle", + '\u25b4': "blackuppointingsmalltriangle", + '\u25b2': "blackuppointingtriangle", + '\u2423': "blank", + '\u1e07': "blinebelow", + '\u2588': "block", + '\uff42': "bmonospace", + '\u0e1a': "bobaimaithai", + '\u307c': "bohiragana", + '\u30dc': "bokatakana", + '\u249d': "bparen", + '\u33c3': "bqsquare", + '\uf8f4': "braceex", + '\u007b': "braceleft", + '\uf8f3': "braceleftbt", + '\uf8f2': "braceleftmid", + '\uff5b': "braceleftmonospace", + '\ufe5b': "braceleftsmall", + '\uf8f1': "bracelefttp", + '\ufe37': "braceleftvertical", + '\u007d': "braceright", + '\uf8fe': "bracerightbt", + '\uf8fd': "bracerightmid", + '\uff5d': "bracerightmonospace", + '\ufe5c': "bracerightsmall", + '\uf8fc': "bracerighttp", + '\ufe38': "bracerightvertical", + '\u005b': "bracketleft", + '\uf8f0': "bracketleftbt", + '\uf8ef': "bracketleftex", + '\uff3b': "bracketleftmonospace", + '\uf8ee': "bracketlefttp", + '\u005d': "bracketright", + '\uf8fb': "bracketrightbt", + '\uf8fa': "bracketrightex", + '\uff3d': "bracketrightmonospace", + '\uf8f9': "bracketrighttp", + '\u02d8': "breve", + '\u032e': "brevebelowcmb", + '\u0306': "brevecmb", + '\u032f': "breveinvertedbelowcmb", + '\u0311': "breveinvertedcmb", + '\u0361': "breveinverteddoublecmb", + '\u032a': "bridgebelowcmb", + '\u033a': "bridgeinvertedbelowcmb", + '\u00a6': "brokenbar", + '\u0180': "bstroke", + '\uf6ea': "bsuperior", + '\u0183': "btopbar", + '\u3076': "buhiragana", + '\u30d6': "bukatakana", + '\u2022': "bullet", + '\u25d8': "bulletinverse", + '\u2219': "bulletoperator", + '\u25ce': "bullseye", + '\u0063': "c", + '\u056e': "caarmenian", + '\u099a': "cabengali", + '\u0107': "cacute", + '\u091a': "cadeva", + '\u0a9a': "cagujarati", + '\u0a1a': "cagurmukhi", + '\u3388': "calsquare", + '\u0981': "candrabindubengali", + '\u0310': "candrabinducmb", + '\u0901': "candrabindudeva", + '\u0a81': "candrabindugujarati", + '\u21ea': "capslock", + // '\u2105': "careof", // duplicate + '\u02c7': "caron", + '\u032c': "caronbelowcmb", + '\u030c': "caroncmb", + '\u21b5': "carriagereturn", + '\u3118': "cbopomofo", + '\u010d': "ccaron", + '\u00e7': "ccedilla", + '\u1e09': "ccedillaacute", + '\u24d2': "ccircle", + '\u0109': "ccircumflex", + '\u0255': "ccurl", + '\u010b': "cdot", + // '\u010b': "cdotaccent", // duplicate + '\u33c5': "cdsquare", + '\u00b8': "cedilla", + '\u0327': "cedillacmb", + '\u00a2': "cent", + '\u2103': "centigrade", + '\uf6df': "centinferior", + '\uffe0': "centmonospace", + '\uf7a2': "centoldstyle", + '\uf6e0': "centsuperior", + '\u0579': "chaarmenian", + '\u099b': "chabengali", + '\u091b': "chadeva", + '\u0a9b': "chagujarati", + '\u0a1b': "chagurmukhi", + '\u3114': "chbopomofo", + '\u04bd': "cheabkhasiancyrillic", + '\u2713': "checkmark", + // '\u0447': "checyrillic", // duplicate + '\u04bf': "chedescenderabkhasiancyrillic", + '\u04b7': "chedescendercyrillic", + '\u04f5': "chedieresiscyrillic", + '\u0573': "cheharmenian", + '\u04cc': "chekhakassiancyrillic", + '\u04b9': "cheverticalstrokecyrillic", + '\u03c7': "chi", + '\u3277': "chieuchacirclekorean", + '\u3217': "chieuchaparenkorean", + '\u3269': "chieuchcirclekorean", + '\u314a': "chieuchkorean", + '\u3209': "chieuchparenkorean", + '\u0e0a': "chochangthai", + '\u0e08': "chochanthai", + '\u0e09': "chochingthai", + '\u0e0c': "chochoethai", + '\u0188': "chook", + '\u3276': "cieucacirclekorean", + '\u3216': "cieucaparenkorean", + '\u3268': "cieuccirclekorean", + '\u3148': "cieuckorean", + '\u3208': "cieucparenkorean", + '\u321c': "cieucuparenkorean", + '\u25cb': "circle", + '\u2297': "circlemultiply", + '\u2299': "circleot", + '\u2295': "circleplus", + '\u3036': "circlepostalmark", + '\u25d0': "circlewithlefthalfblack", + '\u25d1': "circlewithrighthalfblack", + '\u02c6': "circumflex", + '\u032d': "circumflexbelowcmb", + '\u0302': "circumflexcmb", + '\u2327': "clear", + '\u01c2': "clickalveolar", + '\u01c0': "clickdental", + '\u01c1': "clicklateral", + '\u01c3': "clickretroflex", + '\u2663': "club", + // '\u2663': "clubsuitblack", // duplicate + '\u2667': "clubsuitwhite", + '\u33a4': "cmcubedsquare", + '\uff43': "cmonospace", + '\u33a0': "cmsquaredsquare", + '\u0581': "coarmenian", + '\u003a': "colon", + '\u20a1': "colonmonetary", + '\uff1a': "colonmonospace", + // '\u20a1': "colonsign", // duplicate + '\ufe55': "colonsmall", + '\u02d1': "colontriangularhalfmod", + '\u02d0': "colontriangularmod", + '\u002c': "comma", + '\u0313': "commaabovecmb", + '\u0315': "commaaboverightcmb", + '\uf6c3': "commaaccent", + // '\u060c': "commaarabic", // duplicate + '\u055d': "commaarmenian", + '\uf6e1': "commainferior", + '\uff0c': "commamonospace", + '\u0314': "commareversedabovecmb", + // '\u02bd': "commareversedmod", // duplicate + '\ufe50': "commasmall", + '\uf6e2': "commasuperior", + '\u0312': "commaturnedabovecmb", + '\u02bb': "commaturnedmod", + '\u263c': "compass", + // '\u2245': "congruent", // duplicate + '\u222e': "contourintegral", + '\u2303': "control", + '\u0006': "controlACK", + '\u0007': "controlBEL", + '\u0008': "controlBS", + '\u0018': "controlCAN", + '\u000d': "controlCR", + '\u0011': "controlDC1", + '\u0012': "controlDC2", + '\u0013': "controlDC3", + '\u0014': "controlDC4", + '\u007f': "controlDEL", + '\u0010': "controlDLE", + '\u0019': "controlEM", + '\u0005': "controlENQ", + '\u0004': "controlEOT", + '\u001b': "controlESC", + '\u0017': "controlETB", + '\u0003': "controlETX", + '\u000c': "controlFF", + '\u001c': "controlFS", + '\u001d': "controlGS", + '\u0009': "controlHT", + '\u000a': "controlLF", + '\u0015': "controlNAK", + '\u001e': "controlRS", + '\u000f': "controlSI", + '\u000e': "controlSO", + '\u0002': "controlSOT", + '\u0001': "controlSTX", + '\u001a': "controlSUB", + '\u0016': "controlSYN", + '\u001f': "controlUS", + '\u000b': "controlVT", + '\u00a9': "copyright", + '\uf8e9': "copyrightsans", + '\uf6d9': "copyrightserif", + '\u300c': "cornerbracketleft", + '\uff62': "cornerbracketlefthalfwidth", + '\ufe41': "cornerbracketleftvertical", + '\u300d': "cornerbracketright", + '\uff63': "cornerbracketrighthalfwidth", + '\ufe42': "cornerbracketrightvertical", + '\u337f': "corporationsquare", + '\u33c7': "cosquare", + '\u33c6': "coverkgsquare", + '\u249e': "cparen", + '\u20a2': "cruzeiro", + '\u0297': "cstretched", + '\u22cf': "curlyand", + '\u22ce': "curlyor", + '\u00a4': "currency", + '\uf6d1': "cyrBreve", + '\uf6d2': "cyrFlex", + '\uf6d4': "cyrbreve", + '\uf6d5': "cyrflex", + '\u0064': "d", + '\u0564': "daarmenian", + '\u09a6': "dabengali", + // '\u0636': "dadarabic", // duplicate + '\u0926': "dadeva", + '\ufebe': "dadfinalarabic", + '\ufebf': "dadinitialarabic", + '\ufec0': "dadmedialarabic", + // '\u05bc': "dagesh", // duplicate + // '\u05bc': "dageshhebrew", // duplicate + '\u2020': "dagger", + '\u2021': "daggerdbl", + '\u0aa6': "dagujarati", + '\u0a26': "dagurmukhi", + '\u3060': "dahiragana", + '\u30c0': "dakatakana", + // '\u062f': "dalarabic", // duplicate + // '\u05d3': "dalet", // duplicate + '\ufb33': "daletdagesh", + // '\ufb33': "daletdageshhebrew", // duplicate + // '\u05b2': "dalethatafpatah", // duplicate + // '\u05b2': "dalethatafpatahhebrew", // duplicate + // '\u05b1': "dalethatafsegol", // duplicate + // '\u05b1': "dalethatafsegolhebrew", // duplicate + // '\u05d3': "dalethebrew", // duplicate + // '\u05b4': "dalethiriq", // duplicate + // '\u05b4': "dalethiriqhebrew", // duplicate + // '\u05b9': "daletholam", // duplicate + // '\u05b9': "daletholamhebrew", // duplicate + // '\u05b7': "daletpatah", // duplicate + // '\u05b7': "daletpatahhebrew", // duplicate + // '\u05b8': "daletqamats", // duplicate + // '\u05b8': "daletqamatshebrew", // duplicate + // '\u05bb': "daletqubuts", // duplicate + // '\u05bb': "daletqubutshebrew", // duplicate + // '\u05b6': "daletsegol", // duplicate + // '\u05b6': "daletsegolhebrew", // duplicate + // '\u05b0': "daletsheva", // duplicate + // '\u05b0': "daletshevahebrew", // duplicate + // '\u05b5': "dalettsere", // duplicate + // '\u05b5': "dalettserehebrew", // duplicate + '\ufeaa': "dalfinalarabic", + // '\u064f': "dammaarabic", // duplicate + // '\u064f': "dammalowarabic", // duplicate + // '\u064c': "dammatanaltonearabic", // duplicate + // '\u064c': "dammatanarabic", // duplicate + '\u0964': "danda", + '\u05a7': "dargahebrew", + // '\u05a7': "dargalefthebrew", // duplicate + '\u0485': "dasiapneumatacyrilliccmb", + '\uf6d3': "dblGrave", + '\u300a': "dblanglebracketleft", + '\ufe3d': "dblanglebracketleftvertical", + '\u300b': "dblanglebracketright", + '\ufe3e': "dblanglebracketrightvertical", + '\u032b': "dblarchinvertedbelowcmb", + // '\u21d4': "dblarrowleft", // duplicate + // '\u21d2': "dblarrowright", // duplicate + '\u0965': "dbldanda", + '\uf6d6': "dblgrave", + '\u030f': "dblgravecmb", + '\u222c': "dblintegral", + '\u2017': "dbllowline", + '\u0333': "dbllowlinecmb", + '\u033f': "dbloverlinecmb", + '\u02ba': "dblprimemod", + '\u2016': "dblverticalbar", + '\u030e': "dblverticallineabovecmb", + '\u3109': "dbopomofo", + '\u33c8': "dbsquare", + '\u010f': "dcaron", + '\u1e11': "dcedilla", + '\u24d3': "dcircle", + '\u1e13': "dcircumflexbelow", + '\u0111': "dcroat", + '\u09a1': "ddabengali", + '\u0921': "ddadeva", + '\u0aa1': "ddagujarati", + '\u0a21': "ddagurmukhi", + // '\u0688': "ddalarabic", // duplicate + '\ufb89': "ddalfinalarabic", + '\u095c': "dddhadeva", + '\u09a2': "ddhabengali", + '\u0922': "ddhadeva", + '\u0aa2': "ddhagujarati", + '\u0a22': "ddhagurmukhi", + '\u1e0b': "ddotaccent", + '\u1e0d': "ddotbelow", + '\u066b': "decimalseparatorarabic", + // '\u066b': "decimalseparatorpersian", // duplicate + // '\u0434': "decyrillic", // duplicate + '\u00b0': "degree", + '\u05ad': "dehihebrew", + '\u3067': "dehiragana", + '\u03ef': "deicoptic", + '\u30c7': "dekatakana", + '\u232b': "deleteleft", + '\u2326': "deleteright", + '\u03b4': "delta", + '\u018d': "deltaturned", + '\u09f8': "denominatorminusonenumeratorbengali", + '\u02a4': "dezh", + '\u09a7': "dhabengali", + '\u0927': "dhadeva", + '\u0aa7': "dhagujarati", + '\u0a27': "dhagurmukhi", + '\u0257': "dhook", + '\u0385': "dialytikatonos", + '\u0344': "dialytikatonoscmb", + '\u2666': "diamond", + '\u2662': "diamondsuitwhite", + '\u00a8': "dieresis", + '\uf6d7': "dieresisacute", + '\u0324': "dieresisbelowcmb", + '\u0308': "dieresiscmb", + '\uf6d8': "dieresisgrave", + // '\u0385': "dieresistonos", // duplicate + '\u3062': "dihiragana", + '\u30c2': "dikatakana", + '\u3003': "dittomark", + '\u00f7': "divide", + '\u2223': "divides", + '\u2215': "divisionslash", + // '\u0452': "djecyrillic", // duplicate + '\u2593': "dkshade", + '\u1e0f': "dlinebelow", + '\u3397': "dlsquare", + // '\u0111': "dmacron", // duplicate + '\uff44': "dmonospace", + '\u2584': "dnblock", + '\u0e0e': "dochadathai", + '\u0e14': "dodekthai", + '\u3069': "dohiragana", + '\u30c9': "dokatakana", + '\u0024': "dollar", + '\uf6e3': "dollarinferior", + '\uff04': "dollarmonospace", + '\uf724': "dollaroldstyle", + '\ufe69': "dollarsmall", + '\uf6e4': "dollarsuperior", + '\u20ab': "dong", + '\u3326': "dorusquare", + '\u02d9': "dotaccent", + '\u0307': "dotaccentcmb", + '\u0323': "dotbelowcmb", + // '\u0323': "dotbelowcomb", // duplicate + '\u30fb': "dotkatakana", + '\u0131': "dotlessi", + '\uf6be': "dotlessj", + '\u0284': "dotlessjstrokehook", + '\u22c5': "dotmath", + '\u25cc': "dottedcircle", + // '\ufb1f': "doubleyodpatah", // duplicate + // '\ufb1f': "doubleyodpatahhebrew", // duplicate + '\u031e': "downtackbelowcmb", + '\u02d5': "downtackmod", + '\u249f': "dparen", + '\uf6eb': "dsuperior", + '\u0256': "dtail", + '\u018c': "dtopbar", + '\u3065': "duhiragana", + '\u30c5': "dukatakana", + '\u01f3': "dz", + '\u02a3': "dzaltone", + '\u01c6': "dzcaron", + '\u02a5': "dzcurl", + '\u04e1': "dzeabkhasiancyrillic", + // '\u0455': "dzecyrillic", // duplicate + // '\u045f': "dzhecyrillic", // duplicate + '\u0065': "e", + '\u00e9': "eacute", + '\u2641': "earth", + '\u098f': "ebengali", + '\u311c': "ebopomofo", + '\u0115': "ebreve", + '\u090d': "ecandradeva", + '\u0a8d': "ecandragujarati", + '\u0945': "ecandravowelsigndeva", + '\u0ac5': "ecandravowelsigngujarati", + '\u011b': "ecaron", + '\u1e1d': "ecedillabreve", + '\u0565': "echarmenian", + '\u0587': "echyiwnarmenian", + '\u24d4': "ecircle", + '\u00ea': "ecircumflex", + '\u1ebf': "ecircumflexacute", + '\u1e19': "ecircumflexbelow", + '\u1ec7': "ecircumflexdotbelow", + '\u1ec1': "ecircumflexgrave", + '\u1ec3': "ecircumflexhookabove", + '\u1ec5': "ecircumflextilde", + // '\u0454': "ecyrillic", // duplicate + '\u0205': "edblgrave", + '\u090f': "edeva", + '\u00eb': "edieresis", + '\u0117': "edot", + // '\u0117': "edotaccent", // duplicate + '\u1eb9': "edotbelow", + '\u0a0f': "eegurmukhi", + '\u0a47': "eematragurmukhi", + // '\u0444': "efcyrillic", // duplicate + '\u00e8': "egrave", + '\u0a8f': "egujarati", + '\u0567': "eharmenian", + '\u311d': "ehbopomofo", + '\u3048': "ehiragana", + '\u1ebb': "ehookabove", + '\u311f': "eibopomofo", + '\u0038': "eight", + // '\u0668': "eightarabic", // duplicate + '\u09ee': "eightbengali", + '\u2467': "eightcircle", + '\u2791': "eightcircleinversesansserif", + '\u096e': "eightdeva", + '\u2471': "eighteencircle", + '\u2485': "eighteenparen", + '\u2499': "eighteenperiod", + '\u0aee': "eightgujarati", + '\u0a6e': "eightgurmukhi", + // '\u0668': "eighthackarabic", // duplicate + '\u3028': "eighthangzhou", + '\u266b': "eighthnotebeamed", + '\u3227': "eightideographicparen", + '\u2088': "eightinferior", + '\uff18': "eightmonospace", + '\uf738': "eightoldstyle", + '\u247b': "eightparen", + '\u248f': "eightperiod", + '\u06f8': "eightpersian", + '\u2177': "eightroman", + '\u2078': "eightsuperior", + '\u0e58': "eightthai", + '\u0207': "einvertedbreve", + '\u0465': "eiotifiedcyrillic", + '\u30a8': "ekatakana", + '\uff74': "ekatakanahalfwidth", + '\u0a74': "ekonkargurmukhi", + '\u3154': "ekorean", + // '\u043b': "elcyrillic", // duplicate + '\u2208': "element", + '\u246a': "elevencircle", + '\u247e': "elevenparen", + '\u2492': "elevenperiod", + '\u217a': "elevenroman", + '\u2026': "ellipsis", + '\u22ee': "ellipsisvertical", + '\u0113': "emacron", + '\u1e17': "emacronacute", + '\u1e15': "emacrongrave", + // '\u043c': "emcyrillic", // duplicate + '\u2014': "emdash", + '\ufe31': "emdashvertical", + '\uff45': "emonospace", + '\u055b': "emphasismarkarmenian", + '\u2205': "emptyset", + '\u3123': "enbopomofo", + // '\u043d': "encyrillic", // duplicate + '\u2013': "endash", + '\ufe32': "endashvertical", + '\u04a3': "endescendercyrillic", + '\u014b': "eng", + '\u3125': "engbopomofo", + '\u04a5': "enghecyrillic", + '\u04c8': "enhookcyrillic", + '\u2002': "enspace", + '\u0119': "eogonek", + '\u3153': "eokorean", + '\u025b': "eopen", + '\u029a': "eopenclosed", + '\u025c': "eopenreversed", + '\u025e': "eopenreversedclosed", + '\u025d': "eopenreversedhook", + '\u24a0': "eparen", + '\u03b5': "epsilon", + '\u03ad': "epsilontonos", + '\u003d': "equal", + '\uff1d': "equalmonospace", + '\ufe66': "equalsmall", + '\u207c': "equalsuperior", + '\u2261': "equivalence", + '\u3126': "erbopomofo", + // '\u0440': "ercyrillic", // duplicate + '\u0258': "ereversed", + // '\u044d': "ereversedcyrillic", // duplicate + // '\u0441': "escyrillic", // duplicate + '\u04ab': "esdescendercyrillic", + '\u0283': "esh", + '\u0286': "eshcurl", + '\u090e': "eshortdeva", + '\u0946': "eshortvowelsigndeva", + '\u01aa': "eshreversedloop", + '\u0285': "eshsquatreversed", + '\u3047': "esmallhiragana", + '\u30a7': "esmallkatakana", + '\uff6a': "esmallkatakanahalfwidth", + '\u212e': "estimated", + '\uf6ec': "esuperior", + '\u03b7': "eta", + '\u0568': "etarmenian", + '\u03ae': "etatonos", + '\u00f0': "eth", + '\u1ebd': "etilde", + '\u1e1b': "etildebelow", + '\u0591': "etnahtafoukhhebrew", + // '\u0591': "etnahtafoukhlefthebrew", // duplicate + // '\u0591': "etnahtahebrew", // duplicate + // '\u0591': "etnahtalefthebrew", // duplicate + '\u01dd': "eturned", + '\u3161': "eukorean", + // '\u20ac': "euro", // duplicate + '\u09c7': "evowelsignbengali", + '\u0947': "evowelsigndeva", + '\u0ac7': "evowelsigngujarati", + '\u0021': "exclam", + '\u055c': "exclamarmenian", + '\u203c': "exclamdbl", + '\u00a1': "exclamdown", + '\uf7a1': "exclamdownsmall", + '\uff01': "exclammonospace", + '\uf721': "exclamsmall", + '\u2203': "existential", + '\u0292': "ezh", + '\u01ef': "ezhcaron", + '\u0293': "ezhcurl", + '\u01b9': "ezhreversed", + '\u01ba': "ezhtail", + '\u0066': "f", + '\u095e': "fadeva", + '\u0a5e': "fagurmukhi", + '\u2109': "fahrenheit", + // '\u064e': "fathaarabic", // duplicate + // '\u064e': "fathalowarabic", // duplicate + // '\u064b': "fathatanarabic", // duplicate + '\u3108': "fbopomofo", + '\u24d5': "fcircle", + '\u1e1f': "fdotaccent", + // '\u0641': "feharabic", // duplicate + '\u0586': "feharmenian", + '\ufed2': "fehfinalarabic", + '\ufed3': "fehinitialarabic", + '\ufed4': "fehmedialarabic", + '\u03e5': "feicoptic", + '\u2640': "female", + '\ufb00': "ff", + '\ufb03': "ffi", + '\ufb04': "ffl", + '\ufb01': "fi", + '\u246e': "fifteencircle", + '\u2482': "fifteenparen", + '\u2496': "fifteenperiod", + '\u2012': "figuredash", + // '\u25a0': "filledbox", // duplicate + // '\u25ac': "filledrect", // duplicate + // '\u05da': "finalkaf", // duplicate + '\ufb3a': "finalkafdagesh", + // '\ufb3a': "finalkafdageshhebrew", // duplicate + // '\u05da': "finalkafhebrew", // duplicate + // '\u05b8': "finalkafqamats", // duplicate + // '\u05b8': "finalkafqamatshebrew", // duplicate + // '\u05b0': "finalkafsheva", // duplicate + // '\u05b0': "finalkafshevahebrew", // duplicate + // '\u05dd': "finalmem", // duplicate + // '\u05dd': "finalmemhebrew", // duplicate + // '\u05df': "finalnun", // duplicate + // '\u05df': "finalnunhebrew", // duplicate + // '\u05e3': "finalpe", // duplicate + // '\u05e3': "finalpehebrew", // duplicate + // '\u05e5': "finaltsadi", // duplicate + // '\u05e5': "finaltsadihebrew", // duplicate + '\u02c9': "firsttonechinese", + '\u25c9': "fisheye", + // '\u0473': "fitacyrillic", // duplicate + '\u0035': "five", + // '\u0665': "fivearabic", // duplicate + '\u09eb': "fivebengali", + '\u2464': "fivecircle", + '\u278e': "fivecircleinversesansserif", + '\u096b': "fivedeva", + '\u215d': "fiveeighths", + '\u0aeb': "fivegujarati", + '\u0a6b': "fivegurmukhi", + // '\u0665': "fivehackarabic", // duplicate + '\u3025': "fivehangzhou", + '\u3224': "fiveideographicparen", + '\u2085': "fiveinferior", + '\uff15': "fivemonospace", + '\uf735': "fiveoldstyle", + '\u2478': "fiveparen", + '\u248c': "fiveperiod", + '\u06f5': "fivepersian", + '\u2174': "fiveroman", + '\u2075': "fivesuperior", + '\u0e55': "fivethai", + '\ufb02': "fl", + '\u0192': "florin", + '\uff46': "fmonospace", + '\u3399': "fmsquare", + '\u0e1f': "fofanthai", + '\u0e1d': "fofathai", + '\u0e4f': "fongmanthai", + '\u2200': "forall", + '\u0034': "four", + // '\u0664': "fourarabic", // duplicate + '\u09ea': "fourbengali", + '\u2463': "fourcircle", + '\u278d': "fourcircleinversesansserif", + '\u096a': "fourdeva", + '\u0aea': "fourgujarati", + '\u0a6a': "fourgurmukhi", + // '\u0664': "fourhackarabic", // duplicate + '\u3024': "fourhangzhou", + '\u3223': "fourideographicparen", + '\u2084': "fourinferior", + '\uff14': "fourmonospace", + '\u09f7': "fournumeratorbengali", + '\uf734': "fouroldstyle", + '\u2477': "fourparen", + '\u248b': "fourperiod", + '\u06f4': "fourpersian", + '\u2173': "fourroman", + '\u2074': "foursuperior", + '\u246d': "fourteencircle", + '\u2481': "fourteenparen", + '\u2495': "fourteenperiod", + '\u0e54': "fourthai", + '\u02cb': "fourthtonechinese", + '\u24a1': "fparen", + '\u2044': "fraction", + '\u20a3': "franc", + '\u0067': "g", + '\u0997': "gabengali", + '\u01f5': "gacute", + '\u0917': "gadeva", + // '\u06af': "gafarabic", // duplicate + '\ufb93': "gaffinalarabic", + '\ufb94': "gafinitialarabic", + '\ufb95': "gafmedialarabic", + '\u0a97': "gagujarati", + '\u0a17': "gagurmukhi", + '\u304c': "gahiragana", + '\u30ac': "gakatakana", + '\u03b3': "gamma", + '\u0263': "gammalatinsmall", + '\u02e0': "gammasuperior", + '\u03eb': "gangiacoptic", + '\u310d': "gbopomofo", + '\u011f': "gbreve", + '\u01e7': "gcaron", + '\u0123': "gcedilla", + '\u24d6': "gcircle", + '\u011d': "gcircumflex", + // '\u0123': "gcommaaccent", // duplicate + '\u0121': "gdot", + // '\u0121': "gdotaccent", // duplicate + // '\u0433': "gecyrillic", // duplicate + '\u3052': "gehiragana", + '\u30b2': "gekatakana", + '\u2251': "geometricallyequal", + '\u059c': "gereshaccenthebrew", + '\u05f3': "gereshhebrew", + '\u059d': "gereshmuqdamhebrew", + '\u00df': "germandbls", + '\u059e': "gershayimaccenthebrew", + '\u05f4': "gershayimhebrew", + '\u3013': "getamark", + '\u0998': "ghabengali", + '\u0572': "ghadarmenian", + '\u0918': "ghadeva", + '\u0a98': "ghagujarati", + '\u0a18': "ghagurmukhi", + // '\u063a': "ghainarabic", // duplicate + '\ufece': "ghainfinalarabic", + '\ufecf': "ghaininitialarabic", + '\ufed0': "ghainmedialarabic", + '\u0495': "ghemiddlehookcyrillic", + '\u0493': "ghestrokecyrillic", + // '\u0491': "gheupturncyrillic", // duplicate + '\u095a': "ghhadeva", + '\u0a5a': "ghhagurmukhi", + '\u0260': "ghook", + '\u3393': "ghzsquare", + '\u304e': "gihiragana", + '\u30ae': "gikatakana", + '\u0563': "gimarmenian", + // '\u05d2': "gimel", // duplicate + '\ufb32': "gimeldagesh", + // '\ufb32': "gimeldageshhebrew", // duplicate + // '\u05d2': "gimelhebrew", // duplicate + // '\u0453': "gjecyrillic", // duplicate + '\u01be': "glottalinvertedstroke", + '\u0294': "glottalstop", + '\u0296': "glottalstopinverted", + '\u02c0': "glottalstopmod", + '\u0295': "glottalstopreversed", + '\u02c1': "glottalstopreversedmod", + '\u02e4': "glottalstopreversedsuperior", + '\u02a1': "glottalstopstroke", + '\u02a2': "glottalstopstrokereversed", + '\u1e21': "gmacron", + '\uff47': "gmonospace", + '\u3054': "gohiragana", + '\u30b4': "gokatakana", + '\u24a2': "gparen", + '\u33ac': "gpasquare", + '\u2207': "gradient", + '\u0060': "grave", + '\u0316': "gravebelowcmb", + '\u0300': "gravecmb", + // '\u0300': "gravecomb", // duplicate + '\u0953': "gravedeva", + '\u02ce': "gravelowmod", + '\uff40': "gravemonospace", + '\u0340': "gravetonecmb", + '\u003e': "greater", + '\u2265': "greaterequal", + '\u22db': "greaterequalorless", + '\uff1e': "greatermonospace", + '\u2273': "greaterorequivalent", + '\u2277': "greaterorless", + '\u2267': "greateroverequal", + '\ufe65': "greatersmall", + '\u0261': "gscript", + '\u01e5': "gstroke", + '\u3050': "guhiragana", + '\u00ab': "guillemotleft", + '\u00bb': "guillemotright", + '\u2039': "guilsinglleft", + '\u203a': "guilsinglright", + '\u30b0': "gukatakana", + '\u3318': "guramusquare", + '\u33c9': "gysquare", + '\u0068': "h", + '\u04a9': "haabkhasiancyrillic", + '\u06c1': "haaltonearabic", + '\u09b9': "habengali", + '\u04b3': "hadescendercyrillic", + '\u0939': "hadeva", + '\u0ab9': "hagujarati", + '\u0a39': "hagurmukhi", + // '\u062d': "haharabic", // duplicate + '\ufea2': "hahfinalarabic", + '\ufea3': "hahinitialarabic", + '\u306f': "hahiragana", + '\ufea4': "hahmedialarabic", + '\u332a': "haitusquare", + '\u30cf': "hakatakana", + '\uff8a': "hakatakanahalfwidth", + '\u0a4d': "halantgurmukhi", + // '\u0621': "hamzaarabic", // duplicate + // '\u064f': "hamzadammaarabic", // duplicate + // '\u064c': "hamzadammatanarabic", // duplicate + // '\u064e': "hamzafathaarabic", // duplicate + // '\u064b': "hamzafathatanarabic", // duplicate + // '\u0621': "hamzalowarabic", // duplicate + // '\u0650': "hamzalowkasraarabic", // duplicate + // '\u064d': "hamzalowkasratanarabic", // duplicate + // '\u0652': "hamzasukunarabic", // duplicate + '\u3164': "hangulfiller", + // '\u044a': "hardsigncyrillic", // duplicate + '\u21bc': "harpoonleftbarbup", + '\u21c0': "harpoonrightbarbup", + '\u33ca': "hasquare", + // '\u05b2': "hatafpatah", // duplicate + // '\u05b2': "hatafpatah16", // duplicate + // '\u05b2': "hatafpatah23", // duplicate + // '\u05b2': "hatafpatah2f", // duplicate + // '\u05b2': "hatafpatahhebrew", // duplicate + // '\u05b2': "hatafpatahnarrowhebrew", // duplicate + // '\u05b2': "hatafpatahquarterhebrew", // duplicate + // '\u05b2': "hatafpatahwidehebrew", // duplicate + // '\u05b3': "hatafqamats", // duplicate + // '\u05b3': "hatafqamats1b", // duplicate + // '\u05b3': "hatafqamats28", // duplicate + // '\u05b3': "hatafqamats34", // duplicate + // '\u05b3': "hatafqamatshebrew", // duplicate + // '\u05b3': "hatafqamatsnarrowhebrew", // duplicate + // '\u05b3': "hatafqamatsquarterhebrew", // duplicate + // '\u05b3': "hatafqamatswidehebrew", // duplicate + // '\u05b1': "hatafsegol", // duplicate + // '\u05b1': "hatafsegol17", // duplicate + // '\u05b1': "hatafsegol24", // duplicate + // '\u05b1': "hatafsegol30", // duplicate + // '\u05b1': "hatafsegolhebrew", // duplicate + // '\u05b1': "hatafsegolnarrowhebrew", // duplicate + // '\u05b1': "hatafsegolquarterhebrew", // duplicate + // '\u05b1': "hatafsegolwidehebrew", // duplicate + '\u0127': "hbar", + '\u310f': "hbopomofo", + '\u1e2b': "hbrevebelow", + '\u1e29': "hcedilla", + '\u24d7': "hcircle", + '\u0125': "hcircumflex", + '\u1e27': "hdieresis", + '\u1e23': "hdotaccent", + '\u1e25': "hdotbelow", + // '\u05d4': "he", // duplicate + '\u2665': "heart", + // '\u2665': "heartsuitblack", // duplicate + '\u2661': "heartsuitwhite", + '\ufb34': "hedagesh", + // '\ufb34': "hedageshhebrew", // duplicate + // '\u06c1': "hehaltonearabic", // duplicate + // '\u0647': "heharabic", // duplicate + // '\u05d4': "hehebrew", // duplicate + '\ufba7': "hehfinalaltonearabic", + '\ufeea': "hehfinalalttwoarabic", + // '\ufeea': "hehfinalarabic", // duplicate + '\ufba5': "hehhamzaabovefinalarabic", + '\ufba4': "hehhamzaaboveisolatedarabic", + '\ufba8': "hehinitialaltonearabic", + '\ufeeb': "hehinitialarabic", + '\u3078': "hehiragana", + '\ufba9': "hehmedialaltonearabic", + '\ufeec': "hehmedialarabic", + '\u337b': "heiseierasquare", + '\u30d8': "hekatakana", + '\uff8d': "hekatakanahalfwidth", + '\u3336': "hekutaarusquare", + '\u0267': "henghook", + '\u3339': "herutusquare", + // '\u05d7': "het", // duplicate + // '\u05d7': "hethebrew", // duplicate + '\u0266': "hhook", + '\u02b1': "hhooksuperior", + '\u327b': "hieuhacirclekorean", + '\u321b': "hieuhaparenkorean", + '\u326d': "hieuhcirclekorean", + '\u314e': "hieuhkorean", + '\u320d': "hieuhparenkorean", + '\u3072': "hihiragana", + '\u30d2': "hikatakana", + '\uff8b': "hikatakanahalfwidth", + // '\u05b4': "hiriq", // duplicate + // '\u05b4': "hiriq14", // duplicate + // '\u05b4': "hiriq21", // duplicate + // '\u05b4': "hiriq2d", // duplicate + // '\u05b4': "hiriqhebrew", // duplicate + // '\u05b4': "hiriqnarrowhebrew", // duplicate + // '\u05b4': "hiriqquarterhebrew", // duplicate + // '\u05b4': "hiriqwidehebrew", // duplicate + '\u1e96': "hlinebelow", + '\uff48': "hmonospace", + '\u0570': "hoarmenian", + '\u0e2b': "hohipthai", + '\u307b': "hohiragana", + '\u30db': "hokatakana", + '\uff8e': "hokatakanahalfwidth", + // '\u05b9': "holam", // duplicate + // '\u05b9': "holam19", // duplicate + // '\u05b9': "holam26", // duplicate + // '\u05b9': "holam32", // duplicate + // '\u05b9': "holamhebrew", // duplicate + // '\u05b9': "holamnarrowhebrew", // duplicate + // '\u05b9': "holamquarterhebrew", // duplicate + // '\u05b9': "holamwidehebrew", // duplicate + '\u0e2e': "honokhukthai", + '\u0309': "hookabovecomb", + // '\u0309': "hookcmb", // duplicate + '\u0321': "hookpalatalizedbelowcmb", + '\u0322': "hookretroflexbelowcmb", + '\u3342': "hoonsquare", + '\u03e9': "horicoptic", + // '\u2015': "horizontalbar", // duplicate + '\u031b': "horncmb", + '\u2668': "hotsprings", + '\u2302': "house", + '\u24a3': "hparen", + '\u02b0': "hsuperior", + '\u0265': "hturned", + '\u3075': "huhiragana", + '\u3333': "huiitosquare", + '\u30d5': "hukatakana", + '\uff8c': "hukatakanahalfwidth", + '\u02dd': "hungarumlaut", + '\u030b': "hungarumlautcmb", + '\u0195': "hv", + '\u002d': "hyphen", + '\uf6e5': "hypheninferior", + '\uff0d': "hyphenmonospace", + '\ufe63': "hyphensmall", + '\uf6e6': "hyphensuperior", + '\u2010': "hyphentwo", + '\u0069': "i", + '\u00ed': "iacute", + // '\u044f': "iacyrillic", // duplicate + '\u0987': "ibengali", + '\u3127': "ibopomofo", + '\u012d': "ibreve", + '\u01d0': "icaron", + '\u24d8': "icircle", + '\u00ee': "icircumflex", + // '\u0456': "icyrillic", // duplicate + '\u0209': "idblgrave", + '\u328f': "ideographearthcircle", + '\u328b': "ideographfirecircle", + '\u323f': "ideographicallianceparen", + '\u323a': "ideographiccallparen", + '\u32a5': "ideographiccentrecircle", + '\u3006': "ideographicclose", + '\u3001': "ideographiccomma", + '\uff64': "ideographiccommaleft", + '\u3237': "ideographiccongratulationparen", + '\u32a3': "ideographiccorrectcircle", + '\u322f': "ideographicearthparen", + '\u323d': "ideographicenterpriseparen", + '\u329d': "ideographicexcellentcircle", + '\u3240': "ideographicfestivalparen", + '\u3296': "ideographicfinancialcircle", + '\u3236': "ideographicfinancialparen", + '\u322b': "ideographicfireparen", + '\u3232': "ideographichaveparen", + '\u32a4': "ideographichighcircle", + '\u3005': "ideographiciterationmark", + '\u3298': "ideographiclaborcircle", + '\u3238': "ideographiclaborparen", + '\u32a7': "ideographicleftcircle", + '\u32a6': "ideographiclowcircle", + '\u32a9': "ideographicmedicinecircle", + '\u322e': "ideographicmetalparen", + '\u322a': "ideographicmoonparen", + '\u3234': "ideographicnameparen", + '\u3002': "ideographicperiod", + '\u329e': "ideographicprintcircle", + '\u3243': "ideographicreachparen", + '\u3239': "ideographicrepresentparen", + '\u323e': "ideographicresourceparen", + '\u32a8': "ideographicrightcircle", + '\u3299': "ideographicsecretcircle", + '\u3242': "ideographicselfparen", + '\u3233': "ideographicsocietyparen", + '\u3000': "ideographicspace", + '\u3235': "ideographicspecialparen", + '\u3231': "ideographicstockparen", + '\u323b': "ideographicstudyparen", + '\u3230': "ideographicsunparen", + '\u323c': "ideographicsuperviseparen", + '\u322c': "ideographicwaterparen", + '\u322d': "ideographicwoodparen", + '\u3007': "ideographiczero", + '\u328e': "ideographmetalcircle", + '\u328a': "ideographmooncircle", + '\u3294': "ideographnamecircle", + '\u3290': "ideographsuncircle", + '\u328c': "ideographwatercircle", + '\u328d': "ideographwoodcircle", + '\u0907': "ideva", + '\u00ef': "idieresis", + '\u1e2f': "idieresisacute", + '\u04e5': "idieresiscyrillic", + '\u1ecb': "idotbelow", + '\u04d7': "iebrevecyrillic", + // '\u0435': "iecyrillic", // duplicate + '\u3275': "ieungacirclekorean", + '\u3215': "ieungaparenkorean", + '\u3267': "ieungcirclekorean", + '\u3147': "ieungkorean", + '\u3207': "ieungparenkorean", + '\u00ec': "igrave", + '\u0a87': "igujarati", + '\u0a07': "igurmukhi", + '\u3044': "ihiragana", + '\u1ec9': "ihookabove", + '\u0988': "iibengali", + // '\u0438': "iicyrillic", // duplicate + '\u0908': "iideva", + '\u0a88': "iigujarati", + '\u0a08': "iigurmukhi", + '\u0a40': "iimatragurmukhi", + '\u020b': "iinvertedbreve", + // '\u0439': "iishortcyrillic", // duplicate + '\u09c0': "iivowelsignbengali", + '\u0940': "iivowelsigndeva", + '\u0ac0': "iivowelsigngujarati", + '\u0133': "ij", + '\u30a4': "ikatakana", + '\uff72': "ikatakanahalfwidth", + '\u3163': "ikorean", + '\u02dc': "ilde", + '\u05ac': "iluyhebrew", + '\u012b': "imacron", + '\u04e3': "imacroncyrillic", + '\u2253': "imageorapproximatelyequal", + '\u0a3f': "imatragurmukhi", + '\uff49': "imonospace", + // '\u2206': "increment", // duplicate + '\u221e': "infinity", + '\u056b': "iniarmenian", + '\u222b': "integral", + '\u2321': "integralbottom", + // '\u2321': "integralbt", // duplicate + '\uf8f5': "integralex", + '\u2320': "integraltop", + // '\u2320': "integraltp", // duplicate + '\u2229': "intersection", + '\u3305': "intisquare", + // '\u25d8': "invbullet", // duplicate + '\u25d9': "invcircle", + // '\u263b': "invsmileface", // duplicate + // '\u0451': "iocyrillic", // duplicate + '\u012f': "iogonek", + '\u03b9': "iota", + '\u03ca': "iotadieresis", + '\u0390': "iotadieresistonos", + '\u0269': "iotalatin", + '\u03af': "iotatonos", + '\u24a4': "iparen", + '\u0a72': "irigurmukhi", + '\u3043': "ismallhiragana", + '\u30a3': "ismallkatakana", + '\uff68': "ismallkatakanahalfwidth", + '\u09fa': "issharbengali", + '\u0268': "istroke", + '\uf6ed': "isuperior", + '\u309d': "iterationhiragana", + '\u30fd': "iterationkatakana", + '\u0129': "itilde", + '\u1e2d': "itildebelow", + '\u3129': "iubopomofo", + // '\u044e': "iucyrillic", // duplicate + '\u09bf': "ivowelsignbengali", + '\u093f': "ivowelsigndeva", + '\u0abf': "ivowelsigngujarati", + // '\u0475': "izhitsacyrillic", // duplicate + '\u0477': "izhitsadblgravecyrillic", + '\u006a': "j", + '\u0571': "jaarmenian", + '\u099c': "jabengali", + '\u091c': "jadeva", + '\u0a9c': "jagujarati", + '\u0a1c': "jagurmukhi", + '\u3110': "jbopomofo", + '\u01f0': "jcaron", + '\u24d9': "jcircle", + '\u0135': "jcircumflex", + '\u029d': "jcrossedtail", + '\u025f': "jdotlessstroke", + // '\u0458': "jecyrillic", // duplicate + // '\u062c': "jeemarabic", // duplicate + '\ufe9e': "jeemfinalarabic", + '\ufe9f': "jeeminitialarabic", + '\ufea0': "jeemmedialarabic", + // '\u0698': "jeharabic", // duplicate + '\ufb8b': "jehfinalarabic", + '\u099d': "jhabengali", + '\u091d': "jhadeva", + '\u0a9d': "jhagujarati", + '\u0a1d': "jhagurmukhi", + '\u057b': "jheharmenian", + '\u3004': "jis", + '\uff4a': "jmonospace", + '\u24a5': "jparen", + '\u02b2': "jsuperior", + '\u006b': "k", + '\u04a1': "kabashkircyrillic", + '\u0995': "kabengali", + '\u1e31': "kacute", + // '\u043a': "kacyrillic", // duplicate + '\u049b': "kadescendercyrillic", + '\u0915': "kadeva", + // '\u05db': "kaf", // duplicate + // '\u0643': "kafarabic", // duplicate + '\ufb3b': "kafdagesh", + // '\ufb3b': "kafdageshhebrew", // duplicate + '\ufeda': "kaffinalarabic", + // '\u05db': "kafhebrew", // duplicate + '\ufedb': "kafinitialarabic", + '\ufedc': "kafmedialarabic", + '\ufb4d': "kafrafehebrew", + '\u0a95': "kagujarati", + '\u0a15': "kagurmukhi", + '\u304b': "kahiragana", + '\u04c4': "kahookcyrillic", + '\u30ab': "kakatakana", + '\uff76': "kakatakanahalfwidth", + '\u03ba': "kappa", + '\u03f0': "kappasymbolgreek", + '\u3171': "kapyeounmieumkorean", + '\u3184': "kapyeounphieuphkorean", + '\u3178': "kapyeounpieupkorean", + '\u3179': "kapyeounssangpieupkorean", + '\u330d': "karoriisquare", + // '\u0640': "kashidaautoarabic", // duplicate + // '\u0640': "kashidaautonosidebearingarabic", // duplicate + '\u30f5': "kasmallkatakana", + '\u3384': "kasquare", + // '\u0650': "kasraarabic", // duplicate + // '\u064d': "kasratanarabic", // duplicate + '\u049f': "kastrokecyrillic", + '\uff70': "katahiraprolongmarkhalfwidth", + '\u049d': "kaverticalstrokecyrillic", + '\u310e': "kbopomofo", + '\u3389': "kcalsquare", + '\u01e9': "kcaron", + '\u0137': "kcedilla", + '\u24da': "kcircle", + // '\u0137': "kcommaaccent", // duplicate + '\u1e33': "kdotbelow", + '\u0584': "keharmenian", + '\u3051': "kehiragana", + '\u30b1': "kekatakana", + '\uff79': "kekatakanahalfwidth", + '\u056f': "kenarmenian", + '\u30f6': "kesmallkatakana", + '\u0138': "kgreenlandic", + '\u0996': "khabengali", + // '\u0445': "khacyrillic", // duplicate + '\u0916': "khadeva", + '\u0a96': "khagujarati", + '\u0a16': "khagurmukhi", + // '\u062e': "khaharabic", // duplicate + '\ufea6': "khahfinalarabic", + '\ufea7': "khahinitialarabic", + '\ufea8': "khahmedialarabic", + '\u03e7': "kheicoptic", + '\u0959': "khhadeva", + '\u0a59': "khhagurmukhi", + '\u3278': "khieukhacirclekorean", + '\u3218': "khieukhaparenkorean", + '\u326a': "khieukhcirclekorean", + '\u314b': "khieukhkorean", + '\u320a': "khieukhparenkorean", + '\u0e02': "khokhaithai", + '\u0e05': "khokhonthai", + '\u0e03': "khokhuatthai", + '\u0e04': "khokhwaithai", + '\u0e5b': "khomutthai", + '\u0199': "khook", + '\u0e06': "khorakhangthai", + '\u3391': "khzsquare", + '\u304d': "kihiragana", + '\u30ad': "kikatakana", + '\uff77': "kikatakanahalfwidth", + '\u3315': "kiroguramusquare", + '\u3316': "kiromeetorusquare", + '\u3314': "kirosquare", + '\u326e': "kiyeokacirclekorean", + '\u320e': "kiyeokaparenkorean", + '\u3260': "kiyeokcirclekorean", + '\u3131': "kiyeokkorean", + '\u3200': "kiyeokparenkorean", + '\u3133': "kiyeoksioskorean", + // '\u045c': "kjecyrillic", // duplicate + '\u1e35': "klinebelow", + '\u3398': "klsquare", + '\u33a6': "kmcubedsquare", + '\uff4b': "kmonospace", + '\u33a2': "kmsquaredsquare", + '\u3053': "kohiragana", + '\u33c0': "kohmsquare", + '\u0e01': "kokaithai", + '\u30b3': "kokatakana", + '\uff7a': "kokatakanahalfwidth", + '\u331e': "kooposquare", + '\u0481': "koppacyrillic", + '\u327f': "koreanstandardsymbol", + '\u0343': "koroniscmb", + '\u24a6': "kparen", + '\u33aa': "kpasquare", + '\u046f': "ksicyrillic", + '\u33cf': "ktsquare", + '\u029e': "kturned", + '\u304f': "kuhiragana", + '\u30af': "kukatakana", + '\uff78': "kukatakanahalfwidth", + '\u33b8': "kvsquare", + '\u33be': "kwsquare", + '\u006c': "l", + '\u09b2': "labengali", + '\u013a': "lacute", + '\u0932': "ladeva", + '\u0ab2': "lagujarati", + '\u0a32': "lagurmukhi", + '\u0e45': "lakkhangyaothai", + '\ufefc': "lamaleffinalarabic", + '\ufef8': "lamalefhamzaabovefinalarabic", + '\ufef7': "lamalefhamzaaboveisolatedarabic", + '\ufefa': "lamalefhamzabelowfinalarabic", + '\ufef9': "lamalefhamzabelowisolatedarabic", + '\ufefb': "lamalefisolatedarabic", + '\ufef6': "lamalefmaddaabovefinalarabic", + '\ufef5': "lamalefmaddaaboveisolatedarabic", + // '\u0644': "lamarabic", // duplicate + '\u03bb': "lambda", + '\u019b': "lambdastroke", + // '\u05dc': "lamed", // duplicate + '\ufb3c': "lameddagesh", + // '\ufb3c': "lameddageshhebrew", // duplicate + // '\u05dc': "lamedhebrew", // duplicate + // '\u05b9': "lamedholam", // duplicate + // '\u05bc': "lamedholamdagesh", // duplicate + // '\u05bc': "lamedholamdageshhebrew", // duplicate + // '\u05b9': "lamedholamhebrew", // duplicate + '\ufede': "lamfinalarabic", + '\ufcca': "lamhahinitialarabic", + '\ufedf': "laminitialarabic", + '\ufcc9': "lamjeeminitialarabic", + '\ufccb': "lamkhahinitialarabic", + '\ufdf2': "lamlamhehisolatedarabic", + '\ufee0': "lammedialarabic", + '\ufd88': "lammeemhahinitialarabic", + '\ufccc': "lammeeminitialarabic", + // '\ufea0': "lammeemjeeminitialarabic", // duplicate + // '\ufea8': "lammeemkhahinitialarabic", // duplicate + '\u25ef': "largecircle", + '\u019a': "lbar", + '\u026c': "lbelt", + '\u310c': "lbopomofo", + '\u013e': "lcaron", + '\u013c': "lcedilla", + '\u24db': "lcircle", + '\u1e3d': "lcircumflexbelow", + // '\u013c': "lcommaaccent", // duplicate + '\u0140': "ldot", + // '\u0140': "ldotaccent", // duplicate + '\u1e37': "ldotbelow", + '\u1e39': "ldotbelowmacron", + '\u031a': "leftangleabovecmb", + '\u0318': "lefttackbelowcmb", + '\u003c': "less", + '\u2264': "lessequal", + '\u22da': "lessequalorgreater", + '\uff1c': "lessmonospace", + '\u2272': "lessorequivalent", + '\u2276': "lessorgreater", + '\u2266': "lessoverequal", + '\ufe64': "lesssmall", + '\u026e': "lezh", + '\u258c': "lfblock", + '\u026d': "lhookretroflex", + // '\u20a4': "lira", // duplicate + '\u056c': "liwnarmenian", + '\u01c9': "lj", + // '\u0459': "ljecyrillic", // duplicate + '\uf6c0': "ll", + '\u0933': "lladeva", + '\u0ab3': "llagujarati", + '\u1e3b': "llinebelow", + '\u0934': "llladeva", + '\u09e1': "llvocalicbengali", + '\u0961': "llvocalicdeva", + '\u09e3': "llvocalicvowelsignbengali", + '\u0963': "llvocalicvowelsigndeva", + '\u026b': "lmiddletilde", + '\uff4c': "lmonospace", + '\u33d0': "lmsquare", + '\u0e2c': "lochulathai", + '\u2227': "logicaland", + '\u00ac': "logicalnot", + '\u2310': "logicalnotreversed", + '\u2228': "logicalor", + '\u0e25': "lolingthai", + '\u017f': "longs", + '\ufe4e': "lowlinecenterline", + '\u0332': "lowlinecmb", + '\ufe4d': "lowlinedashed", + '\u25ca': "lozenge", + '\u24a7': "lparen", + '\u0142': "lslash", + // '\u2113': "lsquare", // duplicate + '\uf6ee': "lsuperior", + '\u2591': "ltshade", + '\u0e26': "luthai", + '\u098c': "lvocalicbengali", + '\u090c': "lvocalicdeva", + '\u09e2': "lvocalicvowelsignbengali", + '\u0962': "lvocalicvowelsigndeva", + '\u33d3': "lxsquare", + '\u006d': "m", + '\u09ae': "mabengali", + '\u00af': "macron", + '\u0331': "macronbelowcmb", + '\u0304': "macroncmb", + '\u02cd': "macronlowmod", + '\uffe3': "macronmonospace", + '\u1e3f': "macute", + '\u092e': "madeva", + '\u0aae': "magujarati", + '\u0a2e': "magurmukhi", + '\u05a4': "mahapakhhebrew", + // '\u05a4': "mahapakhlefthebrew", // duplicate + '\u307e': "mahiragana", + '\uf895': "maichattawalowleftthai", + '\uf894': "maichattawalowrightthai", + '\u0e4b': "maichattawathai", + '\uf893': "maichattawaupperleftthai", + '\uf88c': "maieklowleftthai", + '\uf88b': "maieklowrightthai", + '\u0e48': "maiekthai", + '\uf88a': "maiekupperleftthai", + '\uf884': "maihanakatleftthai", + '\u0e31': "maihanakatthai", + '\uf889': "maitaikhuleftthai", + '\u0e47': "maitaikhuthai", + '\uf88f': "maitholowleftthai", + '\uf88e': "maitholowrightthai", + '\u0e49': "maithothai", + '\uf88d': "maithoupperleftthai", + '\uf892': "maitrilowleftthai", + '\uf891': "maitrilowrightthai", + '\u0e4a': "maitrithai", + '\uf890': "maitriupperleftthai", + '\u0e46': "maiyamokthai", + '\u30de': "makatakana", + '\uff8f': "makatakanahalfwidth", + '\u2642': "male", + '\u3347': "mansyonsquare", + // '\u05be': "maqafhebrew", // duplicate + // '\u2642': "mars", // duplicate + '\u05af': "masoracirclehebrew", + '\u3383': "masquare", + '\u3107': "mbopomofo", + '\u33d4': "mbsquare", + '\u24dc': "mcircle", + '\u33a5': "mcubedsquare", + '\u1e41': "mdotaccent", + '\u1e43': "mdotbelow", + // '\u0645': "meemarabic", // duplicate + '\ufee2': "meemfinalarabic", + '\ufee3': "meeminitialarabic", + '\ufee4': "meemmedialarabic", + '\ufcd1': "meemmeeminitialarabic", + '\ufc48': "meemmeemisolatedarabic", + '\u334d': "meetorusquare", + '\u3081': "mehiragana", + '\u337e': "meizierasquare", + '\u30e1': "mekatakana", + '\uff92': "mekatakanahalfwidth", + // '\u05de': "mem", // duplicate + '\ufb3e': "memdagesh", + // '\ufb3e': "memdageshhebrew", // duplicate + // '\u05de': "memhebrew", // duplicate + '\u0574': "menarmenian", + '\u05a5': "merkhahebrew", + '\u05a6': "merkhakefulahebrew", + // '\u05a6': "merkhakefulalefthebrew", // duplicate + // '\u05a5': "merkhalefthebrew", // duplicate + '\u0271': "mhook", + '\u3392': "mhzsquare", + '\uff65': "middledotkatakanahalfwidth", + '\u00b7': "middot", + '\u3272': "mieumacirclekorean", + '\u3212': "mieumaparenkorean", + '\u3264': "mieumcirclekorean", + '\u3141': "mieumkorean", + '\u3170': "mieumpansioskorean", + '\u3204': "mieumparenkorean", + '\u316e': "mieumpieupkorean", + '\u316f': "mieumsioskorean", + '\u307f': "mihiragana", + '\u30df': "mikatakana", + '\uff90': "mikatakanahalfwidth", + '\u2212': "minus", + '\u0320': "minusbelowcmb", + '\u2296': "minuscircle", + '\u02d7': "minusmod", + '\u2213': "minusplus", + '\u2032': "minute", + '\u334a': "miribaarusquare", + '\u3349': "mirisquare", + '\u0270': "mlonglegturned", + '\u3396': "mlsquare", + '\u33a3': "mmcubedsquare", + '\uff4d': "mmonospace", + '\u339f': "mmsquaredsquare", + '\u3082': "mohiragana", + '\u33c1': "mohmsquare", + '\u30e2': "mokatakana", + '\uff93': "mokatakanahalfwidth", + '\u33d6': "molsquare", + '\u0e21': "momathai", + '\u33a7': "moverssquare", + '\u33a8': "moverssquaredsquare", + '\u24a8': "mparen", + '\u33ab': "mpasquare", + '\u33b3': "mssquare", + '\uf6ef': "msuperior", + '\u026f': "mturned", + '\u00b5': "mu", + // '\u00b5': "mu1", // duplicate + '\u3382': "muasquare", + '\u226b': "muchgreater", + '\u226a': "muchless", + '\u338c': "mufsquare", + '\u03bc': "mugreek", + '\u338d': "mugsquare", + '\u3080': "muhiragana", + '\u30e0': "mukatakana", + '\uff91': "mukatakanahalfwidth", + '\u3395': "mulsquare", + '\u00d7': "multiply", + '\u339b': "mumsquare", + '\u05a3': "munahhebrew", + // '\u05a3': "munahlefthebrew", // duplicate + '\u266a': "musicalnote", + // '\u266b': "musicalnotedbl", // duplicate + '\u266d': "musicflatsign", + '\u266f': "musicsharpsign", + '\u33b2': "mussquare", + '\u33b6': "muvsquare", + '\u33bc': "muwsquare", + '\u33b9': "mvmegasquare", + '\u33b7': "mvsquare", + '\u33bf': "mwmegasquare", + '\u33bd': "mwsquare", + '\u006e': "n", + '\u09a8': "nabengali", + // '\u2207': "nabla", // duplicate + '\u0144': "nacute", + '\u0928': "nadeva", + '\u0aa8': "nagujarati", + '\u0a28': "nagurmukhi", + '\u306a': "nahiragana", + '\u30ca': "nakatakana", + '\uff85': "nakatakanahalfwidth", + '\u0149': "napostrophe", + '\u3381': "nasquare", + '\u310b': "nbopomofo", + '\u00a0': "nbspace", + '\u0148': "ncaron", + '\u0146': "ncedilla", + '\u24dd': "ncircle", + '\u1e4b': "ncircumflexbelow", + // '\u0146': "ncommaaccent", // duplicate + '\u1e45': "ndotaccent", + '\u1e47': "ndotbelow", + '\u306d': "nehiragana", + '\u30cd': "nekatakana", + '\uff88': "nekatakanahalfwidth", + // '\u20aa': "newsheqelsign", // duplicate + '\u338b': "nfsquare", + '\u0999': "ngabengali", + '\u0919': "ngadeva", + '\u0a99': "ngagujarati", + '\u0a19': "ngagurmukhi", + '\u0e07': "ngonguthai", + '\u3093': "nhiragana", + '\u0272': "nhookleft", + '\u0273': "nhookretroflex", + '\u326f': "nieunacirclekorean", + '\u320f': "nieunaparenkorean", + '\u3135': "nieuncieuckorean", + '\u3261': "nieuncirclekorean", + '\u3136': "nieunhieuhkorean", + '\u3134': "nieunkorean", + '\u3168': "nieunpansioskorean", + '\u3201': "nieunparenkorean", + '\u3167': "nieunsioskorean", + '\u3166': "nieuntikeutkorean", + '\u306b': "nihiragana", + '\u30cb': "nikatakana", + '\uff86': "nikatakanahalfwidth", + '\uf899': "nikhahitleftthai", + '\u0e4d': "nikhahitthai", + '\u0039': "nine", + // '\u0669': "ninearabic", // duplicate + '\u09ef': "ninebengali", + '\u2468': "ninecircle", + '\u2792': "ninecircleinversesansserif", + '\u096f': "ninedeva", + '\u0aef': "ninegujarati", + '\u0a6f': "ninegurmukhi", + // '\u0669': "ninehackarabic", // duplicate + '\u3029': "ninehangzhou", + '\u3228': "nineideographicparen", + '\u2089': "nineinferior", + '\uff19': "ninemonospace", + '\uf739': "nineoldstyle", + '\u247c': "nineparen", + '\u2490': "nineperiod", + '\u06f9': "ninepersian", + '\u2178': "nineroman", + '\u2079': "ninesuperior", + '\u2472': "nineteencircle", + '\u2486': "nineteenparen", + '\u249a': "nineteenperiod", + '\u0e59': "ninethai", + '\u01cc': "nj", + // '\u045a': "njecyrillic", // duplicate + '\u30f3': "nkatakana", + '\uff9d': "nkatakanahalfwidth", + '\u019e': "nlegrightlong", + '\u1e49': "nlinebelow", + '\uff4e': "nmonospace", + '\u339a': "nmsquare", + '\u09a3': "nnabengali", + '\u0923': "nnadeva", + '\u0aa3': "nnagujarati", + '\u0a23': "nnagurmukhi", + '\u0929': "nnnadeva", + '\u306e': "nohiragana", + '\u30ce': "nokatakana", + '\uff89': "nokatakanahalfwidth", + // '\u00a0': "nonbreakingspace", // duplicate + '\u0e13': "nonenthai", + '\u0e19': "nonuthai", + // '\u0646': "noonarabic", // duplicate + '\ufee6': "noonfinalarabic", + // '\u06ba': "noonghunnaarabic", // duplicate + '\ufb9f': "noonghunnafinalarabic", + // '\ufeec': "noonhehinitialarabic", // duplicate + '\ufee7': "nooninitialarabic", + '\ufcd2': "noonjeeminitialarabic", + '\ufc4b': "noonjeemisolatedarabic", + '\ufee8': "noonmedialarabic", + '\ufcd5': "noonmeeminitialarabic", + '\ufc4e': "noonmeemisolatedarabic", + '\ufc8d': "noonnoonfinalarabic", + '\u220c': "notcontains", + '\u2209': "notelement", + // '\u2209': "notelementof", // duplicate + '\u2260': "notequal", + '\u226f': "notgreater", + '\u2271': "notgreaternorequal", + '\u2279': "notgreaternorless", + '\u2262': "notidentical", + '\u226e': "notless", + '\u2270': "notlessnorequal", + '\u2226': "notparallel", + '\u2280': "notprecedes", + '\u2284': "notsubset", + '\u2281': "notsucceeds", + '\u2285': "notsuperset", + '\u0576': "nowarmenian", + '\u24a9': "nparen", + '\u33b1': "nssquare", + '\u207f': "nsuperior", + '\u00f1': "ntilde", + '\u03bd': "nu", + '\u306c': "nuhiragana", + '\u30cc': "nukatakana", + '\uff87': "nukatakanahalfwidth", + '\u09bc': "nuktabengali", + '\u093c': "nuktadeva", + '\u0abc': "nuktagujarati", + '\u0a3c': "nuktagurmukhi", + '\u0023': "numbersign", + '\uff03': "numbersignmonospace", + '\ufe5f': "numbersignsmall", + '\u0374': "numeralsigngreek", + '\u0375': "numeralsignlowergreek", + // '\u2116': "numero", // duplicate + // '\u05e0': "nun", // duplicate + '\ufb40': "nundagesh", + // '\ufb40': "nundageshhebrew", // duplicate + // '\u05e0': "nunhebrew", // duplicate + '\u33b5': "nvsquare", + '\u33bb': "nwsquare", + '\u099e': "nyabengali", + '\u091e': "nyadeva", + '\u0a9e': "nyagujarati", + '\u0a1e': "nyagurmukhi", + '\u006f': "o", + '\u00f3': "oacute", + '\u0e2d': "oangthai", + '\u0275': "obarred", + '\u04e9': "obarredcyrillic", + '\u04eb': "obarreddieresiscyrillic", + '\u0993': "obengali", + '\u311b': "obopomofo", + '\u014f': "obreve", + '\u0911': "ocandradeva", + '\u0a91': "ocandragujarati", + '\u0949': "ocandravowelsigndeva", + '\u0ac9': "ocandravowelsigngujarati", + '\u01d2': "ocaron", + '\u24de': "ocircle", + '\u00f4': "ocircumflex", + '\u1ed1': "ocircumflexacute", + '\u1ed9': "ocircumflexdotbelow", + '\u1ed3': "ocircumflexgrave", + '\u1ed5': "ocircumflexhookabove", + '\u1ed7': "ocircumflextilde", + // '\u043e': "ocyrillic", // duplicate + '\u0151': "odblacute", + '\u020d': "odblgrave", + '\u0913': "odeva", + '\u00f6': "odieresis", + '\u04e7': "odieresiscyrillic", + '\u1ecd': "odotbelow", + '\u0153': "oe", + '\u315a': "oekorean", + '\u02db': "ogonek", + '\u0328': "ogonekcmb", + '\u00f2': "ograve", + '\u0a93': "ogujarati", + '\u0585': "oharmenian", + '\u304a': "ohiragana", + '\u1ecf': "ohookabove", + '\u01a1': "ohorn", + '\u1edb': "ohornacute", + '\u1ee3': "ohorndotbelow", + '\u1edd': "ohorngrave", + '\u1edf': "ohornhookabove", + '\u1ee1': "ohorntilde", + // '\u0151': "ohungarumlaut", // duplicate + '\u01a3': "oi", + '\u020f': "oinvertedbreve", + '\u30aa': "okatakana", + '\uff75': "okatakanahalfwidth", + '\u3157': "okorean", + '\u05ab': "olehebrew", + '\u014d': "omacron", + '\u1e53': "omacronacute", + '\u1e51': "omacrongrave", + '\u0950': "omdeva", + '\u03c9': "omega", + '\u03d6': "omega1", + '\u0461': "omegacyrillic", + '\u0277': "omegalatinclosed", + '\u047b': "omegaroundcyrillic", + '\u047d': "omegatitlocyrillic", + '\u03ce': "omegatonos", + '\u0ad0': "omgujarati", + '\u03bf': "omicron", + '\u03cc': "omicrontonos", + '\uff4f': "omonospace", + '\u0031': "one", + // '\u0661': "onearabic", // duplicate + '\u09e7': "onebengali", + '\u2460': "onecircle", + '\u278a': "onecircleinversesansserif", + '\u0967': "onedeva", + '\u2024': "onedotenleader", + '\u215b': "oneeighth", + '\uf6dc': "onefitted", + '\u0ae7': "onegujarati", + '\u0a67': "onegurmukhi", + // '\u0661': "onehackarabic", // duplicate + '\u00bd': "onehalf", + '\u3021': "onehangzhou", + '\u3220': "oneideographicparen", + '\u2081': "oneinferior", + '\uff11': "onemonospace", + '\u09f4': "onenumeratorbengali", + '\uf731': "oneoldstyle", + '\u2474': "oneparen", + '\u2488': "oneperiod", + '\u06f1': "onepersian", + '\u00bc': "onequarter", + '\u2170': "oneroman", + '\u00b9': "onesuperior", + '\u0e51': "onethai", + '\u2153': "onethird", + '\u01eb': "oogonek", + '\u01ed': "oogonekmacron", + '\u0a13': "oogurmukhi", + '\u0a4b': "oomatragurmukhi", + '\u0254': "oopen", + '\u24aa': "oparen", + '\u25e6': "openbullet", + '\u2325': "option", + '\u00aa': "ordfeminine", + '\u00ba': "ordmasculine", + '\u221f': "orthogonal", + '\u0912': "oshortdeva", + '\u094a': "oshortvowelsigndeva", + '\u00f8': "oslash", + '\u01ff': "oslashacute", + '\u3049': "osmallhiragana", + '\u30a9': "osmallkatakana", + '\uff6b': "osmallkatakanahalfwidth", + // '\u01ff': "ostrokeacute", // duplicate + '\uf6f0': "osuperior", + '\u047f': "otcyrillic", + '\u00f5': "otilde", + '\u1e4d': "otildeacute", + '\u1e4f': "otildedieresis", + '\u3121': "oubopomofo", + '\u203e': "overline", + '\ufe4a': "overlinecenterline", + '\u0305': "overlinecmb", + '\ufe49': "overlinedashed", + '\ufe4c': "overlinedblwavy", + '\ufe4b': "overlinewavy", + // '\u00af': "overscore", // duplicate + '\u09cb': "ovowelsignbengali", + '\u094b': "ovowelsigndeva", + '\u0acb': "ovowelsigngujarati", + '\u0070': "p", + '\u3380': "paampssquare", + '\u332b': "paasentosquare", + '\u09aa': "pabengali", + '\u1e55': "pacute", + '\u092a': "padeva", + '\u21df': "pagedown", + '\u21de': "pageup", + '\u0aaa': "pagujarati", + '\u0a2a': "pagurmukhi", + '\u3071': "pahiragana", + '\u0e2f': "paiyannoithai", + '\u30d1': "pakatakana", + '\u0484': "palatalizationcyrilliccmb", + '\u04c0': "palochkacyrillic", + '\u317f': "pansioskorean", + '\u00b6': "paragraph", + '\u2225': "parallel", + '\u0028': "parenleft", + '\ufd3e': "parenleftaltonearabic", + '\uf8ed': "parenleftbt", + '\uf8ec': "parenleftex", + '\u208d': "parenleftinferior", + '\uff08': "parenleftmonospace", + '\ufe59': "parenleftsmall", + '\u207d': "parenleftsuperior", + '\uf8eb': "parenlefttp", + '\ufe35': "parenleftvertical", + '\u0029': "parenright", + '\ufd3f': "parenrightaltonearabic", + '\uf8f8': "parenrightbt", + '\uf8f7': "parenrightex", + '\u208e': "parenrightinferior", + '\uff09': "parenrightmonospace", + '\ufe5a': "parenrightsmall", + '\u207e': "parenrightsuperior", + '\uf8f6': "parenrighttp", + '\ufe36': "parenrightvertical", + '\u2202': "partialdiff", + // '\u05c0': "paseqhebrew", // duplicate + '\u0599': "pashtahebrew", + '\u33a9': "pasquare", + // '\u05b7': "patah", // duplicate + // '\u05b7': "patah11", // duplicate + // '\u05b7': "patah1d", // duplicate + // '\u05b7': "patah2a", // duplicate + // '\u05b7': "patahhebrew", // duplicate + // '\u05b7': "patahnarrowhebrew", // duplicate + // '\u05b7': "patahquarterhebrew", // duplicate + // '\u05b7': "patahwidehebrew", // duplicate + '\u05a1': "pazerhebrew", + '\u3106': "pbopomofo", + '\u24df': "pcircle", + '\u1e57': "pdotaccent", + // '\u05e4': "pe", // duplicate + // '\u043f': "pecyrillic", // duplicate + '\ufb44': "pedagesh", + // '\ufb44': "pedageshhebrew", // duplicate + '\u333b': "peezisquare", + '\ufb43': "pefinaldageshhebrew", + // '\u067e': "peharabic", // duplicate + '\u057a': "peharmenian", + // '\u05e4': "pehebrew", // duplicate + '\ufb57': "pehfinalarabic", + '\ufb58': "pehinitialarabic", + '\u307a': "pehiragana", + '\ufb59': "pehmedialarabic", + '\u30da': "pekatakana", + '\u04a7': "pemiddlehookcyrillic", + '\ufb4e': "perafehebrew", + '\u0025': "percent", + // '\u066a': "percentarabic", // duplicate + '\uff05': "percentmonospace", + '\ufe6a': "percentsmall", + '\u002e': "period", + '\u0589': "periodarmenian", + // '\u00b7': "periodcentered", // duplicate + '\uff61': "periodhalfwidth", + '\uf6e7': "periodinferior", + '\uff0e': "periodmonospace", + '\ufe52': "periodsmall", + '\uf6e8': "periodsuperior", + '\u0342': "perispomenigreekcmb", + '\u22a5': "perpendicular", + '\u2030': "perthousand", + '\u20a7': "peseta", + '\u338a': "pfsquare", + '\u09ab': "phabengali", + '\u092b': "phadeva", + '\u0aab': "phagujarati", + '\u0a2b': "phagurmukhi", + '\u03c6': "phi", + '\u03d5': "phi1", + '\u327a': "phieuphacirclekorean", + '\u321a': "phieuphaparenkorean", + '\u326c': "phieuphcirclekorean", + '\u314d': "phieuphkorean", + '\u320c': "phieuphparenkorean", + '\u0278': "philatin", + '\u0e3a': "phinthuthai", + // '\u03d5': "phisymbolgreek", // duplicate + '\u01a5': "phook", + '\u0e1e': "phophanthai", + '\u0e1c': "phophungthai", + '\u0e20': "phosamphaothai", + '\u03c0': "pi", + '\u3273': "pieupacirclekorean", + '\u3213': "pieupaparenkorean", + '\u3176': "pieupcieuckorean", + '\u3265': "pieupcirclekorean", + '\u3172': "pieupkiyeokkorean", + '\u3142': "pieupkorean", + '\u3205': "pieupparenkorean", + '\u3174': "pieupsioskiyeokkorean", + '\u3144': "pieupsioskorean", + '\u3175': "pieupsiostikeutkorean", + '\u3177': "pieupthieuthkorean", + '\u3173': "pieuptikeutkorean", + '\u3074': "pihiragana", + '\u30d4': "pikatakana", + // '\u03d6': "pisymbolgreek", // duplicate + '\u0583': "piwrarmenian", + '\u002b': "plus", + '\u031f': "plusbelowcmb", + // '\u2295': "pluscircle", // duplicate + '\u00b1': "plusminus", + '\u02d6': "plusmod", + '\uff0b': "plusmonospace", + '\ufe62': "plussmall", + '\u207a': "plussuperior", + '\uff50': "pmonospace", + '\u33d8': "pmsquare", + '\u307d': "pohiragana", + '\u261f': "pointingindexdownwhite", + '\u261c': "pointingindexleftwhite", + '\u261e': "pointingindexrightwhite", + '\u261d': "pointingindexupwhite", + '\u30dd': "pokatakana", + '\u0e1b': "poplathai", + '\u3012': "postalmark", + '\u3020': "postalmarkface", + '\u24ab': "pparen", + '\u227a': "precedes", + '\u211e': "prescription", + '\u02b9': "primemod", + '\u2035': "primereversed", + '\u220f': "product", + '\u2305': "projective", + '\u30fc': "prolongedkana", + '\u2318': "propellor", + '\u2282': "propersubset", + '\u2283': "propersuperset", + '\u2237': "proportion", + '\u221d': "proportional", + '\u03c8': "psi", + '\u0471': "psicyrillic", + '\u0486': "psilipneumatacyrilliccmb", + '\u33b0': "pssquare", + '\u3077': "puhiragana", + '\u30d7': "pukatakana", + '\u33b4': "pvsquare", + '\u33ba': "pwsquare", + '\u0071': "q", + '\u0958': "qadeva", + '\u05a8': "qadmahebrew", + // '\u0642': "qafarabic", // duplicate + '\ufed6': "qaffinalarabic", + '\ufed7': "qafinitialarabic", + '\ufed8': "qafmedialarabic", + // '\u05b8': "qamats", // duplicate + // '\u05b8': "qamats10", // duplicate + // '\u05b8': "qamats1a", // duplicate + // '\u05b8': "qamats1c", // duplicate + // '\u05b8': "qamats27", // duplicate + // '\u05b8': "qamats29", // duplicate + // '\u05b8': "qamats33", // duplicate + // '\u05b8': "qamatsde", // duplicate + // '\u05b8': "qamatshebrew", // duplicate + // '\u05b8': "qamatsnarrowhebrew", // duplicate + // '\u05b8': "qamatsqatanhebrew", // duplicate + // '\u05b8': "qamatsqatannarrowhebrew", // duplicate + // '\u05b8': "qamatsqatanquarterhebrew", // duplicate + // '\u05b8': "qamatsqatanwidehebrew", // duplicate + // '\u05b8': "qamatsquarterhebrew", // duplicate + // '\u05b8': "qamatswidehebrew", // duplicate + '\u059f': "qarneyparahebrew", + '\u3111': "qbopomofo", + '\u24e0': "qcircle", + '\u02a0': "qhook", + '\uff51': "qmonospace", + // '\u05e7': "qof", // duplicate + '\ufb47': "qofdagesh", + // '\ufb47': "qofdageshhebrew", // duplicate + // '\u05b2': "qofhatafpatah", // duplicate + // '\u05b2': "qofhatafpatahhebrew", // duplicate + // '\u05b1': "qofhatafsegol", // duplicate + // '\u05b1': "qofhatafsegolhebrew", // duplicate + // '\u05e7': "qofhebrew", // duplicate + // '\u05b4': "qofhiriq", // duplicate + // '\u05b4': "qofhiriqhebrew", // duplicate + // '\u05b9': "qofholam", // duplicate + // '\u05b9': "qofholamhebrew", // duplicate + // '\u05b7': "qofpatah", // duplicate + // '\u05b7': "qofpatahhebrew", // duplicate + // '\u05b8': "qofqamats", // duplicate + // '\u05b8': "qofqamatshebrew", // duplicate + // '\u05bb': "qofqubuts", // duplicate + // '\u05bb': "qofqubutshebrew", // duplicate + // '\u05b6': "qofsegol", // duplicate + // '\u05b6': "qofsegolhebrew", // duplicate + // '\u05b0': "qofsheva", // duplicate + // '\u05b0': "qofshevahebrew", // duplicate + // '\u05b5': "qoftsere", // duplicate + // '\u05b5': "qoftserehebrew", // duplicate + '\u24ac': "qparen", + '\u2669': "quarternote", + // '\u05bb': "qubuts", // duplicate + // '\u05bb': "qubuts18", // duplicate + // '\u05bb': "qubuts25", // duplicate + // '\u05bb': "qubuts31", // duplicate + // '\u05bb': "qubutshebrew", // duplicate + // '\u05bb': "qubutsnarrowhebrew", // duplicate + // '\u05bb': "qubutsquarterhebrew", // duplicate + // '\u05bb': "qubutswidehebrew", // duplicate + '\u003f': "question", + // '\u061f': "questionarabic", // duplicate + '\u055e': "questionarmenian", + '\u00bf': "questiondown", + '\uf7bf': "questiondownsmall", + '\u037e': "questiongreek", + '\uff1f': "questionmonospace", + '\uf73f': "questionsmall", + '\u0022': "quotedbl", + '\u201e': "quotedblbase", + '\u201c': "quotedblleft", + '\uff02': "quotedblmonospace", + '\u301e': "quotedblprime", + '\u301d': "quotedblprimereversed", + '\u201d': "quotedblright", + '\u2018': "quoteleft", + '\u201b': "quoteleftreversed", + // '\u201b': "quotereversed", // duplicate + '\u2019': "quoteright", + // '\u0149': "quoterightn", // duplicate + '\u201a': "quotesinglbase", + '\u0027': "quotesingle", + '\uff07': "quotesinglemonospace", + '\u0072': "r", + '\u057c': "raarmenian", + '\u09b0': "rabengali", + '\u0155': "racute", + '\u0930': "radeva", + '\u221a': "radical", + '\uf8e5': "radicalex", + '\u33ae': "radoverssquare", + '\u33af': "radoverssquaredsquare", + '\u33ad': "radsquare", + // '\u05bf': "rafe", // duplicate + // '\u05bf': "rafehebrew", // duplicate + '\u0ab0': "ragujarati", + '\u0a30': "ragurmukhi", + '\u3089': "rahiragana", + '\u30e9': "rakatakana", + '\uff97': "rakatakanahalfwidth", + '\u09f1': "ralowerdiagonalbengali", + '\u09f0': "ramiddlediagonalbengali", + '\u0264': "ramshorn", + '\u2236': "ratio", + '\u3116': "rbopomofo", + '\u0159': "rcaron", + '\u0157': "rcedilla", + '\u24e1': "rcircle", + // '\u0157': "rcommaaccent", // duplicate + '\u0211': "rdblgrave", + '\u1e59': "rdotaccent", + '\u1e5b': "rdotbelow", + '\u1e5d': "rdotbelowmacron", + '\u203b': "referencemark", + '\u2286': "reflexsubset", + '\u2287': "reflexsuperset", + '\u00ae': "registered", + '\uf8e8': "registersans", + '\uf6da': "registerserif", + // '\u0631': "reharabic", // duplicate + '\u0580': "reharmenian", + '\ufeae': "rehfinalarabic", + '\u308c': "rehiragana", + // '\u0644': "rehyehaleflamarabic", // duplicate + '\u30ec': "rekatakana", + '\uff9a': "rekatakanahalfwidth", + // '\u05e8': "resh", // duplicate + '\ufb48': "reshdageshhebrew", + // '\u05b2': "reshhatafpatah", // duplicate + // '\u05b2': "reshhatafpatahhebrew", // duplicate + // '\u05b1': "reshhatafsegol", // duplicate + // '\u05b1': "reshhatafsegolhebrew", // duplicate + // '\u05e8': "reshhebrew", // duplicate + // '\u05b4': "reshhiriq", // duplicate + // '\u05b4': "reshhiriqhebrew", // duplicate + // '\u05b9': "reshholam", // duplicate + // '\u05b9': "reshholamhebrew", // duplicate + // '\u05b7': "reshpatah", // duplicate + // '\u05b7': "reshpatahhebrew", // duplicate + // '\u05b8': "reshqamats", // duplicate + // '\u05b8': "reshqamatshebrew", // duplicate + // '\u05bb': "reshqubuts", // duplicate + // '\u05bb': "reshqubutshebrew", // duplicate + // '\u05b6': "reshsegol", // duplicate + // '\u05b6': "reshsegolhebrew", // duplicate + // '\u05b0': "reshsheva", // duplicate + // '\u05b0': "reshshevahebrew", // duplicate + // '\u05b5': "reshtsere", // duplicate + // '\u05b5': "reshtserehebrew", // duplicate + '\u223d': "reversedtilde", + '\u0597': "reviahebrew", + // '\u0597': "reviamugrashhebrew", // duplicate + // '\u2310': "revlogicalnot", // duplicate + '\u027e': "rfishhook", + '\u027f': "rfishhookreversed", + '\u09dd': "rhabengali", + '\u095d': "rhadeva", + '\u03c1': "rho", + '\u027d': "rhook", + '\u027b': "rhookturned", + '\u02b5': "rhookturnedsuperior", + '\u03f1': "rhosymbolgreek", + '\u02de': "rhotichookmod", + '\u3271': "rieulacirclekorean", + '\u3211': "rieulaparenkorean", + '\u3263': "rieulcirclekorean", + '\u3140': "rieulhieuhkorean", + '\u313a': "rieulkiyeokkorean", + '\u3169': "rieulkiyeoksioskorean", + '\u3139': "rieulkorean", + '\u313b': "rieulmieumkorean", + '\u316c': "rieulpansioskorean", + '\u3203': "rieulparenkorean", + '\u313f': "rieulphieuphkorean", + '\u313c': "rieulpieupkorean", + '\u316b': "rieulpieupsioskorean", + '\u313d': "rieulsioskorean", + '\u313e': "rieulthieuthkorean", + '\u316a': "rieultikeutkorean", + '\u316d': "rieulyeorinhieuhkorean", + // '\u221f': "rightangle", // duplicate + '\u0319': "righttackbelowcmb", + '\u22bf': "righttriangle", + '\u308a': "rihiragana", + '\u30ea': "rikatakana", + '\uff98': "rikatakanahalfwidth", + '\u02da': "ring", + '\u0325': "ringbelowcmb", + '\u030a': "ringcmb", + '\u02bf': "ringhalfleft", + '\u0559': "ringhalfleftarmenian", + '\u031c': "ringhalfleftbelowcmb", + '\u02d3': "ringhalfleftcentered", + '\u02be': "ringhalfright", + '\u0339': "ringhalfrightbelowcmb", + '\u02d2': "ringhalfrightcentered", + '\u0213': "rinvertedbreve", + '\u3351': "rittorusquare", + '\u1e5f': "rlinebelow", + '\u027c': "rlongleg", + '\u027a': "rlonglegturned", + '\uff52': "rmonospace", + '\u308d': "rohiragana", + '\u30ed': "rokatakana", + '\uff9b': "rokatakanahalfwidth", + '\u0e23': "roruathai", + '\u24ad': "rparen", + '\u09dc': "rrabengali", + '\u0931': "rradeva", + '\u0a5c': "rragurmukhi", + // '\u0691': "rreharabic", // duplicate + '\ufb8d': "rrehfinalarabic", + '\u09e0': "rrvocalicbengali", + '\u0960': "rrvocalicdeva", + '\u0ae0': "rrvocalicgujarati", + '\u09c4': "rrvocalicvowelsignbengali", + '\u0944': "rrvocalicvowelsigndeva", + '\u0ac4': "rrvocalicvowelsigngujarati", + '\uf6f1': "rsuperior", + '\u2590': "rtblock", + '\u0279': "rturned", + '\u02b4': "rturnedsuperior", + '\u308b': "ruhiragana", + '\u30eb': "rukatakana", + '\uff99': "rukatakanahalfwidth", + '\u09f2': "rupeemarkbengali", + '\u09f3': "rupeesignbengali", + '\uf6dd': "rupiah", + '\u0e24': "ruthai", + '\u098b': "rvocalicbengali", + '\u090b': "rvocalicdeva", + '\u0a8b': "rvocalicgujarati", + '\u09c3': "rvocalicvowelsignbengali", + '\u0943': "rvocalicvowelsigndeva", + '\u0ac3': "rvocalicvowelsigngujarati", + '\u0073': "s", + '\u09b8': "sabengali", + '\u015b': "sacute", + '\u1e65': "sacutedotaccent", + // '\u0635': "sadarabic", // duplicate + '\u0938': "sadeva", + '\ufeba': "sadfinalarabic", + '\ufebb': "sadinitialarabic", + '\ufebc': "sadmedialarabic", + '\u0ab8': "sagujarati", + '\u0a38': "sagurmukhi", + '\u3055': "sahiragana", + '\u30b5': "sakatakana", + '\uff7b': "sakatakanahalfwidth", + '\ufdfa': "sallallahoualayhewasallamarabic", + // '\u05e1': "samekh", // duplicate + '\ufb41': "samekhdagesh", + // '\ufb41': "samekhdageshhebrew", // duplicate + // '\u05e1': "samekhhebrew", // duplicate + '\u0e32': "saraaathai", + '\u0e41': "saraaethai", + '\u0e44': "saraaimaimalaithai", + '\u0e43': "saraaimaimuanthai", + '\u0e33': "saraamthai", + '\u0e30': "saraathai", + '\u0e40': "saraethai", + '\uf886': "saraiileftthai", + '\u0e35': "saraiithai", + '\uf885': "saraileftthai", + '\u0e34': "saraithai", + '\u0e42': "saraothai", + '\uf888': "saraueeleftthai", + '\u0e37': "saraueethai", + '\uf887': "saraueleftthai", + '\u0e36': "sarauethai", + '\u0e38': "sarauthai", + '\u0e39': "sarauuthai", + '\u3119': "sbopomofo", + '\u0161': "scaron", + '\u1e67': "scarondotaccent", + '\u015f': "scedilla", + '\u0259': "schwa", + // '\u04d9': "schwacyrillic", // duplicate + '\u04db': "schwadieresiscyrillic", + '\u025a': "schwahook", + '\u24e2': "scircle", + '\u015d': "scircumflex", + '\u0219': "scommaaccent", + '\u1e61': "sdotaccent", + '\u1e63': "sdotbelow", + '\u1e69': "sdotbelowdotaccent", + '\u033c': "seagullbelowcmb", + '\u2033': "second", + '\u02ca': "secondtonechinese", + '\u00a7': "section", + // '\u0633': "seenarabic", // duplicate + '\ufeb2': "seenfinalarabic", + '\ufeb3': "seeninitialarabic", + '\ufeb4': "seenmedialarabic", + // '\u05b6': "segol", // duplicate + // '\u05b6': "segol13", // duplicate + // '\u05b6': "segol1f", // duplicate + // '\u05b6': "segol2c", // duplicate + // '\u05b6': "segolhebrew", // duplicate + // '\u05b6': "segolnarrowhebrew", // duplicate + // '\u05b6': "segolquarterhebrew", // duplicate + '\u0592': "segoltahebrew", + // '\u05b6': "segolwidehebrew", // duplicate + '\u057d': "seharmenian", + '\u305b': "sehiragana", + '\u30bb': "sekatakana", + '\uff7e': "sekatakanahalfwidth", + '\u003b': "semicolon", + // '\u061b': "semicolonarabic", // duplicate + '\uff1b': "semicolonmonospace", + '\ufe54': "semicolonsmall", + '\u309c': "semivoicedmarkkana", + '\uff9f': "semivoicedmarkkanahalfwidth", + '\u3322': "sentisquare", + '\u3323': "sentosquare", + '\u0037': "seven", + // '\u0667': "sevenarabic", // duplicate + '\u09ed': "sevenbengali", + '\u2466': "sevencircle", + '\u2790': "sevencircleinversesansserif", + '\u096d': "sevendeva", + '\u215e': "seveneighths", + '\u0aed': "sevengujarati", + '\u0a6d': "sevengurmukhi", + // '\u0667': "sevenhackarabic", // duplicate + '\u3027': "sevenhangzhou", + '\u3226': "sevenideographicparen", + '\u2087': "seveninferior", + '\uff17': "sevenmonospace", + '\uf737': "sevenoldstyle", + '\u247a': "sevenparen", + '\u248e': "sevenperiod", + '\u06f7': "sevenpersian", + '\u2176': "sevenroman", + '\u2077': "sevensuperior", + '\u2470': "seventeencircle", + '\u2484': "seventeenparen", + '\u2498': "seventeenperiod", + '\u0e57': "seventhai", + '\u00ad': "sfthyphen", + '\u0577': "shaarmenian", + '\u09b6': "shabengali", + // '\u0448': "shacyrillic", // duplicate + // '\u0651': "shaddaarabic", // duplicate + '\ufc61': "shaddadammaarabic", + '\ufc5e': "shaddadammatanarabic", + '\ufc60': "shaddafathaarabic", + // '\u064b': "shaddafathatanarabic", // duplicate + '\ufc62': "shaddakasraarabic", + '\ufc5f': "shaddakasratanarabic", + '\u2592': "shade", + // '\u2593': "shadedark", // duplicate + // '\u2591': "shadelight", // duplicate + // '\u2592': "shademedium", // duplicate + '\u0936': "shadeva", + '\u0ab6': "shagujarati", + '\u0a36': "shagurmukhi", + '\u0593': "shalshelethebrew", + '\u3115': "shbopomofo", + // '\u0449': "shchacyrillic", // duplicate + // '\u0634': "sheenarabic", // duplicate + '\ufeb6': "sheenfinalarabic", + '\ufeb7': "sheeninitialarabic", + '\ufeb8': "sheenmedialarabic", + '\u03e3': "sheicoptic", + // '\u20aa': "sheqel", // duplicate + // '\u20aa': "sheqelhebrew", // duplicate + // '\u05b0': "sheva", // duplicate + // '\u05b0': "sheva115", // duplicate + // '\u05b0': "sheva15", // duplicate + // '\u05b0': "sheva22", // duplicate + // '\u05b0': "sheva2e", // duplicate + // '\u05b0': "shevahebrew", // duplicate + // '\u05b0': "shevanarrowhebrew", // duplicate + // '\u05b0': "shevaquarterhebrew", // duplicate + // '\u05b0': "shevawidehebrew", // duplicate + '\u04bb': "shhacyrillic", + '\u03ed': "shimacoptic", + // '\u05e9': "shin", // duplicate + '\ufb49': "shindagesh", + // '\ufb49': "shindageshhebrew", // duplicate + '\ufb2c': "shindageshshindot", + // '\ufb2c': "shindageshshindothebrew", // duplicate + '\ufb2d': "shindageshsindot", + // '\ufb2d': "shindageshsindothebrew", // duplicate + // '\u05c1': "shindothebrew", // duplicate + // '\u05e9': "shinhebrew", // duplicate + // '\ufb2a': "shinshindot", // duplicate + // '\ufb2a': "shinshindothebrew", // duplicate + // '\ufb2b': "shinsindot", // duplicate + // '\ufb2b': "shinsindothebrew", // duplicate + '\u0282': "shook", + '\u03c3': "sigma", + '\u03c2': "sigma1", + // '\u03c2': "sigmafinal", // duplicate + '\u03f2': "sigmalunatesymbolgreek", + '\u3057': "sihiragana", + '\u30b7': "sikatakana", + '\uff7c': "sikatakanahalfwidth", + // '\u05bd': "siluqhebrew", // duplicate + // '\u05bd': "siluqlefthebrew", // duplicate + '\u223c': "similar", + // '\u05c2': "sindothebrew", // duplicate + '\u3274': "siosacirclekorean", + '\u3214': "siosaparenkorean", + '\u317e': "sioscieuckorean", + '\u3266': "sioscirclekorean", + '\u317a': "sioskiyeokkorean", + '\u3145': "sioskorean", + '\u317b': "siosnieunkorean", + '\u3206': "siosparenkorean", + '\u317d': "siospieupkorean", + '\u317c': "siostikeutkorean", + '\u0036': "six", + // '\u0666': "sixarabic", // duplicate + '\u09ec': "sixbengali", + '\u2465': "sixcircle", + '\u278f': "sixcircleinversesansserif", + '\u096c': "sixdeva", + '\u0aec': "sixgujarati", + '\u0a6c': "sixgurmukhi", + // '\u0666': "sixhackarabic", // duplicate + '\u3026': "sixhangzhou", + '\u3225': "sixideographicparen", + '\u2086': "sixinferior", + '\uff16': "sixmonospace", + '\uf736': "sixoldstyle", + '\u2479': "sixparen", + '\u248d': "sixperiod", + '\u06f6': "sixpersian", + '\u2175': "sixroman", + '\u2076': "sixsuperior", + '\u246f': "sixteencircle", + '\u09f9': "sixteencurrencydenominatorbengali", + '\u2483': "sixteenparen", + '\u2497': "sixteenperiod", + '\u0e56': "sixthai", + '\u002f': "slash", + '\uff0f': "slashmonospace", + // '\u017f': "slong", // duplicate + '\u1e9b': "slongdotaccent", + '\u263a': "smileface", + '\uff53': "smonospace", + // '\u05c3': "sofpasuqhebrew", // duplicate + // '\u00ad': "softhyphen", // duplicate + // '\u044c': "softsigncyrillic", // duplicate + '\u305d': "sohiragana", + '\u30bd': "sokatakana", + '\uff7f': "sokatakanahalfwidth", + '\u0338': "soliduslongoverlaycmb", + '\u0337': "solidusshortoverlaycmb", + '\u0e29': "sorusithai", + '\u0e28': "sosalathai", + '\u0e0b': "sosothai", + '\u0e2a': "sosuathai", + '\u0020': "space", + // '\u0020': "spacehackarabic", // duplicate + '\u2660': "spade", + // '\u2660': "spadesuitblack", // duplicate + '\u2664': "spadesuitwhite", + '\u24ae': "sparen", + '\u033b': "squarebelowcmb", + '\u33c4': "squarecc", + '\u339d': "squarecm", + '\u25a9': "squarediagonalcrosshatchfill", + '\u25a4': "squarehorizontalfill", + '\u338f': "squarekg", + '\u339e': "squarekm", + '\u33ce': "squarekmcapital", + '\u33d1': "squareln", + '\u33d2': "squarelog", + '\u338e': "squaremg", + '\u33d5': "squaremil", + '\u339c': "squaremm", + '\u33a1': "squaremsquared", + '\u25a6': "squareorthogonalcrosshatchfill", + '\u25a7': "squareupperlefttolowerrightfill", + '\u25a8': "squareupperrighttolowerleftfill", + '\u25a5': "squareverticalfill", + '\u25a3': "squarewhitewithsmallblack", + '\u33db': "srsquare", + '\u09b7': "ssabengali", + '\u0937': "ssadeva", + '\u0ab7': "ssagujarati", + '\u3149': "ssangcieuckorean", + '\u3185': "ssanghieuhkorean", + '\u3180': "ssangieungkorean", + '\u3132': "ssangkiyeokkorean", + '\u3165': "ssangnieunkorean", + '\u3143': "ssangpieupkorean", + '\u3146': "ssangsioskorean", + '\u3138': "ssangtikeutkorean", + '\uf6f2': "ssuperior", + '\u00a3': "sterling", + '\uffe1': "sterlingmonospace", + '\u0336': "strokelongoverlaycmb", + '\u0335': "strokeshortoverlaycmb", + // '\u2282': "subset", // duplicate + '\u228a': "subsetnotequal", + // '\u2286': "subsetorequal", // duplicate + '\u227b': "succeeds", + '\u220b': "suchthat", + '\u3059': "suhiragana", + '\u30b9': "sukatakana", + '\uff7d': "sukatakanahalfwidth", + // '\u0652': "sukunarabic", // duplicate + '\u2211': "summation", + // '\u263c': "sun", // duplicate + // '\u2283': "superset", // duplicate + '\u228b': "supersetnotequal", + // '\u2287': "supersetorequal", // duplicate + '\u33dc': "svsquare", + '\u337c': "syouwaerasquare", + '\u0074': "t", + '\u09a4': "tabengali", + '\u22a4': "tackdown", + '\u22a3': "tackleft", + '\u0924': "tadeva", + '\u0aa4': "tagujarati", + '\u0a24': "tagurmukhi", + // '\u0637': "taharabic", // duplicate + '\ufec2': "tahfinalarabic", + '\ufec3': "tahinitialarabic", + '\u305f': "tahiragana", + '\ufec4': "tahmedialarabic", + '\u337d': "taisyouerasquare", + '\u30bf': "takatakana", + '\uff80': "takatakanahalfwidth", + // '\u0640': "tatweelarabic", // duplicate + '\u03c4': "tau", + // '\u05ea': "tav", // duplicate + '\ufb4a': "tavdages", + // '\ufb4a': "tavdagesh", // duplicate + // '\ufb4a': "tavdageshhebrew", // duplicate + // '\u05ea': "tavhebrew", // duplicate + '\u0167': "tbar", + '\u310a': "tbopomofo", + '\u0165': "tcaron", + '\u02a8': "tccurl", + '\u0163': "tcedilla", + // '\u0686': "tcheharabic", // duplicate + '\ufb7b': "tchehfinalarabic", + '\ufb7c': "tchehinitialarabic", + '\ufb7d': "tchehmedialarabic", + // '\ufee4': "tchehmeeminitialarabic", // duplicate + '\u24e3': "tcircle", + '\u1e71': "tcircumflexbelow", + // '\u0163': "tcommaaccent", // duplicate + '\u1e97': "tdieresis", + '\u1e6b': "tdotaccent", + '\u1e6d': "tdotbelow", + // '\u0442': "tecyrillic", // duplicate + '\u04ad': "tedescendercyrillic", + // '\u062a': "teharabic", // duplicate + '\ufe96': "tehfinalarabic", + '\ufca2': "tehhahinitialarabic", + '\ufc0c': "tehhahisolatedarabic", + '\ufe97': "tehinitialarabic", + '\u3066': "tehiragana", + '\ufca1': "tehjeeminitialarabic", + '\ufc0b': "tehjeemisolatedarabic", + // '\u0629': "tehmarbutaarabic", // duplicate + '\ufe94': "tehmarbutafinalarabic", + '\ufe98': "tehmedialarabic", + '\ufca4': "tehmeeminitialarabic", + '\ufc0e': "tehmeemisolatedarabic", + '\ufc73': "tehnoonfinalarabic", + '\u30c6': "tekatakana", + '\uff83': "tekatakanahalfwidth", + '\u2121': "telephone", + '\u260e': "telephoneblack", + '\u05a0': "telishagedolahebrew", + '\u05a9': "telishaqetanahebrew", + '\u2469': "tencircle", + '\u3229': "tenideographicparen", + '\u247d': "tenparen", + '\u2491': "tenperiod", + '\u2179': "tenroman", + '\u02a7': "tesh", + // '\u05d8': "tet", // duplicate + '\ufb38': "tetdagesh", + // '\ufb38': "tetdageshhebrew", // duplicate + // '\u05d8': "tethebrew", // duplicate + '\u04b5': "tetsecyrillic", + '\u059b': "tevirhebrew", + // '\u059b': "tevirlefthebrew", // duplicate + '\u09a5': "thabengali", + '\u0925': "thadeva", + '\u0aa5': "thagujarati", + '\u0a25': "thagurmukhi", + // '\u0630': "thalarabic", // duplicate + '\ufeac': "thalfinalarabic", + '\uf898': "thanthakhatlowleftthai", + '\uf897': "thanthakhatlowrightthai", + '\u0e4c': "thanthakhatthai", + '\uf896': "thanthakhatupperleftthai", + // '\u062b': "theharabic", // duplicate + '\ufe9a': "thehfinalarabic", + '\ufe9b': "thehinitialarabic", + '\ufe9c': "thehmedialarabic", + // '\u2203': "thereexists", // duplicate + '\u2234': "therefore", + '\u03b8': "theta", + '\u03d1': "theta1", + // '\u03d1': "thetasymbolgreek", // duplicate + '\u3279': "thieuthacirclekorean", + '\u3219': "thieuthaparenkorean", + '\u326b': "thieuthcirclekorean", + '\u314c': "thieuthkorean", + '\u320b': "thieuthparenkorean", + '\u246c': "thirteencircle", + '\u2480': "thirteenparen", + '\u2494': "thirteenperiod", + '\u0e11': "thonangmonthothai", + '\u01ad': "thook", + '\u0e12': "thophuthaothai", + '\u00fe': "thorn", + '\u0e17': "thothahanthai", + '\u0e10': "thothanthai", + '\u0e18': "thothongthai", + '\u0e16': "thothungthai", + '\u0482': "thousandcyrillic", + '\u066c': "thousandsseparatorarabic", + // '\u066c': "thousandsseparatorpersian", // duplicate + '\u0033': "three", + // '\u0663': "threearabic", // duplicate + '\u09e9': "threebengali", + '\u2462': "threecircle", + '\u278c': "threecircleinversesansserif", + '\u0969': "threedeva", + '\u215c': "threeeighths", + '\u0ae9': "threegujarati", + '\u0a69': "threegurmukhi", + // '\u0663': "threehackarabic", // duplicate + '\u3023': "threehangzhou", + '\u3222': "threeideographicparen", + '\u2083': "threeinferior", + '\uff13': "threemonospace", + '\u09f6': "threenumeratorbengali", + '\uf733': "threeoldstyle", + '\u2476': "threeparen", + '\u248a': "threeperiod", + '\u06f3': "threepersian", + '\u00be': "threequarters", + '\uf6de': "threequartersemdash", + '\u2172': "threeroman", + '\u00b3': "threesuperior", + '\u0e53': "threethai", + '\u3394': "thzsquare", + '\u3061': "tihiragana", + '\u30c1': "tikatakana", + '\uff81': "tikatakanahalfwidth", + '\u3270': "tikeutacirclekorean", + '\u3210': "tikeutaparenkorean", + '\u3262': "tikeutcirclekorean", + '\u3137': "tikeutkorean", + '\u3202': "tikeutparenkorean", + // '\u02dc': "tilde", // duplicate + '\u0330': "tildebelowcmb", + '\u0303': "tildecmb", + // '\u0303': "tildecomb", // duplicate + '\u0360': "tildedoublecmb", + // '\u223c': "tildeoperator", // duplicate + '\u0334': "tildeoverlaycmb", + '\u033e': "tildeverticalcmb", + // '\u2297': "timescircle", // duplicate + '\u0596': "tipehahebrew", + // '\u0596': "tipehalefthebrew", // duplicate + '\u0a70': "tippigurmukhi", + '\u0483': "titlocyrilliccmb", + '\u057f': "tiwnarmenian", + '\u1e6f': "tlinebelow", + '\uff54': "tmonospace", + '\u0569': "toarmenian", + '\u3068': "tohiragana", + '\u30c8': "tokatakana", + '\uff84': "tokatakanahalfwidth", + '\u02e5': "tonebarextrahighmod", + '\u02e9': "tonebarextralowmod", + '\u02e6': "tonebarhighmod", + '\u02e8': "tonebarlowmod", + '\u02e7': "tonebarmidmod", + '\u01bd': "tonefive", + '\u0185': "tonesix", + '\u01a8': "tonetwo", + '\u0384': "tonos", + '\u3327': "tonsquare", + '\u0e0f': "topatakthai", + '\u3014': "tortoiseshellbracketleft", + '\ufe5d': "tortoiseshellbracketleftsmall", + '\ufe39': "tortoiseshellbracketleftvertical", + '\u3015': "tortoiseshellbracketright", + '\ufe5e': "tortoiseshellbracketrightsmall", + '\ufe3a': "tortoiseshellbracketrightvertical", + '\u0e15': "totaothai", + '\u01ab': "tpalatalhook", + '\u24af': "tparen", + '\u2122': "trademark", + '\uf8ea': "trademarksans", + '\uf6db': "trademarkserif", + '\u0288': "tretroflexhook", + // '\u25bc': "triagdn", // duplicate + // '\u25c4': "triaglf", // duplicate + // '\u25ba': "triagrt", // duplicate + // '\u25b2': "triagup", // duplicate + '\u02a6': "ts", + // '\u05e6': "tsadi", // duplicate + '\ufb46': "tsadidagesh", + // '\ufb46': "tsadidageshhebrew", // duplicate + // '\u05e6': "tsadihebrew", // duplicate + // '\u0446': "tsecyrillic", // duplicate + // '\u05b5': "tsere", // duplicate + // '\u05b5': "tsere12", // duplicate + // '\u05b5': "tsere1e", // duplicate + // '\u05b5': "tsere2b", // duplicate + // '\u05b5': "tserehebrew", // duplicate + // '\u05b5': "tserenarrowhebrew", // duplicate + // '\u05b5': "tserequarterhebrew", // duplicate + // '\u05b5': "tserewidehebrew", // duplicate + // '\u045b': "tshecyrillic", // duplicate + '\uf6f3': "tsuperior", + '\u099f': "ttabengali", + '\u091f': "ttadeva", + '\u0a9f': "ttagujarati", + '\u0a1f': "ttagurmukhi", + // '\u0679': "tteharabic", // duplicate + '\ufb67': "ttehfinalarabic", + '\ufb68': "ttehinitialarabic", + '\ufb69': "ttehmedialarabic", + '\u09a0': "tthabengali", + '\u0920': "tthadeva", + '\u0aa0': "tthagujarati", + '\u0a20': "tthagurmukhi", + '\u0287': "tturned", + '\u3064': "tuhiragana", + '\u30c4': "tukatakana", + '\uff82': "tukatakanahalfwidth", + '\u3063': "tusmallhiragana", + '\u30c3': "tusmallkatakana", + '\uff6f': "tusmallkatakanahalfwidth", + '\u246b': "twelvecircle", + '\u247f': "twelveparen", + '\u2493': "twelveperiod", + '\u217b': "twelveroman", + '\u2473': "twentycircle", + '\u5344': "twentyhangzhou", + '\u2487': "twentyparen", + '\u249b': "twentyperiod", + '\u0032': "two", + // '\u0662': "twoarabic", // duplicate + '\u09e8': "twobengali", + '\u2461': "twocircle", + '\u278b': "twocircleinversesansserif", + '\u0968': "twodeva", + '\u2025': "twodotenleader", + // '\u2025': "twodotleader", // duplicate + '\ufe30': "twodotleadervertical", + '\u0ae8': "twogujarati", + '\u0a68': "twogurmukhi", + // '\u0662': "twohackarabic", // duplicate + '\u3022': "twohangzhou", + '\u3221': "twoideographicparen", + '\u2082': "twoinferior", + '\uff12': "twomonospace", + '\u09f5': "twonumeratorbengali", + '\uf732': "twooldstyle", + '\u2475': "twoparen", + '\u2489': "twoperiod", + '\u06f2': "twopersian", + '\u2171': "tworoman", + '\u01bb': "twostroke", + '\u00b2': "twosuperior", + '\u0e52': "twothai", + '\u2154': "twothirds", + '\u0075': "u", + '\u00fa': "uacute", + '\u0289': "ubar", + '\u0989': "ubengali", + '\u3128': "ubopomofo", + '\u016d': "ubreve", + '\u01d4': "ucaron", + '\u24e4': "ucircle", + '\u00fb': "ucircumflex", + '\u1e77': "ucircumflexbelow", + // '\u0443': "ucyrillic", // duplicate + '\u0951': "udattadeva", + '\u0171': "udblacute", + '\u0215': "udblgrave", + '\u0909': "udeva", + '\u00fc': "udieresis", + '\u01d8': "udieresisacute", + '\u1e73': "udieresisbelow", + '\u01da': "udieresiscaron", + '\u04f1': "udieresiscyrillic", + '\u01dc': "udieresisgrave", + '\u01d6': "udieresismacron", + '\u1ee5': "udotbelow", + '\u00f9': "ugrave", + '\u0a89': "ugujarati", + '\u0a09': "ugurmukhi", + '\u3046': "uhiragana", + '\u1ee7': "uhookabove", + '\u01b0': "uhorn", + '\u1ee9': "uhornacute", + '\u1ef1': "uhorndotbelow", + '\u1eeb': "uhorngrave", + '\u1eed': "uhornhookabove", + '\u1eef': "uhorntilde", + // '\u0171': "uhungarumlaut", // duplicate + '\u04f3': "uhungarumlautcyrillic", + '\u0217': "uinvertedbreve", + '\u30a6': "ukatakana", + '\uff73': "ukatakanahalfwidth", + '\u0479': "ukcyrillic", + '\u315c': "ukorean", + '\u016b': "umacron", + '\u04ef': "umacroncyrillic", + '\u1e7b': "umacrondieresis", + '\u0a41': "umatragurmukhi", + '\uff55': "umonospace", + '\u005f': "underscore", + // '\u2017': "underscoredbl", // duplicate + '\uff3f': "underscoremonospace", + '\ufe33': "underscorevertical", + '\ufe4f': "underscorewavy", + '\u222a': "union", + // '\u2200': "universal", // duplicate + '\u0173': "uogonek", + '\u24b0': "uparen", + '\u2580': "upblock", + '\u05c4': "upperdothebrew", + '\u03c5': "upsilon", + '\u03cb': "upsilondieresis", + '\u03b0': "upsilondieresistonos", + '\u028a': "upsilonlatin", + '\u03cd': "upsilontonos", + '\u031d': "uptackbelowcmb", + '\u02d4': "uptackmod", + '\u0a73': "uragurmukhi", + '\u016f': "uring", + // '\u045e': "ushortcyrillic", // duplicate + '\u3045': "usmallhiragana", + '\u30a5': "usmallkatakana", + '\uff69': "usmallkatakanahalfwidth", + '\u04af': "ustraightcyrillic", + '\u04b1': "ustraightstrokecyrillic", + '\u0169': "utilde", + '\u1e79': "utildeacute", + '\u1e75': "utildebelow", + '\u098a': "uubengali", + '\u090a': "uudeva", + '\u0a8a': "uugujarati", + '\u0a0a': "uugurmukhi", + '\u0a42': "uumatragurmukhi", + '\u09c2': "uuvowelsignbengali", + '\u0942': "uuvowelsigndeva", + '\u0ac2': "uuvowelsigngujarati", + '\u09c1': "uvowelsignbengali", + '\u0941': "uvowelsigndeva", + '\u0ac1': "uvowelsigngujarati", + '\u0076': "v", + '\u0935': "vadeva", + '\u0ab5': "vagujarati", + '\u0a35': "vagurmukhi", + '\u30f7': "vakatakana", + // '\u05d5': "vav", // duplicate + // '\ufb35': "vavdagesh", // duplicate + // '\ufb35': "vavdagesh65", // duplicate + // '\ufb35': "vavdageshhebrew", // duplicate + // '\u05d5': "vavhebrew", // duplicate + // '\ufb4b': "vavholam", // duplicate + // '\ufb4b': "vavholamhebrew", // duplicate + // '\u05f0': "vavvavhebrew", // duplicate + // '\u05f1': "vavyodhebrew", // duplicate + '\u24e5': "vcircle", + '\u1e7f': "vdotbelow", + // '\u0432': "vecyrillic", // duplicate + // '\u06a4': "veharabic", // duplicate + '\ufb6b': "vehfinalarabic", + '\ufb6c': "vehinitialarabic", + '\ufb6d': "vehmedialarabic", + '\u30f9': "vekatakana", + // '\u2640': "venus", // duplicate + // '\u007c': "verticalbar", // duplicate + '\u030d': "verticallineabovecmb", + '\u0329': "verticallinebelowcmb", + '\u02cc': "verticallinelowmod", + '\u02c8': "verticallinemod", + '\u057e': "vewarmenian", + '\u028b': "vhook", + '\u30f8': "vikatakana", + '\u09cd': "viramabengali", + '\u094d': "viramadeva", + '\u0acd': "viramagujarati", + '\u0983': "visargabengali", + '\u0903': "visargadeva", + '\u0a83': "visargagujarati", + '\uff56': "vmonospace", + '\u0578': "voarmenian", + '\u309e': "voicediterationhiragana", + '\u30fe': "voicediterationkatakana", + '\u309b': "voicedmarkkana", + '\uff9e': "voicedmarkkanahalfwidth", + '\u30fa': "vokatakana", + '\u24b1': "vparen", + '\u1e7d': "vtilde", + '\u028c': "vturned", + '\u3094': "vuhiragana", + '\u30f4': "vukatakana", + '\u0077': "w", + '\u1e83': "wacute", + '\u3159': "waekorean", + '\u308f': "wahiragana", + '\u30ef': "wakatakana", + '\uff9c': "wakatakanahalfwidth", + '\u3158': "wakorean", + '\u308e': "wasmallhiragana", + '\u30ee': "wasmallkatakana", + '\u3357': "wattosquare", + '\u301c': "wavedash", + '\ufe34': "wavyunderscorevertical", + // '\u0648': "wawarabic", // duplicate + '\ufeee': "wawfinalarabic", + // '\u0624': "wawhamzaabovearabic", // duplicate + '\ufe86': "wawhamzaabovefinalarabic", + '\u33dd': "wbsquare", + '\u24e6': "wcircle", + '\u0175': "wcircumflex", + '\u1e85': "wdieresis", + '\u1e87': "wdotaccent", + '\u1e89': "wdotbelow", + '\u3091': "wehiragana", + '\u2118': "weierstrass", + '\u30f1': "wekatakana", + '\u315e': "wekorean", + '\u315d': "weokorean", + '\u1e81': "wgrave", + // '\u25e6': "whitebullet", // duplicate + // '\u25cb': "whitecircle", // duplicate + // '\u25d9': "whitecircleinverse", // duplicate + '\u300e': "whitecornerbracketleft", + '\ufe43': "whitecornerbracketleftvertical", + '\u300f': "whitecornerbracketright", + '\ufe44': "whitecornerbracketrightvertical", + '\u25c7': "whitediamond", + '\u25c8': "whitediamondcontainingblacksmalldiamond", + '\u25bf': "whitedownpointingsmalltriangle", + '\u25bd': "whitedownpointingtriangle", + '\u25c3': "whiteleftpointingsmalltriangle", + '\u25c1': "whiteleftpointingtriangle", + '\u3016': "whitelenticularbracketleft", + '\u3017': "whitelenticularbracketright", + '\u25b9': "whiterightpointingsmalltriangle", + '\u25b7': "whiterightpointingtriangle", + // '\u25ab': "whitesmallsquare", // duplicate + // '\u263a': "whitesmilingface", // duplicate + // '\u25a1': "whitesquare", // duplicate + '\u2606': "whitestar", + '\u260f': "whitetelephone", + '\u3018': "whitetortoiseshellbracketleft", + '\u3019': "whitetortoiseshellbracketright", + '\u25b5': "whiteuppointingsmalltriangle", + '\u25b3': "whiteuppointingtriangle", + '\u3090': "wihiragana", + '\u30f0': "wikatakana", + '\u315f': "wikorean", + '\uff57': "wmonospace", + '\u3092': "wohiragana", + '\u30f2': "wokatakana", + '\uff66': "wokatakanahalfwidth", + '\u20a9': "won", + '\uffe6': "wonmonospace", + '\u0e27': "wowaenthai", + '\u24b2': "wparen", + '\u1e98': "wring", + '\u02b7': "wsuperior", + '\u028d': "wturned", + '\u01bf': "wynn", + '\u0078': "x", + '\u033d': "xabovecmb", + '\u3112': "xbopomofo", + '\u24e7': "xcircle", + '\u1e8d': "xdieresis", + '\u1e8b': "xdotaccent", + '\u056d': "xeharmenian", + '\u03be': "xi", + '\uff58': "xmonospace", + '\u24b3': "xparen", + '\u02e3': "xsuperior", + '\u0079': "y", + '\u334e': "yaadosquare", + '\u09af': "yabengali", + '\u00fd': "yacute", + '\u092f': "yadeva", + '\u3152': "yaekorean", + '\u0aaf': "yagujarati", + '\u0a2f': "yagurmukhi", + '\u3084': "yahiragana", + '\u30e4': "yakatakana", + '\uff94': "yakatakanahalfwidth", + '\u3151': "yakorean", + '\u0e4e': "yamakkanthai", + '\u3083': "yasmallhiragana", + '\u30e3': "yasmallkatakana", + '\uff6c': "yasmallkatakanahalfwidth", + // '\u0463': "yatcyrillic", // duplicate + '\u24e8': "ycircle", + '\u0177': "ycircumflex", + '\u00ff': "ydieresis", + '\u1e8f': "ydotaccent", + '\u1ef5': "ydotbelow", + // '\u064a': "yeharabic", // duplicate + // '\u06d2': "yehbarreearabic", // duplicate + '\ufbaf': "yehbarreefinalarabic", + '\ufef2': "yehfinalarabic", + // '\u0626': "yehhamzaabovearabic", // duplicate + '\ufe8a': "yehhamzaabovefinalarabic", + '\ufe8b': "yehhamzaaboveinitialarabic", + '\ufe8c': "yehhamzaabovemedialarabic", + // '\ufef3': "yehinitialarabic", // duplicate + // '\ufef4': "yehmedialarabic", // duplicate + '\ufcdd': "yehmeeminitialarabic", + '\ufc58': "yehmeemisolatedarabic", + '\ufc94': "yehnoonfinalarabic", + '\u06d1': "yehthreedotsbelowarabic", + '\u3156': "yekorean", + '\u00a5': "yen", + '\uffe5': "yenmonospace", + '\u3155': "yeokorean", + '\u3186': "yeorinhieuhkorean", + '\u05aa': "yerahbenyomohebrew", + // '\u05aa': "yerahbenyomolefthebrew", // duplicate + // '\u044b': "yericyrillic", // duplicate + '\u04f9': "yerudieresiscyrillic", + '\u3181': "yesieungkorean", + '\u3183': "yesieungpansioskorean", + '\u3182': "yesieungsioskorean", + '\u059a': "yetivhebrew", + '\u1ef3': "ygrave", + '\u01b4': "yhook", + '\u1ef7': "yhookabove", + '\u0575': "yiarmenian", + // '\u0457': "yicyrillic", // duplicate + '\u3162': "yikorean", + '\u262f': "yinyang", + '\u0582': "yiwnarmenian", + '\uff59': "ymonospace", + // '\u05d9': "yod", // duplicate + '\ufb39': "yoddagesh", + // '\ufb39': "yoddageshhebrew", // duplicate + // '\u05d9': "yodhebrew", // duplicate + // '\u05f2': "yodyodhebrew", // duplicate + // '\ufb1f': "yodyodpatahhebrew", // duplicate + '\u3088': "yohiragana", + '\u3189': "yoikorean", + '\u30e8': "yokatakana", + '\uff96': "yokatakanahalfwidth", + '\u315b': "yokorean", + '\u3087': "yosmallhiragana", + '\u30e7': "yosmallkatakana", + '\uff6e': "yosmallkatakanahalfwidth", + '\u03f3': "yotgreek", + '\u3188': "yoyaekorean", + '\u3187': "yoyakorean", + '\u0e22': "yoyakthai", + '\u0e0d': "yoyingthai", + '\u24b4': "yparen", + '\u037a': "ypogegrammeni", + '\u0345': "ypogegrammenigreekcmb", + '\u01a6': "yr", + '\u1e99': "yring", + '\u02b8': "ysuperior", + '\u1ef9': "ytilde", + '\u028e': "yturned", + '\u3086': "yuhiragana", + '\u318c': "yuikorean", + '\u30e6': "yukatakana", + '\uff95': "yukatakanahalfwidth", + '\u3160': "yukorean", + '\u046b': "yusbigcyrillic", + '\u046d': "yusbigiotifiedcyrillic", + '\u0467': "yuslittlecyrillic", + '\u0469': "yuslittleiotifiedcyrillic", + '\u3085': "yusmallhiragana", + '\u30e5': "yusmallkatakana", + '\uff6d': "yusmallkatakanahalfwidth", + '\u318b': "yuyekorean", + '\u318a': "yuyeokorean", + '\u09df': "yyabengali", + '\u095f': "yyadeva", + '\u007a': "z", + '\u0566': "zaarmenian", + '\u017a': "zacute", + '\u095b': "zadeva", + '\u0a5b': "zagurmukhi", + // '\u0638': "zaharabic", // duplicate + '\ufec6': "zahfinalarabic", + '\ufec7': "zahinitialarabic", + '\u3056': "zahiragana", + '\ufec8': "zahmedialarabic", + // '\u0632': "zainarabic", // duplicate + '\ufeb0': "zainfinalarabic", + '\u30b6': "zakatakana", + '\u0595': "zaqefgadolhebrew", + '\u0594': "zaqefqatanhebrew", + '\u0598': "zarqahebrew", + // '\u05d6': "zayin", // duplicate + '\ufb36': "zayindagesh", + // '\ufb36': "zayindageshhebrew", // duplicate + // '\u05d6': "zayinhebrew", // duplicate + '\u3117': "zbopomofo", + '\u017e': "zcaron", + '\u24e9': "zcircle", + '\u1e91': "zcircumflex", + '\u0291': "zcurl", + '\u017c': "zdot", + // '\u017c': "zdotaccent", // duplicate + '\u1e93': "zdotbelow", + // '\u0437': "zecyrillic", // duplicate + '\u0499': "zedescendercyrillic", + '\u04df': "zedieresiscyrillic", + '\u305c': "zehiragana", + '\u30bc': "zekatakana", + '\u0030': "zero", + // '\u0660': "zeroarabic", // duplicate + '\u09e6': "zerobengali", + '\u0966': "zerodeva", + '\u0ae6': "zerogujarati", + '\u0a66': "zerogurmukhi", + // '\u0660': "zerohackarabic", // duplicate + '\u2080': "zeroinferior", + '\uff10': "zeromonospace", + '\uf730': "zerooldstyle", + '\u06f0': "zeropersian", + '\u2070': "zerosuperior", + '\u0e50': "zerothai", + '\ufeff': "zerowidthjoiner", + // '\u200c': "zerowidthnonjoiner", // duplicate + '\u200b': "zerowidthspace", + '\u03b6': "zeta", + '\u3113': "zhbopomofo", + '\u056a': "zhearmenian", + '\u04c2': "zhebrevecyrillic", + // '\u0436': "zhecyrillic", // duplicate + '\u0497': "zhedescendercyrillic", + '\u04dd': "zhedieresiscyrillic", + '\u3058': "zihiragana", + '\u30b8': "zikatakana", + '\u05ae': "zinorhebrew", + '\u1e95': "zlinebelow", + '\uff5a': "zmonospace", + '\u305e': "zohiragana", + '\u30be': "zokatakana", + '\u24b5': "zparen", + '\u0290': "zretroflexhook", + '\u01b6': "zstroke", + '\u305a': "zuhiragana", + '\u30ba': "zukatakana", +} diff --git a/internal/pdf/model/textencoding/glyphs_zapfdingbats.go b/internal/pdf/model/textencoding/glyphs_zapfdingbats.go new file mode 100644 index 0000000..d20273c --- /dev/null +++ b/internal/pdf/model/textencoding/glyphs_zapfdingbats.go @@ -0,0 +1,409 @@ +package textencoding + +var zapfdingbatsGlyphToRuneMap = map[string]rune{ + "a1": '\u2701', + "a10": '\u2721', + "a100": '\u275e', + "a101": '\u2761', + "a102": '\u2762', + "a103": '\u2763', + "a104": '\u2764', + "a105": '\u2710', + "a106": '\u2765', + "a107": '\u2766', + "a108": '\u2767', + "a109": '\u2660', + "a11": '\u261b', + "a110": '\u2665', + "a111": '\u2666', + "a112": '\u2663', + "a117": '\u2709', + "a118": '\u2708', + "a119": '\u2707', + "a12": '\u261e', + "a120": '\u2460', + "a121": '\u2461', + "a122": '\u2462', + "a123": '\u2463', + "a124": '\u2464', + "a125": '\u2465', + "a126": '\u2466', + "a127": '\u2467', + "a128": '\u2468', + "a129": '\u2469', + "a13": '\u270c', + "a130": '\u2776', + "a131": '\u2777', + "a132": '\u2778', + "a133": '\u2779', + "a134": '\u277a', + "a135": '\u277b', + "a136": '\u277c', + "a137": '\u277d', + "a138": '\u277e', + "a139": '\u277f', + "a14": '\u270d', + "a140": '\u2780', + "a141": '\u2781', + "a142": '\u2782', + "a143": '\u2783', + "a144": '\u2784', + "a145": '\u2785', + "a146": '\u2786', + "a147": '\u2787', + "a148": '\u2788', + "a149": '\u2789', + "a15": '\u270e', + "a150": '\u278a', + "a151": '\u278b', + "a152": '\u278c', + "a153": '\u278d', + "a154": '\u278e', + "a155": '\u278f', + "a156": '\u2790', + "a157": '\u2791', + "a158": '\u2792', + "a159": '\u2793', + "a16": '\u270f', + "a160": '\u2794', + "a161": '\u2192', + "a162": '\u27a3', + "a163": '\u2194', + "a164": '\u2195', + "a165": '\u2799', + "a166": '\u279b', + "a167": '\u279c', + "a168": '\u279d', + "a169": '\u279e', + "a17": '\u2711', + "a170": '\u279f', + "a171": '\u27a0', + "a172": '\u27a1', + "a173": '\u27a2', + "a174": '\u27a4', + "a175": '\u27a5', + "a176": '\u27a6', + "a177": '\u27a7', + "a178": '\u27a8', + "a179": '\u27a9', + "a18": '\u2712', + "a180": '\u27ab', + "a181": '\u27ad', + "a182": '\u27af', + "a183": '\u27b2', + "a184": '\u27b3', + "a185": '\u27b5', + "a186": '\u27b8', + "a187": '\u27ba', + "a188": '\u27bb', + "a189": '\u27bc', + "a19": '\u2713', + "a190": '\u27bd', + "a191": '\u27be', + "a192": '\u279a', + "a193": '\u27aa', + "a194": '\u27b6', + "a195": '\u27b9', + "a196": '\u2798', + "a197": '\u27b4', + "a198": '\u27b7', + "a199": '\u27ac', + "a2": '\u2702', + "a20": '\u2714', + "a200": '\u27ae', + "a201": '\u27b1', + "a202": '\u2703', + "a203": '\u2750', + "a204": '\u2752', + "a205": '\u276e', + "a206": '\u2770', + "a21": '\u2715', + "a22": '\u2716', + "a23": '\u2717', + "a24": '\u2718', + "a25": '\u2719', + "a26": '\u271a', + "a27": '\u271b', + "a28": '\u271c', + "a29": '\u2722', + "a3": '\u2704', + "a30": '\u2723', + "a31": '\u2724', + "a32": '\u2725', + "a33": '\u2726', + "a34": '\u2727', + "a35": '\u2605', + "a36": '\u2729', + "a37": '\u272a', + "a38": '\u272b', + "a39": '\u272c', + "a4": '\u260e', + "a40": '\u272d', + "a41": '\u272e', + "a42": '\u272f', + "a43": '\u2730', + "a44": '\u2731', + "a45": '\u2732', + "a46": '\u2733', + "a47": '\u2734', + "a48": '\u2735', + "a49": '\u2736', + "a5": '\u2706', + "a50": '\u2737', + "a51": '\u2738', + "a52": '\u2739', + "a53": '\u273a', + "a54": '\u273b', + "a55": '\u273c', + "a56": '\u273d', + "a57": '\u273e', + "a58": '\u273f', + "a59": '\u2740', + "a6": '\u271d', + "a60": '\u2741', + "a61": '\u2742', + "a62": '\u2743', + "a63": '\u2744', + "a64": '\u2745', + "a65": '\u2746', + "a66": '\u2747', + "a67": '\u2748', + "a68": '\u2749', + "a69": '\u274a', + "a7": '\u271e', + "a70": '\u274b', + "a71": '\u25cf', + "a72": '\u274d', + "a73": '\u25a0', + "a74": '\u274f', + "a75": '\u2751', + "a76": '\u25b2', + "a77": '\u25bc', + "a78": '\u25c6', + "a79": '\u2756', + "a8": '\u271f', + "a81": '\u25d7', + "a82": '\u2758', + "a83": '\u2759', + "a84": '\u275a', + "a85": '\u276f', + "a86": '\u2771', + "a87": '\u2772', + "a88": '\u2773', + "a89": '\u2768', + "a9": '\u2720', + "a90": '\u2769', + "a91": '\u276c', + "a92": '\u276d', + "a93": '\u276a', + "a94": '\u276b', + "a95": '\u2774', + "a96": '\u2775', + "a97": '\u275b', + "a98": '\u275c', + "a99": '\u275d', +} + +var zapfdingbatsRuneToGlyphMap = map[rune]string{ + '\u2701': "a1", + '\u2721': "a10", + '\u275e': "a100", + '\u2761': "a101", + '\u2762': "a102", + '\u2763': "a103", + '\u2764': "a104", + '\u2710': "a105", + '\u2765': "a106", + '\u2766': "a107", + '\u2767': "a108", + '\u2660': "a109", + '\u261b': "a11", + '\u2665': "a110", + '\u2666': "a111", + '\u2663': "a112", + '\u2709': "a117", + '\u2708': "a118", + '\u2707': "a119", + '\u261e': "a12", + '\u2460': "a120", + '\u2461': "a121", + '\u2462': "a122", + '\u2463': "a123", + '\u2464': "a124", + '\u2465': "a125", + '\u2466': "a126", + '\u2467': "a127", + '\u2468': "a128", + '\u2469': "a129", + '\u270c': "a13", + '\u2776': "a130", + '\u2777': "a131", + '\u2778': "a132", + '\u2779': "a133", + '\u277a': "a134", + '\u277b': "a135", + '\u277c': "a136", + '\u277d': "a137", + '\u277e': "a138", + '\u277f': "a139", + '\u270d': "a14", + '\u2780': "a140", + '\u2781': "a141", + '\u2782': "a142", + '\u2783': "a143", + '\u2784': "a144", + '\u2785': "a145", + '\u2786': "a146", + '\u2787': "a147", + '\u2788': "a148", + '\u2789': "a149", + '\u270e': "a15", + '\u278a': "a150", + '\u278b': "a151", + '\u278c': "a152", + '\u278d': "a153", + '\u278e': "a154", + '\u278f': "a155", + '\u2790': "a156", + '\u2791': "a157", + '\u2792': "a158", + '\u2793': "a159", + '\u270f': "a16", + '\u2794': "a160", + '\u2192': "a161", + '\u27a3': "a162", + '\u2194': "a163", + '\u2195': "a164", + '\u2799': "a165", + '\u279b': "a166", + '\u279c': "a167", + '\u279d': "a168", + '\u279e': "a169", + '\u2711': "a17", + '\u279f': "a170", + '\u27a0': "a171", + '\u27a1': "a172", + '\u27a2': "a173", + '\u27a4': "a174", + '\u27a5': "a175", + '\u27a6': "a176", + '\u27a7': "a177", + '\u27a8': "a178", + '\u27a9': "a179", + '\u2712': "a18", + '\u27ab': "a180", + '\u27ad': "a181", + '\u27af': "a182", + '\u27b2': "a183", + '\u27b3': "a184", + '\u27b5': "a185", + '\u27b8': "a186", + '\u27ba': "a187", + '\u27bb': "a188", + '\u27bc': "a189", + '\u2713': "a19", + '\u27bd': "a190", + '\u27be': "a191", + '\u279a': "a192", + '\u27aa': "a193", + '\u27b6': "a194", + '\u27b9': "a195", + '\u2798': "a196", + '\u27b4': "a197", + '\u27b7': "a198", + '\u27ac': "a199", + '\u2702': "a2", + '\u2714': "a20", + '\u27ae': "a200", + '\u27b1': "a201", + '\u2703': "a202", + '\u2750': "a203", + '\u2752': "a204", + '\u276e': "a205", + '\u2770': "a206", + '\u2715': "a21", + '\u2716': "a22", + '\u2717': "a23", + '\u2718': "a24", + '\u2719': "a25", + '\u271a': "a26", + '\u271b': "a27", + '\u271c': "a28", + '\u2722': "a29", + '\u2704': "a3", + '\u2723': "a30", + '\u2724': "a31", + '\u2725': "a32", + '\u2726': "a33", + '\u2727': "a34", + '\u2605': "a35", + '\u2729': "a36", + '\u272a': "a37", + '\u272b': "a38", + '\u272c': "a39", + '\u260e': "a4", + '\u272d': "a40", + '\u272e': "a41", + '\u272f': "a42", + '\u2730': "a43", + '\u2731': "a44", + '\u2732': "a45", + '\u2733': "a46", + '\u2734': "a47", + '\u2735': "a48", + '\u2736': "a49", + '\u2706': "a5", + '\u2737': "a50", + '\u2738': "a51", + '\u2739': "a52", + '\u273a': "a53", + '\u273b': "a54", + '\u273c': "a55", + '\u273d': "a56", + '\u273e': "a57", + '\u273f': "a58", + '\u2740': "a59", + '\u271d': "a6", + '\u2741': "a60", + '\u2742': "a61", + '\u2743': "a62", + '\u2744': "a63", + '\u2745': "a64", + '\u2746': "a65", + '\u2747': "a66", + '\u2748': "a67", + '\u2749': "a68", + '\u274a': "a69", + '\u271e': "a7", + '\u274b': "a70", + '\u25cf': "a71", + '\u274d': "a72", + '\u25a0': "a73", + '\u274f': "a74", + '\u2751': "a75", + '\u25b2': "a76", + '\u25bc': "a77", + '\u25c6': "a78", + '\u2756': "a79", + '\u271f': "a8", + '\u25d7': "a81", + '\u2758': "a82", + '\u2759': "a83", + '\u275a': "a84", + '\u276f': "a85", + '\u2771': "a86", + '\u2772': "a87", + '\u2773': "a88", + '\u2768': "a89", + '\u2720': "a9", + '\u2769': "a90", + '\u276c': "a91", + '\u276d': "a92", + '\u276a': "a93", + '\u276b': "a94", + '\u2774': "a95", + '\u2775': "a96", + '\u275b': "a97", + '\u275c': "a98", + '\u275d': "a99", +} diff --git a/internal/pdf/model/textencoding/symbol.go b/internal/pdf/model/textencoding/symbol.go new file mode 100644 index 0000000..63976b5 --- /dev/null +++ b/internal/pdf/model/textencoding/symbol.go @@ -0,0 +1,496 @@ +package textencoding + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// Encoding for Symbol font. +type SymbolEncoder struct { +} + +func NewSymbolEncoder() SymbolEncoder { + encoder := SymbolEncoder{} + return encoder +} + +// Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF. +func (enc SymbolEncoder) Encode(raw string) string { + encoded := []byte{} + for _, rune := range raw { + code, found := enc.RuneToCharcode(rune) + if !found { + continue + } + + encoded = append(encoded, code) + } + + return string(encoded) +} + +// Conversion between character code and glyph name. +// The bool return flag is true if there was a match, and false otherwise. +func (enc SymbolEncoder) CharcodeToGlyph(code byte) (string, bool) { + glyph, has := symbolEncodingCharcodeToGlyphMap[code] + if !has { + common.Log.Debug("Symbol encoding error: unable to find charcode->glyph entry (%v)", code) + return "", false + } + return glyph, true +} + +// Conversion between glyph name and character code. +// The bool return flag is true if there was a match, and false otherwise. +func (enc SymbolEncoder) GlyphToCharcode(glyph string) (byte, bool) { + code, found := symbolEncodingGlyphToCharcodeMap[glyph] + if !found { + common.Log.Debug("Symbol encoding error: unable to find glyph->charcode entry (%s)", glyph) + return 0, false + } + + return code, found +} + +// Convert rune to character code. +// The bool return flag is true if there was a match, and false otherwise. +func (enc SymbolEncoder) RuneToCharcode(val rune) (byte, bool) { + glyph, found := runeToGlyph(val, glyphlistRuneToGlyphMap) + if !found { + common.Log.Debug("Symbol encoding error: unable to find rune->glyph entry (%v)", val) + return 0, false + } + + code, found := symbolEncodingGlyphToCharcodeMap[glyph] + if !found { + common.Log.Debug("Symbol encoding error: unable to find glyph->charcode entry (%s)", glyph) + return 0, false + } + + return code, true +} + +// Convert character code to rune. +// The bool return flag is true if there was a match, and false otherwise. +func (enc SymbolEncoder) CharcodeToRune(charcode byte) (rune, bool) { + glyph, found := symbolEncodingCharcodeToGlyphMap[charcode] + if !found { + common.Log.Debug("Symbol encoding error: unable to find charcode->glyph entry (%d)", charcode) + return 0, false + } + + val, found := glyphToRune(glyph, glyphlistGlyphToRuneMap) + if !found { + return 0, false + } + + return val, true +} + +// Convert rune to glyph name. +// The bool return flag is true if there was a match, and false otherwise. +func (enc SymbolEncoder) RuneToGlyph(val rune) (string, bool) { + return runeToGlyph(val, glyphlistRuneToGlyphMap) +} + +// Convert glyph to rune. +// The bool return flag is true if there was a match, and false otherwise. +func (enc SymbolEncoder) GlyphToRune(glyph string) (rune, bool) { + return glyphToRune(glyph, glyphlistGlyphToRuneMap) +} + +// Convert to PDF Object. +func (enc SymbolEncoder) ToPdfObject() core.PdfObject { + dict := core.MakeDict() + dict.Set("Type", core.MakeName("Encoding")) + + // Returning an empty Encoding object with no differences. Indicates that we are using the font's built-in + // encoding. + return core.MakeIndirectObject(dict) +} + +// Charcode to Glyph map (Symbol encoding) +var symbolEncodingCharcodeToGlyphMap map[byte]string = map[byte]string{ + 32: "space", + 33: "exclam", + 34: "universal", + 35: "numbersign", + 36: "existential", + 37: "percent", + 38: "ampersand", + 39: "suchthat", + 40: "parenleft", + 41: "parenright", + 42: "asteriskmath", + 43: "plus", + 44: "comma", + 45: "minus", + 46: "period", + 47: "slash", + 48: "zero", + 49: "one", + 50: "two", + 51: "three", + 52: "four", + 53: "five", + 54: "six", + 55: "seven", + 56: "eight", + 57: "nine", + 58: "colon", + 59: "semicolon", + 60: "less", + 61: "equal", + 62: "greater", + 63: "question", + 64: "congruent", + 65: "Alpha", + 66: "Beta", + 67: "Chi", + 68: "Delta", + 69: "Epsilon", + 70: "Phi", + 71: "Gamma", + 72: "Eta", + 73: "Iota", + 74: "theta1", + 75: "Kappa", + 76: "Lambda", + 77: "Mu", + 78: "Nu", + 79: "Omicron", + 80: "Pi", + 81: "Theta", + 82: "Rho", + 83: "Sigma", + 84: "Tau", + 85: "Upsilon", + 86: "sigma1", + 87: "Omega", + 88: "Xi", + 89: "Psi", + 90: "Zeta", + 91: "bracketleft", + 92: "therefore", + 93: "bracketright", + 94: "perpendicular", + 95: "underscore", + 96: "radicalex", + 97: "alpha", + 98: "beta", + 99: "chi", + 100: "delta", + 101: "epsilon", + 102: "phi", + 103: "gamma", + 104: "eta", + 105: "iota", + 106: "phi1", + 107: "kappa", + 108: "lambda", + 109: "mu", + 110: "nu", + 111: "omicron", + 112: "pi", + 113: "theta", + 114: "rho", + 115: "sigma", + 116: "tau", + 117: "upsilon", + 118: "omega1", + 119: "omega", + 120: "xi", + 121: "psi", + 122: "zeta", + 123: "braceleft", + 124: "bar", + 125: "braceright", + 126: "similar", + 160: "Euro", + 161: "Upsilon1", + 162: "minute", + 163: "lessequal", + 164: "fraction", + 165: "infinity", + 166: "florin", + 167: "club", + 168: "diamond", + 169: "heart", + 170: "spade", + 171: "arrowboth", + 172: "arrowleft", + 173: "arrowup", + 174: "arrowright", + 175: "arrowdown", + 176: "degree", + 177: "plusminus", + 178: "second", + 179: "greaterequal", + 180: "multiply", + 181: "proportional", + 182: "partialdiff", + 183: "bullet", + 184: "divide", + 185: "notequal", + 186: "equivalence", + 187: "approxequal", + 188: "ellipsis", + 189: "arrowvertex", + 190: "arrowhorizex", + 191: "carriagereturn", + 192: "aleph", + 193: "Ifraktur", + 194: "Rfraktur", + 195: "weierstrass", + 196: "circlemultiply", + 197: "circleplus", + 198: "emptyset", + 199: "intersection", + 200: "union", + 201: "propersuperset", + 202: "reflexsuperset", + 203: "notsubset", + 204: "propersubset", + 205: "reflexsubset", + 206: "element", + 207: "notelement", + 208: "angle", + 209: "gradient", + 210: "registerserif", + 211: "copyrightserif", + 212: "trademarkserif", + 213: "product", + 214: "radical", + 215: "dotmath", + 216: "logicalnot", + 217: "logicaland", + 218: "logicalor", + 219: "arrowdblboth", + 220: "arrowdblleft", + 221: "arrowdblup", + 222: "arrowdblright", + 223: "arrowdbldown", + 224: "lozenge", + 225: "angleleft", + 226: "registersans", + 227: "copyrightsans", + 228: "trademarksans", + 229: "summation", + 230: "parenlefttp", + 231: "parenleftex", + 232: "parenleftbt", + 233: "bracketlefttp", + 234: "bracketleftex", + 235: "bracketleftbt", + 236: "bracelefttp", + 237: "braceleftmid", + 238: "braceleftbt", + 239: "braceex", + 241: "angleright", + 242: "integral", + 243: "integraltp", + 244: "integralex", + 245: "integralbt", + 246: "parenrighttp", + 247: "parenrightex", + 248: "parenrightbt", + 249: "bracketrighttp", + 250: "bracketrightex", + 251: "bracketrightbt", + 252: "bracerighttp", + 253: "bracerightmid", + 254: "bracerightbt", +} + +// Glyph to charcode map (Symbol encoding). +var symbolEncodingGlyphToCharcodeMap map[string]byte = map[string]byte{ + "space": 32, + "exclam": 33, + "universal": 34, + "numbersign": 35, + "existential": 36, + "percent": 37, + "ampersand": 38, + "suchthat": 39, + "parenleft": 40, + "parenright": 41, + "asteriskmath": 42, + "plus": 43, + "comma": 44, + "minus": 45, + "period": 46, + "slash": 47, + "zero": 48, + "one": 49, + "two": 50, + "three": 51, + "four": 52, + "five": 53, + "six": 54, + "seven": 55, + "eight": 56, + "nine": 57, + "colon": 58, + "semicolon": 59, + "less": 60, + "equal": 61, + "greater": 62, + "question": 63, + "congruent": 64, + "Alpha": 65, + "Beta": 66, + "Chi": 67, + "Delta": 68, + "Epsilon": 69, + "Phi": 70, + "Gamma": 71, + "Eta": 72, + "Iota": 73, + "theta1": 74, + "Kappa": 75, + "Lambda": 76, + "Mu": 77, + "Nu": 78, + "Omicron": 79, + "Pi": 80, + "Theta": 81, + "Rho": 82, + "Sigma": 83, + "Tau": 84, + "Upsilon": 85, + "sigma1": 86, + "Omega": 87, + "Xi": 88, + "Psi": 89, + "Zeta": 90, + "bracketleft": 91, + "therefore": 92, + "bracketright": 93, + "perpendicular": 94, + "underscore": 95, + "radicalex": 96, + "alpha": 97, + "beta": 98, + "chi": 99, + "delta": 100, + "epsilon": 101, + "phi": 102, + "gamma": 103, + "eta": 104, + "iota": 105, + "phi1": 106, + "kappa": 107, + "lambda": 108, + "mu": 109, + "nu": 110, + "omicron": 111, + "pi": 112, + "theta": 113, + "rho": 114, + "sigma": 115, + "tau": 116, + "upsilon": 117, + "omega1": 118, + "omega": 119, + "xi": 120, + "psi": 121, + "zeta": 122, + "braceleft": 123, + "bar": 124, + "braceright": 125, + "similar": 126, + "Euro": 160, + "Upsilon1": 161, + "minute": 162, + "lessequal": 163, + "fraction": 164, + "infinity": 165, + "florin": 166, + "club": 167, + "diamond": 168, + "heart": 169, + "spade": 170, + "arrowboth": 171, + "arrowleft": 172, + "arrowup": 173, + "arrowright": 174, + "arrowdown": 175, + "degree": 176, + "plusminus": 177, + "second": 178, + "greaterequal": 179, + "multiply": 180, + "proportional": 181, + "partialdiff": 182, + "bullet": 183, + "divide": 184, + "notequal": 185, + "equivalence": 186, + "approxequal": 187, + "ellipsis": 188, + "arrowvertex": 189, + "arrowhorizex": 190, + "carriagereturn": 191, + "aleph": 192, + "Ifraktur": 193, + "Rfraktur": 194, + "weierstrass": 195, + "circlemultiply": 196, + "circleplus": 197, + "emptyset": 198, + "intersection": 199, + "union": 200, + "propersuperset": 201, + "reflexsuperset": 202, + "notsubset": 203, + "propersubset": 204, + "reflexsubset": 205, + "element": 206, + "notelement": 207, + "angle": 208, + "gradient": 209, + "registerserif": 210, + "copyrightserif": 211, + "trademarkserif": 212, + "product": 213, + "radical": 214, + "dotmath": 215, + "logicalnot": 216, + "logicaland": 217, + "logicalor": 218, + "arrowdblboth": 219, + "arrowdblleft": 220, + "arrowdblup": 221, + "arrowdblright": 222, + "arrowdbldown": 223, + "lozenge": 224, + "angleleft": 225, + "registersans": 226, + "copyrightsans": 227, + "trademarksans": 228, + "summation": 229, + "parenlefttp": 230, + "parenleftex": 231, + "parenleftbt": 232, + "bracketlefttp": 233, + "bracketleftex": 234, + "bracketleftbt": 235, + "bracelefttp": 236, + "braceleftmid": 237, + "braceleftbt": 238, + "braceex": 239, + "angleright": 241, + "integral": 242, + "integraltp": 243, + "integralex": 244, + "integralbt": 245, + "parenrighttp": 246, + "parenrightex": 247, + "parenrightbt": 248, + "bracketrighttp": 249, + "bracketrightex": 250, + "bracketrightbt": 251, + "bracerighttp": 252, + "bracerightmid": 253, + "bracerightbt": 254, +} diff --git a/internal/pdf/model/textencoding/utils.go b/internal/pdf/model/textencoding/utils.go new file mode 100644 index 0000000..a8eb4aa --- /dev/null +++ b/internal/pdf/model/textencoding/utils.go @@ -0,0 +1,51 @@ +package textencoding + +import "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + +func glyphToRune(glyph string, glyphToRuneMap map[string]rune) (rune, bool) { + ucode, found := glyphToRuneMap[glyph] + if found { + return ucode, true + } + + //common.Log.Debug("Glyph->Rune ERROR: Unable to find glyph %s", glyph) + return 0, false +} + +func runeToGlyph(ucode rune, runeToGlyphMap map[rune]string) (string, bool) { + glyph, found := runeToGlyphMap[ucode] + if found { + return glyph, true + } + + //common.Log.Debug("Rune->Glyph ERROR: Unable to find rune %v", ucode) + return "", false +} + +func splitWords(raw string, encoder TextEncoder) []string { + runes := []rune(raw) + + words := []string{} + + startsAt := 0 + for idx, code := range runes { + glyph, found := encoder.RuneToGlyph(code) + if !found { + common.Log.Debug("Glyph not found for code: %s\n", string(code)) + continue + } + + if glyph == "space" { + word := runes[startsAt:idx] + words = append(words, string(word)) + startsAt = idx + 1 + } + } + + word := runes[startsAt:] + if len(word) > 0 { + words = append(words, string(word)) + } + + return words +} diff --git a/internal/pdf/model/textencoding/winansi.go b/internal/pdf/model/textencoding/winansi.go new file mode 100644 index 0000000..2de7091 --- /dev/null +++ b/internal/pdf/model/textencoding/winansi.go @@ -0,0 +1,557 @@ +package textencoding + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// WinAnsiEncoding. +type WinAnsiEncoder struct { +} + +func NewWinAnsiTextEncoder() WinAnsiEncoder { + encoder := WinAnsiEncoder{} + return encoder +} + +func (winenc WinAnsiEncoder) ToPdfObject() core.PdfObject { + return core.MakeName("WinAnsiEncoding") +} + +// Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF. +func (winenc WinAnsiEncoder) Encode(raw string) string { + encoded := []byte{} + for _, rune := range raw { + code, has := winenc.RuneToCharcode(rune) + if has { + encoded = append(encoded, code) + } + } + + return string(encoded) +} + +// Conversion between character code and glyph name. +// The bool return flag is true if there was a match, and false otherwise. +func (winenc WinAnsiEncoder) CharcodeToGlyph(code byte) (string, bool) { + glyph, has := winansiEncodingCharcodeToGlyphMap[code] + if !has { + common.Log.Debug("Charcode -> Glyph error: charcode not found: %d\n", code) + return "", false + } + return glyph, true +} + +// Conversion between glyph name and character code. +// The bool return flag is true if there was a match, and false otherwise. +func (winenc WinAnsiEncoder) GlyphToCharcode(glyph string) (byte, bool) { + code, found := winansiEncodingGlyphToCharcodeMap[glyph] + if !found { + common.Log.Debug("Glyph -> Charcode error: glyph not found: %s\n", glyph) + return 0, false + } + + return code, true +} + +// Convert rune to character code. +// The bool return flag is true if there was a match, and false otherwise. +func (winenc WinAnsiEncoder) RuneToCharcode(val rune) (byte, bool) { + glyph, found := winenc.RuneToGlyph(val) + if !found { + return 0, false + } + + code, found := winansiEncodingGlyphToCharcodeMap[glyph] + if !found { + common.Log.Debug("Glyph -> Charcode error: glyph not found %s\n", glyph) + return 0, false + } + + return code, true +} + +// Convert character code to rune. +// The bool return flag is true if there was a match, and false otherwise. +func (winenc WinAnsiEncoder) CharcodeToRune(charcode byte) (rune, bool) { + glyph, found := winansiEncodingCharcodeToGlyphMap[charcode] + if !found { + common.Log.Debug("Charcode -> Glyph error: charcode not found: %d\n", charcode) + return 0, false + } + + ucode, found := glyphToRune(glyph, glyphlistGlyphToRuneMap) + if !found { + return 0, false + } + + return ucode, true +} + +// Convert rune to glyph name. +// The bool return flag is true if there was a match, and false otherwise. +func (winenc WinAnsiEncoder) RuneToGlyph(val rune) (string, bool) { + return runeToGlyph(val, glyphlistRuneToGlyphMap) +} + +// Convert glyph to rune. +// The bool return flag is true if there was a match, and false otherwise. +func (winenc WinAnsiEncoder) GlyphToRune(glyph string) (rune, bool) { + return glyphToRune(glyph, glyphlistGlyphToRuneMap) +} + +// Charcode to glyph name map (WinAnsiEncoding). +var winansiEncodingCharcodeToGlyphMap = map[byte]string{ + 32: "space", + 33: "exclam", + 34: "quotedbl", + 35: "numbersign", + 36: "dollar", + 37: "percent", + 38: "ampersand", + 39: "quotesingle", + 40: "parenleft", + 41: "parenright", + 42: "asterisk", + 43: "plus", + 44: "comma", + 45: "hyphen", + 46: "period", + 47: "slash", + 48: "zero", + 49: "one", + 50: "two", + 51: "three", + 52: "four", + 53: "five", + 54: "six", + 55: "seven", + 56: "eight", + 57: "nine", + 58: "colon", + 59: "semicolon", + 60: "less", + 61: "equal", + 62: "greater", + 63: "question", + 64: "at", + 65: "A", + 66: "B", + 67: "C", + 68: "D", + 69: "E", + 70: "F", + 71: "G", + 72: "H", + 73: "I", + 74: "J", + 75: "K", + 76: "L", + 77: "M", + 78: "N", + 79: "O", + 80: "P", + 81: "Q", + 82: "R", + 83: "S", + 84: "T", + 85: "U", + 86: "V", + 87: "W", + 88: "X", + 89: "Y", + 90: "Z", + 91: "bracketleft", + 92: "backslash", + 93: "bracketright", + 94: "asciicircum", + 95: "underscore", + 96: "grave", + 97: "a", + 98: "b", + 99: "c", + 100: "d", + 101: "e", + 102: "f", + 103: "g", + 104: "h", + 105: "i", + 106: "j", + 107: "k", + 108: "l", + 109: "m", + 110: "n", + 111: "o", + 112: "p", + 113: "q", + 114: "r", + 115: "s", + 116: "t", + 117: "u", + 118: "v", + 119: "w", + 120: "x", + 121: "y", + 122: "z", + 123: "braceleft", + 124: "bar", + 125: "braceright", + 126: "asciitilde", + 127: "bullet", + 128: "Euro", + 129: "bullet", + 130: "quotesinglbase", + 131: "florin", + 132: "quotedblbase", + 133: "ellipsis", + 134: "dagger", + 135: "daggerdbl", + 136: "circumflex", + 137: "perthousand", + 138: "Scaron", + 139: "guilsinglleft", + 140: "OE", + 141: "bullet", + 142: "Zcaron", + 143: "bullet", + 144: "bullet", + 145: "quoteleft", + 146: "quoteright", + 147: "quotedblleft", + 148: "quotedblright", + 149: "bullet", + 150: "endash", + 151: "emdash", + 152: "tilde", + 153: "trademark", + 154: "scaron", + 155: "guilsinglright", + 156: "oe", + 157: "bullet", + 158: "zcaron", + 159: "Ydieresis", + 160: "space", + 161: "exclamdown", + 162: "cent", + 163: "sterling", + 164: "currency", + 165: "yen", + 166: "brokenbar", + 167: "section", + 168: "dieresis", + 169: "copyright", + 170: "ordfeminine", + 171: "guillemotleft", + 172: "logicalnot", + 173: "hyphen", + 174: "registered", + 175: "macron", + 176: "degree", + 177: "plusminus", + 178: "twosuperior", + 179: "threesuperior", + 180: "acute", + 181: "mu", + 182: "paragraph", + 183: "periodcentered", + 184: "cedilla", + 185: "onesuperior", + 186: "ordmasculine", + 187: "guillemotright", + 188: "onequarter", + 189: "onehalf", + 190: "threequarters", + 191: "questiondown", + 192: "Agrave", + 193: "Aacute", + 194: "Acircumflex", + 195: "Atilde", + 196: "Adieresis", + 197: "Aring", + 198: "AE", + 199: "Ccedilla", + 200: "Egrave", + 201: "Eacute", + 202: "Ecircumflex", + 203: "Edieresis", + 204: "Igrave", + 205: "Iacute", + 206: "Icircumflex", + 207: "Idieresis", + 208: "Eth", + 209: "Ntilde", + 210: "Ograve", + 211: "Oacute", + 212: "Ocircumflex", + 213: "Otilde", + 214: "Odieresis", + 215: "multiply", + 216: "Oslash", + 217: "Ugrave", + 218: "Uacute", + 219: "Ucircumflex", + 220: "Udieresis", + 221: "Yacute", + 222: "Thorn", + 223: "germandbls", + 224: "agrave", + 225: "aacute", + 226: "acircumflex", + 227: "atilde", + 228: "adieresis", + 229: "aring", + 230: "ae", + 231: "ccedilla", + 232: "egrave", + 233: "eacute", + 234: "ecircumflex", + 235: "edieresis", + 236: "igrave", + 237: "iacute", + 238: "icircumflex", + 239: "idieresis", + 240: "eth", + 241: "ntilde", + 242: "ograve", + 243: "oacute", + 244: "ocircumflex", + 245: "otilde", + 246: "odieresis", + 247: "divide", + 248: "oslash", + 249: "ugrave", + 250: "uacute", + 251: "ucircumflex", + 252: "udieresis", + 253: "yacute", + 254: "thorn", + 255: "ydieresis", +} + +// Glyph to charcode map (WinAnsiEncoding). +var winansiEncodingGlyphToCharcodeMap = map[string]byte{ + "space": 32, + "exclam": 33, + "quotedbl": 34, + "numbersign": 35, + "dollar": 36, + "percent": 37, + "ampersand": 38, + "quotesingle": 39, + "parenleft": 40, + "parenright": 41, + "asterisk": 42, + "plus": 43, + "comma": 44, + "hyphen": 45, + "period": 46, + "slash": 47, + "zero": 48, + "one": 49, + "two": 50, + "three": 51, + "four": 52, + "five": 53, + "six": 54, + "seven": 55, + "eight": 56, + "nine": 57, + "colon": 58, + "semicolon": 59, + "less": 60, + "equal": 61, + "greater": 62, + "question": 63, + "at": 64, + "A": 65, + "B": 66, + "C": 67, + "D": 68, + "E": 69, + "F": 70, + "G": 71, + "H": 72, + "I": 73, + "J": 74, + "K": 75, + "L": 76, + "M": 77, + "N": 78, + "O": 79, + "P": 80, + "Q": 81, + "R": 82, + "S": 83, + "T": 84, + "U": 85, + "V": 86, + "W": 87, + "X": 88, + "Y": 89, + "Z": 90, + "bracketleft": 91, + "backslash": 92, + "bracketright": 93, + "asciicircum": 94, + "underscore": 95, + "grave": 96, + "a": 97, + "b": 98, + "c": 99, + "d": 100, + "e": 101, + "f": 102, + "g": 103, + "h": 104, + "i": 105, + "j": 106, + "k": 107, + "l": 108, + "m": 109, + "n": 110, + "o": 111, + "p": 112, + "q": 113, + "r": 114, + "s": 115, + "t": 116, + "u": 117, + "v": 118, + "w": 119, + "x": 120, + "y": 121, + "z": 122, + "braceleft": 123, + "bar": 124, + "braceright": 125, + "asciitilde": 126, + "bullet": 127, + "Euro": 128, + //"bullet": 129, + "quotesinglbase": 130, + "florin": 131, + "quotedblbase": 132, + "ellipsis": 133, + "dagger": 134, + "daggerdbl": 135, + "circumflex": 136, + "perthousand": 137, + "Scaron": 138, + "guilsinglleft": 139, + "OE": 140, + //"bullet": 141, + "Zcaron": 142, + //"bullet": 143, + //"bullet": 144, + "quoteleft": 145, + "quoteright": 146, + "quotedblleft": 147, + "quotedblright": 148, + //"bullet": 149, + "endash": 150, + "emdash": 151, + "tilde": 152, + "trademark": 153, + "scaron": 154, + "guilsinglright": 155, + "oe": 156, + //"bullet": 157, + "zcaron": 158, + "Ydieresis": 159, + //"space": 160, + "exclamdown": 161, + "cent": 162, + "sterling": 163, + "currency": 164, + "yen": 165, + "brokenbar": 166, + "section": 167, + "dieresis": 168, + "copyright": 169, + "ordfeminine": 170, + "guillemotleft": 171, + "logicalnot": 172, + //"hyphen": 173, + "registered": 174, + "macron": 175, + "degree": 176, + "plusminus": 177, + "twosuperior": 178, + "threesuperior": 179, + "acute": 180, + "mu": 181, + "paragraph": 182, + "periodcentered": 183, + "cedilla": 184, + "onesuperior": 185, + "ordmasculine": 186, + "guillemotright": 187, + "onequarter": 188, + "onehalf": 189, + "threequarters": 190, + "questiondown": 191, + "Agrave": 192, + "Aacute": 193, + "Acircumflex": 194, + "Atilde": 195, + "Adieresis": 196, + "Aring": 197, + "AE": 198, + "Ccedilla": 199, + "Egrave": 200, + "Eacute": 201, + "Ecircumflex": 202, + "Edieresis": 203, + "Igrave": 204, + "Iacute": 205, + "Icircumflex": 206, + "Idieresis": 207, + "Eth": 208, + "Ntilde": 209, + "Ograve": 210, + "Oacute": 211, + "Ocircumflex": 212, + "Otilde": 213, + "Odieresis": 214, + "multiply": 215, + "Oslash": 216, + "Ugrave": 217, + "Uacute": 218, + "Ucircumflex": 219, + "Udieresis": 220, + "Yacute": 221, + "Thorn": 222, + "germandbls": 223, + "agrave": 224, + "aacute": 225, + "acircumflex": 226, + "atilde": 227, + "adieresis": 228, + "aring": 229, + "ae": 230, + "ccedilla": 231, + "egrave": 232, + "eacute": 233, + "ecircumflex": 234, + "edieresis": 235, + "igrave": 236, + "iacute": 237, + "icircumflex": 238, + "idieresis": 239, + "eth": 240, + "ntilde": 241, + "ograve": 242, + "oacute": 243, + "ocircumflex": 244, + "otilde": 245, + "odieresis": 246, + "divide": 247, + "oslash": 248, + "ugrave": 249, + "uacute": 250, + "ucircumflex": 251, + "udieresis": 252, + "yacute": 253, + "thorn": 254, + "ydieresis": 255, +} diff --git a/internal/pdf/model/textencoding/zapfdingbats.go b/internal/pdf/model/textencoding/zapfdingbats.go new file mode 100644 index 0000000..db86ed6 --- /dev/null +++ b/internal/pdf/model/textencoding/zapfdingbats.go @@ -0,0 +1,537 @@ +package textencoding + +import ( + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// Encoding for ZapfDingbats font. +type ZapfDingbatsEncoder struct { +} + +func NewZapfDingbatsEncoder() ZapfDingbatsEncoder { + encoder := ZapfDingbatsEncoder{} + return encoder +} + +// Convert a raw utf8 string (series of runes) to an encoded string (series of character codes) to be used in PDF. +func (enc ZapfDingbatsEncoder) Encode(raw string) string { + encoded := []byte{} + for _, rune := range raw { + code, found := enc.RuneToCharcode(rune) + if !found { + continue + } + + encoded = append(encoded, code) + } + + return string(encoded) +} + +// Conversion between character code and glyph name. +// The bool return flag is true if there was a match, and false otherwise. +func (enc ZapfDingbatsEncoder) CharcodeToGlyph(code byte) (string, bool) { + glyph, has := zapfDingbatsEncodingCharcodeToGlyphMap[code] + if !has { + common.Log.Debug("ZapfDingbats encoding error: unable to find charcode->glyph entry (%v)", code) + return "", false + } + return glyph, true +} + +// Conversion between glyph name and character code. +// The bool return flag is true if there was a match, and false otherwise. +func (enc ZapfDingbatsEncoder) GlyphToCharcode(glyph string) (byte, bool) { + code, found := zapfDingbatsEncodingGlyphToCharcodeMap[glyph] + if !found { + common.Log.Debug("ZapfDingbats encoding error: unable to find glyph->charcode entry (%s)", glyph) + return 0, false + } + + return code, found +} + +// Convert rune to character code. +// The bool return flag is true if there was a match, and false otherwise. +func (enc ZapfDingbatsEncoder) RuneToCharcode(val rune) (byte, bool) { + glyph, found := enc.RuneToGlyph(val) + if !found { + common.Log.Debug("ZapfDingbats encoding error: unable to find rune->glyph entry (%v)", val) + return 0, false + } + + code, found := zapfDingbatsEncodingGlyphToCharcodeMap[glyph] + if !found { + common.Log.Debug("ZapfDingbats encoding error: unable to find glyph->charcode entry (%s)", glyph) + return 0, false + } + + return code, true +} + +// Convert character code to rune. +// The bool return flag is true if there was a match, and false otherwise. +func (enc ZapfDingbatsEncoder) CharcodeToRune(charcode byte) (rune, bool) { + glyph, found := zapfDingbatsEncodingCharcodeToGlyphMap[charcode] + if !found { + common.Log.Debug("ZapfDingbats encoding error: unable to find charcode->glyph entry (%d)", charcode) + return 0, false + } + + return enc.GlyphToRune(glyph) +} + +// Convert rune to glyph name. +// The bool return flag is true if there was a match, and false otherwise. +func (enc ZapfDingbatsEncoder) RuneToGlyph(val rune) (string, bool) { + // Seek in the zapfdingbats list first. + glyph, found := runeToGlyph(val, zapfdingbatsRuneToGlyphMap) + if !found { + // Then revert to glyphlist if not found. + glyph, found = runeToGlyph(val, glyphlistRuneToGlyphMap) + if !found { + common.Log.Debug("ZapfDingbats encoding error: unable to find rune->glyph entry (%v)", val) + return "", false + } + } + + return glyph, true +} + +// Convert glyph to rune. +// The bool return flag is true if there was a match, and false otherwise. +func (enc ZapfDingbatsEncoder) GlyphToRune(glyph string) (rune, bool) { + // Seek in the zapfdingbats list first. + val, found := glyphToRune(glyph, zapfdingbatsGlyphToRuneMap) + if !found { + // Then revert to glyphlist if not found. + val, found = glyphToRune(glyph, glyphlistGlyphToRuneMap) + if !found { + common.Log.Debug("Symbol encoding error: unable to find glyph->rune entry (%v)", glyph) + return 0, false + } + } + + return val, true +} + +// Convert to PDF Object. +func (enc ZapfDingbatsEncoder) ToPdfObject() core.PdfObject { + dict := core.MakeDict() + dict.Set("Type", core.MakeName("Encoding")) + + // Returning an empty Encoding object with no differences. Indicates that we are using the font's built-in + // encoding. + return core.MakeIndirectObject(dict) +} + +var zapfDingbatsEncodingCharcodeToGlyphMap = map[byte]string{ + 32: "space", + 33: "a1", + 34: "a2", + 35: "a202", + 36: "a3", + 37: "a4", + 38: "a5", + 39: "a119", + 40: "a118", + 41: "a117", + 42: "a11", + 43: "a12", + 44: "a13", + 45: "a14", + 46: "a15", + 47: "a16", + 48: "a105", + 49: "a17", + 50: "a18", + 51: "a19", + 52: "a20", + 53: "a21", + 54: "a22", + 55: "a23", + 56: "a24", + 57: "a25", + 58: "a26", + 59: "a27", + 60: "a28", + 61: "a6", + 62: "a7", + 63: "a8", + 64: "a9", + 65: "a10", + 66: "a29", + 67: "a30", + 68: "a31", + 69: "a32", + 70: "a33", + 71: "a34", + 72: "a35", + 73: "a36", + 74: "a37", + 75: "a38", + 76: "a39", + 77: "a40", + 78: "a41", + 79: "a42", + 80: "a43", + 81: "a44", + 82: "a45", + 83: "a46", + 84: "a47", + 85: "a48", + 86: "a49", + 87: "a50", + 88: "a51", + 89: "a52", + 90: "a53", + 91: "a54", + 92: "a55", + 93: "a56", + 94: "a57", + 95: "a58", + 96: "a59", + 97: "a60", + 98: "a61", + 99: "a62", + 100: "a63", + 101: "a64", + 102: "a65", + 103: "a66", + 104: "a67", + 105: "a68", + 106: "a69", + 107: "a70", + 108: "a71", + 109: "a72", + 110: "a73", + 111: "a74", + 112: "a203", + 113: "a75", + 114: "a204", + 115: "a76", + 116: "a77", + 117: "a78", + 118: "a79", + 119: "a81", + 120: "a82", + 121: "a83", + 122: "a84", + 123: "a97", + 124: "a98", + 125: "a99", + 126: "a100", + 128: "a89", + 129: "a90", + 130: "a93", + 131: "a94", + 132: "a91", + 133: "a92", + 134: "a205", + 135: "a85", + 136: "a206", + 137: "a86", + 138: "a87", + 139: "a88", + 140: "a95", + 141: "a96", + 161: "a101", + 162: "a102", + 163: "a103", + 164: "a104", + 165: "a106", + 166: "a107", + 167: "a108", + 168: "a112", + 169: "a111", + 170: "a110", + 171: "a109", + 172: "a120", + 173: "a121", + 174: "a122", + 175: "a123", + 176: "a124", + 177: "a125", + 178: "a126", + 179: "a127", + 180: "a128", + 181: "a129", + 182: "a130", + 183: "a131", + 184: "a132", + 185: "a133", + 186: "a134", + 187: "a135", + 188: "a136", + 189: "a137", + 190: "a138", + 191: "a139", + 192: "a140", + 193: "a141", + 194: "a142", + 195: "a143", + 196: "a144", + 197: "a145", + 198: "a146", + 199: "a147", + 200: "a148", + 201: "a149", + 202: "a150", + 203: "a151", + 204: "a152", + 205: "a153", + 206: "a154", + 207: "a155", + 208: "a156", + 209: "a157", + 210: "a158", + 211: "a159", + 212: "a160", + 213: "a161", + 214: "a163", + 215: "a164", + 216: "a196", + 217: "a165", + 218: "a192", + 219: "a166", + 220: "a167", + 221: "a168", + 222: "a169", + 223: "a170", + 224: "a171", + 225: "a172", + 226: "a173", + 227: "a162", + 228: "a174", + 229: "a175", + 230: "a176", + 231: "a177", + 232: "a178", + 233: "a179", + 234: "a193", + 235: "a180", + 236: "a199", + 237: "a181", + 238: "a200", + 239: "a182", + 241: "a201", + 242: "a183", + 243: "a184", + 244: "a197", + 245: "a185", + 246: "a194", + 247: "a198", + 248: "a186", + 249: "a195", + 250: "a187", + 251: "a188", + 252: "a189", + 253: "a190", + 254: "a191", +} + +var zapfDingbatsEncodingGlyphToCharcodeMap = map[string]byte{ + "space": 32, + "a1": 33, + "a2": 34, + "a202": 35, + "a3": 36, + "a4": 37, + "a5": 38, + "a119": 39, + "a118": 40, + "a117": 41, + "a11": 42, + "a12": 43, + "a13": 44, + "a14": 45, + "a15": 46, + "a16": 47, + "a105": 48, + "a17": 49, + "a18": 50, + "a19": 51, + "a20": 52, + "a21": 53, + "a22": 54, + "a23": 55, + "a24": 56, + "a25": 57, + "a26": 58, + "a27": 59, + "a28": 60, + "a6": 61, + "a7": 62, + "a8": 63, + "a9": 64, + "a10": 65, + "a29": 66, + "a30": 67, + "a31": 68, + "a32": 69, + "a33": 70, + "a34": 71, + "a35": 72, + "a36": 73, + "a37": 74, + "a38": 75, + "a39": 76, + "a40": 77, + "a41": 78, + "a42": 79, + "a43": 80, + "a44": 81, + "a45": 82, + "a46": 83, + "a47": 84, + "a48": 85, + "a49": 86, + "a50": 87, + "a51": 88, + "a52": 89, + "a53": 90, + "a54": 91, + "a55": 92, + "a56": 93, + "a57": 94, + "a58": 95, + "a59": 96, + "a60": 97, + "a61": 98, + "a62": 99, + "a63": 100, + "a64": 101, + "a65": 102, + "a66": 103, + "a67": 104, + "a68": 105, + "a69": 106, + "a70": 107, + "a71": 108, + "a72": 109, + "a73": 110, + "a74": 111, + "a203": 112, + "a75": 113, + "a204": 114, + "a76": 115, + "a77": 116, + "a78": 117, + "a79": 118, + "a81": 119, + "a82": 120, + "a83": 121, + "a84": 122, + "a97": 123, + "a98": 124, + "a99": 125, + "a100": 126, + "a89": 128, + "a90": 129, + "a93": 130, + "a94": 131, + "a91": 132, + "a92": 133, + "a205": 134, + "a85": 135, + "a206": 136, + "a86": 137, + "a87": 138, + "a88": 139, + "a95": 140, + "a96": 141, + "a101": 161, + "a102": 162, + "a103": 163, + "a104": 164, + "a106": 165, + "a107": 166, + "a108": 167, + "a112": 168, + "a111": 169, + "a110": 170, + "a109": 171, + "a120": 172, + "a121": 173, + "a122": 174, + "a123": 175, + "a124": 176, + "a125": 177, + "a126": 178, + "a127": 179, + "a128": 180, + "a129": 181, + "a130": 182, + "a131": 183, + "a132": 184, + "a133": 185, + "a134": 186, + "a135": 187, + "a136": 188, + "a137": 189, + "a138": 190, + "a139": 191, + "a140": 192, + "a141": 193, + "a142": 194, + "a143": 195, + "a144": 196, + "a145": 197, + "a146": 198, + "a147": 199, + "a148": 200, + "a149": 201, + "a150": 202, + "a151": 203, + "a152": 204, + "a153": 205, + "a154": 206, + "a155": 207, + "a156": 208, + "a157": 209, + "a158": 210, + "a159": 211, + "a160": 212, + "a161": 213, + "a163": 214, + "a164": 215, + "a196": 216, + "a165": 217, + "a192": 218, + "a166": 219, + "a167": 220, + "a168": 221, + "a169": 222, + "a170": 223, + "a171": 224, + "a172": 225, + "a173": 226, + "a162": 227, + "a174": 228, + "a175": 229, + "a176": 230, + "a177": 231, + "a178": 232, + "a179": 233, + "a193": 234, + "a180": 235, + "a199": 236, + "a181": 237, + "a200": 238, + "a182": 239, + "a201": 241, + "a183": 242, + "a184": 243, + "a197": 244, + "a185": 245, + "a194": 246, + "a198": 247, + "a186": 248, + "a195": 249, + "a187": 250, + "a188": 251, + "a189": 252, + "a190": 253, + "a191": 254, +} diff --git a/internal/pdf/model/utils.go b/internal/pdf/model/utils.go new file mode 100644 index 0000000..70f68ae --- /dev/null +++ b/internal/pdf/model/utils.go @@ -0,0 +1,57 @@ +package model + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +func getNumberAsFloat(obj core.PdfObject) (float64, error) { + if fObj, ok := obj.(*core.PdfObjectFloat); ok { + return float64(*fObj), nil + } + + if iObj, ok := obj.(*core.PdfObjectInteger); ok { + return float64(*iObj), nil + } + + return 0, errors.New("not a number") +} + +func isNullObject(obj core.PdfObject) bool { + if _, isNull := obj.(*core.PdfObjectNull); isNull { + return true + } else { + return false + } +} + +// Convert a list of pdf objects representing floats or integers to a slice of float64 values. +func getNumbersAsFloat(objects []core.PdfObject) ([]float64, error) { + floats := []float64{} + for _, obj := range objects { + val, err := getNumberAsFloat(obj) + if err != nil { + return nil, err + } + floats = append(floats, val) + + } + return floats, nil +} + +// Cases where expecting an integer, but some implementations actually +// store the number in a floating point format. +func getNumberAsInt64(obj core.PdfObject) (int64, error) { + if iObj, ok := obj.(*core.PdfObjectInteger); ok { + return int64(*iObj), nil + } + + if fObj, ok := obj.(*core.PdfObjectFloat); ok { + common.Log.Debug("Number expected as integer was stored as float (type casting used)") + return int64(*fObj), nil + } + + return 0, errors.New("not a number") +} diff --git a/internal/pdf/model/writer.go b/internal/pdf/model/writer.go new file mode 100644 index 0000000..9dcd678 --- /dev/null +++ b/internal/pdf/model/writer.go @@ -0,0 +1,639 @@ +package model + +import ( + "bufio" + "crypto/md5" + "crypto/rand" + "errors" + "fmt" + "io" + "math" + "os" + "time" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +var pdfCreator = "" + +func getPdfCreator() string { + if len(pdfCreator) > 0 { + return pdfCreator + } + + // Return default. + return "" +} + +func SetPdfCreator(creator string) { + pdfCreator = creator +} + +type PdfWriter struct { + root *core.PdfIndirectObject + pages *core.PdfIndirectObject + objects []core.PdfObject + objectsMap map[core.PdfObject]bool // Quick lookup table. + writer *bufio.Writer + outlineTree *PdfOutlineTreeNode + catalog *core.PdfObjectDictionary + infoObj *core.PdfIndirectObject + + // Encryption + crypter *core.PdfCrypt + encryptDict *core.PdfObjectDictionary + encryptObj *core.PdfIndirectObject + ids *core.PdfObjectArray + + // PDF version + majorVersion int + minorVersion int + + // Objects to be followed up on prior to writing. + // These are objects that are added and reference objects that are not included + // for writing. + // The map stores the object and the dictionary it is contained in. + // Only way so we can access the dictionary entry later. + pendingObjects map[core.PdfObject]*core.PdfObjectDictionary + + // Forms. + acroForm *PdfAcroForm +} + +func NewPdfWriter() PdfWriter { + w := PdfWriter{} + + w.objectsMap = map[core.PdfObject]bool{} + w.objects = []core.PdfObject{} + w.pendingObjects = map[core.PdfObject]*core.PdfObjectDictionary{} + + // PDF Version. Can be changed if using more advanced features in PDF. + // By default it is set to 1.3. + w.majorVersion = 1 + w.minorVersion = 3 + + // Creation info. + infoDict := core.MakeDict() + infoDict.Set("Producer", core.MakeString("")) + infoDict.Set("Creator", core.MakeString(getPdfCreator())) + infoObj := core.PdfIndirectObject{} + infoObj.PdfObject = infoDict + w.infoObj = &infoObj + w.addObject(&infoObj) + + // Root catalog. + catalog := core.PdfIndirectObject{} + catalogDict := core.MakeDict() + catalogDict.Set("Type", core.MakeName("Catalog")) + catalog.PdfObject = catalogDict + + w.root = &catalog + w.addObject(&catalog) + + // Pages. + pages := core.PdfIndirectObject{} + pagedict := core.MakeDict() + pagedict.Set("Type", core.MakeName("Pages")) + kids := core.PdfObjectArray{} + pagedict.Set("Kids", &kids) + pagedict.Set("Count", core.MakeInteger(0)) + pages.PdfObject = pagedict + + w.pages = &pages + w.addObject(&pages) + + catalogDict.Set("Pages", &pages) + w.catalog = catalogDict + + common.Log.Trace("Catalog %s", catalog) + + return w +} + +// Set the PDF version of the output file. +func (pw *PdfWriter) SetVersion(majorVersion, minorVersion int) { + pw.majorVersion = majorVersion + pw.minorVersion = minorVersion +} + +// Set the optional content properties. +func (pw *PdfWriter) SetOCProperties(ocProperties core.PdfObject) error { + dict := pw.catalog + + if ocProperties != nil { + common.Log.Trace("Setting OC Properties...") + dict.Set("OCProperties", ocProperties) + // Any risk of infinite loops? + pw.addObjects(ocProperties) + } + + return nil +} + +func (pw *PdfWriter) hasObject(obj core.PdfObject) bool { + // Check if already added. + for _, o := range pw.objects { + // GH: May perform better to use a hash map to check if added? + if o == obj { + return true + } + } + return false +} + +// Adds the object to list of objects and returns true if the obj was +// not already added. +// Returns false if the object was previously added. +func (pw *PdfWriter) addObject(obj core.PdfObject) bool { + hasObj := pw.hasObject(obj) + if !hasObj { + pw.objects = append(pw.objects, obj) + return true + } + + return false +} + +func (pw *PdfWriter) addObjects(obj core.PdfObject) error { + common.Log.Trace("Adding objects!") + + if io, isIndirectObj := obj.(*core.PdfIndirectObject); isIndirectObj { + common.Log.Trace("Indirect") + common.Log.Trace("- %s (%p)", obj, io) + common.Log.Trace("- %s", io.PdfObject) + if pw.addObject(io) { + err := pw.addObjects(io.PdfObject) + if err != nil { + return err + } + } + return nil + } + + if so, isStreamObj := obj.(*core.PdfObjectStream); isStreamObj { + common.Log.Trace("Stream") + common.Log.Trace("- %s %p", obj, obj) + if pw.addObject(so) { + err := pw.addObjects(so.PdfObjectDictionary) + if err != nil { + return err + } + } + return nil + } + + if dict, isDict := obj.(*core.PdfObjectDictionary); isDict { + common.Log.Trace("Dict") + common.Log.Trace("- %s", obj) + for _, k := range dict.Keys() { + v := dict.Get(k) + common.Log.Trace("Key %s", k) + if k != "Parent" { + err := pw.addObjects(v) + if err != nil { + return err + } + } else { + if _, parentIsNull := dict.Get("Parent").(*core.PdfObjectNull); parentIsNull { + // Parent is null. We can ignore it. + continue + } + + if hasObj := pw.hasObject(v); !hasObj { + common.Log.Debug("Parent obj is missing!! %T %p %v", v, v, v) + pw.pendingObjects[v] = dict + // Although it is missing at this point, it could be added later... + } + // How to handle the parent? Make sure it is present? + if parentObj, parentIsRef := dict.Get("Parent").(*core.PdfObjectReference); parentIsRef { + // Parent is a reference. Means we can drop it? + // Could refer to somewhere outside of the scope of the output doc. + // Should be done by the reader already. + // -> ERROR. + common.Log.Debug("error: Parent is a reference object - Cannot be in writer (needs to be resolved)") + return fmt.Errorf("parent is a reference object - Cannot be in writer (needs to be resolved) - %s", parentObj) + } + } + } + return nil + } + + if arr, isArray := obj.(*core.PdfObjectArray); isArray { + common.Log.Trace("Array") + common.Log.Trace("- %s", obj) + if arr == nil { + return errors.New("array is nil") + } + for _, v := range *arr { + err := pw.addObjects(v) + if err != nil { + return err + } + } + return nil + } + + if _, isReference := obj.(*core.PdfObjectReference); isReference { + // Should never be a reference, should already be resolved. + common.Log.Debug("error: Cannot be a reference!") + return errors.New("reference not allowed") + } + + return nil +} + +// Add a page to the PDF file. The new page should be an indirect +// object. +func (pw *PdfWriter) AddPage(page *PdfPage) error { + obj := page.ToPdfObject() + common.Log.Trace("==========") + common.Log.Trace("Appending to page list %T", obj) + + pageObj, ok := obj.(*core.PdfIndirectObject) + if !ok { + return errors.New("page should be an indirect object") + } + common.Log.Trace("%s", pageObj) + common.Log.Trace("%s", pageObj.PdfObject) + + pDict, ok := pageObj.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return errors.New("page object should be a dictionary") + } + + otype, ok := pDict.Get("Type").(*core.PdfObjectName) + if !ok { + return fmt.Errorf("page should have a Type key with a value of type name (%T)", pDict.Get("Type")) + + } + if *otype != "Page" { + return errors.New("type != Page (Required)") + } + + // Copy inherited fields if missing. + inheritedFields := []core.PdfObjectName{"Resources", "MediaBox", "CropBox", "Rotate"} + parent, hasParent := pDict.Get("Parent").(*core.PdfIndirectObject) + common.Log.Trace("Page Parent: %T (%v)", pDict.Get("Parent"), hasParent) + for hasParent { + common.Log.Trace("Page Parent: %T", parent) + parentDict, ok := parent.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return errors.New("invalid Parent object") + } + for _, field := range inheritedFields { + common.Log.Trace("Field %s", field) + if pDict.Get(field) != nil { + common.Log.Trace("- page has already") + continue + } + + if obj := parentDict.Get(field); obj != nil { + // Parent has the field. Inherit, pass to the new page. + common.Log.Trace("Inheriting field %s", field) + pDict.Set(field, obj) + } + } + parent, hasParent = parentDict.Get("Parent").(*core.PdfIndirectObject) + common.Log.Trace("Next parent: %T", parentDict.Get("Parent")) + } + + common.Log.Trace("Traversal done") + + // Update the dictionary. + // Reuses the input object, updating the fields. + pDict.Set("Parent", pw.pages) + pageObj.PdfObject = pDict + + // Add to Pages. + pagesDict, ok := pw.pages.PdfObject.(*core.PdfObjectDictionary) + if !ok { + return errors.New("invalid Pages obj (not a dict)") + } + kids, ok := pagesDict.Get("Kids").(*core.PdfObjectArray) + if !ok { + return errors.New("invalid Pages Kids obj (not an array)") + } + *kids = append(*kids, pageObj) + pageCount, ok := pagesDict.Get("Count").(*core.PdfObjectInteger) + if !ok { + return errors.New("invalid Pages Count object (not an integer)") + } + // Update the count. + *pageCount = *pageCount + 1 + + pw.addObject(pageObj) + + // Traverse the page and record all object references. + err := pw.addObjects(pDict) + if err != nil { + return err + } + + return nil +} + +// Add outlines to a PDF file. +func (pw *PdfWriter) AddOutlineTree(outlineTree *PdfOutlineTreeNode) { + pw.outlineTree = outlineTree +} + +// Add Acroforms to a PDF file. Sets the specified form for writing. +func (pw *PdfWriter) SetForms(form *PdfAcroForm) error { + pw.acroForm = form + return nil +} + +// Write out an indirect / stream object. +func (pw *PdfWriter) writeObject(num int, obj core.PdfObject) { + common.Log.Trace("Write obj #%d\n", num) + + if pobj, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + outStr := fmt.Sprintf("%d 0 obj\n", num) + outStr += pobj.PdfObject.DefaultWriteString() + outStr += "\nendobj\n" + pw.writer.WriteString(outStr) + return + } + + // XXX/TODO: Add a default encoder if Filter not specified? + // Still need to make sure is encrypted. + if pobj, isStream := obj.(*core.PdfObjectStream); isStream { + outStr := fmt.Sprintf("%d 0 obj\n", num) + outStr += pobj.PdfObjectDictionary.DefaultWriteString() + outStr += "\nstream\n" + pw.writer.WriteString(outStr) + pw.writer.Write(pobj.Stream) + pw.writer.WriteString("\nendstream\nendobj\n") + return + } + + pw.writer.WriteString(obj.DefaultWriteString()) +} + +// Update all the object numbers prior to writing. +func (pw *PdfWriter) updateObjectNumbers() { + // Update numbers + for idx, obj := range pw.objects { + if io, isIndirect := obj.(*core.PdfIndirectObject); isIndirect { + io.ObjectNumber = int64(idx + 1) + io.GenerationNumber = 0 + } + if so, isStream := obj.(*core.PdfObjectStream); isStream { + so.ObjectNumber = int64(idx + 1) + so.GenerationNumber = 0 + } + } +} + +type EncryptOptions struct { + Permissions core.AccessPermissions + Algorithm EncryptionAlgorithm +} + +// EncryptionAlgorithm is used in EncryptOptions to change the default algorithm used to encrypt the document. +type EncryptionAlgorithm int + +const ( + // RC4_128bit uses RC4 encryption (128 bit) + RC4_128bit = EncryptionAlgorithm(iota) + // AES_128bit uses AES encryption (128 bit, PDF 1.6) + AES_128bit + // AES_256bit uses AES encryption (256 bit, PDF 2.0) + AES_256bit +) + +// Encrypt the output file with a specified user/owner password. +func (pw *PdfWriter) Encrypt(userPass, ownerPass []byte, options *EncryptOptions) error { + crypter := core.PdfCrypt{} + pw.crypter = &crypter + + crypter.EncryptedObjects = map[core.PdfObject]bool{} + + crypter.CryptFilters = core.CryptFilters{} + + algo := RC4_128bit + if options != nil { + algo = options.Algorithm + } + + var cf core.CryptFilter + switch algo { + case RC4_128bit: + crypter.V = 2 + crypter.R = 3 + cf = core.NewCryptFilterV2(16) + case AES_128bit: + pw.SetVersion(1, 5) + crypter.V = 4 + crypter.R = 4 + cf = core.NewCryptFilterAESV2() + case AES_256bit: + pw.SetVersion(2, 0) + crypter.V = 5 + crypter.R = 6 // TODO(dennwc): a way to set R=5? + cf = core.NewCryptFilterAESV3() + default: + return fmt.Errorf("unsupported algorithm: %v", options.Algorithm) + } + crypter.Length = cf.Length * 8 + + const ( + defaultFilter = core.StandardCryptFilter + ) + crypter.CryptFilters[defaultFilter] = cf + if crypter.V >= 4 { + crypter.StreamFilter = defaultFilter + crypter.StringFilter = defaultFilter + } + + // Set + crypter.P = math.MaxUint32 + crypter.EncryptMetadata = true + if options != nil { + crypter.P = int(options.Permissions.GetP()) + } + + // Generate the encryption dictionary. + ed := core.MakeDict() + ed.Set("Filter", core.MakeName("Standard")) + ed.Set("P", core.MakeInteger(int64(crypter.P))) + ed.Set("V", core.MakeInteger(int64(crypter.V))) + ed.Set("R", core.MakeInteger(int64(crypter.R))) + ed.Set("Length", core.MakeInteger(int64(crypter.Length))) + pw.encryptDict = ed + + // Prepare the ID object for the trailer. + hashcode := md5.Sum([]byte(time.Now().Format(time.RFC850))) + id0 := core.PdfObjectString(hashcode[:]) + b := make([]byte, 100) + rand.Read(b) + hashcode = md5.Sum(b) + id1 := core.PdfObjectString(hashcode[:]) + common.Log.Trace("Random b: % x", b) + + pw.ids = &core.PdfObjectArray{&id0, &id1} + common.Log.Trace("Gen Id 0: % x", id0) + + // Generate encryption parameters + if crypter.R < 5 { + crypter.Id0 = string(id0) + + // Make the O and U objects. + O, err := crypter.Alg3(userPass, ownerPass) + if err != nil { + common.Log.Debug("error: Error generating O for encryption (%s)", err) + return err + } + crypter.O = []byte(O) + common.Log.Trace("gen O: % x", O) + U, key, err := crypter.Alg5(userPass) + if err != nil { + common.Log.Debug("error: Error generating O for encryption (%s)", err) + return err + } + common.Log.Trace("gen U: % x", U) + crypter.U = []byte(U) + crypter.EncryptionKey = key + + ed.Set("O", &O) + ed.Set("U", &U) + } else { // R >= 5 + err := crypter.GenerateParams(userPass, ownerPass) + if err != nil { + return err + } + ed.Set("O", core.MakeString(string(crypter.O))) + ed.Set("U", core.MakeString(string(crypter.U))) + ed.Set("OE", core.MakeString(string(crypter.OE))) + ed.Set("UE", core.MakeString(string(crypter.UE))) + ed.Set("EncryptMetadata", core.MakeBool(crypter.EncryptMetadata)) + if crypter.R > 5 { + ed.Set("Perms", core.MakeString(string(crypter.Perms))) + } + } + if crypter.V >= 4 { + if err := crypter.SaveCryptFilters(ed); err != nil { + return err + } + } + + // Make an object to contain the encryption dictionary. + io := core.MakeIndirectObject(ed) + pw.encryptObj = io + pw.addObject(io) + + return nil +} + +// Write the pdf out. +func (pw *PdfWriter) Write(ws io.WriteSeeker) error { + // Outlines. + if pw.outlineTree != nil { + common.Log.Trace("OutlineTree: %+v", pw.outlineTree) + outlines := pw.outlineTree.ToPdfObject() + common.Log.Trace("Outlines: %+v (%T, p:%p)", outlines, outlines, outlines) + pw.catalog.Set("Outlines", outlines) + err := pw.addObjects(outlines) + if err != nil { + return err + } + } + + // Form fields. + if pw.acroForm != nil { + common.Log.Trace("Writing acro forms") + indObj := pw.acroForm.ToPdfObject() + common.Log.Trace("AcroForm: %+v", indObj) + pw.catalog.Set("AcroForm", indObj) + err := pw.addObjects(indObj) + if err != nil { + return err + } + } + + // Check pending objects prior to write. + for pendingObj, pendingObjDict := range pw.pendingObjects { + if !pw.hasObject(pendingObj) { + common.Log.Debug("error Pending object %+v %T (%p) never added for writing", pendingObj, pendingObj, pendingObj) + for _, key := range pendingObjDict.Keys() { + val := pendingObjDict.Get(key) + if val == pendingObj { + common.Log.Debug("Pending object found! and replaced with null") + pendingObjDict.Set(key, core.MakeNull()) + break + } + } + } + } + // Set version in the catalog. + pw.catalog.Set("Version", core.MakeName(fmt.Sprintf("%d.%d", pw.majorVersion, pw.minorVersion))) + + w := bufio.NewWriter(ws) + pw.writer = w + + w.WriteString(fmt.Sprintf("%%PDF-%d.%d\n", pw.majorVersion, pw.minorVersion)) + w.WriteString("%âãÏÓ\n") + w.Flush() + + pw.updateObjectNumbers() + + offsets := []int64{} + + // Write objects + common.Log.Trace("Writing %d obj", len(pw.objects)) + for idx, obj := range pw.objects { + common.Log.Trace("Writing %d", idx) + pw.writer.Flush() + offset, _ := ws.Seek(0, os.SEEK_CUR) + offsets = append(offsets, offset) + + // Encrypt prior to writing. + // Encrypt dictionary should not be encrypted. + if pw.crypter != nil && obj != pw.encryptObj { + err := pw.crypter.Encrypt(obj, int64(idx+1), 0) + if err != nil { + common.Log.Debug("error: Failed encrypting (%s)", err) + return err + } + + } + pw.writeObject(idx+1, obj) + } + w.Flush() + + xrefOffset, _ := ws.Seek(0, os.SEEK_CUR) + // Write xref table. + pw.writer.WriteString("xref\r\n") + outStr := fmt.Sprintf("%d %d\r\n", 0, len(pw.objects)+1) + pw.writer.WriteString(outStr) + outStr = fmt.Sprintf("%.10d %.5d f\r\n", 0, 65535) + pw.writer.WriteString(outStr) + for _, offset := range offsets { + outStr = fmt.Sprintf("%.10d %.5d n\r\n", offset, 0) + pw.writer.WriteString(outStr) + } + + // Generate & write trailer + trailer := core.MakeDict() + trailer.Set("Info", pw.infoObj) + trailer.Set("Root", pw.root) + trailer.Set("Size", core.MakeInteger(int64(len(pw.objects)+1))) + // If encrypted! + if pw.crypter != nil { + trailer.Set("Encrypt", pw.encryptObj) + trailer.Set("ID", pw.ids) + common.Log.Trace("Ids: %s", pw.ids) + } + pw.writer.WriteString("trailer\n") + pw.writer.WriteString(trailer.DefaultWriteString()) + pw.writer.WriteString("\n") + + // Make offset reference. + outStr = fmt.Sprintf("startxref\n%d\n", xrefOffset) + pw.writer.WriteString(outStr) + pw.writer.WriteString("%%EOF\n") + w.Flush() + + return nil +} diff --git a/internal/pdf/model/xobject.go b/internal/pdf/model/xobject.go new file mode 100644 index 0000000..a1d67d8 --- /dev/null +++ b/internal/pdf/model/xobject.go @@ -0,0 +1,588 @@ +package model + +import ( + "errors" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" +) + +// XObjectForm (Table 95 in 8.10.2). +type XObjectForm struct { + Filter core.StreamEncoder + + FormType core.PdfObject + BBox core.PdfObject + Matrix core.PdfObject + Resources *PdfPageResources + Group core.PdfObject + Ref core.PdfObject + MetaData core.PdfObject + PieceInfo core.PdfObject + LastModified core.PdfObject + StructParent core.PdfObject + StructParents core.PdfObject + OPI core.PdfObject + OC core.PdfObject + Name core.PdfObject + + // Stream data. + Stream []byte + // Primitive + primitive *core.PdfObjectStream +} + +var ErrTypeCheck = errors.New("type check error") + +// Create a brand new XObject Form. Creates a new underlying PDF object stream primitive. +func NewXObjectForm() *XObjectForm { + xobj := &XObjectForm{} + stream := &core.PdfObjectStream{} + stream.PdfObjectDictionary = core.MakeDict() + xobj.primitive = stream + return xobj +} + +// Build the Form XObject from a stream object. +// XXX: Should this be exposed? Consider different access points. +func NewXObjectFormFromStream(stream *core.PdfObjectStream) (*XObjectForm, error) { + form := &XObjectForm{} + form.primitive = stream + + dict := *(stream.PdfObjectDictionary) + + encoder, err := core.NewEncoderFromStream(stream) + if err != nil { + return nil, err + } + form.Filter = encoder + + if obj := dict.Get("Subtype"); obj != nil { + name, ok := obj.(*core.PdfObjectName) + if !ok { + return nil, errors.New("type error") + } + if *name != "Form" { + common.Log.Debug("invalid form subtype") + return nil, errors.New("invalid form subtype") + } + } + + if obj := dict.Get("FormType"); obj != nil { + form.FormType = obj + } + if obj := dict.Get("BBox"); obj != nil { + form.BBox = obj + } + if obj := dict.Get("Matrix"); obj != nil { + form.Matrix = obj + } + if obj := dict.Get("Resources"); obj != nil { + obj = core.TraceToDirectObject(obj) + d, ok := obj.(*core.PdfObjectDictionary) + if !ok { + common.Log.Debug("invalid XObject Form Resources object, pointing to non-dictionary") + return nil, errors.New("type check error") + } + res, err := NewPdfPageResourcesFromDict(d) + if err != nil { + common.Log.Debug("Failed getting form resources") + return nil, err + } + form.Resources = res + common.Log.Trace("Form resources: %#v", form.Resources) + } + + form.Group = dict.Get("Group") + form.Ref = dict.Get("Ref") + form.MetaData = dict.Get("MetaData") + form.PieceInfo = dict.Get("PieceInfo") + form.LastModified = dict.Get("LastModified") + form.StructParent = dict.Get("StructParent") + form.StructParents = dict.Get("StructParents") + form.OPI = dict.Get("OPI") + form.OC = dict.Get("OC") + form.Name = dict.Get("Name") + + form.Stream = stream.Stream + + return form, nil +} + +func (xform *XObjectForm) GetContainingPdfObject() core.PdfObject { + return xform.primitive +} + +func (xform *XObjectForm) GetContentStream() ([]byte, error) { + decoded, err := core.DecodeStream(xform.primitive) + if err != nil { + return nil, err + } + + return decoded, nil +} + +// Update the content stream with specified encoding. If encoding is null, will use the xform.Filter object +// or Raw encoding if not set. +func (xform *XObjectForm) SetContentStream(content []byte, encoder core.StreamEncoder) error { + encoded := content + + if encoder == nil { + if xform.Filter != nil { + encoder = xform.Filter + } else { + encoder = core.NewRawEncoder() + } + } + + enc, err := encoder.EncodeBytes(encoded) + if err != nil { + return err + } + encoded = enc + + xform.Stream = encoded + + return nil +} + +// Return a stream object. +func (xform *XObjectForm) ToPdfObject() core.PdfObject { + stream := xform.primitive + + dict := stream.PdfObjectDictionary + if xform.Filter != nil { + // Pre-populate the stream dictionary with the encoding related fields. + dict = xform.Filter.MakeStreamDict() + stream.PdfObjectDictionary = dict + } + dict.Set("Type", core.MakeName("XObject")) + dict.Set("Subtype", core.MakeName("Form")) + + dict.SetIfNotNil("FormType", xform.FormType) + dict.SetIfNotNil("BBox", xform.BBox) + dict.SetIfNotNil("Matrix", xform.Matrix) + if xform.Resources != nil { + dict.SetIfNotNil("Resources", xform.Resources.ToPdfObject()) + } + dict.SetIfNotNil("Group", xform.Group) + dict.SetIfNotNil("Ref", xform.Ref) + dict.SetIfNotNil("MetaData", xform.MetaData) + dict.SetIfNotNil("PieceInfo", xform.PieceInfo) + dict.SetIfNotNil("LastModified", xform.LastModified) + dict.SetIfNotNil("StructParent", xform.StructParent) + dict.SetIfNotNil("StructParents", xform.StructParents) + dict.SetIfNotNil("OPI", xform.OPI) + dict.SetIfNotNil("OC", xform.OC) + dict.SetIfNotNil("Name", xform.Name) + + dict.Set("Length", core.MakeInteger(int64(len(xform.Stream)))) + stream.Stream = xform.Stream + + return stream +} + +// XObjectImage (Table 89 in 8.9.5.1). +// Implements PdfModel interface. +type XObjectImage struct { + //ColorSpace PdfObject + Width *int64 + Height *int64 + ColorSpace PdfColorspace + BitsPerComponent *int64 + Filter core.StreamEncoder + + Intent core.PdfObject + ImageMask core.PdfObject + Mask core.PdfObject + Matte core.PdfObject + Decode core.PdfObject + Interpolate core.PdfObject + Alternatives core.PdfObject + SMask core.PdfObject + SMaskInData core.PdfObject + Name core.PdfObject // Obsolete. Currently read if available and write if available. Not setting on new created files. + StructParent core.PdfObject + ID core.PdfObject + OPI core.PdfObject + Metadata core.PdfObject + OC core.PdfObject + Stream []byte + // Primitive + primitive *core.PdfObjectStream +} + +func NewXObjectImage() *XObjectImage { + xobj := &XObjectImage{} + stream := &core.PdfObjectStream{} + stream.PdfObjectDictionary = core.MakeDict() + xobj.primitive = stream + return xobj +} + +// Creates a new XObject Image from an image object with default options. +// If encoder is nil, uses raw encoding (none). +func NewXObjectImageFromImage(img *Image, cs PdfColorspace, encoder core.StreamEncoder) (*XObjectImage, error) { + xobj := NewXObjectImage() + return UpdateXObjectImageFromImage(xobj, img, cs, encoder) +} + +// UpdateXObjectImageFromImage creates a new XObject Image from an Image object `img` and default +// +// masks from xobjIn. +// +// The default masks are overriden if img.hasAlpha +// If `encoder` is nil, uses raw encoding (none). +func UpdateXObjectImageFromImage(xobjIn *XObjectImage, img *Image, cs PdfColorspace, + encoder core.StreamEncoder) (*XObjectImage, error) { + xobj := NewXObjectImage() + + if encoder == nil { + encoder = core.NewRawEncoder() + } + + encoded, err := encoder.EncodeBytes(img.Data) + if err != nil { + common.Log.Debug("error with encoding: %v", err) + return nil, err + } + + xobj.Filter = encoder + xobj.Stream = encoded + + // Width and height. + imWidth := img.Width + imHeight := img.Height + xobj.Width = &imWidth + xobj.Height = &imHeight + + // Bits. + xobj.BitsPerComponent = &img.BitsPerComponent + + // Guess colorspace if not explicitly set. + if cs == nil { + switch img.ColorComponents { + case 1: + xobj.ColorSpace = NewPdfColorspaceDeviceGray() + case 3: + xobj.ColorSpace = NewPdfColorspaceDeviceRGB() + case 4: + xobj.ColorSpace = NewPdfColorspaceDeviceCMYK() + default: + return nil, errors.New("colorspace undefined") + } + } else { + xobj.ColorSpace = cs + } + + if img.hasAlpha { + // Add the alpha channel information as a stencil mask (SMask). + // Has same width and height as original and stored in same + // bits per component (1 component, hence the DeviceGray channel). + smask := NewXObjectImage() + smask.Filter = encoder + encoded, err := encoder.EncodeBytes(img.alphaData) + if err != nil { + common.Log.Debug("error with encoding: %v", err) + return nil, err + } + smask.Stream = encoded + smask.BitsPerComponent = &img.BitsPerComponent + smask.Width = &img.Width + smask.Height = &img.Height + smask.ColorSpace = NewPdfColorspaceDeviceGray() + xobj.SMask = smask.ToPdfObject() + } else { + xobj.SMask = xobjIn.SMask + xobj.ImageMask = xobjIn.ImageMask + if xobj.ColorSpace.GetNumComponents() == 1 { + smaskMatteToGray(xobj) + } + } + + return xobj, nil +} + +// smaskMatteToGray converts to gray the Matte value in the SMask image referenced by `xobj` (if +// there is one) +func smaskMatteToGray(xobj *XObjectImage) error { + if xobj.SMask == nil { + return nil + } + stream, ok := xobj.SMask.(*core.PdfObjectStream) + if !ok { + common.Log.Debug("SMask is not *PdfObjectStream") + return ErrTypeCheck + } + dict := stream.PdfObjectDictionary + matte := dict.Get("Matte") + if matte == nil { + return nil + } + + gray, err := toGray(matte.(*core.PdfObjectArray)) + if err != nil { + return err + } + grayMatte := core.MakeArrayFromFloats([]float64{gray}) + dict.SetIfNotNil("Matte", grayMatte) + return nil +} + +// toGray converts a 1, 3 or 4 dimensional color `matte` to gray +// If `matte` is not a 1, 3 or 4 dimensional color then an error is returned +func toGray(matte *core.PdfObjectArray) (float64, error) { + colors, err := matte.ToFloat64Array() + if err != nil { + common.Log.Debug("Bad Matte array: matte=%s err=%v", matte, err) + } + switch len(colors) { + case 1: + return colors[0], nil + case 3: + cs := PdfColorspaceDeviceRGB{} + rgbColor, err := cs.ColorFromFloats(colors) + if err != nil { + return 0.0, err + } + return rgbColor.(*PdfColorDeviceRGB).ToGray().Val(), nil + + case 4: + cs := PdfColorspaceDeviceCMYK{} + cmykColor, err := cs.ColorFromFloats(colors) + if err != nil { + return 0.0, err + } + rgbColor, err := cs.ColorToRGB(cmykColor.(*PdfColorDeviceCMYK)) + if err != nil { + return 0.0, err + } + return rgbColor.(*PdfColorDeviceRGB).ToGray().Val(), nil + } + err = errors.New("bad Matte color") + common.Log.Error("toGray: matte=%s err=%v", matte, err) + return 0.0, err +} + +// Build the image xobject from a stream object. +// An image dictionary is the dictionary portion of a stream object representing an image XObject. +func NewXObjectImageFromStream(stream *core.PdfObjectStream) (*XObjectImage, error) { + img := &XObjectImage{} + img.primitive = stream + + dict := *(stream.PdfObjectDictionary) + + encoder, err := core.NewEncoderFromStream(stream) + if err != nil { + return nil, err + } + img.Filter = encoder + + if obj := core.TraceToDirectObject(dict.Get("Width")); obj != nil { + iObj, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, errors.New("invalid image width object") + } + iVal := int64(*iObj) + img.Width = &iVal + } else { + return nil, errors.New("width missing") + } + + if obj := core.TraceToDirectObject(dict.Get("Height")); obj != nil { + iObj, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, errors.New("invalid image height object") + } + iVal := int64(*iObj) + img.Height = &iVal + } else { + return nil, errors.New("height missing") + } + + if obj := core.TraceToDirectObject(dict.Get("ColorSpace")); obj != nil { + cs, err := NewPdfColorspaceFromPdfObject(obj) + if err != nil { + return nil, err + } + img.ColorSpace = cs + } else { + // If not specified, assume gray.. + common.Log.Debug("XObject Image colorspace not specified - assuming 1 color component") + img.ColorSpace = NewPdfColorspaceDeviceGray() + } + + if obj := core.TraceToDirectObject(dict.Get("BitsPerComponent")); obj != nil { + iObj, ok := obj.(*core.PdfObjectInteger) + if !ok { + return nil, errors.New("invalid image height object") + } + iVal := int64(*iObj) + img.BitsPerComponent = &iVal + } + + img.Intent = dict.Get("Intent") + img.ImageMask = dict.Get("ImageMask") + img.Mask = dict.Get("Mask") + img.Decode = dict.Get("Decode") + img.Interpolate = dict.Get("Interpolate") + img.Alternatives = dict.Get("Alternatives") + img.SMask = dict.Get("SMask") + img.SMaskInData = dict.Get("SMaskInData") + img.Matte = dict.Get("Matte") + img.Name = dict.Get("Name") + img.StructParent = dict.Get("StructParent") + img.ID = dict.Get("ID") + img.OPI = dict.Get("OPI") + img.Metadata = dict.Get("Metadata") + img.OC = dict.Get("OC") + + img.Stream = stream.Stream + + return img, nil +} + +// Update XObject Image with new image data. +func (ximg *XObjectImage) SetImage(img *Image, cs PdfColorspace) error { + encoded, err := ximg.Filter.EncodeBytes(img.Data) + if err != nil { + return err + } + + ximg.Stream = encoded + + // Width, height and bits. + ximg.Width = &img.Width + ximg.Height = &img.Height + ximg.BitsPerComponent = &img.BitsPerComponent + + // Guess colorspace if not explicitly set. + if cs == nil { + switch img.ColorComponents { + case 1: + ximg.ColorSpace = NewPdfColorspaceDeviceGray() + case 3: + ximg.ColorSpace = NewPdfColorspaceDeviceRGB() + case 4: + ximg.ColorSpace = NewPdfColorspaceDeviceCMYK() + default: + return errors.New("colorspace undefined") + } + } else { + ximg.ColorSpace = cs + } + + return nil +} + +// Set compression filter. Decodes with current filter sets and encodes the data with the new filter. +func (ximg *XObjectImage) SetFilter(encoder core.StreamEncoder) error { + encoded := ximg.Stream + decoded, err := ximg.Filter.DecodeBytes(encoded) + if err != nil { + return err + } + + ximg.Filter = encoder + encoded, err = encoder.EncodeBytes(decoded) + if err != nil { + return err + } + + ximg.Stream = encoded + return nil +} + +// This will convert to an Image which can be transformed or saved out. +// The image data is decoded and the Image returned. +func (ximg *XObjectImage) ToImage() (*Image, error) { + image := &Image{} + + if ximg.Height == nil { + return nil, errors.New("height attribute missing") + } + image.Height = *ximg.Height + + if ximg.Width == nil { + return nil, errors.New("width attribute missing") + } + image.Width = *ximg.Width + + if ximg.BitsPerComponent == nil { + return nil, errors.New("bits per component missing") + } + image.BitsPerComponent = *ximg.BitsPerComponent + + image.ColorComponents = ximg.ColorSpace.GetNumComponents() + + decoded, err := core.DecodeStream(ximg.primitive) + if err != nil { + return nil, err + } + image.Data = decoded + + if ximg.Decode != nil { + darr, ok := ximg.Decode.(*core.PdfObjectArray) + if !ok { + common.Log.Debug("invalid Decode object") + return nil, errors.New("invalid type") + } + decode, err := darr.ToFloat64Array() + if err != nil { + return nil, err + } + image.decode = decode + } + + return image, nil +} + +func (ximg *XObjectImage) GetContainingPdfObject() core.PdfObject { + return ximg.primitive +} + +// Return a stream object. +func (ximg *XObjectImage) ToPdfObject() core.PdfObject { + stream := ximg.primitive + + dict := stream.PdfObjectDictionary + if ximg.Filter != nil { + //dict.Set("Filter", ximg.Filter) + // Pre-populate the stream dictionary with the + // encoding related fields. + dict = ximg.Filter.MakeStreamDict() + stream.PdfObjectDictionary = dict + } + dict.Set("Type", core.MakeName("XObject")) + dict.Set("Subtype", core.MakeName("Image")) + dict.Set("Width", core.MakeInteger(*(ximg.Width))) + dict.Set("Height", core.MakeInteger(*(ximg.Height))) + + if ximg.BitsPerComponent != nil { + dict.Set("BitsPerComponent", core.MakeInteger(*(ximg.BitsPerComponent))) + } + + if ximg.ColorSpace != nil { + dict.SetIfNotNil("ColorSpace", ximg.ColorSpace.ToPdfObject()) + } + dict.SetIfNotNil("Intent", ximg.Intent) + dict.SetIfNotNil("ImageMask", ximg.ImageMask) + dict.SetIfNotNil("Mask", ximg.Mask) + dict.SetIfNotNil("Decode", ximg.Decode) + dict.SetIfNotNil("Interpolate", ximg.Interpolate) + dict.SetIfNotNil("Alternatives", ximg.Alternatives) + dict.SetIfNotNil("SMask", ximg.SMask) + dict.SetIfNotNil("SMaskInData", ximg.SMaskInData) + dict.SetIfNotNil("Matte", ximg.Matte) + dict.SetIfNotNil("Name", ximg.Name) + dict.SetIfNotNil("StructParent", ximg.StructParent) + dict.SetIfNotNil("ID", ximg.ID) + dict.SetIfNotNil("OPI", ximg.OPI) + dict.SetIfNotNil("Metadata", ximg.Metadata) + dict.SetIfNotNil("OC", ximg.OC) + + dict.Set("Length", core.MakeInteger(int64(len(ximg.Stream)))) + stream.Stream = ximg.Stream + + return stream +} diff --git a/internal/pdf/ps/const.go b/internal/pdf/ps/const.go new file mode 100644 index 0000000..d971ae1 --- /dev/null +++ b/internal/pdf/ps/const.go @@ -0,0 +1,15 @@ +package ps + +import ( + "errors" +) + +// Tolerance for comparing real values. +const TOLERANCE = 0.000001 + +// Common errors. +var ErrStackUnderflow = errors.New("Stack underflow") +var ErrStackOverflow = errors.New("Stack overflow") +var ErrTypeCheck = errors.New("Type check error") +var ErrRangeCheck = errors.New("Range check error") +var ErrUndefinedResult = errors.New("Undefined result error") diff --git a/internal/pdf/ps/exec.go b/internal/pdf/ps/exec.go new file mode 100644 index 0000000..3ddca56 --- /dev/null +++ b/internal/pdf/ps/exec.go @@ -0,0 +1,60 @@ +package ps + +// A limited postscript parser for PDF function type 4. + +import ( + "fmt" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +// A PSExecutor has its own execution stack and is used to executre a PS routine (program). +type PSExecutor struct { + Stack *PSStack + program *PSProgram +} + +func NewPSExecutor(program *PSProgram) *PSExecutor { + executor := &PSExecutor{} + executor.Stack = NewPSStack() + executor.program = program + return executor +} + +func PSObjectArrayToFloat64Array(objects []PSObject) ([]float64, error) { + vals := []float64{} + + for _, obj := range objects { + if number, is := obj.(*PSInteger); is { + vals = append(vals, float64(number.Val)) + } else if number, is := obj.(*PSReal); is { + vals = append(vals, number.Val) + } else { + return nil, fmt.Errorf("Type error") + } + } + + return vals, nil +} + +func (this *PSExecutor) Execute(objects []PSObject) ([]PSObject, error) { + // Add the arguments on stack + // [obj1 obj2 ...] + for _, obj := range objects { + err := this.Stack.Push(obj) + if err != nil { + return nil, err + } + } + + err := this.program.Exec(this.Stack) + if err != nil { + common.Log.Debug("Exec failed: %v", err) + return nil, err + } + + result := []PSObject(*this.Stack) + this.Stack.Empty() + + return result, nil +} diff --git a/internal/pdf/ps/handy.go b/internal/pdf/ps/handy.go new file mode 100644 index 0000000..805a867 --- /dev/null +++ b/internal/pdf/ps/handy.go @@ -0,0 +1,31 @@ +package ps + +func MakeReal(val float64) PSObject { + obj := PSReal{} + obj.Val = val + return &obj +} + +func MakeInteger(val int) PSObject { + obj := PSInteger{} + obj.Val = val + return &obj +} + +func MakeBool(val bool) *PSBoolean { + obj := PSBoolean{} + obj.Val = val + return &obj +} + +func MakeOperand(val string) *PSOperand { + obj := PSOperand(val) + return &obj +} + +func abs(x int) int { + if x < 0 { + return -x + } + return x +} diff --git a/internal/pdf/ps/object.go b/internal/pdf/ps/object.go new file mode 100644 index 0000000..2f85dec --- /dev/null +++ b/internal/pdf/ps/object.go @@ -0,0 +1,1367 @@ +package ps + +import ( + "errors" + "fmt" + "math" +) + +type PSObject interface { + Duplicate() PSObject + DebugString() string // Only for debugging. + String() string +} + +// Integer. +type PSInteger struct { + Val int +} + +func (this *PSInteger) Duplicate() PSObject { + obj := PSInteger{} + obj.Val = this.Val + return &obj +} + +func (this *PSInteger) DebugString() string { + return fmt.Sprintf("int:%d", this.Val) +} + +func (this *PSInteger) String() string { + return fmt.Sprintf("%d", this.Val) +} + +// Real number. +type PSReal struct { + Val float64 +} + +func (this *PSReal) DebugString() string { + return fmt.Sprintf("real:%.5f", this.Val) +} + +func (this *PSReal) String() string { + return fmt.Sprintf("%.5f", this.Val) +} + +func (this *PSReal) Duplicate() PSObject { + obj := PSReal{} + obj.Val = this.Val + return &obj +} + +// Bool. +type PSBoolean struct { + Val bool +} + +func (this *PSBoolean) DebugString() string { + return fmt.Sprintf("bool:%v", this.Val) +} + +func (this *PSBoolean) String() string { + return fmt.Sprintf("%v", this.Val) +} + +func (this *PSBoolean) Duplicate() PSObject { + obj := PSBoolean{} + obj.Val = this.Val + return &obj +} + +// A Postscript program is a series of PS objects (arguments, commands, programs etc). +type PSProgram []PSObject + +func NewPSProgram() *PSProgram { + return &PSProgram{} +} + +func (this *PSProgram) Append(obj PSObject) { + *this = append(*this, obj) +} + +func (this *PSProgram) DebugString() string { + s := "{ " + for _, obj := range *this { + s += obj.DebugString() + s += " " + } + s += "}" + + return s +} + +func (this *PSProgram) String() string { + s := "{ " + for _, obj := range *this { + s += obj.String() + s += " " + } + s += "}" + + return s +} + +func (this *PSProgram) Duplicate() PSObject { + prog := &PSProgram{} + for _, obj := range *this { + prog.Append(obj.Duplicate()) + } + return prog +} + +func (this *PSProgram) Exec(stack *PSStack) error { + for _, obj := range *this { + var err error + if number, isInt := obj.(*PSInteger); isInt { + err = stack.Push(number) + } else if number, isReal := obj.(*PSReal); isReal { + err = stack.Push(number) + } else if val, isBool := obj.(*PSBoolean); isBool { + err = stack.Push(val) + } else if function, isFunc := obj.(*PSProgram); isFunc { + err = stack.Push(function) + } else if op, isOp := obj.(*PSOperand); isOp { + err = op.Exec(stack) + } else { + return ErrTypeCheck + } + if err != nil { + return err + } + } + return nil +} + +// Operand. +type PSOperand string + +func (this *PSOperand) DebugString() string { + return fmt.Sprintf("op:'%s'", *this) +} + +func (this *PSOperand) String() string { + return fmt.Sprintf("%s", *this) +} + +func (this *PSOperand) Duplicate() PSObject { + s := *this + return &s +} + +func (this *PSOperand) Exec(stack *PSStack) error { + err := errors.New("Unsupported operand") + switch *this { + case "abs": + err = this.Abs(stack) + case "add": + err = this.Add(stack) + case "and": + err = this.And(stack) + case "atan": + err = this.Atan(stack) + + case "bitshift": + err = this.Bitshift(stack) + + case "ceiling": + err = this.Ceiling(stack) + case "copy": + err = this.Copy(stack) + case "cos": + err = this.Cos(stack) + case "cvi": + err = this.Cvi(stack) + case "cvr": + err = this.Cvr(stack) + + case "div": + err = this.Div(stack) + case "dup": + err = this.Dup(stack) + + case "eq": + err = this.Eq(stack) + case "exch": + err = this.Exch(stack) + case "exp": + err = this.Exp(stack) + + case "floor": + err = this.Floor(stack) + + case "ge": + err = this.Ge(stack) + case "gt": + err = this.Gt(stack) + + case "idiv": + err = this.IDiv(stack) + case "if": + err = this.If(stack) + case "ifelse": + err = this.IfElse(stack) + case "index": + err = this.Index(stack) + + case "le": + err = this.Le(stack) + case "log": + err = this.Log(stack) + case "ln": + err = this.Ln(stack) + case "lt": + err = this.Lt(stack) + + case "mod": + err = this.Mod(stack) + case "mul": + err = this.Mul(stack) + + case "ne": + err = this.Ne(stack) + case "neg": + err = this.Neg(stack) + case "not": + err = this.Not(stack) + + case "or": + err = this.Or(stack) + + case "pop": + err = this.Pop(stack) + + case "round": + err = this.Round(stack) + case "roll": + err = this.Roll(stack) + + case "sin": + err = this.Sin(stack) + case "sqrt": + err = this.Sqrt(stack) + case "sub": + err = this.Sub(stack) + + case "truncate": + err = this.Truncate(stack) + + case "xor": + err = this.Xor(stack) + } + + return err +} + +////// +// Operation implementations + +// Absolute value. +func (this *PSOperand) Abs(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + val := num.Val + if val < 0 { + err = stack.Push(MakeReal(-val)) + } else { + err = stack.Push(MakeReal(val)) + } + } else if num, is := obj.(*PSInteger); is { + val := num.Val + if val < 0 { + err = stack.Push(MakeInteger(-val)) + } else { + err = stack.Push(MakeInteger(val)) + } + } else { + return ErrTypeCheck + } + + return err +} + +// 5 27 add -> 32 +func (this *PSOperand) Add(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + real1, isReal1 := obj1.(*PSReal) + int1, isInt1 := obj1.(*PSInteger) + if !isReal1 && !isInt1 { + return ErrTypeCheck + } + + real2, isReal2 := obj2.(*PSReal) + int2, isInt2 := obj2.(*PSInteger) + if !isReal2 && !isInt2 { + return ErrTypeCheck + } + + // If both numbers integers -> integer output. + if isInt1 && isInt2 { + result := int1.Val + int2.Val + err := stack.Push(MakeInteger(result)) + return err + } + + // Otherwise -> real output. + var result float64 = 0 + if isReal1 { + result = real1.Val + } else { + result = float64(int1.Val) + } + + if isReal2 { + result += real2.Val + } else { + result += float64(int2.Val) + } + + err = stack.Push(MakeReal(result)) + return err +} + +// And operation. +// if bool: returns the logical "and" of the inputs +// bool1 bool2 and -> bool3 +// if int: returns the bitwise "and" of the inputs +// int1 int2 and -> int3 +func (this *PSOperand) And(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + // Boolean inputs. + if bool1, is := obj1.(*PSBoolean); is { + bool2, ok := obj2.(*PSBoolean) + if !ok { + return ErrTypeCheck + } + err = stack.Push(MakeBool(bool1.Val && bool2.Val)) // logical and + return err + } + + // Integer inputs + if int1, is := obj1.(*PSInteger); is { + int2, ok := obj2.(*PSInteger) + if !ok { + return ErrTypeCheck + } + err = stack.Push(MakeInteger(int1.Val & int2.Val)) // bitwise and + return err + } + + return ErrTypeCheck +} + +// den num atan -> atan(num/den) in degrees. +// result is a real value. +func (this *PSOperand) Atan(stack *PSStack) error { + // Denominator + den, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + // Numerator + num, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + // special cases. + // atan(inf) -> 90 + // atan(-inf) -> 270 + if den == 0 { + var err error + if num < 0 { + err = stack.Push(MakeReal(270)) + } else { + err = stack.Push(MakeReal(90)) + } + return err + } + + ratio := num / den + angleDeg := math.Atan(ratio) * 180 / math.Pi + + err = stack.Push(MakeReal(angleDeg)) + return err +} + +// bitshift +// int1 shift bitshift -> int2 +func (this *PSOperand) Bitshift(stack *PSStack) error { + shift, err := stack.PopInteger() + if err != nil { + return err + } + + int1, err := stack.PopInteger() + if err != nil { + return err + } + + var result int + + if shift >= 0 { + result = int1 << uint(shift) + } else { + result = int1 >> uint(-shift) + } + + err = stack.Push(MakeInteger(result)) + return err +} + +// Ceiling of number. +// num1 ceiling -> num2 +// The type of the result is the same as of the operand. +func (this *PSOperand) Ceiling(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + err = stack.Push(MakeReal(math.Ceil(num.Val))) + } else if num, is := obj.(*PSInteger); is { + err = stack.Push(MakeInteger(num.Val)) + } else { + err = ErrTypeCheck + } + + return err +} + +// Copy +// any1 ... anyn n copy -> any1 ... anyn any1 ... anyn +func (this *PSOperand) Copy(stack *PSStack) error { + n, err := stack.PopInteger() + if err != nil { + return err + } + + if n < 0 { + return ErrRangeCheck + } + + if n > len(*stack) { + return ErrRangeCheck + } + + *stack = append(*stack, (*stack)[len(*stack)-n:]...) + return nil +} + +// Cosine +// angle cos -> real +// Angle is in degrees +func (this *PSOperand) Cos(stack *PSStack) error { + angle, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + result := math.Cos(angle * math.Pi / 180.0) + err = stack.Push(MakeReal(result)) + return err +} + +// Convert to integer +func (this *PSOperand) Cvi(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + val := int(num.Val) + err = stack.Push(MakeInteger(val)) + } else if num, is := obj.(*PSInteger); is { + val := num.Val + err = stack.Push(MakeInteger(val)) + } else { + return ErrTypeCheck + } + + return err +} + +// Convert number tor real +func (this *PSOperand) Cvr(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + err = stack.Push(MakeReal(num.Val)) + } else if num, is := obj.(*PSInteger); is { + err = stack.Push(MakeReal(float64(num.Val))) + } else { + return ErrTypeCheck + } + + return err +} + +func (this *PSOperand) Div(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + real1, isReal1 := obj1.(*PSReal) + int1, isInt1 := obj1.(*PSInteger) + if !isReal1 && !isInt1 { + return ErrTypeCheck + } + // Cannot be 0. + if isReal1 && real1.Val == 0 { + return ErrUndefinedResult + } + if isInt1 && int1.Val == 0 { + return ErrUndefinedResult + } + + real2, isReal2 := obj2.(*PSReal) + int2, isInt2 := obj2.(*PSInteger) + if !isReal2 && !isInt2 { + return ErrTypeCheck + } + + // Float output. + var result float64 = 0 + if isReal2 { + result = real2.Val + } else { + result = float64(int2.Val) + } + + if isReal1 { + result /= real1.Val + } else { + result /= float64(int1.Val) + } + + err = stack.Push(MakeReal(result)) + return err +} + +// Duplicates the top object on the stack (dup) +func (this *PSOperand) Dup(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + // Push it back. + err = stack.Push(obj) + if err != nil { + return err + } + // Push the duplicate. + err = stack.Push(obj.Duplicate()) + return err +} + +// Check for equality. +// any1 any2 eq bool +func (this *PSOperand) Eq(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + // bool, real, int + // if bool, both must be bool + bool1, isBool1 := obj1.(*PSBoolean) + bool2, isBool2 := obj2.(*PSBoolean) + if isBool1 || isBool2 { + var err error + if isBool1 && isBool2 { + err = stack.Push(MakeBool(bool1.Val == bool2.Val)) + } else { + // Type mismatch -> false + err = stack.Push(MakeBool(false)) + } + return err + } + + var val1 float64 + var val2 float64 + + if number, is := obj1.(*PSInteger); is { + val1 = float64(number.Val) + } else if number, is := obj1.(*PSReal); is { + val1 = number.Val + } else { + return ErrTypeCheck + } + + if number, is := obj2.(*PSInteger); is { + val2 = float64(number.Val) + } else if number, is := obj2.(*PSReal); is { + val2 = number.Val + } else { + return ErrTypeCheck + } + + if math.Abs(val2-val1) < TOLERANCE { + err = stack.Push(MakeBool(true)) + } else { + err = stack.Push(MakeBool(false)) + } + + return err +} + +// Exchange the top two elements of the stack (exch) +func (this *PSOperand) Exch(stack *PSStack) error { + top, err := stack.Pop() + if err != nil { + return err + } + + next, err := stack.Pop() + if err != nil { + return err + } + + err = stack.Push(top) + if err != nil { + return err + } + err = stack.Push(next) + + return err +} + +// base exponent exp -> base^exp +// Raises base to exponent power. +// The result is a real number. +func (this *PSOperand) Exp(stack *PSStack) error { + exponent, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + base, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + if math.Abs(exponent) < 1 && base < 0 { + return ErrUndefinedResult + } + + result := math.Pow(base, exponent) + err = stack.Push(MakeReal(result)) + + return err +} + +// Floor of number. +func (this *PSOperand) Floor(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + err = stack.Push(MakeReal(math.Floor(num.Val))) + } else if num, is := obj.(*PSInteger); is { + err = stack.Push(MakeInteger(num.Val)) + } else { + return ErrTypeCheck + } + + return err +} + +// Greater than or equal +// num1 num2 ge -> bool; num1 >= num2 +func (this *PSOperand) Ge(stack *PSStack) error { + num2, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + num1, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + // Check equlity. + if math.Abs(num1-num2) < TOLERANCE { + err := stack.Push(MakeBool(true)) + return err + } else if num1 > num2 { + err := stack.Push(MakeBool(true)) + return err + } else { + err := stack.Push(MakeBool(false)) + return err + } +} + +// Greater than +// num1 num2 gt -> bool; num1 > num2 +func (this *PSOperand) Gt(stack *PSStack) error { + num2, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + num1, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + // Check equlity. + if math.Abs(num1-num2) < TOLERANCE { + err := stack.Push(MakeBool(false)) + return err + } else if num1 > num2 { + err := stack.Push(MakeBool(true)) + return err + } else { + err := stack.Push(MakeBool(false)) + return err + } +} + +// Integral division +// 25 3 div -> 8 +func (this *PSOperand) IDiv(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + int1, ok := obj1.(*PSInteger) + if !ok { + return ErrTypeCheck + } + if int1.Val == 0 { + return ErrUndefinedResult + } + + int2, ok := obj2.(*PSInteger) + if !ok { + return ErrTypeCheck + } + + result := int2.Val / int1.Val + err = stack.Push(MakeInteger(result)) + + return err +} + +// If conditional +// bool proc if -> run proc() if bool is true +func (this *PSOperand) If(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + obj2, err := stack.Pop() + if err != nil { + return err + } + + // Type checks. + proc, ok := obj1.(*PSProgram) + if !ok { + return ErrTypeCheck + } + condition, ok := obj2.(*PSBoolean) + if !ok { + return ErrTypeCheck + } + + // Run proc if condition is true. + if condition.Val { + err := proc.Exec(stack) + return err + } + + return nil +} + +// If else conditional +// bool proc1 proc2 ifelse -> execute proc1() if bool is true, otherwise proc2() +func (this *PSOperand) IfElse(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + obj2, err := stack.Pop() + if err != nil { + return err + } + obj3, err := stack.Pop() + if err != nil { + return err + } + + // Type checks. + proc2, ok := obj1.(*PSProgram) + if !ok { + return ErrTypeCheck + } + proc1, ok := obj2.(*PSProgram) + if !ok { + return ErrTypeCheck + } + condition, ok := obj3.(*PSBoolean) + if !ok { + return ErrTypeCheck + } + + // Run proc if condition is true. + if condition.Val { + err := proc1.Exec(stack) + return err + } else { + err := proc2.Exec(stack) + return err + } +} + +// Add a copy of the nth object in the stack to the top. +// any_n ... any_0 n index -> any_n ... any_0 any_n +// index from 0 +func (this *PSOperand) Index(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + n, ok := obj.(*PSInteger) + if !ok { + return ErrTypeCheck + } + + if n.Val < 0 { + return ErrRangeCheck + } + + if n.Val > len(*stack)-1 { + return ErrStackUnderflow + } + + objN := (*stack)[len(*stack)-1-n.Val] + + err = stack.Push(objN.Duplicate()) + return err +} + +// Less or equal +// num1 num2 le -> bool; num1 <= num2 +func (this *PSOperand) Le(stack *PSStack) error { + num2, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + num1, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + // Check equlity. + if math.Abs(num1-num2) < TOLERANCE { + err := stack.Push(MakeBool(true)) + return err + } else if num1 < num2 { + err := stack.Push(MakeBool(true)) + return err + } else { + err := stack.Push(MakeBool(false)) + return err + } +} + +// num log -> real +func (this *PSOperand) Log(stack *PSStack) error { + // Value + val, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + result := math.Log10(val) + err = stack.Push(MakeReal(result)) + return err +} + +// num ln -> ln(num) +// The result is a real number. +func (this *PSOperand) Ln(stack *PSStack) error { + // Value + val, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + result := math.Log(val) + err = stack.Push(MakeReal(result)) + return err +} + +// Less than +// num1 num2 lt -> bool; num1 < num2 +func (this *PSOperand) Lt(stack *PSStack) error { + num2, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + num1, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + // Check equlity. + if math.Abs(num1-num2) < TOLERANCE { + err := stack.Push(MakeBool(false)) + return err + } else if num1 < num2 { + err := stack.Push(MakeBool(true)) + return err + } else { + err := stack.Push(MakeBool(false)) + return err + } +} + +// 12 10 mod -> 2 +func (this *PSOperand) Mod(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + int1, ok := obj1.(*PSInteger) + if !ok { + return ErrTypeCheck + } + if int1.Val == 0 { + return ErrUndefinedResult + } + + int2, ok := obj2.(*PSInteger) + if !ok { + return ErrTypeCheck + } + + result := int2.Val % int1.Val + err = stack.Push(MakeInteger(result)) + return err +} + +// 6 8 mul -> 48 +func (this *PSOperand) Mul(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + real1, isReal1 := obj1.(*PSReal) + int1, isInt1 := obj1.(*PSInteger) + if !isReal1 && !isInt1 { + return ErrTypeCheck + } + + real2, isReal2 := obj2.(*PSReal) + int2, isInt2 := obj2.(*PSInteger) + if !isReal2 && !isInt2 { + return ErrTypeCheck + } + + // If both numbers integers -> integer output. + if isInt1 && isInt2 { + result := int1.Val * int2.Val + err := stack.Push(MakeInteger(result)) + return err + } + + // Otherwise -> real output. + var result float64 = 0 + if isReal1 { + result = real1.Val + } else { + result = float64(int1.Val) + } + + if isReal2 { + result *= real2.Val + } else { + result *= float64(int2.Val) + } + + err = stack.Push(MakeReal(result)) + return err +} + +// Not equal (inverse of eq) +// any1 any2 ne -> bool +func (this *PSOperand) Ne(stack *PSStack) error { + // Simply call equate and then negate the result. + // Implementing directly could be more efficient, but probably not a big deal in most cases. + err := this.Eq(stack) + if err != nil { + return err + } + + err = this.Not(stack) + return err +} + +// Negate +// 6 neg -> -6 +func (this *PSOperand) Neg(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if real, isReal := obj.(*PSReal); isReal { + err = stack.Push(MakeReal(-real.Val)) + return err + } else if inum, isInt := obj.(*PSInteger); isInt { + err = stack.Push(MakeInteger(-inum.Val)) + return err + + } else { + return ErrTypeCheck + } +} + +// Logical/bitwise negation +// bool1 not -> bool2 (logical) +// int1 not -> int2 (bitwise) +func (this *PSOperand) Not(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if bool1, is := obj.(*PSBoolean); is { + err = stack.Push(MakeBool(!bool1.Val)) + return err + } else if int1, isInt := obj.(*PSInteger); isInt { + err = stack.Push(MakeInteger(^int1.Val)) + return err + } else { + return ErrTypeCheck + } +} + +// OR logical/bitwise operation. +// bool1 bool2 or -> bool3 (logical or) +// int1 int2 or -> int3 (bitwise or) +func (this *PSOperand) Or(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + // Boolean inputs (logical). + if bool1, is := obj1.(*PSBoolean); is { + bool2, ok := obj2.(*PSBoolean) + if !ok { + return ErrTypeCheck + } + err = stack.Push(MakeBool(bool1.Val || bool2.Val)) + return err + } + + // Integer inputs (bitwise). + if int1, is := obj1.(*PSInteger); is { + int2, ok := obj2.(*PSInteger) + if !ok { + return ErrTypeCheck + } + err = stack.Push(MakeInteger(int1.Val | int2.Val)) + return err + } + + return ErrTypeCheck +} + +// Remove the top element on the stack (pop) +func (this *PSOperand) Pop(stack *PSStack) error { + _, err := stack.Pop() + if err != nil { + return err + } + return nil +} + +// Round number off. +// num1 round -> num2 +func (this *PSOperand) Round(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + err = stack.Push(MakeReal(math.Floor(num.Val + 0.5))) + } else if num, is := obj.(*PSInteger); is { + err = stack.Push(MakeInteger(num.Val)) + } else { + return ErrTypeCheck + } + + return err +} + +// Roll stack contents (num dir roll) +// num: number of elements, dir: direction +// 7 8 9 3 1 roll -> 9 7 8 +// 7 8 9 3 -1 roll -> 8 9 7 +// n j roll +func (this *PSOperand) Roll(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + j, ok := obj1.(*PSInteger) + if !ok { + return ErrTypeCheck + } + + n, ok := obj2.(*PSInteger) + if !ok { + return ErrTypeCheck + } + if n.Val < 0 { + return ErrRangeCheck + } + if n.Val == 0 || n.Val == 1 { + // Do nothing.. + return nil + } + if n.Val > len(*stack) { + return ErrStackUnderflow + } + + for i := 0; i < abs(j.Val); i++ { + var substack []PSObject + + substack = (*stack)[len(*stack)-(n.Val) : len(*stack)] + if j.Val > 0 { + // if j > 0; put the top element on bottom of the substack + top := substack[len(substack)-1] + substack = append([]PSObject{top}, substack[0:len(substack)-1]...) + } else { + // if j < 0: put the bottom element on top + bottom := substack[len(substack)-n.Val] + substack = append(substack[1:], bottom) + } + + s := append((*stack)[0:len(*stack)-n.Val], substack...) + stack = &s + } + + return nil +} + +// Sine. +// angle sin -> real +// Angle is in degrees +func (this *PSOperand) Sin(stack *PSStack) error { + angle, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + result := math.Sin(angle * math.Pi / 180.0) + err = stack.Push(MakeReal(result)) + return err +} + +// Square root. +// num sqrt -> real; real=sqrt(num) +// The result is a real number. +func (this *PSOperand) Sqrt(stack *PSStack) error { + val, err := stack.PopNumberAsFloat64() + if err != nil { + return err + } + + if val < 0 { + return ErrRangeCheck + } + + result := math.Sqrt(val) + err = stack.Push(MakeReal(result)) + return err +} + +// 8.3 6.6 sub -> 1.7 (real) +// 8 6.3 sub -> 1.7 (real) +// 8 6 sub -> 2 (int) +func (this *PSOperand) Sub(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + real1, isReal1 := obj1.(*PSReal) + int1, isInt1 := obj1.(*PSInteger) + if !isReal1 && !isInt1 { + return ErrTypeCheck + } + + real2, isReal2 := obj2.(*PSReal) + int2, isInt2 := obj2.(*PSInteger) + if !isReal2 && !isInt2 { + return ErrTypeCheck + } + + // If both numbers integers -> integer output. + if isInt1 && isInt2 { + result := int2.Val - int1.Val + err := stack.Push(MakeInteger(result)) + return err + } + + // Otherwise -> real output. + var result float64 = 0 + if isReal2 { + result = real2.Val + } else { + result = float64(int2.Val) + } + + if isReal1 { + result -= real1.Val + } else { + result -= float64(int1.Val) + } + + err = stack.Push(MakeReal(result)) + return err +} + +// Truncate number. +// num1 truncate -> num2 +// The resulting number is the same type as the input. +func (this *PSOperand) Truncate(stack *PSStack) error { + obj, err := stack.Pop() + if err != nil { + return err + } + + if num, is := obj.(*PSReal); is { + truncated := int(num.Val) + err = stack.Push(MakeReal(float64(truncated))) + } else if num, is := obj.(*PSInteger); is { + err = stack.Push(MakeInteger(num.Val)) + } else { + return ErrTypeCheck + } + + return err +} + +// XOR logical/bitwise operation. +// bool1 bool2 xor -> bool3 (logical xor) +// int1 int2 xor -> int3 (bitwise xor) +func (this *PSOperand) Xor(stack *PSStack) error { + obj1, err := stack.Pop() + if err != nil { + return err + } + + obj2, err := stack.Pop() + if err != nil { + return err + } + + // Boolean inputs (logical). + if bool1, is := obj1.(*PSBoolean); is { + bool2, ok := obj2.(*PSBoolean) + if !ok { + return ErrTypeCheck + } + err = stack.Push(MakeBool(bool1.Val != bool2.Val)) + return err + } + + // Integer inputs (bitwise). + if int1, is := obj1.(*PSInteger); is { + int2, ok := obj2.(*PSInteger) + if !ok { + return ErrTypeCheck + } + err = stack.Push(MakeInteger(int1.Val ^ int2.Val)) + return err + } + + return ErrTypeCheck +} diff --git a/internal/pdf/ps/parser.go b/internal/pdf/ps/parser.go new file mode 100644 index 0000000..297aaa3 --- /dev/null +++ b/internal/pdf/ps/parser.go @@ -0,0 +1,245 @@ +package ps + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io" + "strconv" + + pdfcore "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/core" + + "gitea.tecamino.com/paadi/pdfmerge/internal/pdf/common" +) + +type PSParser struct { + reader *bufio.Reader +} + +// Create a new instance of the PDF Postscript parser from input data. +func NewPSParser(content []byte) *PSParser { + parser := PSParser{} + + buffer := bytes.NewBuffer(content) + parser.reader = bufio.NewReader(buffer) + + return &parser +} + +// Parse the postscript and store as a program that can be executed. +func (this *PSParser) Parse() (*PSProgram, error) { + this.skipSpaces() + bb, err := this.reader.Peek(2) + if err != nil { + return nil, err + } + if bb[0] != '{' { + return nil, fmt.Errorf("invalid PS Program not starting with {") + } + + program, err := this.parseFunction() + if err != nil && err != io.EOF { + return nil, err + } + + return program, err +} + +// Detect the signature at the current parse position and parse +// the corresponding object. +func (this *PSParser) parseFunction() (*PSProgram, error) { + c, _ := this.reader.ReadByte() + if c != '{' { + return nil, errors.New("invalid function") + } + + function := NewPSProgram() + + for { + this.skipSpaces() + bb, err := this.reader.Peek(2) + if err != nil { + if err == io.EOF { + break + } + return nil, err + } + + common.Log.Trace("Peek string: %s", string(bb)) + // Determine type. + if bb[0] == '}' { + common.Log.Trace("EOF function") + this.reader.ReadByte() + break + } else if bb[0] == '{' { + common.Log.Trace("Function!") + inlineF, err := this.parseFunction() + if err != nil { + return nil, err + } + function.Append(inlineF) + } else if pdfcore.IsDecimalDigit(bb[0]) || (bb[0] == '-' && pdfcore.IsDecimalDigit(bb[1])) { + common.Log.Trace("->Number!") + number, err := this.parseNumber() + if err != nil { + return nil, err + } + function.Append(number) + } else { + common.Log.Trace("->Operand or bool?") + // Let's peek farther to find out. + bb, _ = this.reader.Peek(5) + peekStr := string(bb) + common.Log.Trace("Peek str: %s", peekStr) + + if (len(peekStr) > 4) && (peekStr[:5] == "false") { + b, err := this.parseBool() + if err != nil { + return nil, err + } + function.Append(b) + } else if (len(peekStr) > 3) && (peekStr[:4] == "true") { + b, err := this.parseBool() + if err != nil { + return nil, err + } + function.Append(b) + } else { + operand, err := this.parseOperand() + if err != nil { + return nil, err + } + function.Append(operand) + } + } + } + + return function, nil +} + +// Skip over any spaces. Returns the number of spaces skipped and +// an error if any. +func (this *PSParser) skipSpaces() (int, error) { + cnt := 0 + for { + bb, err := this.reader.Peek(1) + if err != nil { + return 0, err + } + if pdfcore.IsWhiteSpace(bb[0]) { + this.reader.ReadByte() + cnt++ + } else { + break + } + } + + return cnt, nil +} + +// Numeric objects. +// Integer or Real numbers. +func (this *PSParser) parseNumber() (PSObject, error) { + isFloat := false + allowSigns := true + numStr := "" + for { + common.Log.Trace("Parsing number \"%s\"", numStr) + bb, err := this.reader.Peek(1) + if err == io.EOF { + // GH: EOF handling. Handle EOF like end of line. Can happen with + // encoded object streams that the object is at the end. + // In other cases, we will get the EOF error elsewhere at any rate. + break // Handle like EOF + } + if err != nil { + common.Log.Error("error %s", err) + return nil, err + } + if allowSigns && (bb[0] == '-' || bb[0] == '+') { + // Only appear in the beginning, otherwise serves as a delimiter. + b, _ := this.reader.ReadByte() + numStr += string(b) + allowSigns = false // Only allowed in beginning, and after e (exponential). + } else if pdfcore.IsDecimalDigit(bb[0]) { + b, _ := this.reader.ReadByte() + numStr += string(b) + } else if bb[0] == '.' { + b, _ := this.reader.ReadByte() + numStr += string(b) + isFloat = true + } else if bb[0] == 'e' { + // Exponential number format. + // XXX Is this supported in PS? + b, _ := this.reader.ReadByte() + numStr += string(b) + isFloat = true + allowSigns = true + } else { + break + } + } + + if isFloat { + fVal, err := strconv.ParseFloat(numStr, 64) + o := MakeReal(fVal) + return o, err + } else { + intVal, err := strconv.ParseInt(numStr, 10, 64) + o := MakeInteger(int(intVal)) + return o, err + } +} + +// Parse bool object. +func (this *PSParser) parseBool() (*PSBoolean, error) { + bb, err := this.reader.Peek(4) + if err != nil { + return MakeBool(false), err + } + if (len(bb) >= 4) && (string(bb[:4]) == "true") { + this.reader.Discard(4) + return MakeBool(true), nil + } + + bb, err = this.reader.Peek(5) + if err != nil { + return MakeBool(false), err + } + if (len(bb) >= 5) && (string(bb[:5]) == "false") { + this.reader.Discard(5) + return MakeBool(false), nil + } + + return MakeBool(false), errors.New("Unexpected boolean string") +} + +// An operand is a text command represented by a word. +func (this *PSParser) parseOperand() (*PSOperand, error) { + bytes := []byte{} + for { + bb, err := this.reader.Peek(1) + if err != nil { + if err == io.EOF { + break + } + return nil, err + } + if pdfcore.IsDelimiter(bb[0]) { + break + } + if pdfcore.IsWhiteSpace(bb[0]) { + break + } + + b, _ := this.reader.ReadByte() + bytes = append(bytes, b) + } + + if len(bytes) == 0 { + return nil, fmt.Errorf("invalid operand (empty)") + } + + return MakeOperand(string(bytes)), nil +} diff --git a/internal/pdf/ps/stack.go b/internal/pdf/ps/stack.go new file mode 100644 index 0000000..c221569 --- /dev/null +++ b/internal/pdf/ps/stack.go @@ -0,0 +1,83 @@ +package ps + +type PSStack []PSObject + +func NewPSStack() *PSStack { + return &PSStack{} +} + +func (stack *PSStack) Empty() { + *stack = []PSObject{} +} + +func (stack *PSStack) Push(obj PSObject) error { + if len(*stack) > 100 { + return ErrStackOverflow + } + + *stack = append(*stack, obj) + return nil +} + +func (stack *PSStack) Pop() (PSObject, error) { + if len(*stack) < 1 { + return nil, ErrStackUnderflow + } + + obj := (*stack)[len(*stack)-1] + *stack = (*stack)[0 : len(*stack)-1] + + return obj, nil +} + +func (stack *PSStack) PopInteger() (int, error) { + obj, err := stack.Pop() + if err != nil { + return 0, err + } + + if number, is := obj.(*PSInteger); is { + return number.Val, nil + } else { + return 0, ErrTypeCheck + } +} + +// Pop and return the numeric value of the top of the stack as a float64. +// Real or integer only. +func (stack *PSStack) PopNumberAsFloat64() (float64, error) { + obj, err := stack.Pop() + if err != nil { + return 0, err + } + + if number, is := obj.(*PSReal); is { + return number.Val, nil + } else if number, is := obj.(*PSInteger); is { + return float64(number.Val), nil + } else { + return 0, ErrTypeCheck + } +} + +func (this *PSStack) String() string { + s := "[ " + for _, obj := range *this { + s += obj.String() + s += " " + } + s += "]" + + return s +} + +func (this *PSStack) DebugString() string { + s := "[ " + for _, obj := range *this { + s += obj.DebugString() + s += " " + } + s += "]" + + return s +}