Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
57d3b93b
Commit
57d3b93b
authored
Apr 08, 2009
by
Kenichi Handa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ftfont_text_extents): Fix calculation of metrics->descent.
parent
4ffdb307
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/ftfont.c
src/ftfont.c
+3
-3
No files found.
src/ChangeLog
View file @
57d3b93b
2009-04-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* ftfont.c (ftfont_text_extents): Fix calculation of
metrics->descent.
2009-04-06 Jason Rumney <jasonr@gnu.org>
* frame.c (x_set_font): Avoid C99 mid-block variable declaration.
...
...
src/ftfont.c
View file @
57d3b93b
...
...
@@ -1255,7 +1255,7 @@ ftfont_text_extents (font, code, nglyphs, metrics)
metrics
->
lbearing
=
m
->
horiBearingX
>>
6
;
metrics
->
rbearing
=
(
m
->
horiBearingX
+
m
->
width
)
>>
6
;
metrics
->
ascent
=
m
->
horiBearingY
>>
6
;
metrics
->
descent
=
(
m
->
h
oriBearingY
+
m
->
height
)
>>
6
;
metrics
->
descent
=
(
m
->
h
eight
-
m
->
horiBearingY
)
>>
6
;
}
first
=
0
;
}
...
...
@@ -1269,8 +1269,8 @@ ftfont_text_extents (font, code, nglyphs, metrics)
=
width
+
((
m
->
horiBearingX
+
m
->
width
)
>>
6
);
if
(
metrics
->
ascent
<
(
m
->
horiBearingY
>>
6
))
metrics
->
ascent
=
m
->
horiBearingY
>>
6
;
if
(
metrics
->
descent
>
((
m
->
h
oriBearingY
+
m
->
height
)
>>
6
))
metrics
->
descent
=
(
m
->
h
oriBearingY
+
m
->
height
)
>>
6
;
if
(
metrics
->
descent
>
((
m
->
h
eight
-
m
->
horiBearingY
)
>>
6
))
metrics
->
descent
=
(
m
->
h
eight
-
m
->
horiBearingY
)
>>
6
;
}
width
+=
m
->
horiAdvance
>>
6
;
}
...
...
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