Skip to content

Instantly share code, notes, and snippets.

@adbac
adbac / MagneticMetrics2.py
Last active April 27, 2025 12:17
A new version of ProductionType's magneticMetrics script, updated for RoboFont 4 (using the Subscriber and merz modules)
"""
v.2.000
Observer to make sidebearings magnetic to outline modifications.
Its aim to be used as a startup script so it can be activated and deactivated whenever you need.
Version history:
Adrien Bachelart:
- v2.000: Updated for RF4: use Subscriber instead of observers and merz instead of mojo.drawingTools
ProductionType:
@adbac
adbac / zipFolder.py
Created February 23, 2025 22:15
Python script to zip a folder without macOS metadata like .DS_Store files (and the _MACOSX folder, normally).
import os
import zipfile
from pathlib import Path
def zipFolder(zipDir, sourcePath, excludePatterns=[]):
"""
Zips a folder and its contents, without macOS metadata like `.DS_Store` files.
*zipDir* is the path to the directory to put the zip file in,