OpenFontRender icon indicating copy to clipboard operation
OpenFontRender copied to clipboard

[OFR ERROR] FTC_Manager_LookupFace error: 0x40

Open jie326513988 opened this issue 3 years ago • 2 comments

Hello, I have some problems. Can you help me. esp32-woorm-32D. The error code is resolved as memory overflow, but there is 159136B of available memory left before running. I don't understand why so much memory is needed.

This is part of the code snippet:

Serial.print("FreeHeap:");Serial.println(ESP.getFreeHeap());
if (render.loadFont("/字体/等线细.ttf"))
{
  Serial.println("Render initialize error");
  esp_sleep(0);
  return;
}
render.setDrawer(display); // 设置工程对象
display_ttfLine(0, "渲染测试,16", 16);
display_ttfLine(1, "渲染测试,32", 32);
display_ttfLine(2, "渲染测试,48", 48);

This is the debug output:

FreeHeap:159136 [OFR INFO] Font load required. FaceId: 0x0x3ffc5244 [OFR INFO] Load from file. [OFR ERROR] Font load Failed1: 0x40
[OFR ERROR] FTC_Manager_LookupFace error: 0x40 Render initialize error

jie326513988 avatar Feb 23 '23 13:02 jie326513988

@jie326513988

Sorry for the late reply 🙇‍♂️🙇‍♂️🙇‍♂️

Perhaps, but the your font data is too large for the microcontroller. You may be able to solve the problem by creating a subset font from which only the necessary fonts are extracted. For more detailed verification, you will need to provide us with the font files you are using.

Thank you.

takkaO avatar Feb 28 '23 12:02 takkaO

Thank you. I'm glad you can reply Yes, this font is as large as 14MB, but my other driver library can drive it,Maybe the parsing method is different. Load from SD card.

truetype_Arduino

等线细.zip

jie326513988 avatar Mar 10 '23 11:03 jie326513988