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
95156d1b
Commit
95156d1b
authored
Apr 06, 2009
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use GdiGetCodePage() instead of duplicating its functionality.
parent
4bb8d9c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
font.c
dlls/gdi32/font.c
+7
-13
No files found.
dlls/gdi32/font.c
View file @
95156d1b
...
...
@@ -2483,8 +2483,7 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
DWORD
WINAPI
GetKerningPairsA
(
HDC
hDC
,
DWORD
cPairs
,
LPKERNINGPAIR
kern_pairA
)
{
INT
charset
;
CHARSETINFO
csi
;
UINT
cp
;
CPINFO
cpi
;
DWORD
i
,
total_kern_pairs
,
kern_pairs_copied
=
0
;
KERNINGPAIR
*
kern_pairW
;
...
...
@@ -2495,22 +2494,17 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
return
0
;
}
charset
=
GetTextCharset
(
hDC
);
if
(
!
TranslateCharsetInfo
(
ULongToPtr
(
charset
),
&
csi
,
TCI_SRCCHARSET
))
{
FIXME
(
"Can't find codepage for charset %d
\n
"
,
charset
);
return
0
;
}
cp
=
GdiGetCodePage
(
hDC
);
/* GetCPInfo() will fail on CP_SYMBOL, and WideCharToMultiByte is supposed
* to fail on an invalid character for CP_SYMBOL.
*/
cpi
.
DefaultChar
[
0
]
=
0
;
if
(
c
si
.
ciACP
!=
CP_SYMBOL
&&
!
GetCPInfo
(
csi
.
ciACP
,
&
cpi
))
if
(
c
p
!=
CP_SYMBOL
&&
!
GetCPInfo
(
cp
,
&
cpi
))
{
FIXME
(
"Can't find codepage %u info
\n
"
,
c
si
.
ciACP
);
FIXME
(
"Can't find codepage %u info
\n
"
,
c
p
);
return
0
;
}
TRACE
(
"charset %d => codepage %u
\n
"
,
charset
,
csi
.
ciACP
);
total_kern_pairs
=
GetKerningPairsW
(
hDC
,
0
,
NULL
);
if
(
!
total_kern_pairs
)
return
0
;
...
...
@@ -2522,10 +2516,10 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
{
char
first
,
second
;
if
(
!
WideCharToMultiByte
(
c
si
.
ciACP
,
0
,
&
kern_pairW
[
i
].
wFirst
,
1
,
&
first
,
1
,
NULL
,
NULL
))
if
(
!
WideCharToMultiByte
(
c
p
,
0
,
&
kern_pairW
[
i
].
wFirst
,
1
,
&
first
,
1
,
NULL
,
NULL
))
continue
;
if
(
!
WideCharToMultiByte
(
c
si
.
ciACP
,
0
,
&
kern_pairW
[
i
].
wSecond
,
1
,
&
second
,
1
,
NULL
,
NULL
))
if
(
!
WideCharToMultiByte
(
c
p
,
0
,
&
kern_pairW
[
i
].
wSecond
,
1
,
&
second
,
1
,
NULL
,
NULL
))
continue
;
if
(
first
==
cpi
.
DefaultChar
[
0
]
||
second
==
cpi
.
DefaultChar
[
0
])
...
...
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