• sales

    +86-0755-88291180

32x32 Chinese font modulo description

32x32 Chinese Chinese font modulo description

The size settings are as shown below:
After the modulo is successful, you need to define the following structure array to store the modulo data (the definition of structure is in the Chinese_and_English_display_modulo_settings):
const typFNT_GB32 tfont32[]=
{
  "中",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x80,0x00,
  0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
  0x08,0x01,0x80,0x30,0x0F,0xFF,0xFF,0xF0,0x0C,0x01,0x80,0x20,0x0C,0x01,0x80,0x20,
  0x0C,0x01,0x80,0x20,0x0C,0x01,0x80,0x20,0x0C,0x01,0x80,0x20,0x0C,0x01,0x80,0x20,
  0x0C,0x01,0x80,0x20,0x0C,0x01,0x80,0x20,0x0F,0xFF,0xFF,0xE0,0x0C,0x01,0x80,0x20,
  0x0C,0x01,0x80,0x20,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
  0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
  0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
};
The function is defined as follows:
void GUI_DrawFont32(u16 x, u16 y, u16 fc, u16 bc, u8 *s,u8 mode)
{
    u8 i,j;
    u16 k;
    u16 HZnum;
    u16 x0=x;
    HZnum=sizeof(tfont32)/sizeof(typFNT_GB32);	//Automatic statistics of the number of Chinese characters
    for (k=0;k<HZnum;k++) 
    {
	 if ((tfont32[k].Index[0]==*(s))&&(tfont32[k].Index[1]==*(s+1)))
	 { 	
               LCD_SetWindows(x,y,x+32-1,y+32-1);
	       for(i=0;i<32*4;i++)
	       {
		     for(j=0;j<8;j++)
	             {
			   if(!mode) //Non-overlay mode: The font has a background color, which will overwrite the original display
			   {
				if(tfont32[k].Msk[i]&(0x80>>j))
                                {
				      Lcd_WriteData_16Bit(fc);
                                }				
				else 
                                {
                                      Lcd_WriteData_16Bit(bc);
				}			
                           }
			   else //Overlay mode: the font does not have a background color, and is directly superimposed and displayed on the original display content
			   {
				POINT_COLOR=fc;
			        if(tfont32[k].Msk[i]&(0x80>>j))
                                {
                                      LCD_DrawPoint(x,y);// Draw a point
				}		
		                x++;
				if((x-x0)==32)
				{
				      x=x0;
				      y++;
				      break;
				}
			   }
		      }
		}
	  }				  	
	  continue;  //Find the corresponding dot matrix font to exit immediately, to prevent the impact of multiple Chinese characters repeated modulo
     }
     LCD_SetWindows(0,0,lcddev.width-1,lcddev.height-1);// Restore window to full screen
}

TAG: PI5 Case Raspberry Pi 5 PD Power Pi5 Case ESP32 S3 Development Board 1.5 inch Round Rotary OLED TouchScreen Smart Knob Display 1.5inch Display 466x466 LVGL for Arduino Programmable Magnetic Encoder ESP32 S3 Development Board 2.41 inch AMOLED Display 600x450 TouchScreen For Arduino LVGL With SD-Port/ QMI8658C 6-Axis Sensor RP2040 Programmable Keyboard Raspberry Pi 5 Night Camera TTL To CAN Mini ESP32 S3 2.1 inch Round LCD Development Board 480x480 TouchScreen Display LVGL HMI With QMI8658C 6-Axis Sensor ESP32-S3 1.69inch LCD Display With QST Attitude Gyro Sensor QMI8658C For Arduino Python Raspberry Pi Mini TV Raspberry Pi CM5 IO BASE B Mini Board a Base Development Platform Compute Module 5 IO Board with EEPROM And Encryption chip SpotPear Raspberry Pi Pico 2 RP2350 ETH CH9120 TCP/UDP Ethernet Network For Arduino Raspberry Pi 10.1 inch QLED Quantum Dot Display 1280x720 Capacitive Touchscreen For Computer PC/Jetson/Game Raspberry Pi 5 PCIe to M.2 Industrial USB TO RS232/485 (C) UART FT232RNL 2m For 3.3V / 5V For Switchable RS232/RS485 Raspberry Pi Transparent Screen