• sales

    +86-0755-88291180

24x24 Chinese font modulo description

24x24 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_GB24 tfont24[]=
{
  "中",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,
  0x10,0x00,0x10,0x10,0x18,0x1F,0xFF,0xF8,0x18,0x10,0x18,0x18,0x10,0x18,0x18,0x10,
  0x18,0x18,0x10,0x18,0x18,0x10,0x18,0x18,0x10,0x18,0x1F,0xFF,0xF8,0x10,0x10,0x10,
  0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x18,0x00,0x00,
  0x18,0x00,0x00,0x18,0x00,0x00,0x00,0x00,
};
The function is defined as follows:
void GUI_DrawFont24(u16 x, u16 y, u16 fc, u16 bc, u8 *s,u8 mode)
{
    u8 i,j;
    u16 k;
    u16 HZnum;
    u16 x0=x;
    HZnum=sizeof(tfont24)/sizeof(typFNT_GB24);	//Automatic statistics of the number of Chinese characters
    for (k=0;k<HZnum;k++) 
    {
        if((tfont24[k].Index[0]==*(s))&&(tfont24[k].Index[1]==*(s+1)))
        { 	
             LCD_SetWindows(x,y,x+24-1,y+24-1);
	     for(i=0;i<24*3;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(tfont24[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(tfont24[k].Msk[i]&(0x80>>j))
                              { 
                                   LCD_DrawPoint(x,y);// Draw a point
			      }					
                              x++;
			      if((x-x0)==24)
			      {
				   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: Raspberry Pi 5 Audio hat Raspberry Pi 5 POE PCIe To M.2 E KEY NGFF WIFI7 WIFI6 For BE200/AX210/AX200/RTL8822CE ESP32-P4 Module Core Board PSRAM 32MB Flash 16MB N16R32 Onboard ESP32-C6 Raspberry Pi 12.3 inch DSI MIPI Display TouchScreen LCD 720x1920 Luckfox Lyra Omni3576 RK3576 Tuya AI Voice Robot T5-E1 1.75 inch Round AMOLED TouchScreen GPS For XiaoZhi Development Board Raspberry Pi 5 PCIe to 2-CH PCIe FFC Dual PCIe HAT Board Pi5 Double Raspberry Pi 5 Official Case SpotPear Screen Raspberry Pi 5 RTC charge Luckfox PicoKVM KVM NanoKVM RV1106 Pico Remote Control /Power /Desktop Maintenance Server HDMI USB For PiKVM Raspberry Pi Arduino Thermal imaging Rasperry Pico 2 RP2350 7.3 inch e-Paper Ink Display E6 Full Color Electronic PhotoPainter 800x480 For Calendar/Quotes/Paintings/Posters UART Serial TTL To RS232 B Built-In Protection Circuits Rail-mount Jetson RTL8822CE 5GHz WiFi Wireless Bluetooth5 Card NGFF-M.2 RTL8822CE-CG Core Milk-V Duo Code Raspberry Pi 5 DSI User Guide LoRa32-Heltec V4 ESP32-S3 LoRa SX1262 Development Board 863-928MHz Meshtastic For Arduino Onboard ESP32-C6 Development Board TVOC Sensor gas Sensor Expansion board UART High Sensitivity For Arduino /Raspberry Pi /Pico /ESP32