Skip to content

Commit

Permalink
fix: Remove font manager until we find alternative
Browse files Browse the repository at this point in the history
- font-manager fails to build on WIndows and Linux
  • Loading branch information
netchampfaris committed Feb 10, 2020
1 parent 3f3c074 commit 3efbf5b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 29 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ matrix:
services: docker
language: generic

addons:
apt:
packages:
- libfontconfig-dev

cache:
directories:
- node_modules
Expand Down
1 change: 1 addition & 0 deletions models/doctype/Item/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
{
fieldname: 'description',
label: 'Description',
placeholder: 'Item Description',
fieldtype: 'Text'
},
{
Expand Down
16 changes: 0 additions & 16 deletions models/doctype/PrintSettings/PrintSettings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
const theme = require('@/theme');
const fontManager = require('font-manager');
const uniq = require('lodash/uniq');
let fonts = [];

module.exports = {
name: 'PrintSettings',
Expand Down Expand Up @@ -94,18 +91,6 @@ module.exports = {
fieldname: 'font',
label: 'Font',
fieldtype: 'AutoComplete',
getList() {
return new Promise(resolve => {
if (fonts.length > 0) {
resolve(fonts);
} else {
fontManager.getAvailableFonts(_fonts => {
fonts = ['Inter'].concat(uniq(_fonts.map(f => f.family)).sort());
resolve(fonts);
});
}
});
},
default: 'Inter'
}
],
Expand All @@ -114,7 +99,6 @@ module.exports = {
'displayLogo',
'template',
'color',
'font',
'email',
'phone',
'address',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@popperjs/core": "^2.0.3",
"core-js": "^3.4.3",
"electron-store": "^5.1.0",
"font-manager": "https://github.com/q-lukasz/font-manager#issue-45--compile-error-mac-os-x--node-13-7",
"frappe-charts": "^1.3.0",
"frappejs": "https://github.com/frappe/frappejs",
"knex": "^0.20.4",
Expand Down
8 changes: 1 addition & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4830,12 +4830,6 @@ follow-redirects@^1.0.0:
dependencies:
debug "^3.0.0"

"font-manager@https://github.com/q-lukasz/font-manager#issue-45--compile-error-mac-os-x--node-13-7":
version "0.3.1"
resolved "https://github.com/q-lukasz/font-manager#523d3b3c2b535a5003c2a631bf6d2ec342cc6c8f"
dependencies:
nan ">=2.14.0"

for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
Expand Down Expand Up @@ -7294,7 +7288,7 @@ mz@^2.4.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"

nan@>=2.14.0, nan@^2.12.1:
nan@^2.12.1:
version "2.14.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
Expand Down

0 comments on commit 3efbf5b

Please sign in to comment.