summaryrefslogtreecommitdiff
path: root/src/fl_set_fonts_xft.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2011-10-01 15:42:39 +0000
committerMatthias Melcher <fltk@matthiasm.com>2011-10-01 15:42:39 +0000
commit8709753e1b9d3292a2dbf2bebde38777ea1eef71 (patch)
treefef9d96e50f5e0e769fef217b2e58eb74a52ac58 /src/fl_set_fonts_xft.cxx
parentdde4dbd61f5b8efd2ac5a995e896a4ed8a58140d (diff)
STR 2701: more tolerant Xft Font Attribute interpretation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9108 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_set_fonts_xft.cxx')
-rw-r--r--src/fl_set_fonts_xft.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fl_set_fonts_xft.cxx b/src/fl_set_fonts_xft.cxx
index 508640762..fcb217673 100644
--- a/src/fl_set_fonts_xft.cxx
+++ b/src/fl_set_fonts_xft.cxx
@@ -122,7 +122,7 @@ static void make_raw_name(char *raw, char *pretty)
while ((style) && (style < last))
{
int type;
- while ((*style == '=') || (*style == ' ') || (*style == '\t'))
+ while ((*style == '=') || (*style == ' ') || (*style == '\t') || (*style == ','))
{
style++; // Start of Style string
if ((style >= last) || (*style == 0)) continue;
@@ -165,7 +165,7 @@ static void make_raw_name(char *raw, char *pretty)
goto NEXT_STYLE;
} // switch end
NEXT_STYLE:
- while ((*style != ' ') && (*style != '\t'))
+ while ((*style != ' ') && (*style != '\t') && (*style != ','))
{
style++;
if ((style >= last) || (*style == 0)) goto STYLE_DONE;
@@ -276,10 +276,12 @@ Fl_Font Fl::set_fonts(const char* pattern_name)
first = (char *)font; // name is just what was returned
}
// Truncate the name after the (english) modifiers description
- if (stop)
- {
- *stop = 0; // Terminate the string at the first comma, if there is one
- }
+ // Matt: Actually, there is no guarantee that the *first* description is the English one.
+ // Matt: So we keep the entire description, just in case.
+ //if (stop)
+ //{
+ // *stop = 0; // Terminate the string at the first comma, if there is one
+ //}
// Copy the font description into our list
if (first == (char *)font)