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
286854fb
Commit
286854fb
authored
Feb 09, 2012
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Feb 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Consider whether the logical font face is vertical when selecting.
parent
c683ad72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
freetype.c
dlls/gdi32/freetype.c
+6
-3
font.c
dlls/gdi32/tests/font.c
+1
-1
No files found.
dlls/gdi32/freetype.c
View file @
286854fb
...
...
@@ -3982,7 +3982,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
INT
height
,
width
=
0
;
unsigned
int
score
=
0
,
new_score
;
signed
int
diff
=
0
,
newdiff
;
BOOL
bd
,
it
,
can_use_bitmap
;
BOOL
bd
,
it
,
can_use_bitmap
,
want_vertical
;
LOGFONTW
lf
;
CHARSETINFO
csi
;
HFONTLIST
*
hflist
;
...
...
@@ -4163,6 +4163,8 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
lf
.
lfCharSet
=
csi
.
ciCharset
;
}
want_vertical
=
(
lf
.
lfFaceName
[
0
]
==
'@'
);
/* Face families are in the top 4 bits of lfPitchAndFamily,
so mask with 0xF0 before testing */
...
...
@@ -4192,7 +4194,8 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
family
=
LIST_ENTRY
(
family_elem_ptr
,
Family
,
entry
);
LIST_FOR_EACH
(
face_elem_ptr
,
&
family
->
faces
)
{
face
=
LIST_ENTRY
(
face_elem_ptr
,
Face
,
entry
);
if
(
csi
.
fs
.
fsCsb
[
0
]
&
(
face
->
fs
.
fsCsb
[
0
]
|
face
->
fs_links
.
fsCsb
[
0
]))
{
if
(
face
->
vertical
==
want_vertical
&&
(
csi
.
fs
.
fsCsb
[
0
]
&
(
face
->
fs
.
fsCsb
[
0
]
|
face
->
fs_links
.
fsCsb
[
0
])))
{
if
(
face
->
scalable
)
goto
found
;
if
(
can_use_bitmap
&&
!
last_resort_family
)
...
...
@@ -4211,7 +4214,7 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont )
family
=
LIST_ENTRY
(
family_elem_ptr
,
Family
,
entry
);
LIST_FOR_EACH
(
face_elem_ptr
,
&
family
->
faces
)
{
face
=
LIST_ENTRY
(
face_elem_ptr
,
Face
,
entry
);
if
(
face
->
scalable
)
{
if
(
face
->
scalable
&&
face
->
vertical
==
want_vertical
)
{
csi
.
fs
.
fsCsb
[
0
]
=
0
;
WARN
(
"just using first face for now
\n
"
);
goto
found
;
...
...
dlls/gdi32/tests/font.c
View file @
286854fb
...
...
@@ -4205,7 +4205,7 @@ static void test_east_asian_font_selection(void)
hfont
=
SelectObject
(
hdc
,
hfont
);
memset
(
face_name
,
0
,
sizeof
face_name
);
ret
=
GetTextFaceA
(
hdc
,
sizeof
face_name
,
face_name
);
todo_wine
ok
(
ret
&&
face_name
[
0
]
!=
'@'
,
ok
(
ret
&&
face_name
[
0
]
!=
'@'
,
"expected non-vertical face for charset %u, got %s
\n
"
,
charset
[
i
],
face_name
);
DeleteObject
(
SelectObject
(
hdc
,
hfont
));
...
...
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