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
6ad9eb80
Commit
6ad9eb80
authored
Oct 18, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetTextExtentExPointW as a standard driver entry point.
parent
c66b6112
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
25 deletions
+17
-25
font.c
dlls/gdi32/font.c
+3
-8
freetype.c
dlls/gdi32/freetype.c
+14
-16
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
No files found.
dlls/gdi32/font.c
View file @
6ad9eb80
...
...
@@ -1116,6 +1116,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count,
DC
*
dc
;
BOOL
ret
=
FALSE
;
TEXTMETRICW
tm
;
PHYSDEV
dev
;
TRACE
(
"(%p, %s, %d)
\n
"
,
hdc
,
debugstr_wn
(
str
,
count
),
maxExt
);
...
...
@@ -1141,14 +1142,8 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, LPCWSTR str, INT count,
else
dxs
=
alpDx
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetTextExtentExPoint
(
dc
->
gdiFont
,
str
,
count
,
0
,
NULL
,
dxs
,
size
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextExtentExPoint
);
ret
=
physdev
->
funcs
->
pGetTextExtentExPoint
(
physdev
,
str
,
count
,
0
,
NULL
,
dxs
,
size
);
}
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextExtentExPoint
);
ret
=
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
str
,
count
,
0
,
NULL
,
dxs
,
size
);
/* Perform device size to world size transformations. */
if
(
ret
)
...
...
dlls/gdi32/freetype.c
View file @
6ad9eb80
...
...
@@ -6445,11 +6445,10 @@ BOOL WineEngGetCharABCWidthsI(GdiFont *font, UINT firstChar, UINT count, LPWORD
}
/*************************************************************
* WineEngGetTextExtentExPoint
*
* freetype_GetTextExtentExPoint
*/
BOOL
WineEngGetTextExtentExPoint
(
GdiFont
*
font
,
LPCWSTR
wstr
,
INT
count
,
INT
max_ext
,
LPINT
pnfit
,
LPINT
dxs
,
LPSIZE
size
)
static
BOOL
freetype_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
wstr
,
INT
count
,
INT
max_ext
,
LPINT
pnfit
,
LPINT
dxs
,
LPSIZE
size
)
{
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
INT
idx
;
...
...
@@ -6458,19 +6457,25 @@ BOOL WineEngGetTextExtentExPoint(GdiFont *font, LPCWSTR wstr, INT count,
TEXTMETRICW
tm
;
FT_UInt
glyph_index
;
GdiFont
*
linked_font
;
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextExtentExPoint
);
return
dev
->
funcs
->
pGetTextExtentExPoint
(
dev
,
wstr
,
count
,
max_ext
,
pnfit
,
dxs
,
size
);
}
TRACE
(
"%p, %s, %d, %d, %p
\n
"
,
font
,
debugstr_wn
(
wstr
,
count
),
count
,
max_ext
,
size
);
TRACE
(
"%p, %s, %d, %d, %p
\n
"
,
physdev
->
font
,
debugstr_wn
(
wstr
,
count
),
count
,
max_ext
,
size
);
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
size
->
cx
=
0
;
WineEngGetTextMetrics
(
font
,
&
tm
);
WineEngGetTextMetrics
(
physdev
->
font
,
&
tm
);
size
->
cy
=
tm
.
tmHeight
;
for
(
idx
=
0
;
idx
<
count
;
idx
++
)
{
get_glyph_index_linked
(
font
,
wstr
[
idx
],
&
linked_font
,
&
glyph_index
);
get_glyph_index_linked
(
physdev
->
font
,
wstr
[
idx
],
&
linked_font
,
&
glyph_index
);
WineEngGetGlyphOutline
(
linked_font
,
glyph_index
,
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
&
identity
);
size
->
cx
+=
FONT_GM
(
linked_font
,
glyph_index
)
->
adv
;
...
...
@@ -7080,7 +7085,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pGetPixel */
NULL
,
/* pGetPixelFormat */
NULL
,
/* pGetSystemPaletteEntries */
NULL
,
/* pGetTextExtentExPoint */
freetype_GetTextExtentExPoint
,
/* pGetTextExtentExPoint */
NULL
,
/* pGetTextMetrics */
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
...
...
@@ -7228,13 +7233,6 @@ BOOL WineEngGetCharABCWidthsI(GdiFont *font, UINT firstChar, UINT count, LPWORD
return
FALSE
;
}
BOOL
WineEngGetTextExtentExPoint
(
GdiFont
*
font
,
LPCWSTR
wstr
,
INT
count
,
INT
max_ext
,
LPINT
nfit
,
LPINT
dx
,
LPSIZE
size
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
FALSE
;
}
BOOL
WineEngGetTextExtentExPointI
(
GdiFont
*
font
,
const
WORD
*
indices
,
INT
count
,
INT
max_ext
,
LPINT
nfit
,
LPINT
dx
,
LPSIZE
size
)
{
...
...
dlls/gdi32/gdi_private.h
View file @
6ad9eb80
...
...
@@ -311,7 +311,6 @@ extern DWORD WineEngGetKerningPairs(GdiFont*, DWORD, KERNINGPAIR *) DECLSPEC_HID
extern
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
DECLSPEC_HIDDEN
;
extern
UINT
WineEngGetOutlineTextMetrics
(
GdiFont
*
,
UINT
,
LPOUTLINETEXTMETRICW
)
DECLSPEC_HIDDEN
;
extern
UINT
WineEngGetTextCharsetInfo
(
GdiFont
*
font
,
LPFONTSIGNATURE
fs
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetTextExtentExPoint
(
GdiFont
*
,
LPCWSTR
,
INT
,
INT
,
LPINT
,
LPINT
,
LPSIZE
)
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
;
...
...
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