font-carrier
Advanced tools
Comparing version 0.4.0-beta.4 to 0.4.0-beta.5
@@ -1,3 +0,1 @@ | ||
var multiline = require('multiline') | ||
//导出svg的配置 | ||
@@ -14,3 +12,2 @@ exports.DEFAULT_EXPORT_OPTIONS = { | ||
//默认的配置参数 | ||
@@ -44,46 +41,27 @@ exports.DEFAULT_OPTIONS = { | ||
exports.FONT_TMPL = multiline(function() {/*! | ||
<?xml version="1.0" standalone="no"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | ||
<svg> | ||
<metadata> | ||
Created by font-carrier | ||
</metadata> | ||
exports.FONT_TMPL = | ||
`<?xml version="1.0" standalone="no"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | ||
<svg xmlns="http://www.w3.org/2000/svg"> | ||
<metadata>Created by font-carrier</metadata> | ||
<defs> | ||
<font id="<%= font.id %>" horiz-adv-x="<%= font.horizAdvX %>" vert-adv-y="<%= font.horizAdvX %>" > | ||
<font-face | ||
<% for(var v in fontface){ %> | ||
<% print(v + '="' + fontface[v] + '"') %> | ||
<%} %> | ||
/> | ||
<font id="<%= font.id %>" horiz-adv-x="<%= font.horizAdvX %>" vert-adv-y="<%= font.horizAdvX %>"> | ||
<font-face | ||
<% for(var v in fontface){ %><% print(v + '="' + fontface[v] + '"') %> | ||
<%} %>/> | ||
<missing-glyph /> | ||
<% if(!hasX){ %> | ||
<glyph glyph-name="x" unicode="x" horiz-adv-x="100" | ||
d="M20 20 L50 20 L50 -20 Z" /> | ||
<% } %> | ||
<% for(var i in glyphs){ | ||
var glyph = glyphs[i].options; | ||
%> | ||
<glyph glyph-name="<%= glyph['glyphName'] %>" unicode="<%= glyph['unicode']%>" d="<%= glyph['d']%>" <% if (glyph['horizAdvX']) print('horiz-adv-x="'+ glyph['horizAdvX']+'"') %> <% if (glyph['vertAdvY']) print('vert-adv-y="'+ glyph['vertAdvY']+'"') %> /> | ||
<% } %> | ||
</font> | ||
<glyph glyph-name="x" unicode="x" horiz-adv-x="100" d="M20 20 L50 20 L50 -20 Z" /><% } %> | ||
<% for(var i in glyphs){ var glyph = glyphs[i].options; | ||
%><glyph glyph-name="<%= glyph['glyphName'] %>" unicode="<%= glyph['unicode']%>" d="<%= glyph['d']%>" <% if (glyph['horizAdvX']) print('horiz-adv-x="'+ glyph['horizAdvX']+'"') %> <% if (glyph['vertAdvY']) print('vert-adv-y="'+ glyph['vertAdvY']+'"') %> /> | ||
<% } | ||
%></font> | ||
</defs> | ||
</svg> | ||
*/ | ||
}) | ||
</svg>` | ||
exports.SVG_TMPL = multiline(function() {/*! | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <% if(!options['skipViewport']){ %> x="0" y="0" width="<%= options['width'] %>" height="<%= options['height'] %>" <% } %> viewBox="0 0 <%= glyph['horizAdvX'] %> <%= glyph['vertAdvY'] %>"> | ||
exports.SVG_TMPL = | ||
`<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <% if(!options['skipViewport']){ %> x="0" y="0" width="<%= options['width'] %>" height="<%= options['height'] %>" <% } %> viewBox="0 0 <%= glyph['horizAdvX'] %> <%= glyph['vertAdvY'] %>"> | ||
<path d="<%= glyph['d'] %>"/> | ||
</svg> | ||
*/ | ||
}) | ||
</svg>` |
{ | ||
"name": "font-carrier", | ||
"version": "0.4.0-beta.4", | ||
"version": "0.4.0-beta.5", | ||
"description": "字体搬运工,中文字体解决方案,iconfont", | ||
@@ -16,3 +16,2 @@ "main": "./lib/index.js", | ||
"lodash": "^4.17.21", | ||
"multiline": "^2.0.0", | ||
"opentype.js": "^1.1.0", | ||
@@ -19,0 +18,0 @@ "svg2ttf-new": "^5.3.0-beta.3", |
10
43592
1082
- Removedmultiline@^2.0.0
- Removedmultiline@2.0.0(transitive)
- Removedstrip-indent@2.0.0(transitive)