The R Project SVN R

Rev

Rev 83438 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83438 Rev 84952
Line 33... Line 33...
33
#include "internal.h"
33
#include "internal.h"
34
 
34
 
35
/*
35
/*
36
 *  Pre-defined library fonts.
36
 *  Pre-defined library fonts.
37
 */
37
 */
-
 
38
 
-
 
39
/* exporting is now done via .def file in R */
38
__declspec(dllexport)	font SystemFont = NULL;
40
/* __declspec(dllexport) */	font SystemFont = NULL;
39
__declspec(dllexport)	font FixedFont  = NULL;
41
/* __declspec(dllexport) */	font FixedFont  = NULL;
40
__declspec(dllexport)	font Times      = NULL;
42
/* __declspec(dllexport) */	font Times      = NULL;
41
__declspec(dllexport)	font Helvetica  = NULL;
43
/* __declspec(dllexport) */	font Helvetica  = NULL;
42
__declspec(dllexport)	font Courier    = NULL;
44
/* __declspec(dllexport) */	font Courier    = NULL;
43
 
45
 
44
/*
46
/*
45
 *  Dots per inch for the screen.
47
 *  Dots per inch for the screen.
46
 */
48
 */
47
	static int screen_dpix = 96;	/* logical dpi for VGA */
49
	static int screen_dpix = 96;	/* logical dpi for VGA */
Line 97... Line 99...
97
    ReleaseDC(0, dc);
99
    ReleaseDC(0, dc);
98
 
100
 
99
    return (font) obj;
101
    return (font) obj;
100
}
102
}
101
 
103
 
102
rect getSysFontSize()
104
rect getSysFontSize(void)
103
{
105
{
104
    return  SystemFont->rect;
106
    return  SystemFont->rect;
105
}
107
}
106
 
108
 
107
 
109
 
Line 151... Line 153...
151
   does not seem to be documented.
153
   does not seem to be documented.
152
 
154
 
153
   https://tedwvc.wordpress.com/2019/09/09/new-utf-8-features-in-windows-10-1903/
155
   https://tedwvc.wordpress.com/2019/09/09/new-utf-8-features-in-windows-10-1903/
154
   R PR#18382
156
   R PR#18382
155
*/
157
*/
156
UINT default_font_charset()
158
UINT default_font_charset(void)
157
{
159
{
158
    if (GetACP() == 65001) {
160
    if (GetACP() == 65001) {
159
	CHARSETINFO csinfo;
161
	CHARSETINFO csinfo;
160
	if (TranslateCharsetInfo((DWORD *)(ULONG_PTR)65001, &csinfo,
162
	if (TranslateCharsetInfo((DWORD *)(ULONG_PTR)65001, &csinfo,
161
	                         TCI_SRCCODEPAGE))
163
	                         TCI_SRCCODEPAGE))