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
20070d08
Commit
20070d08
authored
Oct 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetTextMetrics as a standard driver entry point.
parent
ca417799
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
font.c
dlls/gdi32/font.c
+3
-7
freetype.c
dlls/gdi32/freetype.c
+11
-11
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
No files found.
dlls/gdi32/font.c
View file @
20070d08
...
...
@@ -1222,17 +1222,13 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
*/
BOOL
WINAPI
GetTextMetricsW
(
HDC
hdc
,
TEXTMETRICW
*
metrics
)
{
PHYSDEV
physdev
;
BOOL
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetTextMetrics
(
dc
->
gdiFont
,
metrics
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextMetrics
);
ret
=
physdev
->
funcs
->
pGetTextMetrics
(
physdev
,
metrics
);
}
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextMetrics
);
ret
=
physdev
->
funcs
->
pGetTextMetrics
(
physdev
,
metrics
);
if
(
ret
)
{
...
...
dlls/gdi32/freetype.c
View file @
20070d08
...
...
@@ -6209,16 +6209,22 @@ DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
}
/*************************************************************
* WineEngGetTextMetrics
*
* freetype_GetTextMetrics
*/
BOOL
WineEngGetTextMetrics
(
GdiFont
*
font
,
LPTEXTMETRICW
ptm
)
static
BOOL
freetype_GetTextMetrics
(
PHYSDEV
dev
,
TEXTMETRICW
*
metrics
)
{
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
BOOL
ret
;
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextMetrics
);
return
dev
->
funcs
->
pGetTextMetrics
(
dev
,
metrics
);
}
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
ret
=
get_text_metrics
(
font
,
ptm
);
ret
=
get_text_metrics
(
physdev
->
font
,
metrics
);
LeaveCriticalSection
(
&
freetype_cs
);
return
ret
;
}
...
...
@@ -7089,7 +7095,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pGetPixelFormat */
NULL
,
/* pGetSystemPaletteEntries */
freetype_GetTextExtentExPoint
,
/* pGetTextExtentExPoint */
NULL
,
/* pGetTextMetrics */
freetype_GetTextMetrics
,
/* pGetTextMetrics */
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
NULL
,
/* pLineTo */
...
...
@@ -7196,12 +7202,6 @@ DWORD WineEngGetGlyphOutline(GdiFont *font, UINT glyph, UINT format,
return
GDI_ERROR
;
}
BOOL
WineEngGetTextMetrics
(
GdiFont
*
font
,
LPTEXTMETRICW
ptm
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
FALSE
;
}
UINT
WineEngGetOutlineTextMetrics
(
GdiFont
*
font
,
UINT
cbSize
,
OUTLINETEXTMETRICW
*
potm
)
{
...
...
dlls/gdi32/gdi_private.h
View file @
20070d08
...
...
@@ -312,7 +312,6 @@ extern UINT WineEngGetOutlineTextMetrics(GdiFont*, UINT, LPOUTLINETEXTMETRICW) D
extern
UINT
WineEngGetTextCharsetInfo
(
GdiFont
*
font
,
LPFONTSIGNATURE
fs
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetTextExtentExPointI
(
GdiFont
*
,
const
WORD
*
,
INT
,
INT
,
LPINT
,
LPINT
,
LPSIZE
)
DECLSPEC_HIDDEN
;
extern
INT
WineEngGetTextFace
(
GdiFont
*
,
INT
,
LPWSTR
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetTextMetrics
(
GdiFont
*
,
LPTEXTMETRICW
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngFontIsLinked
(
GdiFont
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngInit
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngRealizationInfo
(
GdiFont
*
,
realization_info_t
*
)
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