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
d1682aab
Commit
d1682aab
authored
Nov 21, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Nov 21, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some unaligned accesses.
parent
2d263ce7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
22 deletions
+60
-22
xfont.c
graphics/x11drv/xfont.c
+8
-2
font.c
objects/font.c
+52
-20
No files found.
graphics/x11drv/xfont.c
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 */
...
...
objects/font.c
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
);
}
...
...
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