Skip to content

Commit

Permalink
add :Lang to root element in doco and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Nov 7, 2023
1 parent 7fc85e3 commit d1d6737
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use PDF::XObject::Image;
my PDF::API6 $pdf .= new;
my PDF::Tags $tags .= create: :$pdf;
# create the document root
my PDF::Tags::Elem $doc = $tags.Document;
my PDF::Tags::Elem $doc = $tags.Document: :Lang<en-NZ>;

my PDF::Page $page = $pdf.add-page;
my $header-font = $page.core-font: :family<Helvetica>, :weight<bold>;
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use PDF::XObject::Image;
my PDF::API6 $pdf .= new;
my PDF::Tags $tags .= create: :$pdf;
# create the document root
my PDF::Tags::Elem $doc = $tags.Document;
my PDF::Tags::Elem $doc = $tags.Document: :Lang<en-NZ>;

my PDF::Page $page = $pdf.add-page;
my $header-font = $page.core-font: :family<Helvetica>, :weight<bold>;
Expand Down
Binary file modified t/attributes.pdf
Binary file not shown.
6 changes: 4 additions & 2 deletions t/attributes.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 6;
plan 7;

use PDF::Content::FontObj;
use PDF::Tags;
Expand All @@ -11,7 +11,9 @@ use PDF::COS::Name;

my PDF::Class $pdf .= new;
my PDF::Tags $tags .= create: :$pdf;
my PDF::Tags::Elem $doc = $tags.Document;
my PDF::Tags::Elem $doc = $tags.Document: :Lang<en-NZ>;
my $lang = $doc.Lang;
is $doc.Lang, 'en-NZ';

my PDF::Page $page = $pdf.add-page;
my PDF::Content::FontObj $header-font = $pdf.core-font: :family<Helvetica>, :weight<bold>;
Expand Down

0 comments on commit d1d6737

Please sign in to comment.