Code Monkey home page Code Monkey logo

Comments (6)

nopnop2002 avatar nopnop2002 commented on May 29, 2024

I added LcdDrowCode function.

Font file that From 0x00 to 0x7f, the characters image of Standard ASCII are stored.
M5Statck-Font-1

Font file that From 0x80 to 0xff, the characters image of Japanese are stored.
It can be seen that no font pattern is stored from 0x80 to 0xa0.
M5Statck-Font-2

Font file that From 0x80 to 0xff, the characters image of Latin are stored.
M5Statck-Font-3

from esp-idf-ili9340.

samsam4 avatar samsam4 commented on May 29, 2024

Thank you for quick reaction! I cant test it right away as I have only ESP-IDF 4,2,1 installed and when I tried on 4th August what was the master version from git and was not working with 4,2,1, so I am actually using some older your version that I downloaded in May I think and it was working well (except ascii >127). So will either try to update ESP-IDF (but there was some reason I didn't update it before, just cant remember right now what was ) or will try to patch your old code with whatever you added today.
Best regards

from esp-idf-ili9340.

nopnop2002 avatar nopnop2002 commented on May 29, 2024

This is mine.

ESP-IDF version:v4.4-dev-2825-gb63ec47238

from esp-idf-ili9340.

samsam4 avatar samsam4 commented on May 29, 2024

Ok - I didn't use all your new code (because don't want to install yet 4.4), but found easy fix: just removing/comment out if(ascii < 0x80){ line 211 in fontx.c which I see you also did in some of the recent versions, but in the one that I downloaded in May 2021 was still there. I might don't need yet your new function LcdDrawCode, because lcdDrawString(..); works fine if special and locale symbols are entered as \x7f\x81\xa1\xa2\xa6\xa7 etc. Doesn't work if typed from keyboard or with Alt+code, but I dont need it now and I guess that is why you've made LcdDrawCode?

One more question about font files: When I am using the fontxedit.exe to make my font or even if I just only "Save as" some of the provided your fonts and the fontxedit.exe puts only spaces (0x20) in the place in the font file header where suppose to be font name - 8 bytes from offset 6 to 13. How did you make your font files with names in place - is there any trick with fontxedit or use some other editor to put the names there?
Because without names my code still works, but on terminal output I see plenty of "Fontx: not found."
Thank you and best regards.

from esp-idf-ili9340.

nopnop2002 avatar nopnop2002 commented on May 29, 2024

just removing/comment out if(ascii < 0x80){ line 211 in fontx.c

Good!!

Doesn't work if typed from keyboard or with Alt+code, but I dont need it now and I guess that is why you've made LcdDrawCode?

I wanted to use the LcdDrawCode function to show where the pattern resides in the font file.

How did you make your font files with names in place - is there any trick with fontxedit or use some other editor to put the names there?

fontxedit.exe sets a space(0x20) in the font name of the FONTX file header.

I searched for the header editor for the FONTX file but couldn't find it.

A Binary editor is required to edit the font name of the FONTX file header.


You need to be aware of this when you add new font files to your project.
https://github.com/nopnop2002/esp-idf-ili9340/blob/master/main/main.c#L1278

from esp-idf-ili9340.

samsam4 avatar samsam4 commented on May 29, 2024

Thanks

from esp-idf-ili9340.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.