-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Travis CI
committed
Nov 7, 2020
1 parent
e14d061
commit 2b7c1b9
Showing
13 changed files
with
152 additions
and
17,220 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
define(function(require) { | ||
|
||
var config = [ | ||
{ name: "Courier", label: "Courier", file: "" }, | ||
{ name: "CourierPrime", label: "Courier Prime", file: "courier-prime" }, | ||
{ name: "CourierPrimeCyrillic", label: "Courier Prime Cyrillic", file: "courier-prime-cyrillic" } | ||
// { name: "Kosugi", label: "Kosugi", file: "kosugi", "tmp-ratio": 0.62 } | ||
]; | ||
|
||
var loaders = {}; | ||
config.forEach(function(font) { | ||
if (font.file) { | ||
if (window) { | ||
// BROWSER LOADER | ||
// LOCAL | ||
if (window.location.protocol === "file:") { | ||
loaders[font.name] = function(callback) { | ||
require(['bundle/js/fonts/' + font.file + '.js?callback=define'], function (fonts) { | ||
callback(fonts); | ||
}); | ||
}; | ||
} | ||
// DYNAMIC | ||
else { | ||
loaders[font.name] = function(callback) { | ||
require(['js/fonts/' + font.file + '.js?callback=define'], function (fonts) { | ||
callback(fonts); | ||
}); | ||
}; | ||
} | ||
} else { | ||
// NDOE.JS LOADER | ||
loaders[font.name] = function(callback) { | ||
callback(require('fonts/' + font.file)); | ||
}; | ||
} | ||
} else { | ||
// USE PDF SUPPORTED FONT | ||
loaders[font.name] = function (callback) { | ||
callback(null); | ||
}; | ||
} | ||
loaders[font.name].config = font; | ||
}); | ||
|
||
// list of fonts for settings | ||
loaders.fontsList = config; | ||
|
||
return loaders; | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.