Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
61448249
Commit
61448249
authored
Dec 05, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Remove special handling for linked fonts in ExtTextOut.
parent
55353027
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
100 deletions
+2
-100
font.c
dlls/gdi32/font.c
+2
-73
freetype.c
dlls/gdi32/freetype.c
+0
-26
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
No files found.
dlls/gdi32/font.c
View file @
61448249
...
...
@@ -2371,79 +2371,8 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
}
}
if
(
FontIsLinked
(
hdc
)
&&
!
(
flags
&
ETO_GLYPH_INDEX
))
{
HFONT
orig_font
=
dc
->
hFont
,
cur_font
;
UINT
glyph
;
INT
span
=
0
;
POINT
*
offsets
=
NULL
;
unsigned
int
i
;
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WORD
));
for
(
i
=
0
;
i
<
count
;
i
++
)
{
WineEngGetLinkedHFont
(
dc
,
reordered_str
[
i
],
&
cur_font
,
&
glyph
);
if
(
cur_font
!=
dc
->
hFont
)
{
if
(
!
offsets
)
{
unsigned
int
j
;
offsets
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
deltas
));
offsets
[
0
].
x
=
offsets
[
0
].
y
=
0
;
if
(
!
deltas
)
{
SIZE
tmpsz
;
for
(
j
=
1
;
j
<
count
;
j
++
)
{
GetTextExtentPointW
(
hdc
,
reordered_str
+
j
-
1
,
1
,
&
tmpsz
);
offsets
[
j
].
x
=
offsets
[
j
-
1
].
x
+
abs
(
INTERNAL_XWSTODS
(
dc
,
tmpsz
.
cx
));
offsets
[
j
].
y
=
0
;
}
}
else
{
for
(
j
=
1
;
j
<
count
;
j
++
)
{
offsets
[
j
].
x
=
offsets
[
j
-
1
].
x
+
deltas
[
j
].
x
;
offsets
[
j
].
y
=
offsets
[
j
-
1
].
y
+
deltas
[
j
].
y
;
}
}
}
if
(
span
)
{
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
+
offsets
[
i
-
span
].
x
,
y
+
offsets
[
i
-
span
].
y
,
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
i
-
span
))
:
NULL
);
span
=
0
;
}
SelectObject
(
hdc
,
cur_font
);
}
glyphs
[
span
++
]
=
glyph
;
if
(
i
==
count
-
1
)
{
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
+
(
offsets
?
offsets
[
count
-
span
].
x
:
0
),
y
+
(
offsets
?
offsets
[
count
-
span
].
y
:
0
),
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
count
-
span
))
:
NULL
);
SelectObject
(
hdc
,
orig_font
);
HeapFree
(
GetProcessHeap
(),
0
,
offsets
);
}
}
}
else
{
if
(
!
(
flags
&
ETO_GLYPH_INDEX
)
&&
dc
->
gdiFont
)
{
glyphs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WORD
));
GetGlyphIndicesW
(
hdc
,
reordered_str
,
count
,
glyphs
,
0
);
flags
|=
ETO_GLYPH_INDEX
;
}
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
,
y
,
(
flags
&
~
ETO_OPAQUE
),
&
rc
,
glyphs
?
glyphs
:
reordered_str
,
count
,
(
INT
*
)
deltas
);
}
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
,
y
,
(
flags
&
~
ETO_OPAQUE
),
&
rc
,
glyphs
?
glyphs
:
reordered_str
,
count
,
(
INT
*
)
deltas
);
done:
HeapFree
(
GetProcessHeap
(),
0
,
deltas
);
...
...
dlls/gdi32/freetype.c
View file @
61448249
...
...
@@ -7431,27 +7431,6 @@ static UINT freetype_GetTextCharsetInfo( PHYSDEV dev, LPFONTSIGNATURE fs, DWORD
return
physdev
->
font
->
charset
;
}
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
{
GdiFont
*
font
=
dc
->
gdiFont
,
*
linked_font
;
struct
list
*
first_hfont
;
BOOL
ret
;
GDI_CheckNotLock
();
EnterCriticalSection
(
&
freetype_cs
);
ret
=
get_glyph_index_linked
(
font
,
c
,
&
linked_font
,
glyph
);
TRACE
(
"get_glyph_index_linked glyph %d font %p
\n
"
,
*
glyph
,
linked_font
);
if
(
font
==
linked_font
)
*
new_hfont
=
dc
->
hFont
;
else
{
first_hfont
=
list_head
(
&
linked_font
->
hfontlist
);
*
new_hfont
=
LIST_ENTRY
(
first_hfont
,
struct
tagHFONTLIST
,
entry
)
->
hfont
;
}
LeaveCriticalSection
(
&
freetype_cs
);
return
ret
;
}
/* Retrieve a list of supported Unicode ranges for a given font.
* Can be called with NULL gs to calculate the buffer size. Returns
* the number of ranges found.
...
...
@@ -8020,11 +7999,6 @@ BOOL WineEngCreateScalableFontResource( DWORD hidden, LPCWSTR resource,
return
FALSE
;
}
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
{
return
FALSE
;
}
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/
...
...
dlls/gdi32/gdi_private.h
View file @
61448249
...
...
@@ -294,7 +294,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
extern
HANDLE
WineEngAddFontMemResourceEx
(
PVOID
,
DWORD
,
PVOID
,
LPDWORD
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngCreateScalableFontResource
(
DWORD
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngDestroyFontInstance
(
HFONT
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngGetLinkedHFont
(
DC
*
dc
,
WCHAR
c
,
HFONT
*
new_hfont
,
UINT
*
glyph
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngInit
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
WineEngRemoveFontResourceEx
(
LPCWSTR
,
DWORD
,
PVOID
)
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