takkaO / OpenFontRender

TTF font render support library for microcomputer.
Other
105 stars 16 forks source link

[OFR ERROR] FTC_Manager_LookupFace error: 0x40 #23

Open jie326513988 opened 1 year ago

jie326513988 commented 1 year ago

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

takkaO commented 1 year ago

@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.

jie326513988 commented 1 year ago

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