专家解答:
您是用动态连接库编程吗,若是请用这个函数B_Prn_Text_TrueType()
B_Prn_Text_TrueType_W()
===============================================================================
PURPOSE Create a "True Type Font" text object.
SYNTAX int B_Prn_Text_TrueType(int x, int y, int FSize, LPCTSTR FType,
int Fspin, int FWeight, int FItalic, int FUnline,
int FStrikeOut, LPCTSTR id_name, LPCTSTR data,
int mem_mode);
int B_Prn_Text_TrueType_W(int x,int y,int FHeight,int FWidth,LPCTSTR FType,
int Fspin,int FWeight,int FItalic,int FUnline,
int FStrikeOut,LPCTSTR id_name,LPCTSTR data);
PARAMETER int x; X coordinates.
int y; Y coordinates.
int FSize; TrueType font size,unit is (dot).
FSize = (dpi * point) / 72.
int FHeight; Font Height, unit is (dot).
FHeight = (dpi * point) / 72.
int FWidth; Font Width, unit is (dot).
FWidth = (dpi * point) / 72.
LPCTSTR FType; TrueType font type name.
int Fspin; TrueType font to rotate.
1 -> 0, 2 -> 90, 3 -> 180, 4 -> 270
int FWeight; TrueType font thickness bellow:
0 and NULL and 400 -> standard,
100 -> special thin,200 -> very thin,
300 -> thin ,500 -> middle,
600 -> half thick ,700 -> thick,
800 -> special thick,900 ->blackbody.
int FItalic; TrueType font italic.
0 -> FALSE, 1 -> TRUE.
int FUnline; TrueType font underline.
0 -> FALSE, 1 -> TRUE.
int FStrikeOut; TrueType font StrikeOut.
0 -> FALSE, 1 -> TRUE.
LPCTSTR id_name; To give a id name to store in printer after
calling text by Load_Pcx().
LPCTSTR data; A text string.
RETURN 0 -> OK.
Reference BW-Error.txt file.
EXAMPLE B_Prn_Text_TrueType(30,35,40,"Times New Roman",4,400,0,0,0,"AA","ABCDEF");
B_Prn_Text_TrueType_W(30,35,40,40,"Times New Roman",4,400,0,0,0,"AA","ABCDEF");
REMARK The B_Prn_Text_TrueType function is able to print a text for True
Type Font, But you must install Window's Driver for Dr.200 or Dr.300
first. And adjust the darkness. This function will first search the
Windows driver (Dr.200 or Dr.300) from PCs existing default driver.
If the default driver is for other printer, it will sreach Dr.200
and then Dr.300.
若使用机器指令编程需要购买中文卡 |
|