olikraus / U8g2_for_Adafruit_GFX

Add U8g2 fonts to any Adafruit GFX based graphics library.
Other
112 stars 32 forks source link

typo in write(uint8_t v) method #6

Closed av1024 closed 6 years ago

av1024 commented 6 years ago

Hi! Does not compiled for me. Looks like missed 'u8g2.' in write function.

      uint16_t e = utf8_next(v);
      int16_t delta;

      if ( e == '\n' )
      {
    tx = 0;
// FIXED HERE:
        ty += u8g2.font_info.ascent_para - u8g2.font_info.descent_para;
      }

PS: I try to adapt this lib to RTL8710 with custom eInk library, so I use QtCreator/QBS for build. May be this is non-arduino related issue?

olikraus commented 6 years ago

You mean this line? https://github.com/olikraus/U8g2_for_Adafruit_GFX/blob/master/src/U8g2_for_Adafruit_GFX.h#L185

Did you use the version from Arduino IDE?

Or did you just download zip from here?

av1024 commented 6 years ago

You mean this line? Yes

Did you use the version from Arduino IDE? No. I use git clone (a hour before creating issue) so it latest version

olikraus commented 6 years ago

I guess I have not fully tested the latest version. Thanks!

av1024 commented 6 years ago

Can confirm that code compiled with fixed typo work with custom drawing engine (for now - Paint class from Waveshare examples) with 2.13" eInk display.

Complied via QtCreator's "makefile" - .qbs script using forked rtlDuino library.

BTW: As a thoughts out loud. Looks like Adafruit's GFX is not main part of lib. May be a simple "draw_H(V)_Line" pointers would be enough?

olikraus commented 6 years ago

May be a simple "draw_H(V)_Line" pointers would be enough?

You mean?

olikraus commented 6 years ago

fixed, tested and released

av1024 commented 6 years ago

May be a simple "draw_H(V)_Line" pointers would be enough? You mean?

For now only two functions from GFX used. So it might be an option to remove dependency of Adafruit_GFX and store two pointers for drawing functions.

olikraus commented 6 years ago

True, but the lib was created with Adafruit in mind only. In this case it should be a new github library.