Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
14a225f9
Commit
14a225f9
authored
Feb 08, 2010
by
Chong Yidong
Browse files
* nsfont.m (nsfont_open): The system's value for the font descent
is negative, so round it down to avoid clipping.
parent
f29fd869
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/nsfont.m
src/nsfont.m
+5
-3
No files found.
src/ChangeLog
View file @
14a225f9
2010-02-08 Francis Devereux <francis@devrx.org>
* nsfont.m (nsfont_open): The system's value for the font descent
is negative, so round it down to avoid clipping.
2010-02-06 Chong Yidong <cyd@stupidchicken.com>
* charset.c (load_charset_map_from_file)
...
...
src/nsfont.m
View file @
14a225f9
...
...
@@ -844,8 +844,10 @@ when setting family in ns_spec_to_descriptor(). */
/* max bounds */
font_info
->
max_bounds
.
ascent
=
lrint
(
hshrink
*
[
sfont
ascender
]
+
expand
*
hd
/
2
);
/* [sfont descender] is usually negative. Use floor to avoid
clipping descenders. */
font_info
->
max_bounds
.
descent
=
-
lrint
(
hshrink
*
[
sfont
descender
]
-
expand
*
hd
/
2
);
-
lrint
(
floor
(
hshrink
*
[
sfont
descender
]
-
expand
*
hd
/
2
)
)
;
font_info
->
height
=
font_info
->
max_bounds
.
ascent
+
font_info
->
max_bounds
.
descent
;
font_info
->
max_bounds
.
width
=
lrint
(
font_info
->
width
);
...
...
@@ -880,8 +882,8 @@ when setting family in ns_spec_to_descriptor(). */
#endif
/* set up metrics portion of font struct */
font
->
ascent
=
[
sfont
ascender
];
font
->
descent
=
-
[
sfont
descender
];
font
->
ascent
=
lrint
(
[
sfont
ascender
]
)
;
font
->
descent
=
-
lrint
(
floor
(
[
sfont
descender
]
))
;
font
->
min_width
=
ns_char_width
(
sfont
,
'|'
);
font
->
space_width
=
lrint
(
ns_char_width
(
sfont
,
' '
));
font
->
average_width
=
lrint
(
font_info
->
width
);
...
...
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