Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2023-06-06 09:28:59 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
42fd788fb143a3f082405977137d040786506674
42fd788f
1 parent
7be03d98
Partially revert underline on spans changes
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
pdf/CHANGELOG.md
pdf/lib/src/widgets/text.dart
pdf/CHANGELOG.md
View file @
42fd788
...
...
@@ -3,6 +3,7 @@
## 3.10.5
-
Improve TTF writer with multi-compound characters
-
Partially revert underline on spans changes
## 3.10.4
...
...
pdf/lib/src/widgets/text.dart
View file @
42fd788
...
...
@@ -49,14 +49,12 @@ enum TextOverflow {
}
abstract
class
_Span
{
_Span
(
this
.
style
,
this
.
realWidth
);
_Span
(
this
.
style
);
final
TextStyle
style
;
var
offset
=
PdfPoint
.
zero
;
double
realWidth
;
double
get
left
;
double
get
top
;
...
...
@@ -105,13 +103,9 @@ class _TextDecoration {
return
_box
;
}
final
x1
=
spans
[
startSpan
].
offset
.
x
+
spans
[
startSpan
].
left
+
spans
[
startSpan
].
realWidth
;
final
x2
=
spans
[
endSpan
].
offset
.
x
+
spans
[
endSpan
].
left
+
spans
[
endSpan
].
width
-
spans
[
endSpan
].
realWidth
;
final
x1
=
spans
[
startSpan
].
offset
.
x
+
spans
[
startSpan
].
left
;
final
x2
=
spans
[
endSpan
].
offset
.
x
+
spans
[
endSpan
].
left
+
spans
[
endSpan
].
width
;
var
y1
=
spans
[
startSpan
].
offset
.
y
+
spans
[
startSpan
].
top
;
var
y2
=
y1
+
spans
[
startSpan
].
height
;
...
...
@@ -265,7 +259,7 @@ class _Word extends _Span {
this
.
text
,
TextStyle
style
,
this
.
metrics
,
)
:
super
(
style
,
metrics
.
advanceWidth
);
)
:
super
(
style
);
final
String
text
;
...
...
@@ -331,7 +325,7 @@ class _Word extends _Span {
}
class
_WidgetSpan
extends
_Span
{
_WidgetSpan
(
this
.
widget
,
TextStyle
style
,
this
.
baseline
)
:
super
(
style
,
0
);
_WidgetSpan
(
this
.
widget
,
TextStyle
style
,
this
.
baseline
)
:
super
(
style
);
final
Widget
widget
;
...
...
Please
register
or
login
to post a comment