emilsoftware-utilities 1.3.89 → 1.3.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,12 @@ interface DocumentConfig {
48
48
  colore: string;
49
49
  installPath?: string;
50
50
  };
51
+ fontBold: {
52
+ nome: string;
53
+ dimensione: number;
54
+ colore: string;
55
+ installPath?: string;
56
+ };
51
57
  margini: {
52
58
  sx: number;
53
59
  dx: number;
@@ -122,7 +122,7 @@ class DocumentGenerator {
122
122
  segText = seg.substring(2, seg.length - 2);
123
123
  }
124
124
  if (useBold) {
125
- this.doc.setFont("Montserrat-Bold");
125
+ this.doc.setFont(this.config.fontBold.nome);
126
126
  }
127
127
  else {
128
128
  this.doc.setFont(normalFont);
@@ -275,7 +275,7 @@ class DocumentGenerator {
275
275
  }
276
276
  else if (this.isBoldText(titleText)) {
277
277
  const boldText = this.stripBoldMarkers(titleText);
278
- yield this.writeWrappedTextWithFont(Object.assign(Object.assign({}, this.config.fontSottotitolo), { nome: "Montserrat-Bold" }), boldText, this.curX + this.config.rientro, this.curY, maxWidth - this.config.rientro);
278
+ yield this.writeWrappedTextWithFont(Object.assign(Object.assign({}, this.config.fontSottotitolo), { nome: this.config.fontSottotitolo.nome }), boldText, this.curX + this.config.rientro, this.curY, maxWidth - this.config.rientro);
279
279
  }
280
280
  else {
281
281
  yield this.writeWrappedTextWithFont(this.config.fontSottotitolo, titleText, this.curX + this.config.rientro, this.curY, maxWidth - this.config.rientro);
@@ -299,7 +299,7 @@ class DocumentGenerator {
299
299
  }
300
300
  else if (this.isBoldText(contenuto)) {
301
301
  const boldText = this.stripBoldMarkers(contenuto);
302
- yield this.writeWrappedTextWithFont(Object.assign(Object.assign({}, this.config.fontTesto), { nome: "Montserrat-Bold" }), boldText, this.curX + this.config.rientro, this.curY, maxWidth - this.config.rientro);
302
+ yield this.writeWrappedTextWithFont(Object.assign(Object.assign({}, this.config.fontTesto), { nome: this.config.fontTesto.nome }), boldText, this.curX + this.config.rientro, this.curY, maxWidth - this.config.rientro);
303
303
  }
304
304
  else {
305
305
  yield this.writeWrappedTextWithFont(this.config.fontTesto, contenuto, this.curX + this.config.rientro, this.curY, maxWidth - this.config.rientro);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emilsoftware-utilities",
3
- "version": "1.3.89",
3
+ "version": "1.3.91",
4
4
  "description": "Utilities for EmilSoftware",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",