David PHAM-VAN

Fix missing chars with pdfjs

# Changelog
## 3.7.1
- Fix missing chars with pdfjs
## 3.7.0
- Fix imports for Dart 2.15
... ...
... ... @@ -76,8 +76,12 @@ class TtfWriter {
continue;
}
final glyph =
ttf.readGlyph(ttf.charToGlyphIndexMap[chars[index]] ?? 0).copy();
final glyphIndex = ttf.charToGlyphIndexMap[chars[index]] ?? 0;
if (glyphIndex >= ttf.glyphOffsets.length) {
continue;
}
final glyph = ttf.readGlyph(glyphIndex).copy();
for (final g in glyph.compounds) {
compounds[g] = -1;
}
... ...
... ... @@ -23,7 +23,7 @@ class PdfUnicodeCmap extends PdfObjectStream {
PdfUnicodeCmap(PdfDocument pdfDocument, this.protect) : super(pdfDocument);
/// List of characters
final cmap = <int>[];
final cmap = <int>[0];
/// Protects the text from being "seen" by the PDF reader.
final bool protect;
... ...
... ... @@ -3,7 +3,7 @@ description: A pdf producer for Dart. It can create pdf files for both web or fl
homepage: https://github.com/DavBfr/dart_pdf/tree/master/pdf
repository: https://github.com/DavBfr/dart_pdf
issue_tracker: https://github.com/DavBfr/dart_pdf/issues
version: 3.7.0
version: 3.7.1
environment:
sdk: ">=2.12.0 <3.0.0"
... ...
... ... @@ -22,7 +22,7 @@ dependencies:
image: ">=3.0.1 <4.0.0"
js: ^0.6.3
meta: ">=1.3.0 <2.0.0"
pdf: ^3.7.0
pdf: ^3.7.1
plugin_platform_interface: ^2.0.0
dev_dependencies:
... ...