Backspace sends DEL instead of ^H.
[spft.git] / FontSet.h
blob254b32daaf22824b730481d329852db4086cc387
1 #pragma once
3 #include "Style.h"
4 #include <X11/Xlib.h>
5 #include <X11/Xft/Xft.h>
8 class FontSet {
9 public:
10 FontSet(
11 std::string spec,
12 Display* display, int screen,
13 double font_size_override = 0.0, bool skip_italics = false);
14 ~FontSet();
16 XftFont* xft_font_for(const Style& style) {
17 return xft_fonts[style.italic << 1 | style.bold];
19 XftFont* plain_xft_font() { return xft_fonts[0]; }
20 int ascent() { return xft_fonts[0]->ascent; }
21 int height() { return xft_fonts[0]->height; }
23 double used_font_size;
25 protected:
26 Display* display;
27 XftFont* xft_fonts[4];