summaryrefslogtreecommitdiff
path: root/src/fl_set_font.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-09-13 22:33:03 +0000
committerFabien Costantini <fabien@onepost.net>2008-09-13 22:33:03 +0000
commit9bf19e2329a51f68b2f6b9c2d65db87ab3698f76 (patch)
tree4949368ed1aa08e8a6ecda0958788081a97f1a96 /src/fl_set_font.cxx
parent4159c97e420fd9cd66024a9b71aa5d143cc1b2db (diff)
WP1 merged from my branch, WP2 reserved, todo list updated.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_set_font.cxx')
-rw-r--r--src/fl_set_font.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/fl_set_font.cxx b/src/fl_set_font.cxx
index 180d3bb87..4421ee86b 100644
--- a/src/fl_set_font.cxx
+++ b/src/fl_set_font.cxx
@@ -36,7 +36,10 @@
#include <stdlib.h>
static int table_size;
-
+/**
+ Changes a face. The string pointer is simply stored,
+ the string is not copied, so the string must be in static memory.
+*/
void Fl::set_font(Fl_Font fnum, const char* name) {
while (fnum >= table_size) {
int i = table_size;
@@ -78,11 +81,15 @@ void Fl::set_font(Fl_Font fnum, const char* name) {
s->first = 0;
fl_font(-1, 0);
}
-
+/** Copies one face to another. */
void Fl::set_font(Fl_Font fnum, Fl_Font from) {
Fl::set_font(fnum, get_font(from));
}
-
+/**
+ Get the string for this face. This string is different for each
+ face. Under X this value is passed to XListFonts to get all the sizes
+ of this face.
+*/
const char* Fl::get_font(Fl_Font fnum) {return fl_fonts[fnum].name;}
//