// Where a tool's name is PRINTED on its own object — Home's directory.//// The owner's ruling of 2026-09-16: Home's objects carry no word under them// and no figure. The name is printed ON the object's face — on the clipboard's// header, on the ledger's cover, across the newspaper's masthead — set LIVE// and blended into the photograph exactly the way a project's name is printed// on an enamel cap (`ProjectCaps.swift`: the ink is `PrintInk`, multiplied// when it is dark and screened when it is cream, so the object's own grain and// wear show through the letters). Nothing is baked into a PNG: a rename is a// redraw, and the calendar reprints itself every day.//// ONE ENTRY PER OBJECT, keyed by the OBJECT's name — the part after `tool-`,// which is what `ToolObjects.asset(for:)` names. The entry says WHERE on the// 600 × 600 cut-out the print sits (a box in unit coordinates of the square),// at what angle, in which face and which paint.//// AND THE OBJECTS THAT CARRY NO WORD. A telephone handset, a dartboard, a map// with a pin, a film reel: they have no printable face, and they do not need// one — they say what they are. They are `wordless`, and the two sets are// TOTAL and DISJOINT over `ToolObjects.objectNames`: an object in neither// would silently lose its name, and one in both is two rules for one object.// `ToolPrintTests` holds both directions.//// THE CALENDAR PRINTS THE DATE, NOT THE WORD. A tear-off calendar with// "Calendar" typed on it is a label; a tear-off calendar with SEP over a 16 is// a calendar. Its table entry is the DAY's box; the month band above it is// `calendarMonth`, and both are read off the `now` Home already holds, through// `CottonDate`'s pinned formatter and never an ad-hoc one.importCottonKitimportCottonValuesimportFoundationimportSwiftUI/// One object's print.publicstructToolPrint: Sendable, Equatable {/// The faces a print can be set in — the bundled ones (`Fonts.swift`),/// which is the whole vocabulary an object's lettering has.publicenumFace: String, CaseIterable, Sendable {/// Courier Prime — typing on a form, a label, a card.case type/// Instrument Serif Italic — the enamel lettering, a bottler's label.case cap/// Fraunces Title — a masthead, a spine, a cover.case display/// Caveat — a hand that wrote on the thing itself.case handpublicfunc font(_ size: CGFloat, in type: ThemeType) -> Font {switchself {case .type: return type.body(size)case .cap: return type.cap(size)case .display: return type.display(size)case .hand: return type.hand(size) } } }/// What the print does to the name before it sets it. Not a style — a/// ledger's cover is STAMPED in capitals and a note's is not, and that is/// a fact about the object, not about the string.publicenumTransform: String, CaseIterable, Sendable {case none, upperpublicfunc apply(_ text: String) -> String {switchself {case .none: return textcase .upper: return text.uppercased() } } }/// The two paints — `ProjectCaps.swift`'s, so a cream is one cream.publictypealiasInk = PrintInk/// Centre of the print box in unit coordinates of the object's square/// (0…1, origin top-left).publiclet cx: CGFloatpubliclet cy: CGFloat/// Width and height of the print box, as fractions of the square's side.publiclet w: CGFloatpubliclet h: CGFloat/// Rotation of the print, degrees, clockwise positive.publiclet rotation: CGFloatpubliclet face: Facepubliclet ink: Inkpubliclet transform: Transform/// How many lines the box may wrap to — 1 or 2, for the long names.publiclet lines: Intpublicinit( cx: CGFloat, cy: CGFloat, w: CGFloat, h: CGFloat, rotation: CGFloat = 0, face: Face, ink: Ink = .dark, transform: Transform = .none, lines: Int = 1 ) {self.cx = cxself.cy = cyself.w = wself.h = hself.rotation = rotationself.face = faceself.ink = inkself.transform = transformself.lines = lines }/// The point size this print is set at on an object drawn `objectSide`/// points wide. The box is the measure, not the cell: an object is the/// same picture at every size, so its lettering scales with the picture./// One line fills `tool_print_font_fraction` of the box's height.publicfunc fontSize(objectSide: CGFloat, scale: ThemeScale) -> CGFloat { objectSide * h * ToolPrintKnobs.toolPrintFontFraction / CGFloat(max(lines, 1)) }/// The box's size in points on an object drawn `objectSide` points wide.publicfunc size(objectSide: CGFloat) -> CGSize { CGSize(width: objectSide * w, height: objectSide * h) }/// The box's centre as an offset from the object's centre, in points.publicfunc offset(objectSide: CGFloat) -> CGSize { CGSize(width: (cx - 0.5) * objectSide, height: (cy - 0.5) * objectSide) }}extensionToolPrint {/// The object whose print is the DATE.publicstaticlet calendarObject = "calendar"/// The month band over the calendar's pad — the second print the only/// two-print object carries. Its day number is `table["calendar"]`.publicstaticfunc calendarMonth(in scale: ThemeScale) -> ToolPrint {ToolPrint( cx: ToolPrintKnobs.toolPrintCalendarMonthCx, cy: ToolPrintKnobs.toolPrintCalendarMonthCy, w: ToolPrintKnobs.toolPrintCalendarMonthW, h: ToolPrintKnobs.toolPrintCalendarMonthH, face: .type, transform: .upper ) }/// Today, as the pad prints it: the short month in capitals over the day/// number. `en_US_POSIX` and an explicit pattern, through `CottonDate` —/// the app's spellings are the app's, never the device locale's/// (`Format/DateFormats.swift`), and nothing here reads the wall clock.publicstaticfunc calendarLines(_ now: Date, calendar: Calendar = .current) -> (month: String, day: String) { ( month: CottonDate.formatter("MMM", calendar).string(from: now).uppercased(), day: CottonDate.formatter("d", calendar).string(from: now) ) }/// The objects with no printable face — they are self-evident, and a word/// stamped across them would be a caption on a photograph.publicstaticlet wordless: Set<String> = ["calls", "goals", "locations", "videos",// Ahead's envelopes standing in their pockets are its face; the word sits under it."ahead",// The top slip already carries pencil scribble (2026-09-30)."thoughts",// The tool box's lid carries its handle; the word sits under it."tools",// The framed page already carries its own printed layout; the word sits under it."artifacts",// The guest book's pages already carry its signatures (Spec 9.3)."members",// The headset's earpiece is round and small; the word sits under it."assistants",// The rolodex's cards and its globe plate are its face; the word sits under it."domains",// The card drawer's labels hold their own cards; the word sits under it."storage",// The Settings panel carries adjustment knobs; the name sits under it."settings",// The breaker's face is its lever; the word sits under it."outages",// The coins say what they are; the word sits under them (6 Nov 2026,// when the coins took the wallet's place)."money",// The camera's face is its lens; the word sits under it."camera",// Pictures whose face is already full — postcards, a jar of slips, a// meter dial, letters in a tray, a tabbed file; the word sits under each."stories", "memory", "ai_usage", "imports", "projects",// A takeaway bag says what it is; the word sits under it."food", ]/// Where each object's name is printed on it, as `scale` places it.publicstaticfunc table(in scale: ThemeScale) -> [String: ToolPrint] { [// The clipboard's printed header."todos": ToolPrint( cx: ToolPrintKnobs.toolPrintTodosCx, cy: ToolPrintKnobs.toolPrintTodosCy, w: ToolPrintKnobs.toolPrintTodosW, h: ToolPrintKnobs.toolPrintTodosH, face: .type ),// The pad's day number; the month band is `calendarMonth`."calendar": ToolPrint( cx: ToolPrintKnobs.toolPrintCalendarCx, cy: ToolPrintKnobs.toolPrintCalendarCy, w: ToolPrintKnobs.toolPrintCalendarW, h: ToolPrintKnobs.toolPrintCalendarH, face: .display ),// Written across the open page."notes": ToolPrint( cx: ToolPrintKnobs.toolPrintNotesCx, cy: ToolPrintKnobs.toolPrintNotesCy, w: ToolPrintKnobs.toolPrintNotesW, h: ToolPrintKnobs.toolPrintNotesH, rotation: ToolPrintKnobs.toolPrintNotesRotation, face: .hand ),// The journal's cover, in the bottler's serif."journal": ToolPrint( cx: ToolPrintKnobs.toolPrintJournalCx, cy: ToolPrintKnobs.toolPrintJournalCy, w: ToolPrintKnobs.toolPrintJournalW, h: ToolPrintKnobs.toolPrintJournalH, face: .cap, ink: .cream, transform: .upper ),"mood": ToolPrint( cx: ToolPrintKnobs.toolPrintMoodCx, cy: ToolPrintKnobs.toolPrintMoodCy, w: ToolPrintKnobs.toolPrintMoodW, h: ToolPrintKnobs.toolPrintMoodH, face: .type ),"messages": ToolPrint( cx: ToolPrintKnobs.toolPrintMessagesCx, cy: ToolPrintKnobs.toolPrintMessagesCy, w: ToolPrintKnobs.toolPrintMessagesW, h: ToolPrintKnobs.toolPrintMessagesH, rotation: ToolPrintKnobs.toolPrintMessagesRotation, face: .hand ),"email": ToolPrint( cx: ToolPrintKnobs.toolPrintEmailCx, cy: ToolPrintKnobs.toolPrintEmailCy, w: ToolPrintKnobs.toolPrintEmailW, h: ToolPrintKnobs.toolPrintEmailH, face: .type ),// The rolodex's index tab."people": ToolPrint( cx: ToolPrintKnobs.toolPrintPeopleCx, cy: ToolPrintKnobs.toolPrintPeopleCy, w: ToolPrintKnobs.toolPrintPeopleW, h: ToolPrintKnobs.toolPrintPeopleH, face: .type ),// The masthead."news": ToolPrint( cx: ToolPrintKnobs.toolPrintNewsCx, cy: ToolPrintKnobs.toolPrintNewsCy, w: ToolPrintKnobs.toolPrintNewsW, h: ToolPrintKnobs.toolPrintNewsH, face: .display ),// The book's cover."reader": ToolPrint( cx: ToolPrintKnobs.toolPrintReaderCx, cy: ToolPrintKnobs.toolPrintReaderCy, w: ToolPrintKnobs.toolPrintReaderW, h: ToolPrintKnobs.toolPrintReaderH, face: .display ),// The clock's dial, under the hands."alarms": ToolPrint( cx: ToolPrintKnobs.toolPrintAlarmsCx, cy: ToolPrintKnobs.toolPrintAlarmsCy, w: ToolPrintKnobs.toolPrintAlarmsW, h: ToolPrintKnobs.toolPrintAlarmsH, face: .type ),"meetings": ToolPrint( cx: ToolPrintKnobs.toolPrintMeetingsCx, cy: ToolPrintKnobs.toolPrintMeetingsCy, w: ToolPrintKnobs.toolPrintMeetingsW, h: ToolPrintKnobs.toolPrintMeetingsH, face: .type ),"documents": ToolPrint( cx: ToolPrintKnobs.toolPrintDocumentsCx, cy: ToolPrintKnobs.toolPrintDocumentsCy, w: ToolPrintKnobs.toolPrintDocumentsW, h: ToolPrintKnobs.toolPrintDocumentsH, face: .type ),// Written in the print's white border."photos": ToolPrint( cx: ToolPrintKnobs.toolPrintPhotosCx, cy: ToolPrintKnobs.toolPrintPhotosCy, w: ToolPrintKnobs.toolPrintPhotosW, h: ToolPrintKnobs.toolPrintPhotosH, face: .hand ),// The key's paper tag, hanging at its own angle."passwords": ToolPrint( cx: ToolPrintKnobs.toolPrintPasswordsCx, cy: ToolPrintKnobs.toolPrintPasswordsCy, w: ToolPrintKnobs.toolPrintPasswordsW, h: ToolPrintKnobs.toolPrintPasswordsH, rotation: ToolPrintKnobs.toolPrintPasswordsRotation, face: .type ),// The printout's own cream band, under the run the top sheet carries."code": ToolPrint( cx: ToolPrintKnobs.toolPrintCodeCx, cy: ToolPrintKnobs.toolPrintCodeCy, w: ToolPrintKnobs.toolPrintCodeW, h: ToolPrintKnobs.toolPrintCodeH, face: .type ),// The closed laptop's lid, lower right — the one blank face in the// picture (the desktop machine's is louvred and the dock's is a// connector), set at the lid's own slight lean."devices": ToolPrint( cx: ToolPrintKnobs.toolPrintDevicesCx, cy: ToolPrintKnobs.toolPrintDevicesCy, w: ToolPrintKnobs.toolPrintDevicesW, h: ToolPrintKnobs.toolPrintDevicesH, rotation: ToolPrintKnobs.toolPrintDevicesRotation, face: .type ),// The bin's blank enamel label."bin": ToolPrint( cx: ToolPrintKnobs.toolPrintBinCx, cy: ToolPrintKnobs.toolPrintBinCy, w: ToolPrintKnobs.toolPrintBinW, h: ToolPrintKnobs.toolPrintBinH, face: .type ),// The top ledger’s blank paper label."everything": ToolPrint( cx: ToolPrintKnobs.toolPrintEverythingCx, cy: ToolPrintKnobs.toolPrintEverythingCy, w: ToolPrintKnobs.toolPrintEverythingW, h: ToolPrintKnobs.toolPrintEverythingH, face: .type ),// The suggestion box's cream label plate."feedback": ToolPrint( cx: ToolPrintKnobs.toolPrintFeedbackCx, cy: ToolPrintKnobs.toolPrintFeedbackCy, w: ToolPrintKnobs.toolPrintFeedbackW, h: ToolPrintKnobs.toolPrintFeedbackH, face: .type ), ] }}/// The sizes, counts and timings ToolPrint draws with: Swift's own, beside/// their reader — a theme sets only its tokens (`scale.tokens`).enumToolPrintKnobs {staticlet toolPrintAlarmsCx: CGFloat = 0.5staticlet toolPrintAlarmsCy: CGFloat = 0.7staticlet toolPrintAlarmsH: CGFloat = 0.085staticlet toolPrintAlarmsW: CGFloat = 0.36staticlet toolPrintBinCx: CGFloat = 0.497staticlet toolPrintBinCy: CGFloat = 0.615staticlet toolPrintBinH: CGFloat = 0.1staticlet toolPrintBinW: CGFloat = 0.36staticlet toolPrintCalendarCx: CGFloat = 0.5staticlet toolPrintCalendarCy: CGFloat = 0.6staticlet toolPrintCalendarH: CGFloat = 0.28staticlet toolPrintCalendarMonthCx: CGFloat = 0.5staticlet toolPrintCalendarMonthCy: CGFloat = 0.36staticlet toolPrintCalendarMonthH: CGFloat = 0.085staticlet toolPrintCalendarMonthW: CGFloat = 0.4staticlet toolPrintCalendarW: CGFloat = 0.5staticlet toolPrintCodeCx: CGFloat = 0.5staticlet toolPrintCodeCy: CGFloat = 0.6staticlet toolPrintCodeH: CGFloat = 0.11staticlet toolPrintCodeW: CGFloat = 0.46staticlet toolPrintDevicesCx: CGFloat = 0.755staticlet toolPrintDevicesCy: CGFloat = 0.62staticlet toolPrintDevicesH: CGFloat = 0.055staticlet toolPrintDevicesRotation: CGFloat = -2staticlet toolPrintDevicesW: CGFloat = 0.235staticlet toolPrintDocumentsCx: CGFloat = 0.5staticlet toolPrintDocumentsCy: CGFloat = 0.55staticlet toolPrintDocumentsH: CGFloat = 0.12staticlet toolPrintDocumentsW: CGFloat = 0.58staticlet toolPrintEmailCx: CGFloat = 0.5staticlet toolPrintEmailCy: CGFloat = 0.56staticlet toolPrintEmailH: CGFloat = 0.11staticlet toolPrintEmailW: CGFloat = 0.52staticlet toolPrintEverythingCx: CGFloat = 0.512staticlet toolPrintEverythingCy: CGFloat = 0.29staticlet toolPrintEverythingH: CGFloat = 0.11staticlet toolPrintEverythingW: CGFloat = 0.32staticlet toolPrintFeedbackCx: CGFloat = 0.492staticlet toolPrintFeedbackCy: CGFloat = 0.655staticlet toolPrintFeedbackH: CGFloat = 0.085staticlet toolPrintFeedbackW: CGFloat = 0.34staticlet toolPrintFontFraction: CGFloat = 0.8staticlet toolPrintJournalCx: CGFloat = 0.5staticlet toolPrintJournalCy: CGFloat = 0.5staticlet toolPrintJournalH: CGFloat = 0.11staticlet toolPrintJournalW: CGFloat = 0.5staticlet toolPrintMeetingsCx: CGFloat = 0.5staticlet toolPrintMeetingsCy: CGFloat = 0.335staticlet toolPrintMeetingsH: CGFloat = 0.08staticlet toolPrintMeetingsW: CGFloat = 0.48staticlet toolPrintMessagesCx: CGFloat = 0.5staticlet toolPrintMessagesCy: CGFloat = 0.7staticlet toolPrintMessagesH: CGFloat = 0.12staticlet toolPrintMessagesRotation: CGFloat = -3staticlet toolPrintMessagesW: CGFloat = 0.58staticlet toolPrintMoodCx: CGFloat = 0.5staticlet toolPrintMoodCy: CGFloat = 0.77staticlet toolPrintMoodH: CGFloat = 0.1staticlet toolPrintMoodW: CGFloat = 0.44staticlet toolPrintNewsCx: CGFloat = 0.5staticlet toolPrintNewsCy: CGFloat = 0.29staticlet toolPrintNewsH: CGFloat = 0.14staticlet toolPrintNewsW: CGFloat = 0.7staticlet toolPrintNotesCx: CGFloat = 0.5staticlet toolPrintNotesCy: CGFloat = 0.48staticlet toolPrintNotesH: CGFloat = 0.16staticlet toolPrintNotesRotation: CGFloat = -3staticlet toolPrintNotesW: CGFloat = 0.62staticlet toolPrintPasswordsCx: CGFloat = 0.645staticlet toolPrintPasswordsCy: CGFloat = 0.565staticlet toolPrintPasswordsH: CGFloat = 0.085staticlet toolPrintPasswordsRotation: CGFloat = -28staticlet toolPrintPasswordsW: CGFloat = 0.25staticlet toolPrintPeopleCx: CGFloat = 0.5staticlet toolPrintPeopleCy: CGFloat = 0.575staticlet toolPrintPeopleH: CGFloat = 0.09staticlet toolPrintPeopleW: CGFloat = 0.34staticlet toolPrintPhotosCx: CGFloat = 0.5staticlet toolPrintPhotosCy: CGFloat = 0.84staticlet toolPrintPhotosH: CGFloat = 0.09staticlet toolPrintPhotosW: CGFloat = 0.44staticlet toolPrintReaderCx: CGFloat = 0.5staticlet toolPrintReaderCy: CGFloat = 0.6staticlet toolPrintReaderH: CGFloat = 0.12staticlet toolPrintReaderW: CGFloat = 0.52staticlet toolPrintTodosCx: CGFloat = 0.5staticlet toolPrintTodosCy: CGFloat = 0.38staticlet toolPrintTodosH: CGFloat = 0.12staticlet toolPrintTodosW: CGFloat = 0.54}