Flutter How to save font data

Viewed 27

There is no problem with the added font. Added font file to pubspec.yaml.
What I want to do is to output the data entered in the font file.

Font File Data Image enter image description here

I want to output the text entered in the .ttf file rather than applying the font with fontFamily of TextWidget. For example

List<String> fontData = //Insert FontData;
Text(fontData[0]);  //L
Text(fontData[1]);  //O
Text(fontData[2]);  //r

If you know a method or library how, please let me know, thanks.

1 Answers

There is typically no text inside a ttf file. It only consists of instructions on how to draw each letter/symbol. You are probably using a software or your OS provides an example text to show you how the font looks like. Therefore you cannot extract any text from a ttf file because there isn't any.

Related