David PHAM-VAN

Add more warnings on type1 fonts

@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 - Add Footer Widget 12 - Add Footer Widget
13 - Fix Page orientation 13 - Fix Page orientation
14 - Add Ascii85 test 14 - Add Ascii85 test
  15 +- Add more warnings on type1 fonts
15 16
16 ## 1.3.23 17 ## 1.3.23
17 18
@@ -146,6 +146,7 @@ abstract class PdfFont extends PdfObject { @@ -146,6 +146,7 @@ abstract class PdfFont extends PdfObject {
146 Can not decode the string to Latin1. 146 Can not decode the string to Latin1.
147 This font does not support Unicode characters. 147 This font does not support Unicode characters.
148 If you want to use strings other than Latin strings, use a TrueType (TTF) font instead. 148 If you want to use strings other than Latin strings, use a TrueType (TTF) font instead.
  149 +See https://github.com/DavBfr/dart_pdf/issues/76
149 ---------------------------------------------'''); 150 ---------------------------------------------''');
150 rethrow; 151 rethrow;
151 } 152 }
@@ -20,7 +20,12 @@ class PdfType1Font extends PdfFont { @@ -20,7 +20,12 @@ class PdfType1Font extends PdfFont {
20 /// Constructs a [PdfTtfFont] 20 /// Constructs a [PdfTtfFont]
21 PdfType1Font._create(PdfDocument pdfDocument, this.fontName, this.ascent, 21 PdfType1Font._create(PdfDocument pdfDocument, this.fontName, this.ascent,
22 this.descent, this.widths) 22 this.descent, this.widths)
23 - : super._create(pdfDocument, subtype: '/Type1'); 23 + : assert(() {
  24 + print(
  25 + '$fontName has no Unicode support see https://github.com/DavBfr/dart_pdf/issues/76');
  26 + return true;
  27 + }()),
  28 + super._create(pdfDocument, subtype: '/Type1');
24 29
25 /// The font's real name 30 /// The font's real name
26 @override 31 @override