Browse Source

Add Russian font support

master
Joop Kiefte 2 years ago
parent
commit
bdf726126c
  1. BIN
      font/Courier-Prime-Bold-Italic.ttf
  2. BIN
      font/Courier-Prime-Bold.ttf
  3. BIN
      font/Courier-Prime-Italic.ttf
  4. BIN
      font/Courier-Prime.ttf
  5. BIN
      font/CourierPrime-Bold.ttf
  6. BIN
      font/CourierPrime-BoldItalic.ttf
  7. BIN
      font/CourierPrime-Italic.ttf
  8. BIN
      font/CourierPrime-Regular.ttf
  9. 84
      font/bindata.go
  10. 8
      pdf/create.go

BIN
font/Courier-Prime-Bold-Italic.ttf

Binary file not shown.

BIN
font/Courier-Prime-Bold.ttf

Binary file not shown.

BIN
font/Courier-Prime-Italic.ttf

Binary file not shown.

BIN
font/Courier-Prime.ttf

Binary file not shown.

BIN
font/CourierPrime-Bold.ttf

Binary file not shown.

BIN
font/CourierPrime-BoldItalic.ttf

Binary file not shown.

BIN
font/CourierPrime-Italic.ttf

Binary file not shown.

BIN
font/CourierPrime-Regular.ttf

Binary file not shown.

84
font/bindata.go

File diff suppressed because one or more lines are too long

8
pdf/create.go

@ -52,10 +52,10 @@ func line(pdf *gofpdf.Fpdf, format rules.Format, text string) { @@ -52,10 +52,10 @@ func line(pdf *gofpdf.Fpdf, format rules.Format, text string) {
func Create(file string, format rules.Set, contents lex.Screenplay) {
pdf := gofpdf.New("P", "in", "Letter", "")
pdf.AddUTF8FontFromBytes("CourierPrime", "", font.MustAsset("CourierPrime-Regular.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "B", font.MustAsset("CourierPrime-Bold.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "I", font.MustAsset("CourierPrime-Italic.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "BI", font.MustAsset("CourierPrime-BoldItalic.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "", font.MustAsset("Courier-Prime.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "B", font.MustAsset("Courier-Prime-Bold.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "I", font.MustAsset("Courier-Prime-Italic.ttf"))
pdf.AddUTF8FontFromBytes("CourierPrime", "BI", font.MustAsset("Courier-Prime-Bold-Italic.ttf"))
pdf.AddPage()
pdf.SetMargins(1, 1, 1)
pdf.SetXY(1, 1)

Loading…
Cancel
Save