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
3311bbb3
Commit
3311bbb3
authored
Feb 03, 2011
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Feb 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Check if a character is double byte or single byte.
parent
c8ebdff8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
font.c
dlls/gdi32/font.c
+9
-13
font.c
dlls/gdi32/tests/font.c
+0
-1
No files found.
dlls/gdi32/font.c
View file @
3311bbb3
...
@@ -2495,16 +2495,15 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
...
@@ -2495,16 +2495,15 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
LPGLYPHMETRICS
lpgm
,
DWORD
cbBuffer
,
LPGLYPHMETRICS
lpgm
,
DWORD
cbBuffer
,
LPVOID
lpBuffer
,
const
MAT2
*
lpmat2
)
LPVOID
lpBuffer
,
const
MAT2
*
lpmat2
)
{
{
LPWSTR
p
=
NULL
;
DWORD
ret
;
UINT
c
;
if
(
!
lpmat2
)
return
GDI_ERROR
;
if
(
!
lpmat2
)
return
GDI_ERROR
;
if
(
!
(
fuFormat
&
GGO_GLYPH_INDEX
))
{
if
(
!
(
fuFormat
&
GGO_GLYPH_INDEX
))
{
UINT
cp
;
int
len
;
int
len
;
char
mbchs
[
2
];
char
mbchs
[
2
];
if
(
uChar
>
0xff
)
{
/* but, 2 bytes character only */
cp
=
GdiGetCodePage
(
hdc
);
if
(
IsDBCSLeadByteEx
(
cp
,
uChar
>>
8
))
{
len
=
2
;
len
=
2
;
mbchs
[
0
]
=
(
uChar
&
0xff00
)
>>
8
;
mbchs
[
0
]
=
(
uChar
&
0xff00
)
>>
8
;
mbchs
[
1
]
=
(
uChar
&
0xff
);
mbchs
[
1
]
=
(
uChar
&
0xff
);
...
@@ -2512,14 +2511,11 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
...
@@ -2512,14 +2511,11 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat,
len
=
1
;
len
=
1
;
mbchs
[
0
]
=
(
uChar
&
0xff
);
mbchs
[
0
]
=
(
uChar
&
0xff
);
}
}
p
=
FONT_mbtowc
(
hdc
,
mbchs
,
len
,
NULL
,
NULL
);
MultiByteToWideChar
(
cp
,
0
,
mbchs
,
len
,
(
LPWSTR
)
&
uChar
,
1
);
c
=
p
[
0
];
}
}
else
c
=
uChar
;
return
GetGlyphOutlineW
(
hdc
,
uChar
,
fuFormat
,
lpgm
,
cbBuffer
,
lpBuffer
,
ret
=
GetGlyphOutlineW
(
hdc
,
c
,
fuFormat
,
lpgm
,
cbBuffer
,
lpBuffer
,
lpmat2
);
lpmat2
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/gdi32/tests/font.c
View file @
3311bbb3
...
@@ -3194,7 +3194,6 @@ static void test_GetGlyphOutline(void)
...
@@ -3194,7 +3194,6 @@ static void test_GetGlyphOutline(void)
ret
=
GetGlyphOutlineA
(
hdc
,
0x8041
,
GGO_BITMAP
,
&
gm
,
0
,
NULL
,
&
mat
);
ret
=
GetGlyphOutlineA
(
hdc
,
0x8041
,
GGO_BITMAP
,
&
gm
,
0
,
NULL
,
&
mat
);
ret2
=
GetGlyphOutlineA
(
hdc
,
0x41
,
GGO_BITMAP
,
&
gm2
,
0
,
NULL
,
&
mat
);
ret2
=
GetGlyphOutlineA
(
hdc
,
0x41
,
GGO_BITMAP
,
&
gm2
,
0
,
NULL
,
&
mat
);
todo_wine
ok
(
ret
==
ret2
&&
memcmp
(
&
gm
,
&
gm2
,
sizeof
gm
)
==
0
,
"%d %d
\n
"
,
ret
,
ret2
);
ok
(
ret
==
ret2
&&
memcmp
(
&
gm
,
&
gm2
,
sizeof
gm
)
==
0
,
"%d %d
\n
"
,
ret
,
ret2
);
ret
=
GetGlyphOutlineA
(
hdc
,
c
[
i
].
a
,
GGO_BITMAP
,
&
gm
,
0
,
NULL
,
&
mat
);
ret
=
GetGlyphOutlineA
(
hdc
,
c
[
i
].
a
,
GGO_BITMAP
,
&
gm
,
0
,
NULL
,
&
mat
);
...
...
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