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
08a3e4f2
Commit
08a3e4f2
authored
Oct 19, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Respect transform when calculating glyph advances for run analysis.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9389bcdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
dwrite_private.h
dlls/dwrite/dwrite_private.h
+2
-2
font.c
dlls/dwrite/font.c
+3
-2
main.c
dlls/dwrite/main.c
+2
-2
No files found.
dlls/dwrite/dwrite_private.h
View file @
08a3e4f2
...
...
@@ -130,8 +130,8 @@ extern HRESULT create_font_file(IDWriteFontFileLoader *loader, const void *refer
extern
HRESULT
create_localfontfileloader
(
IDWriteLocalFontFileLoader
**
iface
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_fontface
(
DWRITE_FONT_FACE_TYPE
,
UINT32
,
IDWriteFontFile
*
const
*
,
UINT32
,
DWRITE_FONT_SIMULATIONS
,
IDWriteFontFace2
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_collection
(
IDWriteFactory2
*
,
IDWriteFontFileEnumerator
*
,
BOOL
,
IDWriteFontCollection
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_glyphrunanalysis
(
DWRITE_RENDERING_MODE
,
DWRITE_MEASURING_MODE
,
DWRITE_GLYPH_RUN
const
*
,
FLOAT
,
DWRITE_GRID_FIT_MODE
,
DWRITE_TEXT_ANTIALIAS_MODE
,
FLOAT
,
FLOAT
,
IDWriteGlyphRunAnalysis
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_glyphrunanalysis
(
DWRITE_RENDERING_MODE
,
DWRITE_MEASURING_MODE
,
DWRITE_GLYPH_RUN
const
*
,
FLOAT
,
const
DWRITE_MATRIX
*
,
DWRITE_
GRID_FIT_MODE
,
DWRITE_
TEXT_ANTIALIAS_MODE
,
FLOAT
,
FLOAT
,
IDWriteGlyphRunAnalysis
**
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_system_collection
(
IDWriteFontCollection
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_local_refkey
(
const
WCHAR
*
,
const
FILETIME
*
,
void
**
,
UINT32
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_filestream_from_file
(
IDWriteFontFile
*
,
IDWriteFontFileStream
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/dwrite/font.c
View file @
08a3e4f2
...
...
@@ -4378,7 +4378,8 @@ static const struct IDWriteGlyphRunAnalysisVtbl glyphrunanalysisvtbl = {
};
HRESULT
create_glyphrunanalysis
(
DWRITE_RENDERING_MODE
rendering_mode
,
DWRITE_MEASURING_MODE
measuring_mode
,
DWRITE_GLYPH_RUN
const
*
run
,
FLOAT
ppdip
,
DWRITE_GRID_FIT_MODE
gridfit_mode
,
DWRITE_TEXT_ANTIALIAS_MODE
aa_mode
,
FLOAT
originX
,
FLOAT
originY
,
IDWriteGlyphRunAnalysis
**
ret
)
FLOAT
ppdip
,
const
DWRITE_MATRIX
*
transform
,
DWRITE_GRID_FIT_MODE
gridfit_mode
,
DWRITE_TEXT_ANTIALIAS_MODE
aa_mode
,
FLOAT
originX
,
FLOAT
originY
,
IDWriteGlyphRunAnalysis
**
ret
)
{
struct
dwrite_glyphrunanalysis
*
analysis
;
UINT32
i
;
...
...
@@ -4455,7 +4456,7 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEA
break
;
case
DWRITE_MEASURING_MODE_GDI_CLASSIC
:
case
DWRITE_MEASURING_MODE_GDI_NATURAL
:
hr
=
IDWriteFontFace1_GetGdiCompatibleGlyphAdvances
(
fontface1
,
run
->
fontEmSize
,
ppdip
,
NULL
/* FIXME */
,
hr
=
IDWriteFontFace1_GetGdiCompatibleGlyphAdvances
(
fontface1
,
run
->
fontEmSize
,
ppdip
,
transform
,
measuring_mode
==
DWRITE_MEASURING_MODE_GDI_NATURAL
,
run
->
isSideways
,
1
,
run
->
glyphIndices
+
i
,
&
a
);
if
(
FAILED
(
hr
))
analysis
->
advances
[
i
]
=
0
.
0
;
...
...
dlls/dwrite/main.c
View file @
08a3e4f2
...
...
@@ -1102,7 +1102,7 @@ static HRESULT WINAPI dwritefactory_CreateGlyphRunAnalysis(IDWriteFactory2 *ifac
return
E_INVALIDARG
;
}
return
create_glyphrunanalysis
(
rendering_mode
,
measuring_mode
,
run
,
ppdip
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
return
create_glyphrunanalysis
(
rendering_mode
,
measuring_mode
,
run
,
ppdip
,
transform
,
DWRITE_GRID_FIT_MODE_DEFAULT
,
DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE
,
originX
,
originY
,
analysis
);
}
...
...
@@ -1188,7 +1188,7 @@ static HRESULT WINAPI dwritefactory2_CreateGlyphRunAnalysis(IDWriteFactory2 *ifa
TRACE
(
"(%p)->(%p %p %d %d %d %d %.2f %.2f %p)
\n
"
,
This
,
run
,
transform
,
rendering_mode
,
measuring_mode
,
gridfit_mode
,
aa_mode
,
originX
,
originY
,
analysis
);
return
create_glyphrunanalysis
(
rendering_mode
,
measuring_mode
,
run
,
1
.
0
f
,
gridfit_mode
,
aa_mode
,
originX
,
originY
,
analysis
);
return
create_glyphrunanalysis
(
rendering_mode
,
measuring_mode
,
run
,
1
.
0
f
,
transform
,
gridfit_mode
,
aa_mode
,
originX
,
originY
,
analysis
);
}
static
const
struct
IDWriteFactory2Vtbl
dwritefactoryvtbl
=
{
...
...
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