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
ff96c4dd
Commit
ff96c4dd
authored
Oct 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetGlyphIndices as a standard driver entry point.
parent
90ecea97
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
22 deletions
+19
-22
font.c
dlls/gdi32/font.c
+4
-4
freetype.c
dlls/gdi32/freetype.c
+15
-16
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-2
No files found.
dlls/gdi32/font.c
View file @
ff96c4dd
...
...
@@ -2837,16 +2837,16 @@ DWORD WINAPI GetGlyphIndicesW(HDC hdc, LPCWSTR lpstr, INT count,
LPWORD
pgi
,
DWORD
flags
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
DWORD
ret
=
GDI_ERROR
;
PHYSDEV
dev
;
DWORD
ret
;
TRACE
(
"(%p, %s, %d, %p, 0x%x)
\n
"
,
hdc
,
debugstr_wn
(
lpstr
,
count
),
count
,
pgi
,
flags
);
if
(
!
dc
)
return
GDI_ERROR
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetGlyphIndices
(
dc
->
gdiFont
,
lpstr
,
count
,
pgi
,
flags
);
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetGlyphIndices
);
ret
=
dev
->
funcs
->
pGetGlyphIndices
(
dev
,
lpstr
,
count
,
pgi
,
flags
);
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
dlls/gdi32/freetype.c
View file @
ff96c4dd
...
...
@@ -4947,16 +4947,21 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph)
}
/*************************************************************
* WineEngGetGlyphIndices
*
* freetype_GetGlyphIndices
*/
DWORD
WineEngGetGlyphIndices
(
GdiFont
*
font
,
LPCWSTR
lpstr
,
INT
count
,
LPWORD
pgi
,
DWORD
flags
)
static
DWORD
freetype_GetGlyphIndices
(
PHYSDEV
dev
,
LPCWSTR
lpstr
,
INT
count
,
LPWORD
pgi
,
DWORD
flags
)
{
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
int
i
;
WORD
default_char
;
BOOL
got_default
=
FALSE
;
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetGlyphIndices
);
return
dev
->
funcs
->
pGetGlyphIndices
(
dev
,
lpstr
,
count
,
pgi
,
flags
);
}
if
(
flags
&
GGI_MARK_NONEXISTING_GLYPHS
)
{
default_char
=
0xffff
;
/* XP would use 0x1f for bitmap fonts */
...
...
@@ -4968,20 +4973,20 @@ DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
for
(
i
=
0
;
i
<
count
;
i
++
)
{
pgi
[
i
]
=
get_glyph_index
(
font
,
lpstr
[
i
]);
pgi
[
i
]
=
get_glyph_index
(
physdev
->
font
,
lpstr
[
i
]);
if
(
pgi
[
i
]
==
0
)
{
if
(
!
got_default
)
{
if
(
FT_IS_SFNT
(
font
->
ft_face
))
if
(
FT_IS_SFNT
(
physdev
->
font
->
ft_face
))
{
TT_OS2
*
pOS2
=
pFT_Get_Sfnt_Table
(
font
->
ft_face
,
ft_sfnt_os2
);
default_char
=
(
pOS2
->
usDefaultChar
?
get_glyph_index
(
font
,
pOS2
->
usDefaultChar
)
:
0
);
TT_OS2
*
pOS2
=
pFT_Get_Sfnt_Table
(
physdev
->
font
->
ft_face
,
ft_sfnt_os2
);
default_char
=
(
pOS2
->
usDefaultChar
?
get_glyph_index
(
physdev
->
font
,
pOS2
->
usDefaultChar
)
:
0
);
}
else
{
TEXTMETRICW
textm
;
get_text_metrics
(
font
,
&
textm
);
get_text_metrics
(
physdev
->
font
,
&
textm
);
default_char
=
textm
.
tmDefaultChar
;
}
got_default
=
TRUE
;
...
...
@@ -7083,7 +7088,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetFontData */
freetype_GetFontUnicodeRanges
,
/* pGetFontUnicodeRanges */
NULL
,
/* pGetGlyphIndices */
freetype_GetGlyphIndices
,
/* pGetGlyphIndices */
NULL
,
/* pGetGlyphOutline */
NULL
,
/* pGetICMProfile */
NULL
,
/* pGetImage */
...
...
@@ -7185,12 +7190,6 @@ BOOL WineEngDestroyFontInstance(HFONT hfont)
return
FALSE
;
}
DWORD
WineEngGetGlyphIndices
(
GdiFont
*
font
,
LPCWSTR
lpstr
,
INT
count
,
LPWORD
pgi
,
DWORD
flags
)
{
return
GDI_ERROR
;
}
DWORD
WineEngGetGlyphOutline
(
GdiFont
*
font
,
UINT
glyph
,
UINT
format
,
LPGLYPHMETRICS
lpgm
,
DWORD
buflen
,
LPVOID
buf
,
const
MAT2
*
lpmat
)
...
...
dlls/gdi32/gdi_private.h
View file @
ff96c4dd
...
...
@@ -293,8 +293,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
extern
HANDLE
WineEngAddFontMemResourceEx
(
PVOID
,
DWORD
,
PVOID
,
LPDWORD
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetFontData
(
GdiFont
*
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetGlyphIndices
(
GdiFont
*
font
,
LPCWSTR
lpstr
,
INT
count
,
LPWORD
pgi
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetGlyphOutline
(
GdiFont
*
,
UINT
glyph
,
UINT
format
,
LPGLYPHMETRICS
,
DWORD
buflen
,
LPVOID
buf
,
const
MAT2
*
)
DECLSPEC_HIDDEN
;
...
...
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