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
2021-12-15 17:35:20 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5b191d88909bb64ceeba9d0cc910af17e6441edf
5b191d88
1 parent
81f59be9
Fix TTF font parser for NewsCycle-Regular.ttf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
pdf/lib/src/pdf/ttf_parser.dart
printing/CHANGELOG.md
pdf/lib/src/pdf/ttf_parser.dart
View file @
5b191d8
...
...
@@ -417,9 +417,12 @@ class TtfParser {
}
TtfGlyphInfo
_readCompoundGlyph
(
int
glyph
,
int
start
,
int
offset
)
{
const
ARG_1_AND_2_ARE_WORDS
=
1
;
const
MORE_COMPONENTS
=
32
;
const
WE_HAVE_INSTRUCTIONS
=
256
;
const
ARG_1_AND_2_ARE_WORDS
=
0x0001
;
const
HAS_SCALE
=
0x008
;
const
MORE_COMPONENTS
=
0x0020
;
const
HAS_X_Y_SCALE
=
0x0040
;
const
HAS_TRANFORMATION_MATRIX
=
0x0080
;
const
WE_HAVE_INSTRUCTIONS
=
0x0100
;
final
components
=
<
int
>[];
var
hasInstructions
=
false
;
...
...
@@ -429,6 +432,13 @@ class TtfParser {
flags
=
bytes
.
getUint16
(
offset
);
final
glyphIndex
=
bytes
.
getUint16
(
offset
+
2
);
offset
+=
(
flags
&
ARG_1_AND_2_ARE_WORDS
!=
0
)
?
8
:
6
;
if
(
flags
&
HAS_SCALE
!=
0
)
{
offset
+=
2
;
}
else
if
(
flags
&
HAS_X_Y_SCALE
!=
0
)
{
offset
+=
4
;
}
else
if
(
flags
&
HAS_TRANFORMATION_MATRIX
!=
0
)
{
offset
+=
8
;
}
components
.
add
(
glyphIndex
);
if
(
flags
&
WE_HAVE_INSTRUCTIONS
!=
0
)
{
...
...
printing/CHANGELOG.md
View file @
5b191d8
...
...
@@ -4,6 +4,7 @@
-
Fix print dialog crash on Linux
-
Fix directPrint printer selection on macOS
-
Fix TTF font parser for NewsCycle-Regular.ttf
## 5.6.7
...
...
Please
register
or
login
to post a comment