aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2007-12-08 01:47:40 +0000
committerJason Rumney2007-12-08 01:47:40 +0000
commit713849f63b782e52c558dd85add4f54c538a72c1 (patch)
tree68a61b4b72e81cbf8719a1534c9b22ddbe1ab2eb /src
parentfb220ed56a90caccafcf5c61faf51d033aca3e3f (diff)
downloademacs-713849f63b782e52c558dd85add4f54c538a72c1.tar.gz
emacs-713849f63b782e52c558dd85add4f54c538a72c1.zip
New file.
Diffstat (limited to 'src')
-rw-r--r--src/w32font.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/w32font.h b/src/w32font.h
new file mode 100644
index 00000000000..1faa34dcb7a
--- /dev/null
+++ b/src/w32font.h
@@ -0,0 +1,55 @@
1/* Shared GDI and Uniscribe Font backend declarations for the W32 API.
2 Copyright (C) 2007 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19Boston, MA 02110-1301, USA. */
20
21#ifndef EMACS_W32FONT_H
22#define EMACS_W32FONT_H
23
24
25/* Bit 17 of ntmFlags in NEWTEXTMETRIC is set for Postscript OpenType fonts,
26 bit 18 for Truetype OpenType fonts. */
27#define NTMFLAGS_OPENTYPE 0x60000
28
29/* The actual structure for a w32 font, that can be cast to struct font.
30 The Uniscribe backend extends this. */
31struct w32font_info
32{
33 struct font font;
34 TEXTMETRIC metrics;
35 struct frame *owning_frame;
36};
37
38Lisp_Object w32font_get_cache P_ ((Lisp_Object frame));
39Lisp_Object w32font_list_internal P_ ((Lisp_Object frame,
40 Lisp_Object font_spec,
41 int opentype_only));
42Lisp_Object w32font_match_internal P_ ((Lisp_Object frame,
43 Lisp_Object font_spec,
44 int opentype_only));
45struct font * w32font_open P_ ((FRAME_PTR f, Lisp_Object font_entity,
46 int pixel_size));
47void w32font_close P_ ((FRAME_PTR f, struct font *font));
48int w32font_has_char P_ ((Lisp_Object entity, int c));
49unsigned w32font_encode_char P_ ((struct font *font, int c));
50int w32font_text_extents P_ ((struct font *font, unsigned *code, int nglyphs,
51 struct font_metrics *metrics));
52int w32font_draw P_ ((struct glyph_string *s, int from, int to,
53 int x, int y, int with_background));
54
55#endif