mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
M14: give Windows PDF files a dedicated document icon (#890)
* M14: give Windows PDF files a dedicated document icon Embed the document icon as resource 2 through the existing Windows resource build and select it in both PDF association registrations. Keep the asset reproducible and carry its required licence notices in Windows packages. Formatting, strict Clippy, 1,842 existing workspace tests, all 30 WASM crate checks, assets, layering and parity pass. The Windows x64 release package checks pass, and the contributor confirmed the icon in Explorer. Co-authored-by: Codex <[email protected]> * Refresh catalog hashes after merging main --------- Co-authored-by: Codex <[email protected]> Co-authored-by: Brandon Thomas <[email protected]>
This commit is contained in:
12 files changed
+127
-12
No files matched your search
@@ -0,0 +1,31 @@
|
||||
PdfCraft PDF document icon (pdfcraft-document.svg and pdfcraft-document.ico).
|
||||
SPDX-License-Identifier: ISC AND (MIT OR Apache-2.0)
|
||||
|
||||
The document outline and fold are adapted from Lucide file-text (lucide-static 1.49.0):
|
||||
https://github.com/lucide-icons/lucide
|
||||
The original is kept in assets/icons/file-text.svg.
|
||||
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2026 Lucide Icons and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
The badge, outlined PDF lettering, colours and composition are original work
|
||||
by the PdfCraft contributors. Copyright (c) 2026 PdfCraft contributors.
|
||||
Licensed under either the MIT License or the Apache License, Version 2.0,
|
||||
at your option. Full texts are LICENSE-MIT and LICENSE-APACHE at the
|
||||
repository root, and beside this file in Windows distributions.
|
||||
|
||||
The icon uses no typeface or external image. Regenerate the ICO with
|
||||
packaging/icons.sh; every asset and its SHA-256 is recorded in ATTRIBUTION.toml.
|
||||
@@ -33,6 +33,8 @@ Licence: [LICENSE.txt](LICENSE.txt) (`MIT OR Apache-2.0`, like the repo).
|
||||
| `pdfcraft-1024.png` | 1024 px on Apple's grid; also the runtime Dock icon on macOS |
|
||||
| `pdfcraft.icns` | macOS icon (16–1024 px) |
|
||||
| `pdfcraft.ico` | Windows icon (16–256 px), embedded in `pdfcraft.exe` by `apps/pdfcraft/build.rs` |
|
||||
| `pdfcraft-document.svg` | Windows PDF file icon master: a Lucide document outline, green badge and outlined PDF lettering; no font dependency |
|
||||
| `pdfcraft-document.ico` | Windows PDF file icon (16–256 px), embedded as resource 2 in `pdfcraft.exe` |
|
||||
| `hicolor/<n>x<n>/apps/ai.storyteller.pdfcraft.png` | Linux hicolor theme, 16–512 px; the 256 px one is the runtime icon on Windows and Linux |
|
||||
| `hicolor/scalable/apps/ai.storyteller.pdfcraft.svg` | Linux scalable icon (copy of the master) |
|
||||
|
||||
@@ -40,6 +42,12 @@ Where it shows: `apps/pdfcraft/src/main.rs` sets the window icon (Dock, taskbar,
|
||||
Wayland app id `ai.storyteller.pdfcraft`; `packaging/linux/ai.storyteller.pdfcraft.desktop` names the
|
||||
hicolor icon.
|
||||
|
||||
Windows PDF files use resource 2 (`"pdfcraft.exe",-2`) when PdfCraft is chosen as the default
|
||||
reader; the app keeps resource 1. The document outline is adapted from Lucide `file-text`
|
||||
1.49.0 (ISC); its badge and outlined lettering are original (`MIT OR Apache-2.0`), covered by
|
||||
[LICENSE-document.txt](LICENSE-document.txt). Both icons are embedded, requiring no runtime
|
||||
sidecar. This provides a file type icon; first-page thumbnails still need a thumbnail provider.
|
||||
|
||||
## Regenerate
|
||||
|
||||
```sh
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
@@ -0,0 +1,16 @@
|
||||
<!-- Document outline: Lucide file-text, lucide-static 1.49.0, ISC.
|
||||
PDF badge and outlined lettering: PdfCraft contributors, MIT OR Apache-2.0.
|
||||
No fonts or external images. See LICENSE-document.txt and ATTRIBUTION.toml. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||
<g transform="translate(-2 -2) scale(2.8)" stroke="#0b0b0c" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path fill="#efe9dc" d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" />
|
||||
<path fill="#c8ece4" d="M14 2v5a1 1 0 0 0 1 1h5" />
|
||||
<path fill="none" stroke="#12a58a" d="M8 12h8M8 15h5" />
|
||||
</g>
|
||||
<rect x="3" y="34" width="56" height="23" rx="4" fill="#087f6b" />
|
||||
<g fill="none" stroke="#fff" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M13 50V41h5a3 3 0 0 1 0 6h-5" />
|
||||
<path d="M27 41v9h3a4.5 4.5 0 0 0 0-9z" />
|
||||
<path d="M42 50V41h8M42 45h6" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1023 B |
Reference in new issue
Block a user