Comparing version 4.1.0 to 4.2.0
@@ -0,1 +1,7 @@ | ||
4.2.0 / 2018-12-10 | ||
------------------ | ||
- Added `description` and `url` options, #74 | ||
4.1.0 / 2017-06-24 | ||
@@ -2,0 +8,0 @@ ------------------ |
@@ -29,2 +29,4 @@ /* | ||
font.copyright = options.copyright || svgFont.metadata; | ||
font.description = options.description || 'Generated by svg2ttf from Fontello project.'; | ||
font.url = options.url || 'http://fontello.com'; | ||
font.sfntNames.push({ id: 2, value: options.subfamilyname || svgFont.subfamilyName || 'Regular' }); // subfamily name | ||
@@ -31,0 +33,0 @@ font.sfntNames.push({ id: 4, value: options.fullname || svgFont.id }); // full name |
@@ -48,4 +48,4 @@ 'use strict'; | ||
} | ||
result.push.apply(result, getStrings('Generated by svg2ttf from Fontello project.', TTF_NAMES.DESCRIPTION)); | ||
result.push.apply(result, getStrings('http://fontello.com', TTF_NAMES.URL_VENDOR)); | ||
result.push.apply(result, getStrings(font.description, TTF_NAMES.DESCRIPTION)); | ||
result.push.apply(result, getStrings(font.url, TTF_NAMES.URL_VENDOR)); | ||
@@ -52,0 +52,0 @@ _.forEach(font.sfntNames, function (sfntName) { |
{ | ||
"name": "svg2ttf", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Converts SVG font to TTF font", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"cubic2quad": "^1.0.0", | ||
"lodash": "^4.6.1", | ||
"lodash": "^4.17.10", | ||
"microbuffer": "^1.0.0", | ||
@@ -37,5 +37,5 @@ "svgpath": "^2.1.5", | ||
"devDependencies": { | ||
"eslint": "^4.1.0", | ||
"mocha": "^3.0.0" | ||
"eslint": "^5.10.0", | ||
"mocha": "^5.0.0" | ||
} | ||
} |
@@ -43,3 +43,5 @@ svg2ttf | ||
- `copyright` - copyright string (optional) | ||
- `description` - description string (optional) | ||
- `ts` - Unix timestamp (in seconds) to override creation time (optional) | ||
- `url` - manufacturer url (optional) | ||
- `version` - font version string, can be `Version x.y` or `x.y`. | ||
@@ -46,0 +48,0 @@ - `buf` - internal [byte buffer](https://github.com/fontello/microbuffer) |
@@ -34,2 +34,11 @@ #!/usr/bin/env node | ||
parser.addArgument( | ||
[ '-d', '--description' ], | ||
{ | ||
help: 'Override default description text', | ||
required: false, | ||
type: 'string' | ||
} | ||
); | ||
parser.addArgument( | ||
[ '--ts' ], | ||
@@ -44,2 +53,11 @@ { | ||
parser.addArgument( | ||
[ '-u', '--url' ], | ||
{ | ||
help: 'Override default manufacturer url', | ||
required: false, | ||
type: 'string' | ||
} | ||
); | ||
parser.addArgument( | ||
[ '--vs' ], | ||
@@ -83,6 +101,10 @@ { | ||
if (args.description) options.description = args.description; | ||
if (args.ts !== null) options.ts = args.ts; | ||
if (args.url) options.url = args.url; | ||
if (args.vs) options.version = args.vs; | ||
fs.writeFileSync(args.outfile[0], new Buffer(svg2ttf(svg, options).buffer)); |
78063
2111
73
Updatedlodash@^4.17.10