From: <ai...@us...> - 2007-09-06 07:54:37
|
Revision: 7834 http://plplot.svn.sourceforge.net/plplot/?rev=7834&view=rev Author: airwin Date: 2007-09-06 00:54:41 -0700 (Thu, 06 Sep 2007) Log Message: ----------- Use same default font names as psttf device driver. Remove "if(familyLookup[i] == NULL){" logic since i is not defined. (This bug fix is required to get same font selection as psttf device driver. In particular the font environment variables don't work at all without this bug fix.) Modified Paths: -------------- trunk/drivers/cairo.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2007-09-06 05:59:27 UTC (rev 7833) +++ trunk/drivers/cairo.c 2007-09-06 07:54:41 UTC (rev 7834) @@ -122,11 +122,11 @@ #define NPANGOLOOKUP 5 const char *defaultFamilyLookup[NPANGOLOOKUP] = { - "Sans", - "Serif", - "Monospace", - "Sans", - "Sans" + "Arial,Bitstream-Vera-Sans,sans", + "Times-Roman,Bitstream-Vera-Serif,serif", + "Courier,Bitstream-Vera-Sans-Mono,monospace", + "Arial,Bitstream-Vera-Sans,sans,serif", + "Arial,Bitstream-Vera-Sans,sans,serif" }; const char *envFamilyLookup[NPANGOLOOKUP] = { @@ -646,15 +646,13 @@ // Initialize font table with either enviroment variables or defaults. // This was copied from the psttf driver. - if(familyLookup[i] == NULL){ - for(i=0;i<NPANGOLOOKUP;i++){ - if((a = getenv(envFamilyLookup[i])) != NULL){ - strcpy(familyLookup[i],a); - } - else { - strcpy(familyLookup[i],defaultFamilyLookup[i]); - } + for(i=0;i<NPANGOLOOKUP;i++){ + if((a = getenv(envFamilyLookup[i])) != NULL){ + strcpy(familyLookup[i],a); } + else { + strcpy(familyLookup[i],defaultFamilyLookup[i]); + } } // Allocate a cairo stream structure This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |