放入DB一了百了

TOP

呢幾 MB 會存入 SD Card。
Draw 每一隻字就要 open ... read ... close
咁樣會好慢
ghostkcleung 發表於 2021-6-27 12:14

如果 Draw 五隻字
open ... seek ... read ... seek ... read ... seek ... read ... seek ... read ... seek ... read ... close 呢?

TOP

上晒ram先攞返你想要既slice
https://www.dreamincode.net/foru ... -binary-files-in-c/

TOP

如果將啲嘢 open 到尾嘅話,
咁樣就會變咗 Global variable,
有啲 Global 潔癖,唔係好想咁樣。
(純粹興趣唔係交貨,所以有潔癖)

如果 Draw 五隻字
open ... seek ... read ... seek ... read ... seek ... read ... seek ... read ... s ...
smoke_cheese 發表於 2021-6-29 23:23

TOP

定還是 open type / true type 嘅 render algorithm 會唔會好複雜?

TOP

如果將啲嘢 open 到尾嘅話,
咁樣就會變咗 Global variable,
有啲 Global 潔癖,唔係好想咁樣。
(純粹興 ...
ghostkcleung 發表於 2021-6-30 23:22

將個 File handle 放喺 Font class 入面

TOP

上晒ram先攞返你想要既slice
pchai 發表於 2021-6-30 20:36


mcu 唔同,部份只有 200K ram 左右。 以一個字 24*24/8=72byte, 中文常用可以去到6xxx 字左右,即係 72 *6K= 432K.  mcu 未必夠用。

一般 mcu 出 display 不多過 100個 string, 1000字以下。以 b-tree 結構,做埋 balance. 最壞係 search 9 level 左右就搵到個字。
以 80 byte 放一個字,淨字庫就去左 90~100K。係 init 時要用啲時間去 load 字庫,

TOP