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
441d6cfc
Commit
441d6cfc
authored
Oct 20, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetTextFace as a standard driver entry point.
parent
a2de6a87
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
33 deletions
+37
-33
driver.c
dlls/gdi32/driver.c
+14
-1
font.c
dlls/gdi32/font.c
+4
-15
freetype.c
dlls/gdi32/freetype.c
+19
-16
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
No files found.
dlls/gdi32/driver.c
View file @
441d6cfc
...
...
@@ -434,7 +434,20 @@ static BOOL nulldrv_GetTextExtentExPointI( PHYSDEV dev, const WORD *indices, INT
static
INT
nulldrv_GetTextFace
(
PHYSDEV
dev
,
INT
size
,
LPWSTR
name
)
{
return
0
;
INT
ret
=
0
;
LOGFONTW
font
;
HFONT
hfont
=
GetCurrentObject
(
dev
->
hdc
,
OBJ_FONT
);
if
(
GetObjectW
(
hfont
,
sizeof
(
font
),
&
font
))
{
ret
=
strlenW
(
font
.
lfFaceName
)
+
1
;
if
(
name
)
{
lstrcpynW
(
name
,
font
.
lfFaceName
,
size
);
ret
=
min
(
size
,
ret
);
}
}
return
ret
;
}
static
BOOL
nulldrv_GetTextMetrics
(
PHYSDEV
dev
,
TEXTMETRICW
*
metrics
)
...
...
dlls/gdi32/font.c
View file @
441d6cfc
...
...
@@ -852,25 +852,14 @@ INT WINAPI GetTextFaceA( HDC hdc, INT count, LPSTR name )
*/
INT
WINAPI
GetTextFaceW
(
HDC
hdc
,
INT
count
,
LPWSTR
name
)
{
FONTOBJ
*
font
;
INT
ret
=
0
;
PHYSDEV
dev
;
INT
ret
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
0
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetTextFace
(
dc
->
gdiFont
,
count
,
name
);
else
if
((
font
=
GDI_GetObjPtr
(
dc
->
hFont
,
OBJ_FONT
)))
{
INT
n
=
strlenW
(
font
->
logfont
.
lfFaceName
)
+
1
;
if
(
name
)
{
lstrcpynW
(
name
,
font
->
logfont
.
lfFaceName
,
count
);
ret
=
min
(
count
,
n
);
}
else
ret
=
n
;
GDI_ReleaseObj
(
dc
->
hFont
);
}
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetTextFace
);
ret
=
dev
->
funcs
->
pGetTextFace
(
dev
,
count
,
name
);
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
dlls/gdi32/freetype.c
View file @
441d6cfc
...
...
@@ -6595,17 +6595,26 @@ DWORD WineEngGetFontData(GdiFont *font, DWORD table, DWORD offset, LPVOID buf,
}
/*************************************************************
* WineEngGetTextFace
*
* freetype_GetTextFace
*/
INT
WineEngGetTextFace
(
GdiFont
*
font
,
INT
count
,
LPWSTR
str
)
static
INT
freetype_GetTextFace
(
PHYSDEV
dev
,
INT
count
,
LPWSTR
str
)
{
INT
n
=
strlenW
(
font
->
name
)
+
1
;
if
(
str
)
{
lstrcpynW
(
str
,
font
->
name
,
count
);
return
min
(
count
,
n
);
}
else
return
n
;
INT
n
;
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetTextFace
);
return
dev
->
funcs
->
pGetTextFace
(
dev
,
count
,
str
);
}
n
=
strlenW
(
physdev
->
font
->
name
)
+
1
;
if
(
str
)
{
lstrcpynW
(
str
,
physdev
->
font
->
name
,
count
);
n
=
min
(
count
,
n
);
}
return
n
;
}
/*************************************************************
...
...
@@ -7138,7 +7147,7 @@ static const struct gdi_dc_funcs freetype_funcs =
freetype_GetTextCharsetInfo
,
/* pGetTextCharsetInfo */
freetype_GetTextExtentExPoint
,
/* pGetTextExtentExPoint */
freetype_GetTextExtentExPointI
,
/* pGetTextExtentExPointI */
NULL
,
/* pGetTextFace */
freetype_GetTextFace
,
/* pGetTextFace */
freetype_GetTextMetrics
,
/* pGetTextMetrics */
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
...
...
@@ -7234,12 +7243,6 @@ DWORD WineEngGetFontData(GdiFont *font, DWORD table, DWORD offset, LPVOID buf,
return
GDI_ERROR
;
}
INT
WineEngGetTextFace
(
GdiFont
*
font
,
INT
count
,
LPWSTR
str
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
0
;
}
INT
WineEngAddFontResourceEx
(
LPCWSTR
file
,
DWORD
flags
,
PVOID
pdv
)
{
FIXME
(
"(%s, %x, %p): stub
\n
"
,
debugstr_w
(
file
),
flags
,
pdv
);
...
...
dlls/gdi32/gdi_private.h
View file @
441d6cfc
...
...
@@ -294,7 +294,6 @@ extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetFontData
(
GdiFont
*
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
DECLSPEC_HIDDEN
;
extern
INT
WineEngGetTextFace
(
GdiFont
*
,
INT
,
LPWSTR
)
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