I’m trying to load a custom font like this:
Scenic.Cache.Hash.compute(File.read!(@font_path), :sha) |> IO.inspect()
Scenic.Cache.File.load(@font_path, @font_hash) |> IO.inspect()
Scenic.Cache.File.read(@font_path, @font_hash) |> IO.inspect()
graph =
Graph.build(font: @font_hash, font_size: 24)
This is the output when using the font:
"cu1h9EqFbnBMyCyDDqtWtMh2lOw"
{:ok, "cu1h9EqFbnBMyCyDDqtWtMh2lOw"}
{:ok,
<<0, 1, 0, 0, 0, 20, 1, 0, 0, 4, 0, 64, 71, 80, 79, 83, 39, 13, 154, 194, 0, 4,
82, 12, 0, 0, 117, 60, 71, 83, 85, 66, 177, 57, 193, 22, 0, 4, 199, 72, 0, 0,
0, 146, 76, 84, 83, 72, ...>>}
Unknown message: 0x38
WARNING Excess message bytes! 313343
So it looks like loading/reading the file works fine, but when I use it I get the error message.
It’s a ttf font.
Anyone got an idea what could be wrong?