0

Can the RA8875 change Font?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can the RA8875 change Font?

by Forge on Fri Oct 06, 2017 6:42 pm

So I have been trying to get a little prototype for a product going and I am running into a silly issue I can not solve. I have a Arduino Mega 2560 R3 hooked up to a 7" TFT LCD with a RA8875 chip. I am simply trying to change my font; specifically to any of the ones included with the adafruit_gfx library. I'll post some code here to see if anyone can spot anything wrong.

Note that everything compiles and uploads smoothly without error. The LCD touchscreen also works very well and visual stuff such as the adafruit graphics demo runs well too.
I just cant change font. I also noticed

Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_RA8875.h>

#include <Fonts/FreeSansBold24pt7b.h>

#define RA8875_INT 4
#define RA8875_CS 10
#define RA8875_RESET 9

Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET);
uint16_t tx, ty;
float xScale = 1024.0F/850.0;
float yScale = 1024.0F/545.0;

void setup() {
  Serial.begin(9600);
  tft.begin(RA8875_800x480);
  tft.displayOn(true);
  tft.GPIOX(true);
  tft.PWM1config(true, RA8875_PWM_CLK_DIV1024);
  tft.PWM1out(255);

  tft.textMode();
  tft.setFont(&FreeSansBold24pt7b);
  tft.textSetCursor(80,200);
  tft.textEnlarge(8);
  tft.print("AXCDW0129314");
}

void loop() {

}

Forge
 
Posts: 1
Joined: Fri Oct 06, 2017 6:35 pm

Re: Can the RA8875 change Font?

by adafruit_support_rick on Sat Oct 07, 2017 9:03 am

tft.textMode sets the RA8875 to use its internal font. Don't go into text mode if you want to use a GFX font

adafruit_support_rick
 
Posts: 34768
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.