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
e5a0fa70
Commit
e5a0fa70
authored
Oct 21, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetCharABCWidths as a standard driver entry point.
parent
5b783485
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
24 deletions
+17
-24
font.c
dlls/gdi32/font.c
+4
-7
freetype.c
dlls/gdi32/freetype.c
+13
-15
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-2
No files found.
dlls/gdi32/font.c
View file @
e5a0fa70
...
...
@@ -2382,8 +2382,9 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
LPABC
abc
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
PHYSDEV
dev
;
unsigned
int
i
;
BOOL
ret
=
FALSE
;
BOOL
ret
;
if
(
!
dc
)
return
FALSE
;
...
...
@@ -2393,11 +2394,8 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
return
FALSE
;
}
if
(
dc
->
gdiFont
)
ret
=
WineEngGetCharABCWidths
(
dc
->
gdiFont
,
firstChar
,
lastChar
,
abc
);
else
FIXME
(
": stub
\n
"
);
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetCharABCWidths
);
ret
=
dev
->
funcs
->
pGetCharABCWidths
(
dev
,
firstChar
,
lastChar
,
abc
);
if
(
ret
)
{
/* convert device units to logical */
...
...
@@ -2406,7 +2404,6 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
abc
->
abcB
=
INTERNAL_XDSTOWS
(
dc
,
abc
->
abcB
);
abc
->
abcC
=
INTERNAL_XDSTOWS
(
dc
,
abc
->
abcC
);
}
ret
=
TRUE
;
}
release_dc_ptr
(
dc
);
...
...
dlls/gdi32/freetype.c
View file @
e5a0fa70
...
...
@@ -6348,28 +6348,33 @@ static BOOL freetype_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastChar, L
}
/*************************************************************
* WineEngGetCharABCWidths
*
* freetype_GetCharABCWidths
*/
BOOL
WineEngGetCharABCWidths
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
static
BOOL
freetype_GetCharABCWidths
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
{
static
const
MAT2
identity
=
{
{
0
,
1
},{
0
,
0
},{
0
,
0
},{
0
,
1
}
};
UINT
c
;
GLYPHMETRICS
gm
;
FT_UInt
glyph_index
;
GdiFont
*
linked_font
;
struct
freetype_physdev
*
physdev
=
get_freetype_dev
(
dev
);
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetCharABCWidths
);
return
dev
->
funcs
->
pGetCharABCWidths
(
dev
,
firstChar
,
lastChar
,
buffer
);
}
TRACE
(
"%p, %d, %d, %p
\n
"
,
font
,
firstChar
,
lastChar
,
buffer
);
TRACE
(
"%p, %d, %d, %p
\n
"
,
physdev
->
font
,
firstChar
,
lastChar
,
buffer
);
if
(
!
FT_IS_SCALABLE
(
font
->
ft_face
))
if
(
!
FT_IS_SCALABLE
(
physdev
->
font
->
ft_face
))
return
FALSE
;
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
for
(
c
=
firstChar
;
c
<=
lastChar
;
c
++
)
{
get_glyph_index_linked
(
font
,
c
,
&
linked_font
,
&
glyph_index
);
get_glyph_index_linked
(
physdev
->
font
,
c
,
&
linked_font
,
&
glyph_index
);
get_glyph_outline
(
linked_font
,
glyph_index
,
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
&
identity
);
buffer
[
c
-
firstChar
].
abcA
=
FONT_GM
(
linked_font
,
glyph_index
)
->
lsb
;
...
...
@@ -7088,7 +7093,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pFrameRgn */
NULL
,
/* pGdiComment */
NULL
,
/* pGdiRealizationInfo */
NULL
,
/* pGetCharABCWidths */
freetype_GetCharABCWidths
,
/* pGetCharABCWidths */
NULL
,
/* pGetCharABCWidthsI */
freetype_GetCharWidth
,
/* pGetCharWidth */
NULL
,
/* pGetDeviceCaps */
...
...
@@ -7218,13 +7223,6 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
return
0
;
}
BOOL
WineEngGetCharABCWidths
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
FALSE
;
}
BOOL
WineEngGetCharABCWidthsFloat
(
GdiFont
*
font
,
UINT
first
,
UINT
last
,
LPABCFLOAT
buffer
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
...
...
dlls/gdi32/gdi_private.h
View file @
e5a0fa70
...
...
@@ -292,8 +292,6 @@ typedef struct
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
BOOL
WineEngGetCharABCWidths
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetCharABCWidthsFloat
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABCFLOAT
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetCharABCWidthsI
(
GdiFont
*
font
,
UINT
firstChar
,
...
...
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