Generates the source files from the working src files We don't want to use the working files as this will prep the files for making all the fonts, so it has to subset and change things that one wants to keep in the design files. *ds* file name of the working source designspace
(ds, src, version)
| 41 | |
| 42 | |
| 43 | def makeSources(ds, src, version): |
| 44 | """ |
| 45 | Generates the source files from the working src files |
| 46 | |
| 47 | We don't want to use the working files as this will prep the files |
| 48 | for making all the fonts, so it has to subset and change things that one |
| 49 | wants to keep in the design files. |
| 50 | |
| 51 | *ds* file name of the working source designspace file |
| 52 | *src* is path to the mastering source directory |
| 53 | *version* is the version number to set the fonts to |
| 54 | """ |
| 55 | # Copy files from src/ufo, as we need to edit them |
| 56 | ignore = shutil.ignore_patterns(".git", |
| 57 | ".git*", |
| 58 | ) |
| 59 | print("🏗 Copying files") |
| 60 | |
| 61 | dsPath = os.path.join("../src/ufo", ds) |
| 62 | copyFiles(dsPath, src) |
| 63 | |
| 64 | # Copy features |
| 65 | shutil.copytree("../src/features/features", os.path.join(src, "features"), |
| 66 | ignore=ignore) |
| 67 | shutil.copy("../src/features/features.fea", |
| 68 | os.path.join(src, 'features.fea')) |
| 69 | |
| 70 | prep(os.path.join(src, ds), version) |
| 71 | buildFeatures(src) |
| 72 | |
| 73 | |
| 74 | def buildFiles(sources=True, |
no test coverage detected