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
7d56b2dd
Commit
7d56b2dd
authored
May 28, 2010
by
Kenichi Handa
Browse files
Handle face-ignored-fonts
parent
478ebb73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
src/ChangeLog
src/ChangeLog
+7
-0
src/font.c
src/font.c
+35
-2
No files found.
src/ChangeLog
View file @
7d56b2dd
2010-05-28 Kenichi Handa <handa@m17n.org>
* font.c (font_delete_unmatched): Check Vface_ignored_fonts.
Don't sheck SPEC if it is nil.
(font_list_entities): Call font_delete_unmatched if
Vface_ignored_fonts is non-nil.
2010-05-27 Glenn Morris <rgm@gnu.org>
2010-05-27 Glenn Morris <rgm@gnu.org>
* Makefile.in, autodeps.mk, deps.mk, ns.mk:
* Makefile.in, autodeps.mk, deps.mk, ns.mk:
...
...
src/font.c
View file @
7d56b2dd
...
@@ -2821,6 +2821,14 @@ font_clear_cache (f, cache, driver)
...
@@ -2821,6 +2821,14 @@ font_clear_cache (f, cache, driver)
static
Lisp_Object
scratch_font_spec
,
scratch_font_prefer
;
static
Lisp_Object
scratch_font_spec
,
scratch_font_prefer
;
/* Check each font-entity in VEC, and return a list of font-entities
that satisfy this condition:
(1) matches with SPEC and SIZE if SPEC is not nil, and
(2) doesn't match with any regexps in Vface_ignored_fonts (if non-nil).
*/
extern
Lisp_Object
Vface_ignored_fonts
;
Lisp_Object
Lisp_Object
font_delete_unmatched
(
vec
,
spec
,
size
)
font_delete_unmatched
(
vec
,
spec
,
size
)
Lisp_Object
vec
,
spec
;
Lisp_Object
vec
,
spec
;
...
@@ -2833,6 +2841,29 @@ font_delete_unmatched (vec, spec, size)
...
@@ -2833,6 +2841,29 @@ font_delete_unmatched (vec, spec, size)
for
(
val
=
Qnil
,
i
=
ASIZE
(
vec
)
-
1
;
i
>=
0
;
i
--
)
for
(
val
=
Qnil
,
i
=
ASIZE
(
vec
)
-
1
;
i
>=
0
;
i
--
)
{
{
entity
=
AREF
(
vec
,
i
);
entity
=
AREF
(
vec
,
i
);
if
(
!
NILP
(
Vface_ignored_fonts
))
{
char
name
[
256
];
Lisp_Object
tail
,
regexp
;
if
(
font_unparse_xlfd
(
entity
,
0
,
name
,
256
)
>=
0
)
{
for
(
tail
=
Vface_ignored_fonts
;
CONSP
(
tail
);
tail
=
XCDR
(
tail
))
{
regexp
=
XCAR
(
tail
);
if
(
STRINGP
(
regexp
)
&&
fast_c_string_match_ignore_case
(
regexp
,
name
)
>=
0
)
break
;
}
if
(
CONSP
(
tail
))
continue
;
}
}
if
(
NILP
(
spec
))
{
val
=
Fcons
(
entity
,
val
);
continue
;
}
for
(
prop
=
FONT_WEIGHT_INDEX
;
prop
<
FONT_SIZE_INDEX
;
prop
++
)
for
(
prop
=
FONT_WEIGHT_INDEX
;
prop
<
FONT_SIZE_INDEX
;
prop
++
)
if
(
INTEGERP
(
AREF
(
spec
,
prop
))
if
(
INTEGERP
(
AREF
(
spec
,
prop
))
&&
((
XINT
(
AREF
(
spec
,
prop
))
>>
8
)
&&
((
XINT
(
AREF
(
spec
,
prop
))
>>
8
)
...
@@ -2932,8 +2963,10 @@ font_list_entities (frame, spec)
...
@@ -2932,8 +2963,10 @@ font_list_entities (frame, spec)
ASET
(
copy
,
FONT_TYPE_INDEX
,
driver_list
->
driver
->
type
);
ASET
(
copy
,
FONT_TYPE_INDEX
,
driver_list
->
driver
->
type
);
XSETCDR
(
cache
,
Fcons
(
Fcons
(
copy
,
val
),
XCDR
(
cache
)));
XSETCDR
(
cache
,
Fcons
(
Fcons
(
copy
,
val
),
XCDR
(
cache
)));
}
}
if (ASIZE (val) > 0 && need_filtering)
if
(
ASIZE
(
val
)
>
0
val = font_delete_unmatched (val, spec, size);
&&
(
need_filtering
||
!
NILP
(
Vface_ignored_fonts
)))
val
=
font_delete_unmatched
(
val
,
need_filtering
?
spec
:
Qnil
,
size
);
if
(
ASIZE
(
val
)
>
0
)
if
(
ASIZE
(
val
)
>
0
)
list
=
Fcons
(
val
,
list
);
list
=
Fcons
(
val
,
list
);
}
}
...
...
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