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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
a1fe5c00
Commit
a1fe5c00
authored
May 31, 2007
by
Jason Rumney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[USE_FONT_BACKEND]: Port font backend changes from xfns.c.
(x_to_w32_charset, w32_to_x_charset): Expose externally.
parent
4fe8e188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
2 deletions
+75
-2
src/w32fns.c
src/w32fns.c
+75
-2
No files found.
src/w32fns.c
View file @
a1fe5c00
...
@@ -57,6 +57,10 @@ Boston, MA 02110-1301, USA. */
...
@@ -57,6 +57,10 @@ Boston, MA 02110-1301, USA. */
#include <dlgs.h>
#include <dlgs.h>
#define FILE_NAME_TEXT_FIELD edt1
#define FILE_NAME_TEXT_FIELD edt1
#ifdef USE_FONT_BACKEND
#include "font.h"
#endif
void syms_of_w32fns ();
void syms_of_w32fns ();
void globals_of_w32fns ();
void globals_of_w32fns ();
...
@@ -4129,6 +4133,38 @@ unwind_create_frame (frame)
...
@@ -4129,6 +4133,38 @@ unwind_create_frame (frame)
return Qnil;
return Qnil;
}
}
#ifdef USE_FONT_BACKEND
static void
x_default_font_parameter (f, parms)
struct frame *f;
Lisp_Object parms;
{
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
Lisp_Object font = x_get_arg (dpyinfo, parms, Qfont, "font", "Font",
RES_TYPE_STRING);
if (!STRINGP (font))
{
int i;
static char *names[]
= { "-*-Courier New-normal-r-*-*-*-100-*-*-c-*-iso8859-1",
"-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1",
"-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-iso8859-1",
"Fixedsys",
NULL };
for (i = 0; names[i]; i++)
{
font = font_open_by_name (f, names[i]);
if (! NILP (font))
break;
}
if (NILP (font))
error ("No suitable font was found");
}
x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING);
}
#endif
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1, 1, 0,
1, 1, 0,
...
@@ -4261,8 +4297,25 @@ This function is an internal primitive--use `make-frame' instead. */)
...
@@ -4261,8 +4297,25 @@ This function is an internal primitive--use `make-frame' instead. */)
specbind (Qx_resource_name, name);
specbind (Qx_resource_name, name);
}
}
#ifdef USE_FONT_BACKEND
if (enable_font_backend)
{
/* Perhaps, we must allow frame parameter, say `font-backend',
to specify which font backends to use. */
register_font_driver (&w32font_driver, f);
x_default_parameter (f, parameters, Qfont_backend, Qnil,
"fontBackend", "FontBackend", RES_TYPE_STRING);
}
#endif /* USE_FONT_BACKEND */
/* Extract the window parameters from the supplied values
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
that are needed to determine window geometry. */
#ifdef USE_FONT_BACKEND
if (enable_font_backend)
x_default_font_parameter (f, parameters);
else
#endif
{
{
Lisp_Object font;
Lisp_Object font;
...
@@ -4852,7 +4905,7 @@ w32_to_x_weight (fnweight)
...
@@ -4852,7 +4905,7 @@ w32_to_x_weight (fnweight)
return "*";
return "*";
}
}
static
LONG
LONG
x_to_w32_charset (lpcs)
x_to_w32_charset (lpcs)
char * lpcs;
char * lpcs;
{
{
...
@@ -4940,7 +4993,7 @@ x_to_w32_charset (lpcs)
...
@@ -4940,7 +4993,7 @@ x_to_w32_charset (lpcs)
}
}
static
char *
char *
w32_to_x_charset (fncharset, matching)
w32_to_x_charset (fncharset, matching)
int fncharset;
int fncharset;
char *matching;
char *matching;
...
@@ -7339,8 +7392,25 @@ x_create_tip_frame (dpyinfo, parms, text)
...
@@ -7339,8 +7392,25 @@ x_create_tip_frame (dpyinfo, parms, text)
specbind (Qx_resource_name, name);
specbind (Qx_resource_name, name);
}
}
#ifdef USE_FONT_BACKEND
if (enable_font_backend)
{
/* Perhaps, we must allow frame parameter, say `font-backend',
to specify which font backends to use. */
register_font_driver (&w32font_driver, f);
x_default_parameter (f, parms, Qfont_backend, Qnil,
"fontBackend", "FontBackend", RES_TYPE_STRING);
}
#endif /* USE_FONT_BACKEND */
/* Extract the window parameters from the supplied values
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
that are needed to determine window geometry. */
#ifdef USE_FONT_BACKEND
if (enable_font_backend)
x_default_font_parameter (f, parms);
else
#endif /* USE_FONT_BACKEND */
{
{
Lisp_Object font;
Lisp_Object font;
...
@@ -8655,6 +8725,9 @@ frame_parm_handler w32_frame_parm_handlers[] =
...
@@ -8655,6 +8725,9 @@ frame_parm_handler w32_frame_parm_handlers[] =
x_set_fringe_width,
x_set_fringe_width,
0, /* x_set_wait_for_wm, */
0, /* x_set_wait_for_wm, */
x_set_fullscreen,
x_set_fullscreen,
#ifdef USE_FONT_BACKEND
x_set_font_backend
#endif
};
};
void
void
...
...
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