dvi2bitmap  dvi2bitmap1.0
Public Member Functions | Static Public Member Functions | List of all members
KarlPathSearcher Class Reference

Abstracts access to the kpathsea library. More...

#include <KarlPathSearcher.h>

Public Member Functions

const char * find (const char *font, int resolution)
 Finds a font at a given resolution. More...
 

Static Public Member Functions

static KarlPathSearchergetInstance (const char *name=0, const int basedpi=0)
 Returns an instance of the object which searches the TeX tree, using Karl's path-searching algorithm (KPSE). More...
 
static verbosities verbosity (const verbosities level)
 Sets the verbosity level. More...
 
static const char * version_string (void)
 Obtains the Kpathsea version. More...
 
static void setProgramName (const char *name)
 Sets the name of the invoking program. More...
 

Detailed Description

Abstracts access to the kpathsea library.

This class provides at singleton object which can service requests to the library.

Member Function Documentation

const char * KarlPathSearcher::find ( const char *  fontname,
int  resolution 
)

Finds a font at a given resolution.

Parameters
fontnamethe name of the font to search for
resolutionthe desired font resolution
Returns
the full path to the PK file which defines the font, or zero if the font cannot be found

References normal.

KarlPathSearcher * KarlPathSearcher::getInstance ( const char *  program_name = 0,
const int  basedpi = 0 
)
static

Returns an instance of the object which searches the TeX tree, using Karl's path-searching algorithm (KPSE).

Note that, although it looks as if you should be able to call this more than once with different parameters, you can't in fact, and if you call it more than once (that's fine and sensible) you get the same instance back each time. In fact, there's no good reason I can think of why you'd want to initialise this in different ways, so this isn't a problem in fact. The door remains open to this changing in future, though. About the only reason for giving non-default parameters here is to register a different program_name for the kpathsea library to use when reporting errors or warnings.

Parameters
program_namethe name to be used in kpathsea feedback; if zero, this default to the value set by setProgramName, and if that has not been set, to "tex"
basedpithe base resolution of the PK fonts; if zero, it is taken to be PkFont.dpiBase (a sensible default)

References PkFont::dpiBase().

static void KarlPathSearcher::setProgramName ( const char *  name)
inlinestatic

Sets the name of the invoking program.

This acts as the default for the initialising name parameter to method getInstance

Parameters
namethe name of the invoking program

Referenced by main().

verbosities KarlPathSearcher::verbosity ( const verbosities  level)
static

Sets the verbosity level.

As well as setting the intrinsic level of chatter for this class, it controls the amount of chatter from the libkpathsea library itself: if the level is above debug, then all kpathsea debugging information is switched on.

Parameters
levelthe desired verbosity level
Returns
the previous verbosity level

References debug.

Referenced by PkFont::verbosity().

const char * KarlPathSearcher::version_string ( void  )
static

Obtains the Kpathsea version.

Returns
the kpathsea version string

Referenced by main().


The documentation for this class was generated from the following files: