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
392c54e1
Commit
392c54e1
authored
Aug 09, 2002
by
Dave Hawkes
Committed by
Alexandre Julliard
Aug 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fonts with an incomplete character set could cause a fault.
parent
5ee517ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
xfont.c
graphics/x11drv/xfont.c
+5
-3
No files found.
graphics/x11drv/xfont.c
View file @
392c54e1
...
...
@@ -1031,6 +1031,7 @@ static void XFONT_GetLeading( const LPIFONTINFO16 pFI, const XFontStruct* x_fs,
{
unsigned
long
height
;
unsigned
min
=
(
unsigned
char
)
pFI
->
dfFirstChar
;
unsigned
max
=
(
unsigned
char
)
pFI
->
dfLastChar
;
BOOL
bIsLatin
=
IS_LATIN_CHARSET
(
pFI
->
dfCharSet
);
if
(
pEL
)
*
pEL
=
0
;
...
...
@@ -1048,7 +1049,7 @@ static void XFONT_GetLeading( const LPIFONTINFO16 pFI, const XFontStruct* x_fs,
if
(
TSXGetFontProperty
((
XFontStruct
*
)
x_fs
,
XA_CAP_HEIGHT
,
&
height
)
==
FALSE
)
{
if
(
x_fs
->
per_char
)
if
(
bIsLatin
)
if
(
bIsLatin
&&
((
unsigned
char
)
'X'
<=
(
max
-
min
))
)
height
=
x_fs
->
per_char
[
'X'
-
min
].
ascent
;
else
if
(
x_fs
->
ascent
>=
x_fs
->
max_bounds
.
ascent
)
...
...
@@ -1092,8 +1093,9 @@ static INT XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, const XFontStruct* x_fs,
if
(
x_fs
->
per_char
)
{
int
width
=
0
,
chars
=
0
,
j
;
if
(
IS_LATIN_CHARSET
(
pFI
->
dfCharSet
)
||
pFI
->
dfCharSet
==
DEFAULT_CHARSET
)
if
(
(
IS_LATIN_CHARSET
(
pFI
->
dfCharSet
)
||
pFI
->
dfCharSet
==
DEFAULT_CHARSET
)
&&
(
max
-
min
)
>=
(
unsigned
char
)
'z'
)
{
/* FIXME - should use a weighted average */
for
(
j
=
0
;
j
<
26
;
j
++
)
...
...
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