Skip to content

Releases: takzen/book-forge

Book Forge v1.4.0 — Typography, Layout & Export Fixes

Choose a tag to compare

@takzen takzen released this 18 Sep 09:58

Fonts, page layout and the export pipeline are the focus of this release. The interface named a font it never loaded, the preview's font switcher changed nothing, markdown headings and lists came out of the PDF looking like plain body text, and several flows failed without saying so.

Typography

  • Inter is actually loaded. The interface font is now self-hosted through next/font, with latin-ext so Polish diacritics render properly. Previously the stylesheet named Inter but nothing ever fetched it, so the whole UI fell back to whatever the machine happened to have.
  • The font switcher works. Picking Sans or Mono in Preview & PDF now changes the text — verified as Georgia → Segoe UI → Consolas. The manuscript styles sat outside Tailwind's cascade layers, where they silently beat every font-sans / font-mono utility.
  • Headings and lists survive the export. A # heading now renders at 30.4px/700 instead of 16px/400 — identical to body text — and bullet lists regained their markers and indentation. Both were stripped by Tailwind's preflight and never restored. Everything is sized in em, so it scales with the chosen type size.
  • The manuscript has its own typefaces, separate from the interface font. Chromium cannot embed a self-hosted webfont when it exports a PDF: it drew every glyph as a Type3 vector procedure, inflating the file about 2.7× into a form print shops routinely reject. The book now uses locally installed families, which embed as proper CIDFontType2 subsets.
Font Size Pages Embedded
Serif 148 714 B 31 Georgia ×4
Sans 147 031 B 31 Segoe UI ×4
Mono 141 232 B 32 Consolas ×4

Page layout

  • No more blank page in every PDF. The title page was sized with 100vh, which in a headless render is the browser viewport, not the page box — it overflowed and pushed an almost-empty page into every export. The book is now 31 pages where it used to be 34.
  • The table of contents no longer lists itself or gets printed twice, and its dotted leaders now lead to real page numbers.
  • Book settings drive the output. Font, type size, leading, all three margins and recto/verso chapter starts are stored, editable from a new panel in the sidebar, and applied to the PDF. The table existed before but nothing read it — the print layout had its margins hard-coded.
  • One page estimator shared by the editor, the preview and the generated contents, so their numbering agrees. Images now carry weight in the estimate, so less content slips off the bottom of a preview sheet.

Cover export

The PNG export now screenshots the same component the designer draws on screen, so the file cannot drift from the preview. It replaces a canvas re-implementation that used different fonts than the preview, scaled type by a hard-coded factor, recognised only three hard-coded gradients, and supported neither text wrapping nor letter-spacing, opacity or element borders. Scaling is measured rather than assumed, and the export height now follows the book format.

Silent failures

  • ZIP import reported failure on success. redirect() signals by throwing and sat inside a try/catch, so every successful import was caught, logged as an error and redirected to ?error=import-failed — even though the book had been created.
  • Backups over 1MB never uploaded at all. Server Actions cap the request body at 1MB by default, so a real archive died with ERR_CONNECTION_RESET before the action ran, making the advertised 50MB limit unreachable. The limit is raised and transport failures now surface in the UI.
  • Electron stopped orphaning the server. spawn() rejects a numeric pid, so the taskkill call threw into an empty catch and the Next.js process survived every shutdown, holding the port. Zoom shortcuts are also handled once instead of three times, so Ctrl +/- moves one step.
  • The import button works without a file selected. Chrome refuses to submit a form containing an invalid required control it cannot focus, and the input was display: none.

Also

Strict table-of-contents matching, so a chapter that merely mentions one — "Jak czytać spis treści" — is no longer removed from the manuscript. Chapter numbering follows the chapter count rather than sortOrder, which used to name a fourth chapter "Chapter 7". Export filenames transliterate Polish diacritics instead of dropping the letters ("Książka" → ksiazka, not ksi-ka). Settings writes are validated and clamped. Dead code removed: an unreachable b5 format, an unimplemented shape element type, and a fallback form with no submit button.

Verification

  • npm run build — production build succeeds
  • npm run test — 17 tests pass, up from 3; the suite no longer runs against the live library
  • npx eslint . — clean, down from 13 errors and 9 warnings
  • PDF and cover output measured directly from generated files, not assumed

Book Forge v1.3.1 — Clean Pagination & Title Cleanup

Choose a tag to compare

@takzen takzen released this 13 Sep 10:41

