resolveCustomFont method
Implementation
Future<pw.Font> resolveCustomFont(
String ttfFontPath, AssetBundle assetBundle) async {
final bytes = await assetBundle.load(ttfFontPath);
if (bytes.buffer.asInt8List().isEmpty) {
throw Exception('Font file $ttfFontPath is empty');
}
return pw.Font.ttf(bytes);
}