Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
d1682aab
Commit
d1682aab
authored
25 years ago
by
Ulrich Weigand
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Removed some unaligned accesses.
parent
2d263ce7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
graphics/x11drv/xfont.c
+8
-2
8 additions, 2 deletions
graphics/x11drv/xfont.c
objects/font.c
+52
-20
52 additions, 20 deletions
objects/font.c
with
60 additions
and
22 deletions
graphics/x11drv/xfont.c
+
8
−
2
View file @
d1682aab
...
...
@@ -1072,7 +1072,10 @@ static void XFONT_GetTextMetrics( const fontObject* pfo, const LPTEXTMETRICA pTM
pTM
->
tmWeight
+=
100
;
}
*
(
INT
*
)
&
pTM
->
tmFirstChar
=
*
(
INT
*
)
&
pdf
->
dfFirstChar
;
pTM
->
tmFirstChar
=
pdf
->
dfFirstChar
;
pTM
->
tmLastChar
=
pdf
->
dfLastChar
;
pTM
->
tmDefaultChar
=
pdf
->
dfDefaultChar
;
pTM
->
tmBreakChar
=
pdf
->
dfBreakChar
;
pTM
->
tmCharSet
=
pdf
->
dfCharSet
;
pTM
->
tmPitchAndFamily
=
pdf
->
dfPitchAndFamily
;
...
...
@@ -1122,7 +1125,10 @@ static UINT XFONT_GetFontMetric( const fontInfo* pfi, const LPENUMLOGFONTEX16 pL
pTM
->
tmDigitizedAspectX
=
pfi
->
df
.
dfHorizRes
;
pTM
->
tmDigitizedAspectY
=
pfi
->
df
.
dfVertRes
;
*
(
INT
*
)
&
pTM
->
tmFirstChar
=
*
(
INT
*
)
&
pfi
->
df
.
dfFirstChar
;
pTM
->
tmFirstChar
=
pfi
->
df
.
dfFirstChar
;
pTM
->
tmLastChar
=
pfi
->
df
.
dfLastChar
;
pTM
->
tmDefaultChar
=
pfi
->
df
.
dfDefaultChar
;
pTM
->
tmBreakChar
=
pfi
->
df
.
dfBreakChar
;
/* return font type */
...
...
This diff is collapsed.
Click to expand it.
objects/font.c
+
52
−
20
View file @
d1682aab
...
...
@@ -92,43 +92,75 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = {
/***********************************************************************
* LOGFONT conversion functions.
*/
static
void
__logfont32to16
(
INT16
*
plf16
,
const
INT
*
plf32
)
{
int
i
;
for
(
i
=
0
;
i
<
5
;
i
++
)
*
plf16
++
=
*
plf32
++
;
*
((
INT
*
)
plf16
)
++
=
*
plf32
++
;
*
((
INT
*
)
plf16
)
=
*
plf32
;
}
static
void
__logfont16to32
(
INT
*
plf32
,
const
INT16
*
plf16
)
{
int
i
;
for
(
i
=
0
;
i
<
5
;
i
++
)
*
plf32
++
=
*
plf16
++
;
*
plf32
++
=
*
((
INT
*
)
plf16
)
++
;
*
plf32
=
*
((
INT
*
)
plf16
);
}
void
FONT_LogFont32ATo16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
)
{
__logfont32to16
(
(
INT16
*
)
font16
,
(
const
INT
*
)
font32
);
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfEscapement
=
font32
->
lfEscapement
;
font16
->
lfOrientation
=
font32
->
lfOrientation
;
font16
->
lfWeight
=
font32
->
lfWeight
;
font16
->
lfItalic
=
font32
->
lfItalic
;
font16
->
lfUnderline
=
font32
->
lfUnderline
;
font16
->
lfStrikeOut
=
font32
->
lfStrikeOut
;
font16
->
lfCharSet
=
font32
->
lfCharSet
;
font16
->
lfOutPrecision
=
font32
->
lfOutPrecision
;
font16
->
lfClipPrecision
=
font32
->
lfClipPrecision
;
font16
->
lfQuality
=
font32
->
lfQuality
;
font16
->
lfPitchAndFamily
=
font32
->
lfPitchAndFamily
;
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
void
FONT_LogFont32WTo16
(
const
LOGFONTW
*
font32
,
LPLOGFONT16
font16
)
{
__logfont32to16
(
(
INT16
*
)
font16
,
(
const
INT
*
)
font32
);
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfEscapement
=
font32
->
lfEscapement
;
font16
->
lfOrientation
=
font32
->
lfOrientation
;
font16
->
lfWeight
=
font32
->
lfWeight
;
font16
->
lfItalic
=
font32
->
lfItalic
;
font16
->
lfUnderline
=
font32
->
lfUnderline
;
font16
->
lfStrikeOut
=
font32
->
lfStrikeOut
;
font16
->
lfCharSet
=
font32
->
lfCharSet
;
font16
->
lfOutPrecision
=
font32
->
lfOutPrecision
;
font16
->
lfClipPrecision
=
font32
->
lfClipPrecision
;
font16
->
lfQuality
=
font32
->
lfQuality
;
font16
->
lfPitchAndFamily
=
font32
->
lfPitchAndFamily
;
lstrcpynWtoA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
void
FONT_LogFont16To32A
(
const
LPLOGFONT16
font16
,
LPLOGFONTA
font32
)
{
__logfont16to32
(
(
INT
*
)
font32
,
(
const
INT16
*
)
font16
);
font32
->
lfHeight
=
font16
->
lfHeight
;
font32
->
lfWidth
=
font16
->
lfWidth
;
font32
->
lfEscapement
=
font16
->
lfEscapement
;
font32
->
lfOrientation
=
font16
->
lfOrientation
;
font32
->
lfWeight
=
font16
->
lfWeight
;
font32
->
lfItalic
=
font16
->
lfItalic
;
font32
->
lfUnderline
=
font16
->
lfUnderline
;
font32
->
lfStrikeOut
=
font16
->
lfStrikeOut
;
font32
->
lfCharSet
=
font16
->
lfCharSet
;
font32
->
lfOutPrecision
=
font16
->
lfOutPrecision
;
font32
->
lfClipPrecision
=
font16
->
lfClipPrecision
;
font32
->
lfQuality
=
font16
->
lfQuality
;
font32
->
lfPitchAndFamily
=
font16
->
lfPitchAndFamily
;
lstrcpynA
(
font32
->
lfFaceName
,
font16
->
lfFaceName
,
LF_FACESIZE
);
}
void
FONT_LogFont16To32W
(
const
LPLOGFONT16
font16
,
LPLOGFONTW
font32
)
{
__logfont16to32
(
(
INT
*
)
font32
,
(
const
INT16
*
)
font16
);
font32
->
lfHeight
=
font16
->
lfHeight
;
font32
->
lfWidth
=
font16
->
lfWidth
;
font32
->
lfEscapement
=
font16
->
lfEscapement
;
font32
->
lfOrientation
=
font16
->
lfOrientation
;
font32
->
lfWeight
=
font16
->
lfWeight
;
font32
->
lfItalic
=
font16
->
lfItalic
;
font32
->
lfUnderline
=
font16
->
lfUnderline
;
font32
->
lfStrikeOut
=
font16
->
lfStrikeOut
;
font32
->
lfCharSet
=
font16
->
lfCharSet
;
font32
->
lfOutPrecision
=
font16
->
lfOutPrecision
;
font32
->
lfClipPrecision
=
font16
->
lfClipPrecision
;
font32
->
lfQuality
=
font16
->
lfQuality
;
font32
->
lfPitchAndFamily
=
font16
->
lfPitchAndFamily
;
lstrcpynAtoW
(
font32
->
lfFaceName
,
font16
->
lfFaceName
,
LF_FACESIZE
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment