[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src font.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src font.c |
Date: |
Wed, 11 Mar 2009 11:44:05 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 09/03/11 11:44:05
Modified files:
src : font.c
Log message:
(font_open_by_spec): New function.
(font_open_by_name): Use font_open_by_spec.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/font.c?cvsroot=emacs&r1=1.117&r2=1.118
Patches:
Index: font.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/font.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- font.c 5 Mar 2009 12:25:07 -0000 1.117
+++ font.c 11 Mar 2009 11:44:04 -0000 1.118
@@ -3484,20 +3484,16 @@
}
-/* Open a font best matching with NAME on frame F. If no proper font
- is found, return Qnil. */
+/* Open a font matching with font-spec SPEC on frame F. If no proper
+ font is found, return Qnil. */
Lisp_Object
-font_open_by_name (f, name)
+font_open_by_spec (f, spec)
FRAME_PTR f;
- char *name;
+ Lisp_Object spec;
{
- Lisp_Object args[2];
- Lisp_Object spec, attrs[LFACE_VECTOR_SIZE];
+ Lisp_Object attrs[LFACE_VECTOR_SIZE];
- args[0] = QCname;
- args[1] = make_unibyte_string (name, strlen (name));
- spec = Ffont_spec (2, args);
/* We set up the default font-related attributes of a face to prefer
a moderate font. */
attrs[LFACE_FAMILY_INDEX] = attrs[LFACE_FOUNDRY_INDEX] = Qnil;
@@ -3514,6 +3510,24 @@
}
+/* Open a font matching with NAME on frame F. If no proper font is
+ found, return Qnil. */
+
+Lisp_Object
+font_open_by_name (f, name)
+ FRAME_PTR f;
+ char *name;
+{
+ Lisp_Object args[2];
+ Lisp_Object spec;
+
+ args[0] = QCname;
+ args[1] = make_unibyte_string (name, strlen (name));
+ spec = Ffont_spec (2, args);
+ return font_open_by_spec (f, spec);
+}
+
+
/* Register font-driver DRIVER. This function is used in two ways.
The first is with frame F non-NULL. In this case, make DRIVER