Open tbrowder opened 1 year ago
To me it is clearer to separate the two actions, if I understand correctly:
use PDF::Font::Loader :load-font, :find-font; my $font-file = find-font: :family<DejaVu>, :slant<italic>, :lang<en>; my $font = load-font: $font-file; # use the font in PDF-Lite # ... $pdf.add-page.text: { .font = $font; .text-position = [10, 600]; .say: 'Hello, world'; } # ...
In the example the font size entry is missing. I think it should be something like:
.font = $font, $font-size; # in PS points
To me it is clearer to separate the two actions, if I understand correctly: