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
5c1c7a65
Commit
5c1c7a65
authored
Oct 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetCharWidthW as a standard driver entry point.
parent
6ad9eb80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
23 deletions
+16
-23
font.c
dlls/gdi32/font.c
+4
-8
freetype.c
dlls/gdi32/freetype.c
+12
-14
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
No files found.
dlls/gdi32/font.c
View file @
5c1c7a65
...
...
@@ -1612,23 +1612,19 @@ BOOL WINAPI GetCharWidth32W( HDC hdc, UINT firstChar, UINT lastChar,
{
UINT
i
;
BOOL
ret
;
PHYSDEV
dev
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetCharWidth
(
dc
->
gdiFont
,
firstChar
,
lastChar
,
buffer
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetCharWidth
);
ret
=
physdev
->
funcs
->
pGetCharWidth
(
physdev
,
firstChar
,
lastChar
,
buffer
);
}
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetCharWidth
);
ret
=
dev
->
funcs
->
pGetCharWidth
(
dev
,
firstChar
,
lastChar
,
buffer
);
if
(
ret
)
{
/* convert device units to logical */
for
(
i
=
firstChar
;
i
<=
lastChar
;
i
++
,
buffer
++
)
*
buffer
=
INTERNAL_XDSTOWS
(
dc
,
*
buffer
);
ret
=
TRUE
;
}
release_dc_ptr
(
dc
);
return
ret
;
...
...
dlls/gdi32/freetype.c
View file @
5c1c7a65
...
...
@@ -6309,24 +6309,29 @@ static BOOL get_glyph_index_linked(GdiFont *font, UINT c, GdiFont **linked_font,
}
/*************************************************************
* WineEngGetCharWidth
*
* freetype_GetCharWidth
*/
BOOL
WineEngGetCharWidth
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
static
BOOL
freetype_GetCharWidth
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
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
);
TRACE
(
"%p, %d, %d, %p
\n
"
,
font
,
firstChar
,
lastChar
,
buffer
);
if
(
!
physdev
->
font
)
{
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetCharWidth
);
return
dev
->
funcs
->
pGetCharWidth
(
dev
,
firstChar
,
lastChar
,
buffer
);
}
TRACE
(
"%p, %d, %d, %p
\n
"
,
physdev
->
font
,
firstChar
,
lastChar
,
buffer
);
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
);
WineEngGetGlyphOutline
(
linked_font
,
glyph_index
,
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
&
identity
);
buffer
[
c
-
firstChar
]
=
FONT_GM
(
linked_font
,
glyph_index
)
->
adv
;
...
...
@@ -7076,7 +7081,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL
,
/* pFlattenPath */
NULL
,
/* pFrameRgn */
NULL
,
/* pGdiComment */
NULL
,
/* pGetCharWidth */
freetype_GetCharWidth
,
/* pGetCharWidth */
NULL
,
/* pGetDeviceCaps */
NULL
,
/* pGetDeviceGammaRamp */
NULL
,
/* pGetICMProfile */
...
...
@@ -7206,13 +7211,6 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
return
0
;
}
BOOL
WineEngGetCharWidth
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
{
ERR
(
"called but we don't have FreeType
\n
"
);
return
FALSE
;
}
BOOL
WineEngGetCharABCWidths
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABC
buffer
)
{
...
...
dlls/gdi32/gdi_private.h
View file @
5c1c7a65
...
...
@@ -299,7 +299,6 @@ extern BOOL WineEngGetCharABCWidthsFloat(GdiFont *font, UINT firstChar,
UINT
lastChar
,
LPABCFLOAT
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetCharABCWidthsI
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
count
,
LPWORD
pgi
,
LPABC
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetCharWidth
(
GdiFont
*
,
UINT
,
UINT
,
LPINT
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetFontData
(
GdiFont
*
,
DWORD
,
DWORD
,
LPVOID
,
DWORD
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetFontUnicodeRanges
(
GdiFont
*
,
LPGLYPHSET
)
DECLSPEC_HIDDEN
;
extern
DWORD
WineEngGetGlyphIndices
(
GdiFont
*
font
,
LPCWSTR
lpstr
,
INT
count
,
...
...
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