The following is excellent instruction. This is helpful information.
However, I can't understand how to create the TTF file data by the getFont method. There is no "writeAsBytes" statement. This means the TTF file is always empty.
In what cases is the following condition TRUE?
// Line 11 of getFont
if (fontBytes != null && fontBytes.isNotEmpty) {