尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Digitize typefaces: turn scans of typewriter type samples into clean, installable monospaced fonts
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Digitize typefaces. Turn scans of typewriter type samples - dirty, skewed, at any resolution - into clean, installable monospaced fonts. Label where each character is; Digitype averages every impression, traces it, and rebuilds it.
Site: https://leonardchau.com/Digitype/ · Try it in your browser: https://leonardchau.com/Digitype/app/ · Docs: Preparing samples · User guide · How it works · Settings
git clone https://github.com/dairyking98/Digitype
cd Digitype
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python3 -m digitype label "path/to/your/scans"
On Windows, run.bat "D:\Scans\Type Samples" sets up .venv on first run. Then open
http://127.0.0.1:8770, draw a box around a line of text, type what it says, and press Regenerate.
Lower each letter into water a little at a time. The shoreline at each level is the letter thinned by that much. Where shore from two sides meets and goes under, it leaves a trail. The trail, plus the depth at which each point of it went under, is the letter's seed. A disc of radius = depth at every trail point gives the letter back exactly.
The seed is where the cleanup happens. Dirt barely moves the trail:
Then the seeds can be standardized across the whole alphabet (one stem width, true verticals, shared baseline and x-height, shared serifs) and grown back: faithfully, or modified (lighter/bolder, more or less contrast, monoline), and exported as a font.
| stage | module | status |
|---|---|---|
| glyph from a font (test input) | glyph.py | done |
| simulated worn impression / bad scan | raster.dirty | done |
| first cleanup: specks, pinholes (< a stroke), edge | raster.clean | done |
| sinking island: depth map + trail graph (nodes, branches) | island.sink | done |
| prune corner ridges / speck trails, merge split junctions | island.prune | done, tuning |
| seed: smoothed + simplified centerlines, linearized half-widths, nodes | seed.py | done (polylines; Bézier fit next) |
| grow back (discs + tapered capsules, junction fill) | grow.py | done |
| report PNG per letter | report.py | done |
| average several impressions of the same letter | regen.average | done |
| real scans: labelling tool, cells, baselines, averaging, .ttf export | project.py regen.py server.py web/ | done |
| standardize across the alphabet | planned | |
| terminal / serif styles (flat ends come back round today) | planned | |
| export a .ttf (fontTools) | regen.write_font | done |
https://leonardchau.com/Digitype/app/ runs the same labelling tool with nothing installed: Python
runs in the browser (Pyodide), and a service worker answers the page's /api/ requests with
digitype/webapi.py in place of the server. The project lives in the browser's storage (or a folder
picked on disk, Chrome/Edge); Download project / Open project (.zip) move it between computers.
No "Add from a path" (a web page can't read paths), and Regenerate is about 1.6x slower than native.
Build: python3 site/build.py (local test in site/dist/) or python3 site/build.py docs/app
(what GitHub Pages serves - rebuild it whenever digitype/ changes).
run.bat "D:\Scans\Type Samples" (Windows; first run sets up .venv)
.venv/bin/python3 -m digitype label path/to/samples [--project DIR] (anywhere)
Opens a local page (http://127.0.0.1:8770). Every image, multi-page TIFF frame and PDF page is a page; Upload PDF / images… copies files into the project from the browser. Drag a box round a glyph and type it; type a whole run (spaces included) to split a line into fixed-pitch cells at the project's pitch. The page warns when the text can't match the ink (a missing or extra space). Baselines are automatic: letters that sit on the line give it, g j p , ( ... borrow it. Adaptive (default) fits the baseline locally along each line, so skewed or wavy lines are followed; Straight fits one tilted line per run. Tilt correction turns each sample level by its line's tilt before averaging. Shift+drag the red line to set one by hand.
Font sets: a project can hold several typefaces (the Peli scans are a different Olympia face per page). Pick the set in the top bar, + New font starts another; boxes, pitch and font name are kept per set, other sets' boxes show dimmed, and Regenerate only uses the chosen set.
Regenerate averages every sample of each character (lined up on cell and baseline,
registered sub-pixel), then writes two fixed-pitch fonts to projects/<name>/out/<set>/:
-Average.ttf (the averaged ink, traced) and -Seed.ttf (sunk to a seed and regrown).
Results shows each glyph's average, trace and seed. Projects live in projects/ (not in git).
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/python3 -m digitype demo path/to/font.ttf kyR8 --dirty --out out
Each letter gets report_XXXX.png (input -> sinking island -> seed -> grown back vs the
original, with IoU) and seed_XXXX_{clean,dirty}.json. examples/ has runs on Noto Sans Mono
and FreeMono.