Home

In the Y series, users can use the vector font file for text display.Vector fonts can effectively remove the jagged problem of traditional text display, making it more beautiful.

Vector font files can be found in the computer: C:\Windows\Fonts path, suffixed as .TTF files, or downloaded online.


➢Attributes

8.2.4 Vector Text


Location: The control displays the area.

'X' 'Y' is the upper-left corner coordinate of the touch area.

'W','H' is the width and height of the touch area, the unit is a pixel point.

Name: Default VectorWord,can be reset.

DescibePointer: Fixed to 0xFFFF.

VarHeaderAddress: the starting variable address of the attribute setting. Other attribute variables will be directly assigned, occupying the continuous address space after the start address.

BackColor:

Address: store background color, occupying two variable address spaces

Value:Default color,can be modified through the serial port.

Note: After checking “Background Transparent”, the text will have no color background and directly display the background image.

ForeColor:

Address: Store foreground color, occupying two variable address spaces

Value:Default color , can be modified through the serial port.

FontSize:

Address: storage address size, occupying an address space

Value:Default size, occupying a variable address space

EncodingAddress: storage encoding address.

WordStockAddress: storage word stock address.

EncodingValue:

UTF8 GB2312 GBK  BIG5

SJIS UNICODE

EncodingFile: Font file name,s must be named by numbers, such as: 1.TTF

InitValue: Power-on default text.

FontAlignment: left aligned,right aligned,centered.

 

➢Serial command control description (HEX format):

Frame head

Data length

Command

Head address

X

Y

Backcolor

Forecolor

Font size

Encoding

Font number

Data

1

Data

2

End mark

5AA5

XX

82

0x0001

0000

00F0

0000 0000

FFFF FFFF

0007

0002

0001

B9DA

CFD4

0000

The address corresponding to each attribute is the contiguous address space of the first address.

0x0001

0x0002

0x0003+0x0004

0x0005+0x0006

0x0007

0x0008

0x0009

0x000A

0x000B

0x0009+ 0x001*N

➢Note: If you modify the data in a single attribute, you can directly modify the data of the corresponding address with the 0x82 instruction.

➢Description:

FrameHead: fixed to 5AA5 length, 2 bytes

DataLength: XX = number of all data bytes after command and command

Command: fixed to 0x82, 1 byte

HeadAddress: User settings, the variable storage space stores the first address of the data.

X, Y: The coordinate X of the upper left corner of the text display occupies 2 bytes respectively. For example, the text coordinate to be displayed is (10, 10), then X=0x000A Y=0x000A;

Backcolor: 32-bit color format is ABGR setting 0x00000000 ie A=0x00 B=0x00 G=0X00 R=0x00, A=0x00 ie background transparency, 4 bytes;

Forecolor: the same as the background color;

FontSize: The display size of the font, such as: 0x0007 is displayed as a font width and height of 7 pixels, occupying two bytes.

EncodingMethod: 6 encoding methods can be set(UTF8,GB2312,GBK ,BIG5,SJIS,UNICODE)

FontNumber: The text displays the font number used. 2 bytes, such as: 1.TTF

Data: Displayed text data, such as: 0xB9DA-GBK code “冠”, 0xCFD4-GBK code “显”,

Note: The end of the text data must occupy a variable space as the text end flag, fixed to 0x0000

 

Example: In the coordinates (0, 240) position, white is the DisplayColor, the text background color is not displayed, and the words “冠显” are displayed, which always occupy 12 variable address spaces.

TX: (HEX) 5A A5 1B 82 0001 0000 00F0 00000000 FFFFFFFF 0007 0002 0001 B9DA CFD4 0000