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
409000c3
Commit
409000c3
authored
Aug 16, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Aug 16, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Translate OutlineTextMetrics to logical co-ords.
parent
9a8fc063
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
2 deletions
+47
-2
font.c
objects/font.c
+47
-2
No files found.
objects/font.c
View file @
409000c3
...
...
@@ -1315,7 +1315,8 @@ BOOL WINAPI GetTextMetricsW( HDC hdc, TEXTMETRICW *metrics )
metrics
->
tmMaxCharWidth
=
WDPTOLP
(
metrics
->
tmMaxCharWidth
);
metrics
->
tmOverhang
=
WDPTOLP
(
metrics
->
tmOverhang
);
ret
=
TRUE
;
#undef WDPTOLP
#undef HDPTOLP
TRACE
(
"text metrics:
\n
"
" Weight = %03li
\t
FirstChar = %i
\t
AveCharWidth = %li
\n
"
" Italic = % 3i
\t
LastChar = %i
\t\t
MaxCharWidth = %li
\n
"
...
...
@@ -1515,8 +1516,52 @@ UINT WINAPI GetOutlineTextMetricsW(
TRACE
(
"(%d,%d,%p)
\n
"
,
hdc
,
cbData
,
lpOTM
);
if
(
!
dc
)
return
0
;
if
(
dc
->
gdiFont
)
if
(
dc
->
gdiFont
)
{
ret
=
WineEngGetOutlineTextMetrics
(
dc
->
gdiFont
,
cbData
,
lpOTM
);
if
(
ret
&&
ret
<=
cbData
)
{
#define WDPTOLP(x) ((x<0)? \
(-abs(INTERNAL_XDSTOWS(dc, (x)))): \
(abs(INTERNAL_XDSTOWS(dc, (x)))))
#define HDPTOLP(y) ((y<0)? \
(-abs(INTERNAL_YDSTOWS(dc, (y)))): \
(abs(INTERNAL_YDSTOWS(dc, (y)))))
lpOTM
->
otmTextMetrics
.
tmHeight
=
HDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmHeight
);
lpOTM
->
otmTextMetrics
.
tmAscent
=
HDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmAscent
);
lpOTM
->
otmTextMetrics
.
tmDescent
=
HDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmDescent
);
lpOTM
->
otmTextMetrics
.
tmInternalLeading
=
HDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmInternalLeading
);
lpOTM
->
otmTextMetrics
.
tmExternalLeading
=
HDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmExternalLeading
);
lpOTM
->
otmTextMetrics
.
tmAveCharWidth
=
WDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmAveCharWidth
);
lpOTM
->
otmTextMetrics
.
tmMaxCharWidth
=
WDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmMaxCharWidth
);
lpOTM
->
otmTextMetrics
.
tmOverhang
=
WDPTOLP
(
lpOTM
->
otmTextMetrics
.
tmOverhang
);
lpOTM
->
otmAscent
=
HDPTOLP
(
lpOTM
->
otmAscent
);
lpOTM
->
otmDescent
=
HDPTOLP
(
lpOTM
->
otmDescent
);
lpOTM
->
otmLineGap
=
HDPTOLP
(
lpOTM
->
otmLineGap
);
lpOTM
->
otmsCapEmHeight
=
HDPTOLP
(
lpOTM
->
otmsCapEmHeight
);
lpOTM
->
otmsXHeight
=
HDPTOLP
(
lpOTM
->
otmsXHeight
);
lpOTM
->
otmrcFontBox
.
top
=
HDPTOLP
(
lpOTM
->
otmrcFontBox
.
top
);
lpOTM
->
otmrcFontBox
.
bottom
=
HDPTOLP
(
lpOTM
->
otmrcFontBox
.
bottom
);
lpOTM
->
otmrcFontBox
.
left
=
WDPTOLP
(
lpOTM
->
otmrcFontBox
.
left
);
lpOTM
->
otmrcFontBox
.
right
=
WDPTOLP
(
lpOTM
->
otmrcFontBox
.
right
);
lpOTM
->
otmMacAscent
=
HDPTOLP
(
lpOTM
->
otmMacAscent
);
lpOTM
->
otmMacDescent
=
HDPTOLP
(
lpOTM
->
otmMacDescent
);
lpOTM
->
otmMacLineGap
=
HDPTOLP
(
lpOTM
->
otmMacLineGap
);
lpOTM
->
otmptSubscriptSize
.
x
=
WDPTOLP
(
lpOTM
->
otmptSubscriptSize
.
x
);
lpOTM
->
otmptSubscriptSize
.
y
=
HDPTOLP
(
lpOTM
->
otmptSubscriptSize
.
y
);
lpOTM
->
otmptSubscriptOffset
.
x
=
WDPTOLP
(
lpOTM
->
otmptSubscriptOffset
.
x
);
lpOTM
->
otmptSubscriptOffset
.
y
=
HDPTOLP
(
lpOTM
->
otmptSubscriptOffset
.
y
);
lpOTM
->
otmptSuperscriptSize
.
x
=
WDPTOLP
(
lpOTM
->
otmptSuperscriptSize
.
x
);
lpOTM
->
otmptSuperscriptSize
.
y
=
HDPTOLP
(
lpOTM
->
otmptSuperscriptSize
.
y
);
lpOTM
->
otmptSuperscriptOffset
.
x
=
WDPTOLP
(
lpOTM
->
otmptSuperscriptOffset
.
x
);
lpOTM
->
otmptSuperscriptOffset
.
y
=
HDPTOLP
(
lpOTM
->
otmptSuperscriptOffset
.
y
);
lpOTM
->
otmsStrikeoutSize
=
HDPTOLP
(
lpOTM
->
otmsStrikeoutSize
);
lpOTM
->
otmsStrikeoutPosition
=
HDPTOLP
(
lpOTM
->
otmsStrikeoutPosition
);
lpOTM
->
otmsUnderscoreSize
=
HDPTOLP
(
lpOTM
->
otmsUnderscoreSize
);
lpOTM
->
otmsUnderscorePosition
=
HDPTOLP
(
lpOTM
->
otmsUnderscorePosition
);
#undef WDPTOLP
#undef HDPTOLP
}
}
else
{
/* This stuff was in GetOutlineTextMetricsA, I've moved it here
but really this should just be a return 0. */
...
...
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