mzapo_canvas.c
void DrawText(Canvas* canvas, char* text, int start_x, int start_y, unsigned int separation, RGB* color){
	int c_main_x = 0;
	int c_main_y = 0;
	
	int first_c_offset = font_winFreeSystem14x16.firstchar;

	unsigned int c_height = font_winFreeSystem14x16.height;
	
	
	
	for(int c = 0; c < strlen(text); c++){
		if(text[c] == 10){ // End of line when working with array strings
			break;}
		
		uint32_t c_offset = font_winFreeSystem14x16.offset[(int)(text[c])-first_c_offset];
		unsigned char c_width = font_winFreeSystem14x16.width[(int)(text[c])-first_c_offset];

		for(int c_temp_y = 0; c_temp_y < c_height; c_temp_y++){
			uint16_t c_line_data = font_winFreeSystem14x16.bits[c_offset+c_temp_y];

			uint16_t iterator = 32768; // 1000000000000000 mask bits
			for(int c_temp_x = 0; c_temp_x < c_width; c_temp_x++){
				if((iterator & c_line_data) != 0){
					// color pixel if and mask is not zero
					ColorCanvasPixel((start_x+c_main_x+c_temp_x), (start_y+c_main_y+c_temp_y), color, canvas);
				}
				iterator = iterator >> 1; // 0100000000000000 ...
			}
		}
		c_main_x += (c_width + separation);
	}
	return;
}
/*  Draws text to the canvas where left up position is (start_x,start_y) and 
	separation is the number of pixels between letters (>=0)  
	This function basically iterates through every character in string,
	each character is represented in the font_winFreeSystem14x16 with its,
	width, height(all have the same height), and binary (uint_16),
	for each line in specific character we mask the bits with 1000...,0100...,0010...
	and when bitwise operation with this iterative binary and line of a character is
	not zero (meaning there is number 1 which represents color in character) then
	color the pixel with argument 'color'. We also have arguments for moving like
	'c_main_x','c_main_y' so we dont draw on one place. And add semerator at the end */
Draws text to the canvas where left up position is (start_x,start_y) and
separation is the number of pixels between letters (>=0)
This function basically iterates through every character in string,
each character is represented in the font_winFreeSystem14x16 with its,
width, height(all have the same height), and binary (uint_16),
for each line in specific character we mask the bits with 1000...,0100...,0010
and when bitwise operation with this iterative binary and line of a character is
not zero (meaning there is number 1 which represents color in character) then
color the pixel with argument 'color'. We also have arguments for moving like
'c_main_x','c_main_y' so we dont draw on one place. And add semerator at the end
Draws text to the canvas where left up position is ( start_x start_y ) and separation is the number of pixels between letters ( > = 0 ) This function basically iterates through every character in string each character is represented in the font_winFreeSystem14x16 with its width height ( all have the same height ) and binary ( uint_16 ) for each line in specific character we mask the bits with 1000 ... 0100 ... 0010 and when bitwise operation with this iterative binary and line of a character is not zero ( meaning there is number 1 which represents color in character ) then color the pixel with argument ' color ' . We also have arguments for moving like ' c_main_x ' ' c_main_y ' so we dont draw on one place . And add semerator at the end
void DrawText(Canvas* canvas, char* text, int start_x, int start_y, unsigned int separation, RGB* color){
	int c_main_x = 0;
	int c_main_y = 0;
	int first_c_offset = font_winFreeSystem14x16.firstchar;
	unsigned int c_height = font_winFreeSystem14x16.height;
	for(int c = 0; c < strlen(text); c++){
		if(text[c] == 10){ 
			break;}
		uint32_t c_offset = font_winFreeSystem14x16.offset[(int)(text[c])-first_c_offset];
		unsigned char c_width = font_winFreeSystem14x16.width[(int)(text[c])-first_c_offset];
		for(int c_temp_y = 0; c_temp_y < c_height; c_temp_y++){
			uint16_t c_line_data = font_winFreeSystem14x16.bits[c_offset+c_temp_y];
			uint16_t iterator = 32768; 
			for(int c_temp_x = 0; c_temp_x < c_width; c_temp_x++){
				if((iterator & c_line_data) != 0){
					ColorCanvasPixel((start_x+c_main_x+c_temp_x), (start_y+c_main_y+c_temp_y), color, canvas);
				}
				iterator = iterator >> 1; 
			}
		}
		c_main_x += (c_width + separation);
	}
	return;
}
void DrawText ( Canvas * canvas , char * text , int start_x , int start_y , unsigned int separation , RGB * color ) { int c_main_x = 0 ; int c_main_y = 0 ; int first_c_offset = font_winFreeSystem14x16 . firstchar ; unsigned int c_height = font_winFreeSystem14x16 . height ; for ( int c = 0 ; c < strlen ( text ) ; c ++ ) { if ( text [ c ] == 10 ) { break ; } uint32_t c_offset = font_winFreeSystem14x16 . offset [ ( int ) ( text [ c ] ) - first_c_offset ] ; unsigned char c_width = font_winFreeSystem14x16 . width [ ( int ) ( text [ c ] ) - first_c_offset ] ; for ( int c_temp_y = 0 ; c_temp_y < c_height ; c_temp_y ++ ) { uint16_t c_line_data = font_winFreeSystem14x16 . bits [ c_offset + c_temp_y ] ; uint16_t iterator = 32768 ; for ( int c_temp_x = 0 ; c_temp_x < c_width ; c_temp_x ++ ) { if ( ( iterator & c_line_data ) != 0 ) { ColorCanvasPixel ( ( start_x + c_main_x + c_temp_x ) , ( start_y + c_main_y + c_temp_y ) , color , canvas ) ; } iterator = iterator >> 1 ; } } c_main_x += ( c_width + separation ) ; } return ; }
Draws text to the canvas where left up position is (start_x,start_y) and
separation is the number of pixels between letters (>=0)
This function basically iterates through every character in string,
each character is represented in the font_winFreeSystem14x16 with its,
width, height(all have the same height), and binary (uint_16),
for each line in specific character we mask the bits with 1000...,0100...,0010...
and when bitwise operation with this iterative binary and line of a character is
not zero (meaning there is number 1 which represents color in character) then
color the pixel with argument 'color'.
Draws text to the canvas where left up position is ( start_x start_y ) and separation is the number of pixels between letters ( > = 0 ) This function basically iterates through every character in string each character is represented in the font_winFreeSystem14x16 with its width height ( all have the same height ) and binary ( uint_16 ) for each line in specific character we mask the bits with 1000 ... 0100 ... 0010 ... and when bitwise operation with this iterative binary and line of a character is not zero ( meaning there is number 1 which represents color in character ) then color the pixel with argument ' color ' .
// End of line when working with array strings // 1000000000000000 mask bits // color pixel if and mask is not zero // 0100000000000000 ...