summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-09-23 13:56:07 +0000
committerManolo Gouy <Manolo>2016-09-23 13:56:07 +0000
commit0250c5a98af506f2f107f8bd2e9e2c2c87a10c10 (patch)
tree161771fa546b05f2d7fad1f5d67d831e00c6425c /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
parent63e33b1be3e2af253cd8adf10a5eac7e72a5fc7e (diff)
Move font-related member functions from Fl_Screen_Driver to Fl_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11968 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
index 0e5f8cb71..efc0d062d 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
@@ -19,7 +19,6 @@
// Select fonts from the FLTK font table.
#include "../../flstring.h"
#include "Fl_Xlib_Graphics_Driver.H"
-#include "../X11/Fl_X11_Screen_Driver.H"
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include <FL/x.H>
@@ -44,7 +43,7 @@
#define USE_OVERLAY 0
// turn a stored font name in "fltk format" into a pretty name:
-const char* Fl_X11_Screen_Driver::get_font_name(Fl_Font fnum, int* ap) {
+const char* Fl_Xlib_Graphics_Driver::get_font_name(Fl_Font fnum, int* ap) {
Fl_Fontdesc *f = fl_fonts + fnum;
if (!f->fontname[0]) {
const char* p = f->name;
@@ -218,7 +217,7 @@ static int fl_free_font = FL_FREE_FONT;
// Also, for now I'm ignoring the "pattern_name" and just getting everything...
// AND I don't try and skip the fonts we've already loaded in the defaults.
// Blimey! What a hack!
-Fl_Font Fl_X11_Screen_Driver::set_fonts(const char* pattern_name)
+Fl_Font Fl_Xlib_Graphics_Driver::set_fonts(const char* pattern_name)
{
FcFontSet *fnt_set; // Will hold the list of fonts we find
FcPattern *fnt_pattern; // Holds the generic "match all names" pattern
@@ -364,11 +363,11 @@ static int int_sort(const void *aa, const void *bb) {
// Return all the point sizes supported by this font:
// Suprisingly enough Xft works exactly like fltk does and returns
// the same list. Except there is no way to tell if the font is scalable.
-int Fl_X11_Screen_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) {
+int Fl_Xlib_Graphics_Driver::get_font_sizes(Fl_Font fnum, int*& sizep) {
Fl_Fontdesc *s = fl_fonts+fnum;
if (!s->name) s = fl_fonts; // empty slot in table, use entry 0
- open_display();
+ fl_open_display();
XftFontSet* fs = XftListFonts(fl_display, fl_screen,
XFT_FAMILY, XftTypeString, s->name+1,
(void *)0,