Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxPdfDocument::SetFontPath ( const wxString &  fontPath = wxEmptyString ) [virtual]

Sets the default path for font definition files.

wxPdfDocument uses XML font definition files for embedding fonts. The definition file (and the font file itself when embedding) must be present in the path set by SetFontPath.

Parameters:
fontPaththe path to be used as the default font file path If an empty string is passed the default path is set to the path specified by the environment variable WXPDF_FONTPATH. If WXPDF_FONTPATH does not exist, the subdirectory 'fonts' of the current working directory is used instead.

Definition at line 580 of file pdfdoc.cpp.

References m_fontPath.

Referenced by wxPdfDocument().

{
  if (fontPath != wxEmptyString)
  {
    m_fontPath = fontPath;
  }
  else
  {
    wxString localFontPath;
    if (!wxGetEnv(_T("WXPDF_FONTPATH"), &localFontPath))
    {
      localFontPath = wxGetCwd();
      if (!wxEndsWithPathSeparator(localFontPath))
      {
        localFontPath += wxFILE_SEP_PATH;
      }
      localFontPath += _T("fonts");
    }
    m_fontPath = localFontPath;
  }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index