On 17 Jan 2012, at 07:58, Christian Schmitz wrote:

> 
> Am 17.01.2012 um 00:02 schrieb Ian M. Jones:
> 
>> Hi,
>> 
>> Is there anything I should be doing to get text on the chart axis in Linux?
> 
> 
> Did you use SetFontSearchPath to specify a font folder?
> 
> Greetings
> Christian
> 

Thanks Christian, I knew there had to be something extra to do in Linux.

The following worked after I installed the ttf-liberation fonts via aptitude:

  // If target is Linux, need to tell ChartDirector where to find some fonts.
  if TargetLinux then
    CDBaseChartMBS.SetFontSearchPath "/usr/share/fonts/truetype/ttf-liberation"
  end if
  
  // Create chart.
  dim c as new CDXYChartMBS(ChartImageView.Width, ChartImageView.Height)
  
  // If target is Linux, need to tell ChartDirector which fonts from font 
search path to use for the different font styles.
  if TargetLinux then
    c.setDefaultFonts("LiberationSans-Regular.ttf", "LiberationSans-Bold.ttf", 
"LiberationSans-Italic.ttf", "LiberationSans-BoldItalic.ttf")
  end if
  
The one thing that stumped me for a little bit was working out how to specify 
the fonts, in your documentation for CDBaseChartMBS.setDefaultFonts and in 
other functions you say "See Font Specification for details on various font 
attributes." but there is no link to it. So I had to do a site specific search 
on google to find the actual documentation for Font Specification to find out 
that the actual font file name is used. It would be great if you could link to 
that page to help others who have to specify fonts too.

Thanks again for the help.

Ian
________________________________________
IMiJ Ltd
http://www.imij.co.uk
http://www.ianmjones.com
http://twitter.com/ianmjones


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to