Coder Social home page Coder Social logo

Comments (3)

riuson avatar riuson commented on July 17, 2024

Hello,
Try the following template.
It is highly likely that it will not give you an immediately working result. But it can give you a starting point.

$(start_block_header)
#include <stdint.h>

//#define XADVANCE ($(out_images_max_width)+1)
#define YADVANCE ($(out_images_max_height)+1)

$(end_block_header)

const uint8_t $(doc_name_ws)_Bitmaps[] PROGMEM = {
$(start_block_images_table)
  $(out_image_data)
  #if ($(out_blocks_count) > 0)
  $(out_comma)
  #endif
$(end_block_images_table)
};

const GFXglyph $(doc_name_ws)_Glyphs[] PROGMEM = {
$(start_block_images_table)
  //Index,  W, H,xAdv,dX, dY
  { $(out_char_offset), $(out_char_image_width), $(out_char_image_height), /*XADVANCE*/ $(out_image_width) + 1, $(out_char_image_left), ( $(out_image_height) - ($(out_char_image_top) + $(out_char_image_height)) )}$(out_comma) // 
$(end_block_images_table)
};

$(start_block_images_table)
#ifndef FIRST_CHAR_CODE
#define FIRST_CHAR_CODE 0x$(out_char_code)
#endif

#ifdef LAST_CHAR_CODE
#undef LAST_CHAR_CODE
#endif

#define LAST_CHAR_CODE 0x$(out_char_code)

$(end_block_images_table)

const GFXfont $(doc_name_ws) PROGMEM = {
  (uint8_t  *)$(doc_name_ws)_Bitmaps,
  (GFXglyph *)$(doc_name_ws)_Glyphs,
  FIRST_CHAR_CODE, LAST_CHAR_CODE, YADVANCE
};

#undef XADVANCE
#undef YADVANCE
#undef FIRST_CHAR_CODE
#undef LAST_CHAR_CODE

from lcd-image-converter.

boromyr avatar boromyr commented on July 17, 2024

Wow, thank you very much, I'll try it and I'll try to fix it. You could add it to the repository, so they can use it too, almost all library use Adafruit GFX and there are no simple and effective tools for fonts.
Excellent app!!!!

from lcd-image-converter.

riuson avatar riuson commented on July 17, 2024

If you manage to bring the template to working condition, let me know. Maybe I will add it to the package.

from lcd-image-converter.

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.