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
81aefea4
Commit
81aefea4
authored
Feb 18, 2008
by
Stefan Monnier
Browse files
(font_unparse_xlfd): Don't ignore integer pixel size specs.
parent
5137f982
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
src/ChangeLog
src/ChangeLog
+4
-0
src/font.c
src/font.c
+11
-8
No files found.
src/ChangeLog
View file @
81aefea4
2008-02-18 Stefan Monnier <monnier@iro.umontreal.ca>
* font.c (font_unparse_xlfd): Don't ignore integer pixel size specs.
2008-02-18 Jan Dj$(Q)Z(Brv <jan.h.d@swipnet.se>
* xfns.c (Fx_show_tip): Set string to " " if empty.
...
...
src/font.c
View file @
81aefea4
...
...
@@ -75,7 +75,7 @@ Lisp_Object Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
#define CHECK_VALIDATE_FONT_SPEC(x) \
do { \
if (! FONT_SPEC_P (x))
x =
wrong_type_argument (Qfont, x); \
if (! FONT_SPEC_P (x)) wrong_type_argument (Qfont, x); \
x = font_prop_validate (x); \
} while (0)
...
...
@@ -1161,18 +1161,21 @@ font_unparse_xlfd (font, pixel_size, name, nbytes)
xassert (NUMBERP (val) || NILP (val));
if (INTEGERP (val))
{
f[XLFD_PIXEL_INDEX] = alloca (22);
i = XINT (val);
int i = XINT (val);
if (i <= 0)
i = pixel_size;
if (i > 0)
len += sprintf (f[XLFD_PIXEL_INDEX], "%d-*", i) + 1;
else if (pixel_size > 0)
len += sprintf (f[XLFD_PIXEL_INDEX], "%d-*", pixel_size) + 1;
f[XLFD_PIXEL_INDEX] = "*-*", len += 4;
{
f[XLFD_PIXEL_INDEX] = alloca (22);
len += sprintf (f[XLFD_PIXEL_INDEX], "%d-*", i) + 1;
}
else
f[XLFD_PIXEL_INDEX] = "*-*", len += 4;
}
else if (FLOATP (val))
{
int i = XFLOAT_DATA (val) * 10;
f[XLFD_PIXEL_INDEX] = alloca (12);
i = XFLOAT_DATA (val) * 10;
len += sprintf (f[XLFD_PIXEL_INDEX], "*-%d", i) + 1;
}
else
...
...
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