Skip to content

Commit

Permalink
Merge branch 'feature/ttf-support'
Browse files Browse the repository at this point in the history
  • Loading branch information
taurgis committed Jul 10, 2022
2 parents 088c429 + 80bf1a5 commit 48d0835
Show file tree
Hide file tree
Showing 9 changed files with 2,478 additions and 15 deletions.
10 changes: 10 additions & 0 deletions cartridges/jsPDF/fonts/angin-senja-normal.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions cartridges/jsPDF/fonts/broc-webfont-normal.js

Large diffs are not rendered by default.

20 changes: 6 additions & 14 deletions cartridges/jsPDF/jsPDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,9 @@ var jsPDF = (function (global) {

for (var token in topics[topic]) {
var sub = topics[topic][token];
try {
sub[0].apply(context, args);
} catch (ex) {
if (global.console) {
console.error('jsPDF PubSub Error', ex.message, ex);
}
}

sub[0].apply(context, args);

if (sub[1]) tokens.push(token);
}
if (tokens.length) tokens.forEach(this.unsubscribe);
Expand Down Expand Up @@ -1012,7 +1008,7 @@ var jsPDF = (function (global) {

events.publish('addFont', {
font: font,
instance: instance
instance: API
});

if (fontKey !== undefined) {
Expand Down Expand Up @@ -1051,12 +1047,8 @@ var jsPDF = (function (global) {
if (~stack.indexOf(' at ')) stack = stack.split(" at ")[1];
var m = "Error in function " + stack.split("\n")[0].split('<')[
0] + ": " + e.message;
if (global.console) {
global.console.error(m, e);
if (global.alert) alert(m);
} else {
throw new Error(m);
}

throw new Error(m);
}
};
fn.foo.bar = fn;
Expand Down
Loading

0 comments on commit 48d0835

Please sign in to comment.