feat(cover): redraw placeholder covers in nine selectable styles

Replace the lattice placeholder with a typesetting engine that measures real glyphs, balances line
breaks and parses series, subtitles and sort-form authors before drawing.
Add a placeholderCoverStyle display preference, Bauhaus by default, with a style switcher and sample
shelf in Book Covers settings. Colours follow the series, author or title, so a cover stays the same
when genres arrive later; only Paperback's bands use genre.
This commit is contained in:
neon
2026-10-15 00:43:21 +00:00
parent 97cd03325f
commit c54986d5d2
35 changed files with 3390 additions and 228 deletions
+15
View File
@@ -37,6 +37,20 @@ export type CardInfoMode = (typeof CARD_INFO_MODES)[number];
export const BOOK_THUMBNAIL_CLICK_ACTION = ["reader", "details"] as const;
export type BookThumbnailClickAction = (typeof BOOK_THUMBNAIL_CLICK_ACTION)[number];
/** The artwork drawn for a book that has no cover. */
export const PLACEHOLDER_COVER_STYLES = [
"bauhaus",
"constructivist",
"memphis",
"clothbound",
"poster",
"aurora",
"vista",
"marbled",
"paperback",
] as const;
export type PlaceholderCoverStyle = (typeof PLACEHOLDER_COVER_STYLES)[number];
export interface DisplayPreferences {
portraitCoverSize: number;
squareCoverSize: number;
@@ -65,4 +79,5 @@ export interface DisplayPreferences {
gridCardSecondaryLabel: GridCardLabelField;
cardInfoMode: CardInfoMode;
thumbnailClickAction: BookThumbnailClickAction;
placeholderCoverStyle: PlaceholderCoverStyle;
}