Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

font-carrier

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-carrier - npm Package Compare versions

Comparing version 0.4.0-beta.4 to 0.4.0-beta.5

62

lib/config.js

@@ -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="&#x78;" 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="&#x78;" 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc