fornellas / eglib

A portable C library for interfacing with LCD, OLED, e-ink / e-paper displays.
Other
6 stars 4 forks source link

How to add Chinese fonts #34

Open dinpingyu opened 1 year ago

dinpingyu commented 1 year ago

Hello, do you know if you can add simplified Chinese fonts

fornellas commented 1 year ago

@dinpingyu I'm happy to merge a PR adding new unicode blocks here. From the available fonts, I'm not sure which of them support Chinese. I know for a fact that Adobe's doesn't. You may add extra fonts here, just make sure to check their licences and update LICENSE.md . Other than that, you'll need to add some tests here, check this doc as well.

There's also a hacking guide which you may find useful.

songzhishuo commented 1 year ago

sorry, I dont know how to add simplified Chinese fonts too. could you please give me a detailed graphic tutorial.ThankYou.!!!

fornellas commented 1 year ago

detailed graphic tutorial

Not sure what you mean by that...


There's a lot of documentation here https://fornellas.github.io/eglib/ Which you should refer to get started.

You'll at least, have to:

A word of advice: the Unicode blocks for Chinese characters is quite big, I did a quick attempt of adding them, gcc would require 3G of RAM, and the generated object files were huge. Certainly, it would not be possible to use them at STM32F4, as none would have enough Flash memory for that. You'll likely need to refactor the font interface to allow font data to be pulled from other sources (eg: a uSD card) as well.

songzhishuo commented 1 year ago

Thank you very much for your reply, my English is not too good. I'd like to say tutorials. tutorials&Demo to use chinese font in eglib.