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
6c8ec042
Commit
6c8ec042
authored
Jan 28, 2008
by
Kenichi Handa
Browse files
(font_find_for_lface): Check if the character C is
supported or not only for the first font.
parent
d67f7f1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
+18
-22
src/font.c
src/font.c
+18
-22
No files found.
src/font.c
View file @
6c8ec042
...
...
@@ -2603,8 +2603,8 @@ font_find_for_lface (f, lface, spec, c)
Lisp_Object
spec
;
int
c
;
{
Lisp_Object
frame
,
entities
;
int
i
;
Lisp_Object
frame
,
entities
,
val
;
int
i
,
result
;
XSETFRAME
(
frame
,
f
);
...
...
@@ -2646,9 +2646,9 @@ font_find_for_lface (f, lface, spec, c)
if
(
c
>=
0
)
{
struct
charset
*
repertory
;
struct
charset
*
encoding
,
*
repertory
;
if
(
font_registry_charsets
(
registry
,
NULL
,
&
repertory
)
<
0
)
if
(
font_registry_charsets
(
registry
,
&
encoding
,
&
repertory
)
<
0
)
return
Qnil
;
if
(
repertory
)
{
...
...
@@ -2659,7 +2659,7 @@ font_find_for_lface (f, lface, spec, c)
suppress the further checking. */
c
=
-
1
;
}
else
if
(
c
>
MAX_UNICODE_CHAR
)
else
if
(
c
>
encoding
->
max_char
)
return
Qnil
;
}
for
(
i
=
0
;
i
<
FONT_SPEC_MAX
;
i
++
)
...
...
@@ -2692,23 +2692,19 @@ font_find_for_lface (f, lface, spec, c)
if
(
c
<
0
)
return
AREF
(
entities
,
0
);
for
(
i
=
0
;
i
<
ASIZE
(
entities
);
i
++
)
{
int
result
=
font_has_char
(
f
,
AREF
(
entities
,
i
),
c
);
Lisp_Object
font_object
;
if
(
result
>
0
)
return
AREF
(
entities
,
i
);
if
(
result
==
0
)
continue
;
font_object
=
font_open_for_lface
(
f
,
AREF
(
entities
,
i
),
lface
,
spec
);
if
(
NILP
(
font_object
))
continue
;
result
=
font_has_char
(
f
,
font_object
,
c
);
font_close_object
(
f
,
font_object
)
;
if
(
result
>
0
)
return
AREF
(
entities
,
i
);
}
val
=
AREF
(
entities
,
0
)
;
result
=
font_has_char
(
f
,
val
,
c
);
if
(
result
>
0
)
return
val
;
if
(
result
==
0
)
return
Qnil
;
val
=
font_open_for_lface
(
f
,
val
,
lface
,
spec
)
;
if
(
NILP
(
val
))
return
Qnil
;
result
=
font_has_char
(
f
,
val
,
c
);
if
(
result
>
0
)
return
val
;
return
Qnil
;
}
...
...
@@ -3101,7 +3097,7 @@ font_at (c, pos, face, w, string)
/* Lisp API */
DEFUN
(
"fontp"
,
Ffontp
,
Sfontp
,
1
,
1
,
0
,
doc
:
/* Return t if OBJECT is a font-spec
or
font-entity.
doc
:
/* Return t if OBJECT is a font-spec
,
font-entity
, or font-object
.
Return nil otherwise. */
)
(
object
)
Lisp_Object
object
;
...
...
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