fontvertx 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. fontvertx-1.0.0/LICENSE +21 -0
  2. fontvertx-1.0.0/PKG-INFO +145 -0
  3. fontvertx-1.0.0/README.md +112 -0
  4. fontvertx-1.0.0/pyproject.toml +99 -0
  5. fontvertx-1.0.0/pyproject.toml.orig +90 -0
  6. fontvertx-1.0.0/src/fontvertx/__init__.py +6 -0
  7. fontvertx-1.0.0/src/fontvertx/__main__.py +96 -0
  8. fontvertx-1.0.0/src/fontvertx/assets/fonts/inter/Inter-Bold.ttf +0 -0
  9. fontvertx-1.0.0/src/fontvertx/assets/fonts/inter/Inter-Medium.ttf +0 -0
  10. fontvertx-1.0.0/src/fontvertx/assets/fonts/inter/Inter-Regular.ttf +0 -0
  11. fontvertx-1.0.0/src/fontvertx/assets/fonts/inter/Inter-SemiBold.ttf +0 -0
  12. fontvertx-1.0.0/src/fontvertx/assets/fonts/inter/OFL.txt +92 -0
  13. fontvertx-1.0.0/src/fontvertx/assets/fonts/jetbrains_mono/JetBrainsMono-Medium.ttf +0 -0
  14. fontvertx-1.0.0/src/fontvertx/assets/fonts/jetbrains_mono/JetBrainsMono-Regular.ttf +0 -0
  15. fontvertx-1.0.0/src/fontvertx/assets/fonts/jetbrains_mono/OFL.txt +93 -0
  16. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-128.png +0 -0
  17. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-16.png +0 -0
  18. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-24.png +0 -0
  19. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-256.png +0 -0
  20. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-32.png +0 -0
  21. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-48.png +0 -0
  22. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-64.png +0 -0
  23. fontvertx-1.0.0/src/fontvertx/assets/fontvertx-small.svg +8 -0
  24. fontvertx-1.0.0/src/fontvertx/assets/fontvertx.ico +0 -0
  25. fontvertx-1.0.0/src/fontvertx/assets/fontvertx.svg +14 -0
  26. fontvertx-1.0.0/src/fontvertx/assets/icons/LICENSE-Apache-2.0.txt +202 -0
  27. fontvertx-1.0.0/src/fontvertx/assets/icons/NOTICE.txt +16 -0
  28. fontvertx-1.0.0/src/fontvertx/assets/icons/add.svg +1 -0
  29. fontvertx-1.0.0/src/fontvertx/assets/icons/arrow_back.svg +1 -0
  30. fontvertx-1.0.0/src/fontvertx/assets/icons/arrow_downward.svg +1 -0
  31. fontvertx-1.0.0/src/fontvertx/assets/icons/arrow_forward.svg +1 -0
  32. fontvertx-1.0.0/src/fontvertx/assets/icons/arrow_upward.svg +1 -0
  33. fontvertx-1.0.0/src/fontvertx/assets/icons/cancel.svg +1 -0
  34. fontvertx-1.0.0/src/fontvertx/assets/icons/check.svg +1 -0
  35. fontvertx-1.0.0/src/fontvertx/assets/icons/check_circle.svg +1 -0
  36. fontvertx-1.0.0/src/fontvertx/assets/icons/check_wght600.svg +1 -0
  37. fontvertx-1.0.0/src/fontvertx/assets/icons/chevron_right.svg +1 -0
  38. fontvertx-1.0.0/src/fontvertx/assets/icons/close.svg +1 -0
  39. fontvertx-1.0.0/src/fontvertx/assets/icons/error.svg +1 -0
  40. fontvertx-1.0.0/src/fontvertx/assets/icons/expand_less.svg +1 -0
  41. fontvertx-1.0.0/src/fontvertx/assets/icons/expand_more.svg +1 -0
  42. fontvertx-1.0.0/src/fontvertx/assets/icons/history.svg +1 -0
  43. fontvertx-1.0.0/src/fontvertx/assets/icons/pause_circle.svg +1 -0
  44. fontvertx-1.0.0/src/fontvertx/assets/icons/priority_high.svg +1 -0
  45. fontvertx-1.0.0/src/fontvertx/assets/icons/progress_activity.svg +1 -0
  46. fontvertx-1.0.0/src/fontvertx/assets/icons/remove.svg +1 -0
  47. fontvertx-1.0.0/src/fontvertx/assets/icons/sync_alt.svg +1 -0
  48. fontvertx-1.0.0/src/fontvertx/assets/icons/tune.svg +1 -0
  49. fontvertx-1.0.0/src/fontvertx/assets/icons/unfold_less.svg +1 -0
  50. fontvertx-1.0.0/src/fontvertx/assets/icons/unfold_more.svg +1 -0
  51. fontvertx-1.0.0/src/fontvertx/assets/icons/warning.svg +1 -0
  52. fontvertx-1.0.0/src/fontvertx/assets/indicators/check.svg +1 -0
  53. fontvertx-1.0.0/src/fontvertx/assets/indicators/dash.svg +1 -0
  54. fontvertx-1.0.0/src/fontvertx/assets/indicators/dot.svg +1 -0
  55. fontvertx-1.0.0/src/fontvertx/cli.py +645 -0
  56. fontvertx-1.0.0/src/fontvertx/constants.py +34 -0
  57. fontvertx-1.0.0/src/fontvertx/contours.py +344 -0
  58. fontvertx-1.0.0/src/fontvertx/css_kit.py +85 -0
  59. fontvertx-1.0.0/src/fontvertx/finder.py +243 -0
  60. fontvertx-1.0.0/src/fontvertx/font.py +607 -0
  61. fontvertx-1.0.0/src/fontvertx/gui/__init__.py +1 -0
  62. fontvertx-1.0.0/src/fontvertx/gui/conversion_controller.py +370 -0
  63. fontvertx-1.0.0/src/fontvertx/gui/conversion_dialog.py +314 -0
  64. fontvertx-1.0.0/src/fontvertx/gui/conversion_log.py +111 -0
  65. fontvertx-1.0.0/src/fontvertx/gui/drop_zone_frame.py +46 -0
  66. fontvertx-1.0.0/src/fontvertx/gui/file_list.py +625 -0
  67. fontvertx-1.0.0/src/fontvertx/gui/icons.py +125 -0
  68. fontvertx-1.0.0/src/fontvertx/gui/instance_tree.py +1110 -0
  69. fontvertx-1.0.0/src/fontvertx/gui/layout_manager.py +217 -0
  70. fontvertx-1.0.0/src/fontvertx/gui/logs.py +57 -0
  71. fontvertx-1.0.0/src/fontvertx/gui/organization_dialog.py +732 -0
  72. fontvertx-1.0.0/src/fontvertx/gui/panels/__init__.py +1 -0
  73. fontvertx-1.0.0/src/fontvertx/gui/panels/conversion_panel.py +39 -0
  74. fontvertx-1.0.0/src/fontvertx/gui/panels/destination_panel.py +115 -0
  75. fontvertx-1.0.0/src/fontvertx/gui/panels/source_panel.py +344 -0
  76. fontvertx-1.0.0/src/fontvertx/gui/profile_options.py +515 -0
  77. fontvertx-1.0.0/src/fontvertx/gui/profiles.py +53 -0
  78. fontvertx-1.0.0/src/fontvertx/gui/scanner.py +52 -0
  79. fontvertx-1.0.0/src/fontvertx/gui/settings_store.py +116 -0
  80. fontvertx-1.0.0/src/fontvertx/gui/status_pill.py +346 -0
  81. fontvertx-1.0.0/src/fontvertx/gui/styles.py +1411 -0
  82. fontvertx-1.0.0/src/fontvertx/gui/tooltips.py +133 -0
  83. fontvertx-1.0.0/src/fontvertx/gui/widgets.py +1181 -0
  84. fontvertx-1.0.0/src/fontvertx/gui/window.py +1418 -0
  85. fontvertx-1.0.0/src/fontvertx/gui/worker.py +177 -0
  86. fontvertx-1.0.0/src/fontvertx/inspection.py +175 -0
  87. fontvertx-1.0.0/src/fontvertx/logging_setup.py +133 -0
  88. fontvertx-1.0.0/src/fontvertx/merge_curves.py +501 -0
  89. fontvertx-1.0.0/src/fontvertx/models.py +187 -0
  90. fontvertx-1.0.0/src/fontvertx/otf_builder.py +149 -0
  91. fontvertx-1.0.0/src/fontvertx/qu2cu.py +132 -0
  92. fontvertx-1.0.0/src/fontvertx/service.py +568 -0
  93. fontvertx-1.0.0/src/fontvertx/ttf_builder.py +113 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cesare Gilento
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: fontvertx
3
+ Version: 1.0.0
4
+ Summary: A free, open-source font converter for the desktop and the command line.
5
+ Author: Cesare Gilento
6
+ Author-email: Cesare Gilento <ftCLI@proton.me>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Environment :: Console
11
+ Classifier: Environment :: X11 Applications :: Qt
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: End Users/Desktop
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
20
+ Classifier: Topic :: Text Processing :: Fonts
21
+ Requires-Dist: cffsubr>=0.4.0
22
+ Requires-Dist: click>=8.5.1,<9
23
+ Requires-Dist: fonttools[pathops,woff]>=4.68.0
24
+ Requires-Dist: pathvalidate>=3.3.1
25
+ Requires-Dist: pyside6-essentials>=6.12.0
26
+ Requires-Dist: ttfautohint-py>=0.6.1
27
+ Requires-Python: >=3.12
28
+ Project-URL: Homepage, https://github.com/ftCLI/Fontvertx
29
+ Project-URL: Documentation, https://github.com/ftCLI/Fontvertx/blob/main/docs/manual.md
30
+ Project-URL: Issues, https://github.com/ftCLI/Fontvertx/issues
31
+ Project-URL: Changelog, https://github.com/ftCLI/Fontvertx/blob/main/CHANGELOG.md
32
+ Description-Content-Type: text/markdown
33
+
34
+ # Fontvertx
35
+
36
+ <p align="center">
37
+ <img src="https://raw.githubusercontent.com/ftCLI/Fontvertx/v1.0.0/src/fontvertx/assets/fontvertx-256.png" alt="Fontvertx logo" width="160" height="160">
38
+ </p>
39
+
40
+ <p align="center">
41
+ A free, open-source font converter for the desktop and the command line.<br>
42
+ Local, batch-ready, and built on established font tools.
43
+ </p>
44
+
45
+ Fontvertx converts fonts between TrueType, PostScript (CFF), WOFF and WOFF2, extracts individual fonts from TTC/OTC collections, and exports variable-font instances as static fonts. It comes as a desktop app (GUI) and a command-line tool (CLI) that share the same conversion engine.
46
+
47
+ ![Fontvertx main window](https://raw.githubusercontent.com/ftCLI/Fontvertx/v1.0.0/docs/images/fontvertx-main-window.png)
48
+
49
+ ## Features
50
+
51
+ - **Fully local** — your fonts never leave your machine: no uploads, no online services.
52
+ - **Batch processing** — add files or entire folders and convert hundreds of fonts in a single run.
53
+ - **Fine-grained control** — curve-conversion tolerance, target UPM, contour simplification, autohinting, subroutinization and more.
54
+ - **Organized output** — build a folder structure from font properties and conversion settings.
55
+ - **Controllable batches** — pause, resume or cancel mid-run; incompatible fonts are explained, not silently skipped.
56
+ - **One engine** — the GUI and the CLI produce identical results.
57
+
58
+ ## Conversions
59
+
60
+ | Conversion | CLI name |
61
+ |---|---|
62
+ | TTF → OTF (TrueType → PostScript) | `ttf2otf` |
63
+ | OTF → TTF (PostScript → TrueType) | `otf2ttf` |
64
+ | TTF / OTF → WOFF / WOFF2 | `ft2wf` |
65
+ | WOFF → TTF / OTF | `woff2ft` |
66
+ | WOFF2 → TTF / OTF | `woff22ft` |
67
+ | Variable → Static | `var2static` |
68
+ | Collection (TTC / OTC) → TTF / OTF | `ttc2sfnt` |
69
+
70
+ ## Installation
71
+
72
+ ### Ready-to-run app (no Python needed)
73
+
74
+ Download the zip for your system from the [latest release](https://github.com/ftCLI/Fontvertx/releases/latest):
75
+
76
+ - **Windows 10 or 11 (64-bit):** `Fontvertx-<version>-windows-x64.zip` — unzip and run `Fontvertx.exe`.
77
+ - **macOS 14.4 or later, Apple Silicon:** `Fontvertx-<version>-macos-arm64.zip` — unzip and move `Fontvertx.app` to Applications.
78
+
79
+ The apps are not signed, so Windows and macOS warn you on first launch. The [manual](https://github.com/ftCLI/Fontvertx/blob/v1.0.0/docs/manual.md#22-ready-to-run-app-windows-and-macos) explains how to open them.
80
+
81
+ ### With Python (3.12 or later)
82
+
83
+ ```console
84
+ uv tool install fontvertx
85
+ ```
86
+
87
+ or
88
+
89
+ ```console
90
+ python -m pip install fontvertx
91
+ ```
92
+
93
+ Then run `fontvertx` for the desktop app or `fontvertx-cli` for the command line.
94
+
95
+ `uv` downloads a suitable Python by itself if your system has an older one; with `pip` you need Python 3.12 or later already installed.
96
+
97
+ ## Quick start
98
+
99
+ **Desktop app.** Add fonts with **Add files…**, **Add folder…** or drag and drop, choose a conversion, adjust the options, pick where to save, and press **Convert**.
100
+
101
+ **Command line:**
102
+
103
+ ```console
104
+ # Convert all fonts in a folder and its subfolders to WOFF and WOFF2
105
+ fontvertx-cli ft2wf ./fonts --recursive --output-dir ./converted
106
+
107
+ # TrueType to PostScript with a tighter tolerance
108
+ fontvertx-cli ttf2otf ./fonts --tolerance 0.5
109
+ ```
110
+
111
+ Run `fontvertx-cli --help` or `fontvertx-cli <conversion> --help` for every option.
112
+
113
+ > **A note on rights.** Converting a font means modifying it. Make sure the font's license allows it before converting.
114
+
115
+ ## Documentation
116
+
117
+ The **[user manual](https://github.com/ftCLI/Fontvertx/blob/v1.0.0/docs/manual.md)** covers every conversion and option, variable-font instances, output organization, the CLI, logs and troubleshooting.
118
+
119
+ ## Development
120
+
121
+ ```console
122
+ git clone https://github.com/ftCLI/Fontvertx.git
123
+ cd Fontvertx
124
+ uv sync --group dev
125
+ uv run pytest
126
+ ```
127
+
128
+ The project uses `ruff`, `mypy`, `bandit` and `pip-audit`; CI runs the tests on Python 3.12, 3.14 and 3.15 on Linux, Windows and macOS, with a 90% coverage threshold.
129
+
130
+ The ready-to-run apps are built with PyInstaller: `.\packaging\windows\build.ps1` on Windows, `./packaging/macos/build.sh` on a Mac with Apple Silicon. The official builds come from the `build.yml` workflow, which tests each build's CLI and attaches the zips to the GitHub release.
131
+
132
+ ## License
133
+
134
+ MIT — see [LICENSE](https://github.com/ftCLI/Fontvertx/blob/v1.0.0/LICENSE).
135
+
136
+ ## Acknowledgments
137
+
138
+ Fontvertx is built on excellent open-source tools:
139
+
140
+ - [FontTools](https://github.com/fonttools/fonttools) — font parsing and writing
141
+ - [ttfautohint](https://freedesktop.org/wiki/Software/ttfautohint/) — TrueType autohinting
142
+ - [cffsubr](https://github.com/adobe-type-tools/cffsubr) — CFF subroutinization
143
+ - [Skia pathops](https://github.com/fonttools/skia-pathops) — contour overlap removal
144
+ - [Inter](https://rsms.me/inter/) and [JetBrains Mono](https://www.jetbrains.com/lp/mono/) — interface fonts, under the SIL Open Font License 1.1
145
+ - [Material Symbols](https://fonts.google.com/icons) — interface icons, under the Apache License 2.0
@@ -0,0 +1,112 @@
1
+ # Fontvertx
2
+
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/ftCLI/Fontvertx/v1.0.0/src/fontvertx/assets/fontvertx-256.png" alt="Fontvertx logo" width="160" height="160">
5
+ </p>
6
+
7
+ <p align="center">
8
+ A free, open-source font converter for the desktop and the command line.<br>
9
+ Local, batch-ready, and built on established font tools.
10
+ </p>
11
+
12
+ Fontvertx converts fonts between TrueType, PostScript (CFF), WOFF and WOFF2, extracts individual fonts from TTC/OTC collections, and exports variable-font instances as static fonts. It comes as a desktop app (GUI) and a command-line tool (CLI) that share the same conversion engine.
13
+
14
+ ![Fontvertx main window](https://raw.githubusercontent.com/ftCLI/Fontvertx/v1.0.0/docs/images/fontvertx-main-window.png)
15
+
16
+ ## Features
17
+
18
+ - **Fully local** — your fonts never leave your machine: no uploads, no online services.
19
+ - **Batch processing** — add files or entire folders and convert hundreds of fonts in a single run.
20
+ - **Fine-grained control** — curve-conversion tolerance, target UPM, contour simplification, autohinting, subroutinization and more.
21
+ - **Organized output** — build a folder structure from font properties and conversion settings.
22
+ - **Controllable batches** — pause, resume or cancel mid-run; incompatible fonts are explained, not silently skipped.
23
+ - **One engine** — the GUI and the CLI produce identical results.
24
+
25
+ ## Conversions
26
+
27
+ | Conversion | CLI name |
28
+ |---|---|
29
+ | TTF → OTF (TrueType → PostScript) | `ttf2otf` |
30
+ | OTF → TTF (PostScript → TrueType) | `otf2ttf` |
31
+ | TTF / OTF → WOFF / WOFF2 | `ft2wf` |
32
+ | WOFF → TTF / OTF | `woff2ft` |
33
+ | WOFF2 → TTF / OTF | `woff22ft` |
34
+ | Variable → Static | `var2static` |
35
+ | Collection (TTC / OTC) → TTF / OTF | `ttc2sfnt` |
36
+
37
+ ## Installation
38
+
39
+ ### Ready-to-run app (no Python needed)
40
+
41
+ Download the zip for your system from the [latest release](https://github.com/ftCLI/Fontvertx/releases/latest):
42
+
43
+ - **Windows 10 or 11 (64-bit):** `Fontvertx-<version>-windows-x64.zip` — unzip and run `Fontvertx.exe`.
44
+ - **macOS 14.4 or later, Apple Silicon:** `Fontvertx-<version>-macos-arm64.zip` — unzip and move `Fontvertx.app` to Applications.
45
+
46
+ The apps are not signed, so Windows and macOS warn you on first launch. The [manual](https://github.com/ftCLI/Fontvertx/blob/v1.0.0/docs/manual.md#22-ready-to-run-app-windows-and-macos) explains how to open them.
47
+
48
+ ### With Python (3.12 or later)
49
+
50
+ ```console
51
+ uv tool install fontvertx
52
+ ```
53
+
54
+ or
55
+
56
+ ```console
57
+ python -m pip install fontvertx
58
+ ```
59
+
60
+ Then run `fontvertx` for the desktop app or `fontvertx-cli` for the command line.
61
+
62
+ `uv` downloads a suitable Python by itself if your system has an older one; with `pip` you need Python 3.12 or later already installed.
63
+
64
+ ## Quick start
65
+
66
+ **Desktop app.** Add fonts with **Add files…**, **Add folder…** or drag and drop, choose a conversion, adjust the options, pick where to save, and press **Convert**.
67
+
68
+ **Command line:**
69
+
70
+ ```console
71
+ # Convert all fonts in a folder and its subfolders to WOFF and WOFF2
72
+ fontvertx-cli ft2wf ./fonts --recursive --output-dir ./converted
73
+
74
+ # TrueType to PostScript with a tighter tolerance
75
+ fontvertx-cli ttf2otf ./fonts --tolerance 0.5
76
+ ```
77
+
78
+ Run `fontvertx-cli --help` or `fontvertx-cli <conversion> --help` for every option.
79
+
80
+ > **A note on rights.** Converting a font means modifying it. Make sure the font's license allows it before converting.
81
+
82
+ ## Documentation
83
+
84
+ The **[user manual](https://github.com/ftCLI/Fontvertx/blob/v1.0.0/docs/manual.md)** covers every conversion and option, variable-font instances, output organization, the CLI, logs and troubleshooting.
85
+
86
+ ## Development
87
+
88
+ ```console
89
+ git clone https://github.com/ftCLI/Fontvertx.git
90
+ cd Fontvertx
91
+ uv sync --group dev
92
+ uv run pytest
93
+ ```
94
+
95
+ The project uses `ruff`, `mypy`, `bandit` and `pip-audit`; CI runs the tests on Python 3.12, 3.14 and 3.15 on Linux, Windows and macOS, with a 90% coverage threshold.
96
+
97
+ The ready-to-run apps are built with PyInstaller: `.\packaging\windows\build.ps1` on Windows, `./packaging/macos/build.sh` on a Mac with Apple Silicon. The official builds come from the `build.yml` workflow, which tests each build's CLI and attaches the zips to the GitHub release.
98
+
99
+ ## License
100
+
101
+ MIT — see [LICENSE](https://github.com/ftCLI/Fontvertx/blob/v1.0.0/LICENSE).
102
+
103
+ ## Acknowledgments
104
+
105
+ Fontvertx is built on excellent open-source tools:
106
+
107
+ - [FontTools](https://github.com/fonttools/fonttools) — font parsing and writing
108
+ - [ttfautohint](https://freedesktop.org/wiki/Software/ttfautohint/) — TrueType autohinting
109
+ - [cffsubr](https://github.com/adobe-type-tools/cffsubr) — CFF subroutinization
110
+ - [Skia pathops](https://github.com/fonttools/skia-pathops) — contour overlap removal
111
+ - [Inter](https://rsms.me/inter/) and [JetBrains Mono](https://www.jetbrains.com/lp/mono/) — interface fonts, under the SIL Open Font License 1.1
112
+ - [Material Symbols](https://fonts.google.com/icons) — interface icons, under the Apache License 2.0
@@ -0,0 +1,99 @@
1
+ [project]
2
+ name = "fontvertx"
3
+ version = "1.0.0"
4
+ description = "A free, open-source font converter for the desktop and the command line."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.12"
9
+ dependencies = [
10
+ "cffsubr>=0.4.0",
11
+ "click>=8.5.1,<9",
12
+ "fonttools[pathops,woff]>=4.68.0",
13
+ "pathvalidate>=3.3.1",
14
+ "PySide6-Essentials>=6.12.0",
15
+ "ttfautohint-py>=0.6.1",
16
+ ]
17
+ classifiers = [
18
+ "Development Status :: 5 - Production/Stable",
19
+ "Environment :: Console",
20
+ "Environment :: X11 Applications :: Qt",
21
+ "Intended Audience :: Developers",
22
+ "Intended Audience :: End Users/Desktop",
23
+ "Operating System :: OS Independent",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Programming Language :: Python :: 3.14",
28
+ "Programming Language :: Python :: 3.15",
29
+ "Topic :: Text Processing :: Fonts",
30
+ ]
31
+
32
+ [[project.authors]]
33
+ name = "Cesare Gilento"
34
+ email = "ftCLI@proton.me"
35
+
36
+ [project.scripts]
37
+ fontvertx-cli = "fontvertx.cli:main"
38
+
39
+ [project.gui-scripts]
40
+ fontvertx = "fontvertx.__main__:main"
41
+
42
+ [project.urls]
43
+ Homepage = "https://github.com/ftCLI/Fontvertx"
44
+ Documentation = "https://github.com/ftCLI/Fontvertx/blob/main/docs/manual.md"
45
+ Issues = "https://github.com/ftCLI/Fontvertx/issues"
46
+ Changelog = "https://github.com/ftCLI/Fontvertx/blob/main/CHANGELOG.md"
47
+
48
+ [dependency-groups]
49
+ test = [
50
+ "pytest>=9.2.0",
51
+ "pytest-cov>=7.1.0",
52
+ ]
53
+ dev = [
54
+ { include-group = "test" },
55
+ "ruff>=0.17.5",
56
+ "mypy>=2.4.1",
57
+ "bandit[toml]>=1.9.4",
58
+ "pip-audit>=2.10.1",
59
+ ]
60
+ build = ["pyinstaller>=6"]
61
+
62
+ [tool.pytest.ini_options]
63
+ testpaths = ["tests"]
64
+ addopts = "--cov=fontvertx --cov-report=term-missing:skip-covered --cov-fail-under=90"
65
+
66
+ [tool.ruff]
67
+ target-version = "py312"
68
+ line-length = 100
69
+ src = ["src"]
70
+
71
+ [tool.ruff.lint]
72
+ select = [
73
+ "E",
74
+ "F",
75
+ "I",
76
+ "UP",
77
+ "B",
78
+ "C4",
79
+ "SIM",
80
+ ]
81
+ ignore = ["E501"]
82
+
83
+ [tool.ruff.format]
84
+ quote-style = "double"
85
+ indent-style = "space"
86
+
87
+ [tool.mypy]
88
+ python_version = "3.12"
89
+ files = ["src"]
90
+ warn_unused_configs = true
91
+ check_untyped_defs = true
92
+ ignore_missing_imports = true
93
+
94
+ [tool.uv.build-backend]
95
+ module-name = "fontvertx"
96
+
97
+ [build-system]
98
+ requires = ["uv_build>=0.13.8,<0.14.0"]
99
+ build-backend = "uv_build"
@@ -0,0 +1,90 @@
1
+ [project]
2
+ name = "fontvertx"
3
+ version = "1.0.0"
4
+ description = "A free, open-source font converter for the desktop and the command line."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [
9
+ { name = "Cesare Gilento", email = "ftCLI@proton.me" }
10
+ ]
11
+ requires-python = ">=3.12"
12
+ dependencies = [
13
+ "cffsubr>=0.4.0",
14
+ "click>=8.5.1,<9",
15
+ "fonttools[pathops,woff]>=4.68.0",
16
+ "pathvalidate>=3.3.1",
17
+ "PySide6-Essentials>=6.12.0",
18
+ "ttfautohint-py>=0.6.1",
19
+ ]
20
+ classifiers = [
21
+ "Development Status :: 5 - Production/Stable",
22
+ "Environment :: Console",
23
+ "Environment :: X11 Applications :: Qt",
24
+ "Intended Audience :: Developers",
25
+ "Intended Audience :: End Users/Desktop",
26
+ "Operating System :: OS Independent",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Programming Language :: Python :: 3.13",
30
+ "Programming Language :: Python :: 3.14",
31
+ "Programming Language :: Python :: 3.15",
32
+ "Topic :: Text Processing :: Fonts",
33
+ ]
34
+
35
+ [project.scripts]
36
+ fontvertx-cli = "fontvertx.cli:main"
37
+
38
+ [project.gui-scripts]
39
+ fontvertx = "fontvertx.__main__:main"
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/ftCLI/Fontvertx"
43
+ Documentation = "https://github.com/ftCLI/Fontvertx/blob/main/docs/manual.md"
44
+ Issues = "https://github.com/ftCLI/Fontvertx/issues"
45
+ Changelog = "https://github.com/ftCLI/Fontvertx/blob/main/CHANGELOG.md"
46
+
47
+ [dependency-groups]
48
+ test = [
49
+ "pytest>=9.2.0",
50
+ "pytest-cov>=7.1.0",
51
+ ]
52
+ dev = [
53
+ { include-group = "test" },
54
+ "ruff>=0.17.5",
55
+ "mypy>=2.4.1",
56
+ "bandit[toml]>=1.9.4",
57
+ "pip-audit>=2.10.1",
58
+ ]
59
+ build = ["pyinstaller>=6"]
60
+
61
+ [tool.pytest.ini_options]
62
+ testpaths = ["tests"]
63
+ addopts = "--cov=fontvertx --cov-report=term-missing:skip-covered --cov-fail-under=90"
64
+
65
+ [tool.ruff]
66
+ target-version = "py312"
67
+ line-length = 100
68
+ src = ["src"]
69
+
70
+ [tool.ruff.lint]
71
+ select = ["E", "F", "I", "UP", "B", "C4", "SIM"]
72
+ ignore = ["E501"]
73
+
74
+ [tool.ruff.format]
75
+ quote-style = "double"
76
+ indent-style = "space"
77
+
78
+ [tool.mypy]
79
+ python_version = "3.12"
80
+ files = ["src"]
81
+ warn_unused_configs = true
82
+ check_untyped_defs = true
83
+ ignore_missing_imports = true
84
+
85
+ [build-system]
86
+ requires = ["uv_build>=0.13.8,<0.14.0"]
87
+ build-backend = "uv_build"
88
+
89
+ [tool.uv.build-backend]
90
+ module-name = "fontvertx"
@@ -0,0 +1,6 @@
1
+ __version__ = "1.0.0"
2
+
3
+ from fontvertx.finder import FontFinder
4
+ from fontvertx.font import Font
5
+
6
+ __all__ = ["Font", "FontFinder", "__version__"]
@@ -0,0 +1,96 @@
1
+ import ctypes
2
+ import logging
3
+ import sys
4
+ from pathlib import Path
5
+
6
+ from PySide6.QtCore import QSize, Qt
7
+ from PySide6.QtGui import QFont, QFontDatabase, QIcon
8
+ from PySide6.QtWidgets import QApplication, QStyleFactory
9
+
10
+ from fontvertx.gui.styles import MONO_FONT_FAMILY, UI_FONT_FAMILY, set_mono_family, ui_font
11
+ from fontvertx.gui.tooltips import TooltipTimingStyle, install_tooltip_theme
12
+ from fontvertx.gui.window import ConverterWindow
13
+ from fontvertx.logging_setup import setup_logging
14
+
15
+ # Window icon sizes; 16 and 24 px are rendered from the small design
16
+ # (fontvertx-small.svg), 32 px and up from the large one (fontvertx.svg).
17
+ APP_ICON_SIZES = (16, 24, 32, 48, 64, 128, 256)
18
+
19
+
20
+ def _app_icon() -> QIcon:
21
+ assets = Path(__file__).parent / "assets"
22
+ icon = QIcon()
23
+ for size in APP_ICON_SIZES:
24
+ png = assets / f"fontvertx-{size}.png"
25
+ if png.is_file():
26
+ icon.addFile(str(png), QSize(size, size))
27
+ if icon.isNull():
28
+ ico = assets / "fontvertx.ico"
29
+ if ico.is_file():
30
+ return QIcon(str(ico))
31
+ logging.getLogger(__name__).warning("Application icon not found in %s", assets)
32
+ return icon
33
+
34
+
35
+ def _set_windows_app_id() -> None:
36
+ if sys.platform != "win32":
37
+ return
38
+ try:
39
+ ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("Fontvertx.Fontvertx")
40
+ except (AttributeError, OSError) as error:
41
+ logging.getLogger(__name__).warning("Could not set Windows application ID: %s", error)
42
+
43
+
44
+ def _app_font() -> QFont:
45
+ font = QFontDatabase.systemFont(QFontDatabase.SystemFont.GeneralFont)
46
+ fonts = Path(__file__).parent / "assets" / "fonts" / "inter"
47
+ for style in ("Regular", "Medium", "SemiBold", "Bold"):
48
+ path = fonts / f"Inter-{style}.ttf"
49
+ font_id = QFontDatabase.addApplicationFont(str(path))
50
+ if font_id < 0 or UI_FONT_FAMILY not in QFontDatabase.applicationFontFamilies(font_id):
51
+ logging.getLogger(__name__).warning(
52
+ "Could not load UI font %s; using the system font", path
53
+ )
54
+ return font
55
+ font = ui_font(font) # UI family and features (styles.ui_font)
56
+ font.setWeight(QFont.Weight.Medium)
57
+ return font
58
+
59
+
60
+ def _mono_family() -> str:
61
+ fallback = QFontDatabase.systemFont(QFontDatabase.SystemFont.FixedFont).family()
62
+ fonts = Path(__file__).parent / "assets" / "fonts" / "jetbrains_mono"
63
+ for style in ("Regular", "Medium"):
64
+ path = fonts / f"JetBrainsMono-{style}.ttf"
65
+ font_id = QFontDatabase.addApplicationFont(str(path))
66
+ if font_id < 0 or MONO_FONT_FAMILY not in QFontDatabase.applicationFontFamilies(font_id):
67
+ logging.getLogger(__name__).warning(
68
+ "Could not load monospaced font %s; using the system fixed font", path
69
+ )
70
+ return fallback
71
+ return MONO_FONT_FAMILY
72
+
73
+
74
+ def main() -> int:
75
+ log_file = setup_logging()
76
+ logging.getLogger(__name__).info(
77
+ "Starting Fontvertx (log file: %s)", log_file if log_file is not None else "unavailable"
78
+ )
79
+ _set_windows_app_id()
80
+ app = QApplication(sys.argv)
81
+ # Neutral cross-platform base style; the application stylesheet sits on top.
82
+ app.setStyle(TooltipTimingStyle(QStyleFactory.create("Fusion")))
83
+ app.styleHints().setColorScheme(Qt.ColorScheme.Light)
84
+ app.setOrganizationName("Fontvertx")
85
+ app.setApplicationName("Fontvertx")
86
+ app.setWindowIcon(_app_icon())
87
+ app.setFont(_app_font())
88
+ set_mono_family(_mono_family())
89
+ install_tooltip_theme(app)
90
+ window = ConverterWindow()
91
+ window.showMaximized()
92
+ return app.exec()
93
+
94
+
95
+ if __name__ == "__main__":
96
+ sys.exit(main())
@@ -0,0 +1,92 @@
1
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+ -----------------------------------------------------------
8
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9
+ -----------------------------------------------------------
10
+
11
+ PREAMBLE
12
+ The goals of the Open Font License (OFL) are to stimulate worldwide
13
+ development of collaborative font projects, to support the font creation
14
+ efforts of academic and linguistic communities, and to provide a free and
15
+ open framework in which fonts may be shared and improved in partnership
16
+ with others.
17
+
18
+ The OFL allows the licensed fonts to be used, studied, modified and
19
+ redistributed freely as long as they are not sold by themselves. The
20
+ fonts, including any derivative works, can be bundled, embedded,
21
+ redistributed and/or sold with any software provided that any reserved
22
+ names are not used by derivative works. The fonts and derivatives,
23
+ however, cannot be released under any other type of license. The
24
+ requirement for fonts to remain under this license does not apply
25
+ to any document created using the fonts or their derivatives.
26
+
27
+ DEFINITIONS
28
+ "Font Software" refers to the set of files released by the Copyright
29
+ Holder(s) under this license and clearly marked as such. This may
30
+ include source files, build scripts and documentation.
31
+
32
+ "Reserved Font Name" refers to any names specified as such after the
33
+ copyright statement(s).
34
+
35
+ "Original Version" refers to the collection of Font Software components as
36
+ distributed by the Copyright Holder(s).
37
+
38
+ "Modified Version" refers to any derivative made by adding to, deleting,
39
+ or substituting -- in part or in whole -- any of the components of the
40
+ Original Version, by changing formats or by porting the Font Software to a
41
+ new environment.
42
+
43
+ "Author" refers to any designer, engineer, programmer, technical
44
+ writer or other person who contributed to the Font Software.
45
+
46
+ PERMISSION AND CONDITIONS
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
49
+ redistribute, and sell modified and unmodified copies of the Font
50
+ Software, subject to the following conditions:
51
+
52
+ 1) Neither the Font Software nor any of its individual components,
53
+ in Original or Modified Versions, may be sold by itself.
54
+
55
+ 2) Original or Modified Versions of the Font Software may be bundled,
56
+ redistributed and/or sold with any software, provided that each copy
57
+ contains the above copyright notice and this license. These can be
58
+ included either as stand-alone text files, human-readable headers or
59
+ in the appropriate machine-readable metadata fields within text or
60
+ binary files as long as those fields can be easily viewed by the user.
61
+
62
+ 3) No Modified Version of the Font Software may use the Reserved Font
63
+ Name(s) unless explicit written permission is granted by the corresponding
64
+ Copyright Holder. This restriction only applies to the primary font name as
65
+ presented to the users.
66
+
67
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
68
+ Software shall not be used to promote, endorse or advertise any
69
+ Modified Version, except to acknowledge the contribution(s) of the
70
+ Copyright Holder(s) and the Author(s) or with their explicit written
71
+ permission.
72
+
73
+ 5) The Font Software, modified or unmodified, in part or in whole,
74
+ must be distributed entirely under this license, and must not be
75
+ distributed under any other license. The requirement for fonts to
76
+ remain under this license does not apply to any document created
77
+ using the Font Software.
78
+
79
+ TERMINATION
80
+ This license becomes null and void if any of the above conditions are
81
+ not met.
82
+
83
+ DISCLAIMER
84
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
86
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
87
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
88
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
90
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
91
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
92
+ OTHER DEALINGS IN THE FONT SOFTWARE.