Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fecb1d8b
Commit
fecb1d8b
authored
Jan 10, 2012
by
Kusanagi Kouichi
Committed by
Alexandre Julliard
Jan 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: GetGlyphIndices doesn't substitute glyph.
parent
2dda47fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
freetype.c
dlls/gdi32/freetype.c
+6
-2
font.c
dlls/gdi32/tests/font.c
+12
-5
No files found.
dlls/gdi32/freetype.c
View file @
fecb1d8b
...
...
@@ -4988,7 +4988,7 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph)
else
ret
=
pFT_Get_Char_Index
(
font
->
ft_face
,
(
unsigned
char
)
buf
);
TRACE
(
"%04x (%02x) -> ret %d def_used %d
\n
"
,
glyph
,
buf
,
ret
,
default_used
);
return
get_GSUB_vert_glyph
(
font
,
ret
)
;
return
ret
;
}
if
(
font
->
ft_face
->
charmap
->
encoding
==
FT_ENCODING_MS_SYMBOL
)
...
...
@@ -5001,7 +5001,7 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph)
}
else
glyphId
=
pFT_Get_Char_Index
(
font
->
ft_face
,
glyph
);
return
g
et_GSUB_vert_glyph
(
font
,
glyphId
)
;
return
g
lyphId
;
}
/*************************************************************
...
...
@@ -6373,7 +6373,10 @@ static BOOL get_glyph_index_linked(GdiFont *font, UINT c, GdiFont **linked_font,
*
linked_font
=
font
;
if
((
*
glyph
=
get_glyph_index
(
font
,
c
)))
{
*
glyph
=
get_GSUB_vert_glyph
(
font
,
*
glyph
);
return
TRUE
;
}
LIST_FOR_EACH_ENTRY
(
child_font
,
&
font
->
child_fonts
,
CHILD_FONT
,
entry
)
{
...
...
@@ -6384,6 +6387,7 @@ static BOOL get_glyph_index_linked(GdiFont *font, UINT c, GdiFont **linked_font,
if
(
!
child_font
->
font
->
ft_face
)
continue
;
g
=
get_glyph_index
(
child_font
->
font
,
c
);
g
=
get_GSUB_vert_glyph
(
child_font
->
font
,
g
);
if
(
g
)
{
*
glyph
=
g
;
...
...
dlls/gdi32/tests/font.c
View file @
fecb1d8b
...
...
@@ -4070,13 +4070,14 @@ todo_wine
DeleteFile
(
ttf_name
);
}
static
void
check_vertical_font
(
const
char
*
name
,
BOOL
*
installed
,
BOOL
*
selected
,
GLYPHMETRICS
*
gm
)
static
void
check_vertical_font
(
const
char
*
name
,
BOOL
*
installed
,
BOOL
*
selected
,
GLYPHMETRICS
*
gm
,
WORD
*
gi
)
{
LOGFONTA
lf
;
HFONT
hfont
,
hfont_prev
;
HDC
hdc
;
char
facename
[
100
];
DWORD
ret
;
static
const
WCHAR
str
[]
=
{
0x2025
};
*
installed
=
is_truetype_font_installed
(
name
);
...
...
@@ -4112,6 +4113,9 @@ static void check_vertical_font(const char *name, BOOL *installed, BOOL *selecte
if
(
!*
selected
)
memset
(
gm
,
0
,
sizeof
*
gm
);
ret
=
pGetGlyphIndicesW
(
hdc
,
str
,
1
,
gi
,
0
);
ok
(
ret
!=
GDI_ERROR
,
"GetGlyphIndicesW failed
\n
"
);
SelectObject
(
hdc
,
hfont_prev
);
DeleteObject
(
hfont
);
ReleaseDC
(
NULL
,
hdc
);
...
...
@@ -4123,10 +4127,11 @@ static void test_vertical_font(void)
int
num
;
BOOL
ret
,
installed
,
selected
;
GLYPHMETRICS
gm
;
WORD
hgi
,
vgi
;
if
(
!
pAddFontResourceExA
||
!
pRemoveFontResourceExA
)
if
(
!
pAddFontResourceExA
||
!
pRemoveFontResourceExA
||
!
pGetGlyphIndicesW
)
{
win_skip
(
"AddFontResourceExA is not available on this platform
\n
"
);
win_skip
(
"AddFontResourceExA
or GetGlyphIndicesW
is not available on this platform
\n
"
);
return
;
}
...
...
@@ -4139,20 +4144,22 @@ static void test_vertical_font(void)
num
=
pAddFontResourceExA
(
ttf_name
,
FR_PRIVATE
,
0
);
ok
(
num
==
2
,
"AddFontResourceExA should add 2 fonts from vertical.ttf
\n
"
);
check_vertical_font
(
"@WineTestVertical"
,
&
installed
,
&
selected
,
&
gm
);
check_vertical_font
(
"@WineTestVertical"
,
&
installed
,
&
selected
,
&
gm
,
&
hgi
);
ok
(
installed
,
"@WineTestVertical is not installed
\n
"
);
ok
(
selected
,
"@WineTestVertical is not selected
\n
"
);
ok
(
gm
.
gmBlackBoxX
>
gm
.
gmBlackBoxY
,
"gmBlackBoxX(%u) should be greater than gmBlackBoxY(%u) if horizontal
\n
"
,
gm
.
gmBlackBoxX
,
gm
.
gmBlackBoxY
);
check_vertical_font
(
"@@WineTestVertical"
,
&
installed
,
&
selected
,
&
gm
);
check_vertical_font
(
"@@WineTestVertical"
,
&
installed
,
&
selected
,
&
gm
,
&
vgi
);
ok
(
installed
,
"@@WineTestVertical is not installed
\n
"
);
ok
(
selected
,
"@@WineTestVertical is not selected
\n
"
);
ok
(
gm
.
gmBlackBoxX
<
gm
.
gmBlackBoxY
,
"gmBlackBoxX(%u) should be less than gmBlackBoxY(%u) if vertical
\n
"
,
gm
.
gmBlackBoxX
,
gm
.
gmBlackBoxY
);
ok
(
hgi
==
vgi
,
"different glyph h:%u v:%u
\n
"
,
hgi
,
vgi
);
ret
=
pRemoveFontResourceExA
(
ttf_name
,
FR_PRIVATE
,
0
);
ok
(
ret
,
"RemoveFontResourceEx() error %d
\n
"
,
GetLastError
());
...
...
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