Using the default font of the control, while displaying both Japanese and Chinese, will appear garbled, according to the settings inside the skinmagic, using MS Sans Serif (Microsoft fine Word) font, you can solve the problem.
Use this font to display Chinese on text controls at the same time, both Japanese and English in three languages.
Create a font, and then setfont the text control.
M_fontscrolltext.createfont (18,
0,
0,
0,
Fw_normal,
FALSE,
FALSE,
FALSE,
Ansi_charset,
Out_default_precis,
Clip_default_precis,
Default_quality,
Default_pitch,
_t ("MS Sans Serif")
);
Briefly explain the parameters.
1. 1th parameter
Font size, there is a method of conversion between the number of points and the logical height.
Method 1:
In the source code of CreatePointFont
int nheight; Height of font
Point pt;
Pt.y =:: GetDeviceCaps (HDC, logpixelsy) * pointsize;
Pt.y/= 720; Points/inch, ten Decipoints/point
::D Ptolp (HDC, &pt, 1);
Point ptorg = {0, 0};
::D Ptolp (HDC, &ptorg, 1);
nheight =-abs (PT.Y-PTORG.Y);
Method 2:
nheight =-muldiv (pointsize, GetDeviceCaps (HDC, Logpixelsy), 72);
2. 5th parameter
You can set whether the font is bold
3. 6th parameter
Set whether the font is skewed
4. 7th parameter
Set whether the font is underlined
5. Last parameter
The name of the font.
The above conversions are not tested and modified if there are any problems.