fonts

command
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 7 Imported by: 0

README

Embedded Fonts Example

This sample shows how to embed a TrueType font from testdata/*.TTF and draw the Chinese greeting "你好,世界!" using the fluent PDF builder.

It demonstrates:

  • loading a UTF-8 string into the document via a registered TrueType font
  • registering the font once and reusing it through standard builder text operations
  • writing the PDF with the default writer configuration

Download fonts

Download these fonts and place them in the testdata directory.

Run It

go run ./examples/fonts [output.pdf]

The program defaults to fonts.pdf in the current directory.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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