David PHAM-VAN

Fix empty lines text gap

# Changelog
## 3.10.7
- Fix empty lines text gap
## 3.10.6
- Update bidi dependency
... ...
... ... @@ -19,9 +19,10 @@
import 'dart:convert';
import 'dart:math' as math;
import 'dart:typed_data';
import 'package:meta/meta.dart';
import 'bidi_utils.dart' as bidi;
import 'bidi_utils.dart' as bidi;
import 'font_metrics.dart';
enum TtfParserName {
... ... @@ -192,6 +193,8 @@ class TtfParser {
int get descent => bytes.getInt16(tableOffsets[hhea_table]! + 6);
int get lineGap => bytes.getInt16(tableOffsets[hhea_table]! + 8);
int get numOfLongHorMetrics =>
bytes.getUint16(tableOffsets[hhea_table]! + 34);
... ...
... ... @@ -282,6 +282,9 @@ See https://github.com/DavBfr/dart_pdf/wiki/Fonts-Management
/// Spans the distance between the baseline and the lowest descending glyph
double get descent;
/// Height of an empty line
double get lineGap => ascent + descent;
/// Internal units per
int get unitsPerEm;
... ...
... ... @@ -1041,7 +1041,7 @@ class RichText extends Widget with SpanningWidget {
if (spanCount > 0) {
offsetY += bottom - top;
} else {
offsetY += space.ascent + space.descent;
offsetY += font.lineGap * style.fontSize! * textScaleFactor;
}
top = 0;
bottom = 0;
... ...
... ... @@ -12,7 +12,7 @@ topics:
- print
- printing
- report
version: 3.10.6
version: 3.10.7
environment:
sdk: ">=2.18.0 <4.0.0"
... ...