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
2020-12-27 06:00:57 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6802ee843a7e87e30e7a5f586487f21588b330d2
6802ee84
1 parent
deac1cab
Add some asserts on the TtfParser
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
pdf/CHANGELOG.md
pdf/lib/src/ttf_parser.dart
pdf/CHANGELOG.md
View file @
6802ee8
...
...
@@ -6,6 +6,7 @@
-
Add LayoutWidgetBuilder
-
Add GridPaper widget
-
Improve internal sructure
-
Add some asserts on the TtfParser
## 1.13.0
...
...
pdf/lib/src/ttf_parser.dart
View file @
6802ee8
...
...
@@ -54,6 +54,23 @@ class TtfParser {
tableSize
[
name
]
=
size
;
}
assert
(
tableOffsets
.
containsKey
(
head_table
),
'Unable to find the `head` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
name_table
),
'Unable to find the `name` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
hmtx_table
),
'Unable to find the `hmtx` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
hhea_table
),
'Unable to find the `hhea` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
cmap_table
),
'Unable to find the `cmap` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
maxp_table
),
'Unable to find the `maxp` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
loca_table
),
'Unable to find the `loca` table. This file is not a supported TTF font'
);
assert
(
tableOffsets
.
containsKey
(
glyf_table
),
'Unable to find the `glyf` table. This file is not a supported TTF font'
);
_parseFontName
();
_parseCMap
();
_parseIndexes
();
...
...
Please
register
or
login
to post a comment