diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-14 08:15:50 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-14 08:15:50 +0200 |
| commit | 0fe118aa946a6c195d53b929a37be6c1cb3c1bd3 (patch) | |
| tree | 6f6574c9996cf40b804e2e317831243f8ef78a27 /src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | |
| parent | 4769e0085d7e259d68de1f4d22b6a83509fcad05 (diff) | |
Remove duplication of Pango standard font names
And move each array of standard font names to appropriate font-related source file
Diffstat (limited to 'src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx')
| -rw-r--r-- | src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx index d07baaf51..0084f8cdf 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx @@ -37,6 +37,30 @@ extern unsigned fl_cmap[256]; // defined in fl_color.cxx +// The predefined fonts that FLTK has with Pango: +static Fl_Fontdesc built_in_table[] = { + {"Sans"}, + {"Sans Bold"}, + {"Sans Italic"}, + {"Sans Bold Italic"}, + {"Monospace"}, + {"Monospace Bold"}, + {"Monospace Italic"}, + {"Monospace Bold Italic"}, + {"Serif"}, + {"Serif Bold"}, + {"Serif Italic"}, + {"Serif Bold Italic"}, + {"Standard Symbols PS"}, // FL_SYMBOL + {"Monospace"}, + {"Monospace Bold"}, + {"D050000L"}, // FL_ZAPF_DINGBATS +}; + + +FL_EXPORT Fl_Fontdesc *fl_fonts = built_in_table; + + // duplicated from Fl_PostScript.cxx struct callback_data { const uchar *data; @@ -70,6 +94,7 @@ static void draw_image_cb(void *data, int x, int y, int w, uchar *buf) { curdata += cb_data->D; } } +// end of duplicated part Fl_Cairo_Graphics_Driver::Fl_Cairo_Graphics_Driver() : Fl_Graphics_Driver() { @@ -1001,9 +1026,6 @@ int Fl_Cairo_Graphics_Driver::descent() { } -extern Fl_Fontdesc *fl_fonts; - - void Fl_Cairo_Graphics_Driver::init_built_in_fonts() { static int i = 0; if (!i) { |
