• sales

    +86-0755-88291180

48x48 Chinese font modulo description

48x48 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_GB48 tfont48[]=
{
    "中",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,
    0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,
    0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,
    0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,
    0x00,0x00,0x02,0x00,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x03,0xC0,0x03,0xFF,
    0xFF,0xFF,0xFF,0xC0,0x03,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,
    0x01,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,
    0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x01,0x80,
    0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,
    0x01,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x01,0xFF,0xFF,0xFF,
    0xFF,0x80,0x01,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,
    0x03,0x80,0x03,0x80,0x02,0x00,0x03,0x80,0x02,0x00,0x00,0x00,0x03,0x80,0x00,0x00,
    0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,
    0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,
    0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,
    0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x80,
    0x00,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
The function is defined as follows:
void GUI_DrawFont48(u16 x, u16 y, u16 fc, u16 bc, u8 *s,u8 mode)
{
    u8 j;
    u16 k,i;
    u16 HZnum;
    u16 x0=x;
    HZnum=sizeof(tfont48)/sizeof(typFNT_GB48);	//Automatic statistics of the number of Chinese characters
    for (k=0;k<HZnum;k++) 
    {
        if ((tfont48[k].Index[0]==*(s))&&(tfont48[k].Index[1]==*(s+1)))
        { 	
            LCD_SetWindows(x,y,x+48-1,y+48-1);
	    for(i=0;i<48*6;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(tfont48[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(tfont48[k].Msk[i]&(0x80>>j))	
                        {                        
                            LCD_DrawPoint(x,y);//Draw a point
                        }
			x++;
			if((x-x0)==48)
			{
			    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 Cooling ESP32 P4 Development Board WIFI6 4 inch LCD Round Display 4inch TouchScreen 720×720 Dual Microphones Pi5 ESP32 S3 Serial UART Bus Servo TTL ST3235 30KG.CM Magnetic Encoder 360&deg; High Precision And Large Torque Raspberry Pi Pico Raspberry Pi Pico 2 RP2350 With 0.96 inch LCD Display 0.96inch Screen 160×80 Onboard RP2350A 7.5 inch Passive NFC e-Paper BW Display 7.5inch E-ink Screen No Need Battery Wireless Powered Data Transfer MPS2280 POE Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board HAT Pi5 2280/2242/2230 Raspberry Pi 5 Industrial USB TO RS485 2CH Converter FT2232HL Grade Isolated Industrial Modbus RS485 RTU 8-ch Magnetic Latching Relay Module (C) With Digital Input Jetson Nano Heatsink Raspberry Pi Raspberry Pi 5 PCIe FFC Connector to Standard PCIe x1 Slot (C) Expansion Board Computer Monitor Screen Raspberry Pi Buzzer Raspberry Pi Camera V1 USB To CAN FD Mini TV