diff --git a/modules/gmt/modgmt_structs.h b/modules/gmt/modgmt_structs.h index 3dac6ed..114dbb5 100644 --- a/modules/gmt/modgmt_structs.h +++ b/modules/gmt/modgmt_structs.h @@ -828,11 +828,12 @@ struct gmt_font: public gmt_struct { WordList::const_iterator ci; WordList wl=Split(str,",",true); + std::string fakeerr; // Defaults size=default_size; family=default_family; - color.Convert(0,err); // Black + color.Convert(0,fakeerr); // Black if(wl.size()>3) {err="String "+str+" is not font string"; return false;} // String is [size][,family][,color] or [family][,color] ci=wl.begin(); @@ -840,7 +841,11 @@ struct gmt_font: public gmt_struct { Value2Width s(*ci); bool suc=true; - {std::string fake; size=s(&suc,fake);} + { + std::string fake; + double newsize=s(&suc,fake); + if(suc) size=newsize; + } if(!suc) // Parse error. check if argument is font name { if(0==families.count(*ci)) return false; // No, argument is not allowed font name