David PHAM-VAN

Fix Nunito font parsing

1 # Changelog 1 # Changelog
2 2
  3 +## 3.4.1
  4 +
  5 +- Fix Nunito font parsing
  6 +
3 ## 3.4.0 7 ## 3.4.0
4 8
5 - Fix Text.softWrap behavior 9 - Fix Text.softWrap behavior
@@ -36,10 +36,7 @@ class PdfFontMetrics { @@ -36,10 +36,7 @@ class PdfFontMetrics {
36 }) : ascent = ascent ?? bottom, 36 }) : ascent = ascent ?? bottom,
37 descent = descent ?? top, 37 descent = descent ?? top,
38 advanceWidth = advanceWidth ?? right - left, 38 advanceWidth = advanceWidth ?? right - left,
39 - leftBearing = leftBearing ?? left,  
40 - assert(left <= right),  
41 - assert(top <= bottom),  
42 - assert((descent ?? top) <= (ascent ?? bottom)); 39 + leftBearing = leftBearing ?? left;
43 40
44 /// Add another metric 41 /// Add another metric
45 factory PdfFontMetrics.append( 42 factory PdfFontMetrics.append(
@@ -358,7 +358,6 @@ class TtfParser { @@ -358,7 +358,6 @@ class TtfParser {
358 358
359 if (flag & REPEAT != 0) { 359 if (flag & REPEAT != 0) {
360 var repeatCount = bytes.getUint8(offset++); 360 var repeatCount = bytes.getUint8(offset++);
361 - assert(repeatCount > 0);  
362 i += repeatCount; 361 i += repeatCount;
363 while (repeatCount-- > 0) { 362 while (repeatCount-- > 0) {
364 flags.add(flag); 363 flags.add(flag);
@@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl @@ -4,7 +4,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf 4 homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
5 repository: https://github.com/DavBfr/dart_pdf 5 repository: https://github.com/DavBfr/dart_pdf
6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues 6 issue_tracker: https://github.com/DavBfr/dart_pdf/issues
7 -version: 3.4.0 7 +version: 3.4.1
8 8
9 environment: 9 environment:
10 sdk: ">=2.12.0 <3.0.0" 10 sdk: ">=2.12.0 <3.0.0"