What's new

  • Strict Footer-Only Page Numbering: Page numbers are now rendered strictly and cleanly at the bottom center of each page sheet without extra labels, format dimensions, or decoration.
  • Header & Top-Bar Cleanup: Removed all artificial page numbers, page ranges, and suffixes from chapter titles, running headers, and preview banners.
  • Natural Page Counting: Sequential page indexing begins naturally from page 1 without arbitrary offsets for unrequested front matter.
  • Clean Table of Contents & Chapter Titles: Multi-part sections and table of contents pages maintain clean, uniform titles without redundant page numbering suffixes.

Verification


  • pm run test\ — all tests passed

  • pm run build\ — Next.js production build completed successfully

Book Forge v1.3.0 — Multi-page Table of Contents & TOC Page Insertion

Choose a tag to compare

@takzen takzen released this 02 Sep 17:19

What's new

  • Multi-page Table of Contents Support: Long tables of contents are now cleanly split across multiple book pages in both the interactive Book Preview and print/PDF export, eliminating unwanted scrollbars and text clipping.
  • Dedicated TOC Page Insertion: Added '+ Strona spisu' button in the manuscript sidebar allowing authors to insert multiple dedicated Table of Contents pages ('Spis treści', 'Spis treści (strona 2)', etc.).
  • In-Editor TOC Controls: When editing any Table of Contents page, authors can now refresh that specific page's chapter list or insert the next TOC page directly from the editor toolbar.
  • Clean Sidebar Labeling: Table of Contents pages show clear 'TOC · Str. 1', 'TOC · Str. 2' badges while maintaining sequential numbering for narrative chapters.
  • Accurate Page Numbering: Automatic page footer calculations dynamically account for multi-page tables of contents.

Verification

  • 'pnpm test' — all tests passed
  • 'pnpm build' — Next.js production build completed successfully

Book Forge v1.2.0

Choose a tag to compare

@takzen takzen released this 01 Sep 18:10

What's new

  • Improved Cover Studio with reliable element selection, property controls, alignment helpers, and smooth center snapping.
  • Added a dedicated table of contents chapter with safe refresh and duplicate prevention.
  • Improved the Windows desktop launcher for quieter Electron startup.

Verification

  • pnpm test — 3 tests passed
  • pnpm build — completed successfully

v1.1.0 - Electron Desktop Application & Zoom Support

Choose a tag to compare

@takzen takzen released this 01 Sep 12:16

What's Changed in v1.1.0

🖥️ Native Desktop Experience (Electron)

  • Wrapped Book Forge in an Electron desktop application.
  • Added native application window, menu, and background server lifecycle management.
  • Added custom high-resolution application icons (\electron/icon.ico\ and \electron/icon.png).

🔍 Dynamic Zooming & Accessibility

  • Full zoom controls via \Ctrl + +\ (Zoom In), \Ctrl + -\ (Zoom Out), and \Ctrl + 0\ (Reset).
  • Smooth mouse wheel zoom using \Ctrl + Mouse Wheel.

🚀 Desktop Shortcut Generator

  • Added automated shortcut creation script (\pnpm shortcut) to place an icon directly on the Windows Desktop.
  • Batch launcher
    un-book-forge.bat\ for easy offline startup.

v1.0.0 — Book Forge Initial Release

Choose a tag to compare

@takzen takzen released this 01 Sep 10:25

Book Forge v1.0.0 🚀

Lokalny, prywatny kreator książek i ebooków w Markdownie z eksportem do PDF i projektantem okładek.

Główne funkcjonalności:

  • 📖 Zarządzanie książkami i rozdziałami: SQLite + Drizzle ORM, formaty A5, A4, 6x9 in, zmiana kolejności rozdziałów, autosave.
  • ✍️ Edytor Markdown: Dwukolumnowy edytor z natychmiastowym podglądem, paskiem narzędzi, skrótami klawiszowymi i licznikiem słów.
  • 🖼️ Obsługa grafik: Wgrywanie obrazów (PNG, JPG, WebP, GIF) i łatwe wstawianie do treści.
  • 🎨 Projektant okładek: Szablony, pola tekstowe, tła i eksport okładki w 300 DPI.
  • 📄 Podgląd i eksport PDF: Renderowanie przez Playwright z podziałami stron (@page, break-after), stroną tytułową i spisem treści.
  • 📦 Backup & Duplikacja: Kopiowanie projektów 1-kliknięciem oraz eksport/import kompletnych archiwów ZIP.