Windows-Unterstützung: .bat-Skripte, Font-Werkzeuge in Python

- libs/glyphextract.py ersetzt die grep/sed/bc-Logik von extract-glyph.sh,
  extract-font.sh und fonttest.sh (die .sh rufen es nur noch auf);
  schreibt FONTNAME= und <font>.cfg nach $PICCREATE_OUT
- bin/*.bat: setenv, piccreate, svgconvert, webscan, extract-glyph,
  extract-font, fonttest, setup-venv; .gitattributes für CRLF
- piccreate.py: Hintergrund als file:// URL (Windows-Pfade)
- svgconvert.py: magick statt convert, Configs/CSV als UTF-8
- webscan.py: Installationshinweise für Windows
- doc/README.md: Abschnitt Windows, Font-Werkzeuge aktualisiert

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael Stangl
2026-10-09 09:29:02 +02:00
co-authored by Claude Opus 5.5
parent 4897883938
commit 29c066b45a
18 changed files with 471 additions and 209 deletions
+4 -2
View File
@@ -10,6 +10,7 @@ import optparse
import os
import re
import configparser
import pathlib
from utils import CSVImport, CompleteEnding, get_translation
from string import Template
@@ -39,12 +40,13 @@ def create_picture_frame( config ):
try:
params['background'] = config.get('globals', 'background')
imagetpl = ''' <image width="${width}" height="${height}"
xlink:href="file://${background}">
xlink:href="${background}">
</image>
'''
background = config.get('globals', 'background')
font_path = os.path.expandvars(os.path.join('$PICCREATE_BACKGROUNDS', background ))
params['background'] = os.path.normpath(font_path)
# als file:// URL, damit es auch mit Windows-Pfaden (C:\...) klappt
params['background'] = pathlib.Path(os.path.abspath(font_path)).as_uri()
svgbegin = svgbegin + Template( imagetpl ).substitute(params)
except configparser.NoOptionError:
# dann eben kein Hintergrundbild