Skip to content

DO NOT MERGE: fpdf2 greenfield planner spike v2 - #206

Draft
yyolk wants to merge 3 commits into
masterfrom
cursor/fpdf2-greenfield-planner-spike-v2-c128
Draft

DO NOT MERGE: fpdf2 greenfield planner spike v2#206
yyolk wants to merge 3 commits into
masterfrom
cursor/fpdf2-greenfield-planner-spike-v2-c128

Conversation

@yyolk

@yyolk yyolk commented Sep 8, 2026

Copy link
Copy Markdown
Owner

DO NOT MERGE. Experimental throwaway spike. This branch will not be merged and may be deleted later.

Third greenfield planner spike (after fpdf2 v1 #204 and ReportLab #205). Source is rebuilt clean — no copy from those branches. Visual craft aims at #205’s tighter Helvetica-on-white (black header slab, washed/inverted nav, boxed mini-months, hairline rhythm) without parch chrome.

The Typst/parch application tree is stripped. Tiny Python package writes a yearly planner PDF with fpdf2 only.

Type (follow-up)

Helvetica is gone. Vendored Liberation Fonts 2.1.5 (SIL OFL 1.1) in src/planner/fonts/ — Regular + Bold for Sans and Serif. add_font at construct.

  • Serif — titles and the cover year numeral (January 2026, Week 1, Thu 1 January, giant 2026).
  • Sans — chrome, nav, calendars, chips, figures.
  • Small caps — fake, not OpenType smcp. Uppercase at 0.76× with 0.14 em tracking. Used on nav tabs, cover eyebrow/specs, header meta, month abbreviations, weekday letters, week gutter, and labels (notes / today / more). Documented in NOTES.md.

Glance: artifacts/preview/{cover,year,quarter,month,week,day}.png and artifacts/preview/type-sample.png (cover + day).

Generate

python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/press --specimen
.venv/bin/press                          # N=0, artifacts/planner-2026.pdf
.venv/bin/press --notes-pages 2
.venv/bin/press --specimen --notes-pages 2

Defaults: year 2026, Monday week start, page 106 × 144 mm portrait.

--notes-pages N: 1 daily page + N dedicated notes pages per day. N=0 (default) is the day page only, with its on-page notes panel.

Notes-pages benchmark

Full-year 2026, Monday weeks. /usr/bin/time -v around press (generate only). VM: 15 GiB RAM, 4 CPUs, no swap. Order 0 → 2 → 10 → 20 → 30 → 50 → 100. Nothing OOM’d. Last completed N=100. Died N: none. Full-year N≥2 PDFs not committed (N=100 was ~76 MB). Details: BENCH.md. Fonts follow-up did not re-run the N=100 matrix.

N pages wall peak RSS PDF bytes link annots named dests
0 436 1.23 s 63.6 MiB 3.1 MB 20 065 436
2 1 166 1.73 s 72.7 MiB 4.6 MB 25 905 1 166
10 4 086 3.54 s 109.2 MiB 10.3 MB 48 900 4 086
20 7 736 6.05 s 154.4 MiB 17.6 MB 78 100 7 736
30 11 386 8.46 s 200.5 MiB 24.9 MB 107 300 11 386
50 18 686 13.52 s 290.3 MiB 39.4 MB 165 700 18 686
100 36 936 26.04 s 518.0 MiB 75.7 MB 311 700 36 936

Spot-check (pypdf): day-2026-07-02 and day-2026-07-02-notes-1 exist for N≥2; day→notes-1 and notes-1→day annots resolve (N=2: pages 618↔619; N=100: 18454↔18455).

vs #204 / #205 at N=100: v2 26 s / 518 MiB / 76 MB; v1 31 s / 629 MiB / 78 MB; ReportLab 35 s / 893 MiB / 109 MB. Same linear class, no Typst notes-slab cliff.

CI

Old Typst jobs replaced with a specimen generate stub. Do not treat as product CI.

Open in Web Open in Cursor 

Strip the Typst/parch tree and replace it with a tiny fpdf2-only
package. Working press writes a 2026 Monday-week 106x144 mm planner
with named dests, page links, and specimen/full-year artifacts.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 2 commits September 8, 2026 21:53
Full-year 2026 matrix 0→100 via /usr/bin/time -v. Nothing OOM'd.
N=100 was 26s / 518 MiB. Spot-check day↔notes with pypdf.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
Vendor Liberation Fonts 2.1.5 (SIL OFL) and register Regular+Bold
via add_font. Serif for titles and the cover year; sans for chrome,
nav, and calendars. Labels use a fake smcp (uppercase at 0.76x with
tracking). Regenerated specimen and previews.

Co-authored-by: Joseph Chiocchi <joe@yolk.cc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants