sumotoy / RA8875

A library for RAiO RA8875 display driver for Teensy3.x or LC/Arduino's/Energia/Spark
GNU General Public License v3.0
79 stars 55 forks source link

Font centering using internal font is no longer centered #60

Closed The-Experimentalist closed 9 years ago

The-Experimentalist commented 9 years ago

When I compile with 0.70 fonts are correctly centered, with 0.70b5 they tend to the bottom right hand corner. I will test more later and report back.

This is using internal fonts.

sumotoy commented 9 years ago

ah, ok. It's an easy fix. I'll check and fix later

sumotoy commented 9 years ago

Are you sure about this issue? look at the following code...

  tft.setFontScale(3);
  //tft.setCursor(CENTER, CENTER);
  tft.setCursor(tft.width()/2, tft.height()/2,true);
  tft.print("AA AA");
  tft.drawLine(0, 0, tft.width(), tft.height(), RA8875_RED);
  tft.drawLine(0, tft.height(), tft.width(), 0, RA8875_RED);
  tft.drawFastHLine(0, tft.height() / 2, tft.width(), RA8875_RED);
  tft.drawFastVLine(tft.width() / 2, 0, tft.height(), RA8875_RED);

Looks perfectly centered, at any scale and using CENTER or autocenter flag!!!!

The-Experimentalist commented 9 years ago

Sorry for slow reply, been away. Not had chance to test this yet. All I know is when I compile with the later code all my button legends went off centre. Will probably not get any time to work on this again for a couple of weeks

sumotoy commented 9 years ago

no prob, I'll close it, eventually you can still open again issue if you find something else I've missed.