Question: / / PROBLEM 1 : Prints string ' msg ' using 'font'. Only prints characters / / 0 to 'length - 1 ' . Iterates

// PROBLEM 1: Prints string 'msg' using 'font'. Only prints characters
//0 to 'length-1'. Iterates over each row in font->height and then
// scans across the charactes in 'msg' printing each "row" of the
// character. On reaching index 'length', prints a newline and then
// scans across 'msg' again printing characters from the next row.
// Each msg[i] character is used to as the index into fonts->glyphs[]
// to access the "glyph" that will be printed.
//
// NOTE: This function does NOT handle embedded newline '
'
// characters. It is intended to be called repeatedly on each line in
// multiline text with '
' characters found using the
// 'find_linebreaks()' function.
//
// EXAMPLE:
//
// print_fontified_oneline("Hello!", &font_standard, 6);
//// Prints the following on standard output:
//._.._.,-,,-,._.
//||||___||||___||
//||_||/'_`\||||/_\||
//|_||__/|||||(_)||_|
//|_||_|\___||_||_|\___/(_)
void print_fontified_oneline(char *msg, font_t *font, int length){
// WRITE ME
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!