diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-23 09:06:37 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-23 09:06:37 +0300 |
| commit | 1834c8886b15aa3b868e988c185ac5c344392886 (patch) | |
| tree | 89bab79059910638b7f8b3f865e9feddf95f4b81 /internal/comic/pageframe_test.go | |
| parent | 0ccc8073852895996ed70c4b2a86c460e3a3ddae (diff) | |
Add ISO A4 PDF print/book pipeline, page-frame prompts, and usage docs
Print and book PDF modes now letterbox each raster to A4 portrait at pdf.density;
print uses the matte color for pads. CLI forces 3:4 generation for print|book unless
--aspect-ratio is set. Cover, gallery, and back prompts gain DINA4PDF instructions when
those modes are active.
Introduce DescribePageFrame and PDF helpers with tests; add CLI tests for presentation
and aspect precedence. Expand README and config example with A4 examples, language
env vars, and page-format vs PDF behavior. Add sample Sumer vocabulary files.
Made-with: Cursor
Diffstat (limited to 'internal/comic/pageframe_test.go')
| -rw-r--r-- | internal/comic/pageframe_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/comic/pageframe_test.go b/internal/comic/pageframe_test.go new file mode 100644 index 0000000..c9c7c26 --- /dev/null +++ b/internal/comic/pageframe_test.go @@ -0,0 +1,22 @@ +package comic + +import "testing" + +func TestDescribePageFrame(t *testing.T) { + tests := []struct { + ratio string + want string + }{ + {"16:9", "landscape 16:9 format (widescreen)"}, + {"2:3", "portrait 2:3 format (tall comic book page proportions)"}, + {"3:2", "landscape 3:2 format (widescreen)"}, + {"1:1", "square 1:1 format"}, + {"", "landscape 16:9 format (widescreen)"}, + {"bogus", "bogus format"}, + } + for _, tt := range tests { + if got := DescribePageFrame(tt.ratio); got != tt.want { + t.Fatalf("DescribePageFrame(%q) = %q, want %q", tt.ratio, got, tt.want) + } + } +} |
