pdf

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

README

Wrap PDF

PDF export for Wrap.

For more information see the wiki or if there is a bug you would like to report or an idea to suggest you can do that here.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CourierPrime = Font{
		RomanName:      "Courier Prime",
		Roman:          []string{"Courier Prime.ttf", "Courier Prime Regular.ttf", "CourierPrime-Regular.ttf", "courier-prime.ttf"},
		BoldName:       "Courier Prime Bold",
		Bold:           []string{"Courier Prime Bold.ttf", "CourierPrime-Bold.ttf", "courier-prime-bold.ttf"},
		ItalicName:     "Courier Prime Italic",
		Italic:         []string{"Courier Prime Italic.ttf", "CourierPrime-Italic.ttf", "courier-prime-italic.ttf"},
		BoldItalicName: "Courier Prime Bold Italic",
		BoldItalic:     []string{"Courier Prime Bold Italic.ttf", "CourierPrime-BoldItalic.ttf", "courier-prime-bold-italic.ttf"},
	}

	CourierNew = Font{
		RomanName:      "Courier New",
		Roman:          []string{"Courier New.ttf", "cour.ttf"},
		BoldName:       "Courier New Bold",
		Bold:           []string{"Courier New Bold.ttf", "courbd.ttf"},
		ItalicName:     "Courier New Italic",
		Italic:         []string{"Courier New Italic.ttf", "couri.ttf"},
		BoldItalicName: "Courier New Bold Italic",
		BoldItalic:     []string{"Courier New Bold Italic.ttf", "courbi.ttf"},
	}

	FreeMono = Font{
		RomanName:      "FreeMono",
		Roman:          []string{"FreeMono.ttf"},
		BoldName:       "FreeMono Bold",
		Bold:           []string{"FreeMonoBold.ttf"},
		ItalicName:     "FreeMono Oblique",
		Italic:         []string{"FreeMonoOblique.ttf"},
		BoldItalicName: "FreeMono Bold Oblique",
		BoldItalic:     []string{"FreeMonoBoldOblique.ttf"},
	}
)

Selectable fonts

View Source
var AutoFontSelection = true

AutoFontSelection enables automatic font selection

View Source
var PageSize = ""

PageSize specifies the prefered page size

View Source
var Production = true

Production makes the export module add scene numbers and other production specific additions

View Source
var SelectedFont = CourierPrime

SelectedFont is the font to be used during export if AutoSelect is disabled

Functions

func MakePDF

func MakePDF(script *ast.Script, pathToFile string) error

MakePDF writes the PDF to a file

func WritePDF

func WritePDF(script *ast.Script, writer io.Writer) error

WritePDF writes the PDF to a writer

Types

type Font

type Font struct {
	RomanName      string
	Roman          []string
	BoldName       string
	Bold           []string
	ItalicName     string
	Italic         []string
	BoldItalicName string
	BoldItalic     []string
}

Font are fonts that the PDF export can use

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL