Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2ad1a94d
Commit
2ad1a94d
authored
Aug 25, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backed out font codepage change.
parent
6cd85a58
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
11 deletions
+7
-11
xfont.c
graphics/x11drv/xfont.c
+0
-4
gdi.h
include/gdi.h
+0
-1
dc.c
objects/dc.c
+0
-1
font.c
objects/font.c
+3
-2
text.c
objects/text.c
+4
-3
No files found.
graphics/x11drv/xfont.c
View file @
2ad1a94d
...
...
@@ -2993,10 +2993,6 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
hPrevFont
=
dc
->
w
.
hFont
;
dc
->
w
.
hFont
=
hfont
;
dc
->
w
.
codepage
=
CP_ACP
;
/* NOTE: the codepage of UNICODE is treated as CP_ACP(=0) */
if
(
CHECK_PFONT
(
physDev
->
font
)
)
dc
->
w
.
codepage
=
__PFONT
(
physDev
->
font
)
->
fi
->
codepage
;
LeaveCriticalSection
(
&
crtsc_fonts_X11
);
...
...
include/gdi.h
View file @
2ad1a94d
...
...
@@ -134,7 +134,6 @@ typedef struct
XFORM
xformWorld2Vport
;
/* World-to-viewport transformation */
XFORM
xformVport2World
;
/* Inverse of the above transformation */
BOOL
vport2WorldValid
;
/* Is xformVport2World valid? */
WORD
codepage
;
/* codepage of the selected font */
}
WIN_DC_INFO
;
...
...
objects/dc.c
View file @
2ad1a94d
...
...
@@ -73,7 +73,6 @@ static void DC_Init_DC_INFO( WIN_DC_INFO *win_dc_info )
win_dc_info
->
xformWorld2Vport
=
win_dc_info
->
xformWorld2Wnd
;
win_dc_info
->
xformVport2World
=
win_dc_info
->
xformWorld2Wnd
;
win_dc_info
->
vport2WorldValid
=
TRUE
;
win_dc_info
->
codepage
=
CP_ACP
;
PATH_InitGdiPath
(
&
win_dc_info
->
path
);
}
...
...
objects/font.c
View file @
2ad1a94d
...
...
@@ -890,6 +890,7 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
LPSIZE
size
)
{
BOOL
ret
=
FALSE
;
UINT
codepage
=
CP_ACP
;
/* FIXME: get codepage of font charset */
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
...
...
@@ -899,11 +900,11 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
/* str may not be 0 terminated so we can't use HEAP_strdupWtoA.
* So we use MultiByteToWideChar.
*/
UINT
wlen
=
MultiByteToWideChar
(
dc
->
w
.
codepage
,
0
,
str
,
count
,
NULL
,
0
);
UINT
wlen
=
MultiByteToWideChar
(
codepage
,
0
,
str
,
count
,
NULL
,
0
);
LPWSTR
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
);
if
(
p
)
{
wlen
=
MultiByteToWideChar
(
dc
->
w
.
codepage
,
0
,
str
,
count
,
p
,
wlen
);
wlen
=
MultiByteToWideChar
(
codepage
,
0
,
str
,
count
,
p
,
wlen
);
ret
=
dc
->
funcs
->
pGetTextExtentPoint
(
dc
,
p
,
wlen
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
}
...
...
objects/text.c
View file @
2ad1a94d
...
...
@@ -54,6 +54,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
{
DC
*
dc
=
DC_GetDCUpdate
(
hdc
);
LPWSTR
p
;
UINT
codepage
=
CP_ACP
;
/* FIXME: get codepage of font charset */
BOOL
ret
=
FALSE
;
LPINT
lpDxW
=
NULL
;
...
...
@@ -61,7 +62,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
if
(
dc
->
funcs
->
pExtTextOut
)
{
UINT
wlen
=
MultiByteToWideChar
(
dc
->
w
.
codepage
,
0
,
str
,
count
,
NULL
,
0
);
UINT
wlen
=
MultiByteToWideChar
(
codepage
,
0
,
str
,
count
,
NULL
,
0
);
if
(
lpDx
)
{
int
i
=
0
,
j
=
0
;
...
...
@@ -69,7 +70,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
lpDxW
=
(
LPINT
)
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
INT
));
while
(
i
<
count
)
{
if
(
IsDBCSLeadByteEx
(
dc
->
w
.
codepage
,
str
[
i
]))
if
(
IsDBCSLeadByteEx
(
codepage
,
str
[
i
]))
{
lpDxW
[
j
++
]
=
lpDx
[
i
]
+
lpDx
[
i
+
1
];
i
=
i
+
2
;
...
...
@@ -83,7 +84,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
}
if
((
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
)))
{
wlen
=
MultiByteToWideChar
(
dc
->
w
.
codepage
,
0
,
str
,
count
,
p
,
wlen
);
wlen
=
MultiByteToWideChar
(
codepage
,
0
,
str
,
count
,
p
,
wlen
);
ret
=
dc
->
funcs
->
pExtTextOut
(
dc
,
x
,
y
,
flags
,
lprect
,
p
,
wlen
,
lpDxW
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment