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
23c7c046
Commit
23c7c046
authored
Oct 19, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Reimplement GetCharABCWidthsFloat using the integer version.
parent
27208a0e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
53 deletions
+11
-53
font.c
dlls/gdi32/font.c
+11
-13
freetype.c
dlls/gdi32/freetype.c
+0
-38
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-2
No files found.
dlls/gdi32/font.c
View file @
23c7c046
...
...
@@ -3049,6 +3049,8 @@ BOOL WINAPI GetCharABCWidthsFloatA( HDC hdc, UINT first, UINT last, LPABCFLOAT a
BOOL
WINAPI
GetCharABCWidthsFloatW
(
HDC
hdc
,
UINT
first
,
UINT
last
,
LPABCFLOAT
abcf
)
{
UINT
i
;
ABC
*
abc
;
PHYSDEV
dev
;
BOOL
ret
=
FALSE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
...
...
@@ -3056,28 +3058,24 @@ BOOL WINAPI GetCharABCWidthsFloatW( HDC hdc, UINT first, UINT last, LPABCFLOAT a
if
(
!
dc
)
return
FALSE
;
if
(
!
abcf
)
{
release_dc_ptr
(
dc
);
return
FALSE
;
}
if
(
dc
->
gdiFont
)
ret
=
WineEngGetCharABCWidthsFloat
(
dc
->
gdiFont
,
first
,
last
,
abcf
);
else
FIXME
(
"stub
\n
"
);
if
(
!
abcf
)
goto
done
;
if
(
!
(
abc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
last
-
first
+
1
)
*
sizeof
(
*
abc
)
)))
goto
done
;
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetCharABCWidths
);
ret
=
dev
->
funcs
->
pGetCharABCWidths
(
dev
,
first
,
last
,
abc
);
if
(
ret
)
{
/* convert device units to logical */
for
(
i
=
first
;
i
<=
last
;
i
++
,
abcf
++
)
{
abcf
->
abcfA
=
abc
f
->
abcf
A
*
dc
->
xformVport2World
.
eM11
;
abcf
->
abcfB
=
abc
f
->
abcf
B
*
dc
->
xformVport2World
.
eM11
;
abcf
->
abcfC
=
abc
f
->
abcf
C
*
dc
->
xformVport2World
.
eM11
;
abcf
->
abcfA
=
abc
->
abc
A
*
dc
->
xformVport2World
.
eM11
;
abcf
->
abcfB
=
abc
->
abc
B
*
dc
->
xformVport2World
.
eM11
;
abcf
->
abcfC
=
abc
->
abc
C
*
dc
->
xformVport2World
.
eM11
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
abc
);
done:
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
dlls/gdi32/freetype.c
View file @
23c7c046
...
...
@@ -6387,38 +6387,6 @@ static BOOL freetype_GetCharABCWidths( PHYSDEV dev, UINT firstChar, UINT lastCha
}
/*************************************************************
* WineEngGetCharABCWidthsFloat
*
*/
BOOL
WineEngGetCharABCWidthsFloat
(
GdiFont
*
font
,
UINT
first
,
UINT
last
,
LPABCFLOAT
buffer
)
{
static
const
MAT2
identity
=
{{
0
,
1
},
{
0
,
0
},
{
0
,
0
},
{
0
,
1
}};
UINT
c
;
GLYPHMETRICS
gm
;
FT_UInt
glyph_index
;
GdiFont
*
linked_font
;
TRACE
(
"%p, %d, %d, %p
\n
"
,
font
,
first
,
last
,
buffer
);
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
for
(
c
=
first
;
c
<=
last
;
c
++
)
{
get_glyph_index_linked
(
font
,
c
,
&
linked_font
,
&
glyph_index
);
get_glyph_outline
(
linked_font
,
glyph_index
,
GGO_METRICS
|
GGO_GLYPH_INDEX
,
&
gm
,
0
,
NULL
,
&
identity
);
buffer
[
c
-
first
].
abcfA
=
FONT_GM
(
linked_font
,
glyph_index
)
->
lsb
;
buffer
[
c
-
first
].
abcfB
=
FONT_GM
(
linked_font
,
glyph_index
)
->
bbx
;
buffer
[
c
-
first
].
abcfC
=
FONT_GM
(
linked_font
,
glyph_index
)
->
adv
-
FONT_GM
(
linked_font
,
glyph_index
)
->
lsb
-
FONT_GM
(
linked_font
,
glyph_index
)
->
bbx
;
}
LeaveCriticalSection
(
&
freetype_cs
);
return
TRUE
;
}
/*************************************************************
* freetype_GetCharABCWidthsI
*/
static
BOOL
freetype_GetCharABCWidthsI
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
count
,
LPWORD
pgi
,
LPABC
buffer
)
...
...
@@ -7228,12 +7196,6 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
return
0
;
}
BOOL
WineEngGetCharABCWidthsFloat
(
GdiFont
*
font
,
UINT
first
,
UINT
last
,
LPABCFLOAT
buffer
)
{
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 @
23c7c046
...
...
@@ -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
WineEngGetCharABCWidthsFloat
(
GdiFont
*
font
,
UINT
firstChar
,
UINT
lastChar
,
LPABCFLOAT
buffer
)
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