PROS formatted strings

Im new to PROS for v5 and I was wondering is there is a easy way to print a formatted string to the brain`s screen using LittlevGL. I plan on using this to display variables, motor values, ect. As far as I know the best way to do this would be to make a label and set its text to a formatted string. The problem I run into is that the function


lv_label_set_text(lv_obj_t *label, const char *text);

requires a constant char. So I need to find a way to format a string and convert it to a


const char*

. Any help would be greatly appreciated.

I figured it out using snprintf, here is the code, I am sure there is a better way to do this

  char buffer [100];
	while (true) {
    shooterV = Shooter.get_actual_velocity();
    snprintf ( buffer, 100, "Shooter Velocity: %3d", shooterV);
    lv_label_set_text(label1, buffer);
		pros::delay(8);
	}

Another question how do you change font size in pros? I tried initializing the font in the lv_conf.h file and created a style for my label but it wont compile

static lv_style_t label;                      
lv_style_copy(&label, &lv_style_plain);
label.text.font = &lv_font_dejavu_30; 
lv_label_set_style(label1, &label);

Getting an error “unidentified reference to lv_font_dejavu_30”


char* print;
std::sprintf(print, "Position: %d", position);
lv_label_set_text(label, print);

That results in a memory permission error, I believe you have to declare the size of the char string

std::ostringstream ostr;

It’s simpler. But PROSV5 has some BUG support for STL. Maybe it’s just that my technology is not in place
resulting BUG.