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
a823468b
Commit
a823468b
authored
Mar 01, 2008
by
Jason Rumney
Browse files
(w32font_full_name): Report point size for scalable fonts.
parent
98329671
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
src/ChangeLog
src/ChangeLog
+4
-0
src/w32font.c
src/w32font.c
+25
-6
No files found.
src/ChangeLog
View file @
a823468b
2008-03-01 Jason Rumney <jasonr@gnu.org>
* w32font.c (w32font_full_name): Report point size for scalable fonts.
2008-03-01 Kim F. Storm <storm@cua.dk>
* dispextern.h (CHAR_GLYPH_SPACE_P): Check for default face.
...
...
src/w32font.c
View file @
a823468b
...
...
@@ -1553,11 +1553,20 @@ w32font_full_name (font, font_obj, pixel_size, name, nbytes)
char
*
name
;
int
nbytes
;
{
int
len
;
int
len
,
height
,
outline
;
char
*
p
;
Lisp_Object
antialiasing
,
weight
=
Qnil
;
len
=
strlen
(
font
->
lfFaceName
)
+
21
;
/* :pixelsize=SIZE */
len
=
strlen
(
font
->
lfFaceName
);
outline
=
EQ
(
AREF
(
font_obj
,
FONT_FOUNDRY_INDEX
),
Qoutline
);
/* Represent size of scalable fonts by point size. But use pixelsize for
raster fonts to indicate that they are exactly that size. */
if
(
outline
)
len
+=
11
;
/* -SIZE */
else
len
=
strlen
(
font
->
lfFaceName
)
+
21
;
if
(
font
->
lfItalic
)
len
+=
7
;
/* :italic */
...
...
@@ -1579,10 +1588,20 @@ w32font_full_name (font, font_obj, pixel_size, name, nbytes)
p
=
name
;
p
+=
sprintf
(
p
,
"%s"
,
font
->
lfFaceName
);
if
(
font
->
lfHeight
)
p
+=
sprintf
(
p
,
":pixelsize=%d"
,
eabs
(
font
->
lfHeight
));
else
if
(
pixel_size
>
0
)
p
+=
sprintf
(
p
,
":pixelsize=%d"
,
pixel_size
);
height
=
font
->
lfHeight
?
eabs
(
font
->
lfHeight
)
:
pixel_size
;
if
(
height
>
0
)
{
if
(
outline
)
{
float
pointsize
=
height
*
72
.
0
/
one_w32_display_info
.
resy
;
/* Round to nearest half point. */
pointsize
=
round
(
pointsize
*
2
)
/
2
;
p
+=
sprintf
(
p
,
"-%1.1f"
,
pointsize
);
}
else
p
+=
sprintf
(
p
,
":pixelsize=%d"
,
height
);
}
if
(
font
->
lfItalic
)
p
+=
sprintf
(
p
,
":italic"
);
...
...
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