mirror of
https://github.com/kiliman/operator-mono-lig.git
synced 2026-08-12 02:10:52 +02:00
🐛 Fix multiple font generation using profiles
This commit is contained in:
@@ -24,5 +24,5 @@ if not exist .\ligature\%lig%\glyphs\* exit /b
|
||||
@echo Building %lig%
|
||||
ttx -f .\original\%otf%.otf
|
||||
node index.js %otf%
|
||||
ttx -f .\build\%lig%.ttx
|
||||
for %%f in (.\build\%lig%*.ttx) do ttx -f %%f
|
||||
exit /b
|
||||
|
||||
@@ -18,7 +18,10 @@ build_font() {
|
||||
echo Building $1
|
||||
ttx -f "./original/$otf.otf"
|
||||
node index.js $otf
|
||||
ttx -f ./build/$1.ttx
|
||||
|
||||
for f in ./build/$1*.ttx ; do
|
||||
ttx -f $f
|
||||
done
|
||||
}
|
||||
|
||||
if [ -n "$1" ]
|
||||
|
||||
@@ -36,9 +36,7 @@ function main() {
|
||||
|
||||
const buildFont = profile => {
|
||||
// add suffix to dstFileName if present
|
||||
const dstFileName = `./build/${ligFontName}${
|
||||
profile.suffixWithLeadingHyphen
|
||||
}.ttx`;
|
||||
const dstFileName = `./build/${ligFontName}${profile.suffixWithLeadingHyphen}.ttx`;
|
||||
console.log(
|
||||
`Building ligature font file ${dstFileName} name = ${profile.name}`
|
||||
);
|
||||
@@ -87,7 +85,7 @@ const getProfiles = () => {
|
||||
|
||||
const content = fs.readFileSync(profilePath, 'utf-8');
|
||||
content
|
||||
.split(os.EOL)
|
||||
.split(/\r|\r\n|\n/g)
|
||||
.filter(line => /^[#]/.test(line) === false && line.length > 0)
|
||||
.forEach(line => {
|
||||
const ch = line.trim()[0];
|
||||
@@ -103,7 +101,7 @@ const getProfiles = () => {
|
||||
profiles.push(profile);
|
||||
} else {
|
||||
if (!profile) {
|
||||
throw new Error('You must profile a profile name in []');
|
||||
throw new Error('You must provide a profile name in []');
|
||||
}
|
||||
profile.ligatures.push(line);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user