joseph-grabinger / flutter_to_pdf

Create PDFs but work with normal Flutter Widgets.
MIT License
21 stars 17 forks source link

Fix: Unsupported `AppleSystemUIFont` font #92

Closed joseph-grabinger closed 3 weeks ago

joseph-grabinger commented 3 weeks ago

When exporting a Text widget that uses a TextStyle provided through a TextTheme (on macOS & iOS) the following error is thrown:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Unsupported Font: .AppleSystemUIFont
#0      TextStyleConverter.resolveFont (package:flutter_to_pdf/args/text_style.dart:66:11)
#1      TextStyleConverter.toPdfTextStyle (package:flutter_to_pdf/args/text_style.dart:39:21)
#2      TextConverter.toPdfWidget (package:flutter_to_pdf/widgets/text.dart:22:29)
#3      ExportInstance.matchWidget (package:flutter_to_pdf/export_instance.dart:176:40)
#4      ExportInstance._visit (package:flutter_to_pdf/export_instance.dart:58:29)

Closes #78.

codecov-commenter commented 3 weeks ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.46%. Comparing base (3950e24) to head (2011d03). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/args/text_style.dart 70.00% 3 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #92 +/- ## ========================================== - Coverage 85.52% 85.46% -0.07% ========================================== Files 58 58 Lines 898 901 +3 ========================================== + Hits 768 770 +2 - Misses 130 131 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RenatoCesarF commented 1 week ago

is this working on version 0.2.2? I cant import my font, and if i do not import, get this error

joseph-grabinger commented 1 week ago

@RenatoCesarF this will be present in version 0.2.3