Flutter - Rendering a custom symbol based fonts

Viewed 503

I am trying to render a custom font made up of symbols, the Phoenician alphabet to be exact, I have the font file '.ttf', in my pubspec.yaml I added the font as I would normally do when I am about to add a custom font:

flutter:
  fonts:
    - family: Phoenician
      fonts:
        - asset: fonts/Phoenician.ttf

When I tried to test the font out it didn't render and instead showed regular latin characters.

Text(test_str, style: TextStyle(fontFamily: 'Phoenician'),

I made sure of the font's metadata, it works just fine, I even installed it on my computer.

How exactly can I use this level of customized fonts with flutter?

PS: I am running MacOS and testing on an iPhone 11 simulator

UPDATE: Those symbols DO NOT exist in the table of characters.

1 Answers

After I tried the font on my own, It works really fine:

Hello World

I think the problem is inside the Phoenician.ttf file.

Why? See image below:

enter image description here

As you can see, not all of the letters are "translated" into the Phoenician alphabet The components that are not "translated" are:

a, e, f, i, j, o, t, u, v, Capitalized Letters (except T), Numbers, etc.

So, I decided to try the capitalized letter, and then the result is: HELLO WORLD

So if you want to use this font, make sure to not use the capitalized letter, number, etc.

Related