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
69a26387
Commit
69a26387
authored
Dec 20, 2011
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Dec 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add vertical fonts to font list.
parent
65f80924
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
freetype.c
dlls/gdi32/freetype.c
+31
-3
font.c
dlls/gdi32/tests/font.c
+0
-4
No files found.
dlls/gdi32/freetype.c
View file @
69a26387
...
...
@@ -1450,11 +1450,25 @@ static void AddFaceToFamily(Face *face, Family *family)
list_add_before
(
entry
,
&
face
->
entry
);
}
static
WCHAR
*
prepend_at
(
WCHAR
*
family
)
{
WCHAR
*
str
;
if
(
!
family
)
return
NULL
;
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
strlenW
(
family
)
+
2
));
str
[
0
]
=
'@'
;
strcpyW
(
str
+
1
,
family
);
HeapFree
(
GetProcessHeap
(),
0
,
family
);
return
str
;
}
#define ADDFONT_EXTERNAL_FONT 0x01
#define ADDFONT_FORCE_BITMAP 0x02
#define ADDFONT_ADD_TO_CACHE 0x04
static
void
AddFaceToList
(
FT_Face
ft_face
,
char
*
fake_family
,
const
char
*
file
,
void
*
font_data_ptr
,
DWORD
font_data_size
,
FT_Long
face_index
,
DWORD
flags
)
static
void
AddFaceToList
(
FT_Face
ft_face
,
char
*
fake_family
,
const
char
*
file
,
void
*
font_data_ptr
,
DWORD
font_data_size
,
FT_Long
face_index
,
DWORD
flags
,
BOOL
vertical
)
{
int
bitmap_num
=
0
;
Family
*
family
;
...
...
@@ -1494,6 +1508,12 @@ static void AddFaceToList(FT_Face ft_face, char *fake_family, const char *file,
}
}
if
(
vertical
)
{
english_family
=
prepend_at
(
english_family
);
localised_family
=
prepend_at
(
localised_family
);
}
family
=
find_family_from_name
(
localised_family
?
localised_family
:
english_family
);
if
(
!
family
)
{
family
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
family
));
...
...
@@ -1671,6 +1691,7 @@ static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_
WCHAR
*
localised_family
;
FT_Error
err
;
FT_Long
face_index
=
0
,
num_faces
;
INT
ret
=
0
;
/* we always load external fonts from files - otherwise we would get a crash in update_reg_entries */
assert
(
file
||
!
(
flags
&
ADDFONT_EXTERNAL_FONT
));
...
...
@@ -1779,12 +1800,19 @@ static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_
HeapFree
(
GetProcessHeap
(),
0
,
localised_family
);
}
AddFaceToList
(
ft_face
,
fake_family
,
file
,
font_data_ptr
,
font_data_size
,
face_index
,
flags
);
AddFaceToList
(
ft_face
,
fake_family
,
file
,
font_data_ptr
,
font_data_size
,
face_index
,
flags
,
FALSE
);
++
ret
;
if
(
FT_HAS_VERTICAL
(
ft_face
))
{
AddFaceToList
(
ft_face
,
fake_family
,
file
,
font_data_ptr
,
font_data_size
,
face_index
,
flags
,
TRUE
);
++
ret
;
}
num_faces
=
ft_face
->
num_faces
;
pFT_Done_Face
(
ft_face
);
}
while
(
num_faces
>
++
face_index
);
return
num_faces
;
return
ret
;
}
static
INT
AddFontFileToList
(
const
char
*
file
,
char
*
fake_family
,
const
WCHAR
*
target_family
,
DWORD
flags
)
...
...
dlls/gdi32/tests/font.c
View file @
69a26387
...
...
@@ -4121,7 +4121,6 @@ static void test_vertical_font(void)
}
num
=
pAddFontResourceExA
(
ttf_name
,
FR_PRIVATE
,
0
);
todo_wine
ok
(
num
==
2
,
"AddFontResourceExA should add 2 fonts from vertical.ttf
\n
"
);
check_vertical_font
(
"@WineTestVertical"
,
&
installed
,
&
selected
,
&
gm
);
...
...
@@ -4133,11 +4132,8 @@ static void test_vertical_font(void)
gm
.
gmBlackBoxX
,
gm
.
gmBlackBoxY
);
check_vertical_font
(
"@@WineTestVertical"
,
&
installed
,
&
selected
,
&
gm
);
todo_wine
ok
(
installed
,
"@@WineTestVertical is not installed
\n
"
);
todo_wine
ok
(
selected
,
"@@WineTestVertical is not selected
\n
"
);
todo_wine
ok
(
gm
.
gmBlackBoxX
<
gm
.
gmBlackBoxY
,
"gmBlackBoxX(%u) should be less than gmBlackBoxY(%u) if vertical
\n
"
,
gm
.
gmBlackBoxX
,
gm
.
gmBlackBoxY
);
...
...
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