summaryrefslogtreecommitdiff
path: root/def.go
diff options
context:
space:
mode:
authorPaulo Coutinho <paulo@prsolucoes.com>2016-07-28 15:16:40 -0300
committerPaulo Coutinho <paulo@prsolucoes.com>2016-07-28 15:16:40 -0300
commit3b6661f37138ca3acd19fdf756b3104021d2b315 (patch)
tree1932a8b7bc332fafb18824315f0aaa69b086c884 /def.go
parent11f22e6f7d4f331772e7999a14bb7ade23028f19 (diff)
adding support to embedded fonts as byte array
Diffstat (limited to 'def.go')
-rw-r--r--def.go23
1 files changed, 13 insertions, 10 deletions
diff --git a/def.go b/def.go
index f5eed3a..3bb32d4 100644
--- a/def.go
+++ b/def.go
@@ -122,6 +122,8 @@ func (info *ImageInfoType) SetDpi(dpi float64) {
type fontFileType struct {
length1, length2 int64
n int
+ embedded bool
+ content []byte
}
type linkType struct {
@@ -246,9 +248,10 @@ type Fpdf struct {
layer layerRecType // manages optional layers in document
catalogSort bool // sort resource catalogs in document
colorFlag bool // indicates whether fill and text colors are different
- color struct { // Composite values of colors
- draw, fill, text clrType
- }
+ color struct {
+ // Composite values of colors
+ draw, fill, text clrType
+ }
}
type encType struct {
@@ -310,31 +313,31 @@ type FontDescType struct {
// The maximum height above the baseline reached by glyphs in this
// font (for example for "S"). The height of glyphs for accented
// characters shall be excluded.
- Ascent int
+ Ascent int
// The maximum depth below the baseline reached by glyphs in this
// font. The value shall be a negative number.
- Descent int
+ Descent int
// The vertical coordinate of the top of flat capital letters,
// measured from the baseline (for example "H").
- CapHeight int
+ CapHeight int
// A collection of flags defining various characteristics of the
// font. (See the FontFlag* constants.)
- Flags int
+ Flags int
// A rectangle, expressed in the glyph coordinate system, that
// shall specify the font bounding box. This should be the smallest
// rectangle enclosing the shape that would result if all of the
// glyphs of the font were placed with their origins coincident
// and then filled.
- FontBBox fontBoxType
+ FontBBox fontBoxType
// The angle, expressed in degrees counterclockwise from the
// vertical, of the dominant vertical strokes of the font. (The
// 9-o’clock position is 90 degrees, and the 3-o’clock position
// is –90 degrees.) The value shall be negative for fonts that
// slope to the right, as almost all italic fonts do.
- ItalicAngle int
+ ItalicAngle int
// The thickness, measured horizontally, of the dominant vertical
// stems of glyphs in the font.
- StemV int
+ StemV int
// The width to use for character codes whose widths are not
// specified in a font dictionary’s Widths array. This shall have
// a predictable effect only if all such codes map to glyphs whose