• 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: X1300 X1300-A2 Raspberry Pi 5 HDMI to CSI-2 Shield 1080P@60fps & Audio & Video Also Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board (D) HAT Pi5-2280-2242-2230 Raspberry Pi Pico 2 RP2350 Core A Development Board RP2350A 8.8inch LCD 1920x480 Computer PC Monitor Display Secondary Screen TypeC USB CPU RAM Industrial USB TO RS485 Isolated Bidirectional Converter Original FT232RNL 2 Meters long 1.85inch LCD TouchScreen Display 360×360 ST77916 For Arduino /Raspberry Pi /ESP32 /Pico /STM32 DeepSeek XiaoZhi AI Voice Chat Robot BOX ESP32-S3 Development Board 3.5 inch LCD N16R8 Touchscreen Display 6-Axis /Camera /SD Horizontal Drag Instructions Program ESP32-C6 LCD Development Board 0.85 inch Display 0.85inch Screen 128x128 Mini SD-Port QST LVGL For Arduino EchoEar ESP32 S3 AI Development Board with 1.85-inch LCD Display Cute Cat Pet Chatting Robot N32R16 Sipeed Tang Primer 25K GW5A RISCV FPGA Development Board Dock SDRAM GW5A-LV25MG121 Retro Game linux DDSM115 Direct Drive Servo Motor All-In-One Design Hub RS485 Motor 0.96inch1.3inch1.44inch1.8inch LCD Display Screen Round Arduino Raspberry Pi ESP32 Pico STM32 Jetson Orin 5G/4G/3G expansion board GNSS GPS SIM8260G-M2 SIM8262E-M2 Raspberry Pi 8 inch DSI LCD Display With 5MP Front Camera MIPI 800&times;480 Capacitive TouchScreen RP2040-Keyboard-3 ESP32-S3FH4R2 Matrix 8x8 RGB-LED-WiFi Bluetooth QST Attitude Gyro Sensor QMI8658C Arduino Python Raspberry Pi 5 5V5A Power ESP32-S3 QMI8658A