ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/defaultfont.h
(Generate patch)

Comparing rxvt-unicode/src/defaultfont.h (file contents):
Revision 1.15 by pcg, Fri Feb 27 02:52:51 2004 UTC vs.
Revision 1.21 by root, Wed Aug 11 01:36:51 2004 UTC

9#ifdef HAVE_XSETLOCALE 9#ifdef HAVE_XSETLOCALE
10# define X_LOCALE 10# define X_LOCALE
11# include <X11/Xlocale.h> 11# include <X11/Xlocale.h>
12#else 12#else
13# ifdef HAVE_SETLOCALE 13# ifdef HAVE_SETLOCALE
14# include <locale.h> 14# include <clocale>
15# endif 15# endif
16#endif /* HAVE_XLOCALE */ 16#endif /* HAVE_XLOCALE */
17 17
18#ifdef HAVE_NL_LANGINFO 18#ifdef HAVE_NL_LANGINFO
19# include <langinfo.h> 19# include <langinfo.h>
20#endif 20#endif
21
22#include <inttypes.h>
21 23
22#include "rxvtlib.h" 24#include "rxvtlib.h"
23#include "feature.h" 25#include "feature.h"
24#include "encoding.h" 26#include "encoding.h"
25#include "rxvtstl.h" 27#include "rxvtstl.h"
55 57
56 operator Drawable() { return drawable; } 58 operator Drawable() { return drawable; }
57}; 59};
58 60
59struct rxvt_font { 61struct rxvt_font {
62 struct rxvt_fontset *fs;
60 // managed by the fontset 63 // managed by the fontset
61 rxvt_t r; 64 rxvt_t r;
62 void set_term (rxvt_t r) { this->r = r; } 65 void set_term (rxvt_t r) { this->r = r; }
63 66
64 char *name; 67 char *name;
97#define FONT_UNREF(f) do { (f)->clear (); delete (f); } while (0) 100#define FONT_UNREF(f) do { (f)->clear (); delete (f); } while (0)
98 101
99struct rxvt_fallback_font; 102struct rxvt_fallback_font;
100 103
101struct rxvt_fontset { 104struct rxvt_fontset {
105 char *fontdesc;
106
102 rxvt_fontset (rxvt_t r); 107 rxvt_fontset (rxvt_t r);
103 ~rxvt_fontset (); 108 ~rxvt_fontset ();
104 109
105 rxvt_font *new_font (const char *name, codeset cs); 110 rxvt_font *new_font (const char *name, codeset cs);
106 111
107 bool populate (const char *desc); 112 bool populate (const char *desc);
108 int find_font (uint32_t unicode); 113 int find_font (uint32_t unicode, bool bold = false);
114 int find_font (const char *name) const;
109 115
116 // font-id's MUST fit into a signed 16 bit integer.
110 rxvt_font *operator [] (int id) const 117 rxvt_font *operator [] (int id) const
111 { 118 {
112 return fonts[id]; 119 return fonts[id];
113 } 120 }
114 121

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines