Back to index

texmacs  1.0.7.15
Functions
load_tex.hpp File Reference
#include "load_tfm.hpp"
#include "load_pk.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void load_tex (string family, int size, int dpi, int dsize, tex_font_metric &tfm, font_glyphs &pk)

Function Documentation

void load_tex ( string  family,
int  size,
int  dpi,
int  dsize,
tex_font_metric &  tfm,
font_glyphs &  pk 
)

Definition at line 284 of file load_tex.cpp.

{
  bench_start ("load tex font");
  if (DEBUG_VERBOSE)
    cout << "TeXmacs] loading " << family << size
        << " at " << dpi << " dpi\n";
  if (load_tex_tfm (family, size, dsize, tfm) &&
      load_tex_pk (family, size, dpi, dsize, tfm, pk))
    {
      bench_cumul ("load tex font");
      rubber_fix (tfm, pk);
      return;
    }
  if (DEBUG_VERBOSE) {
    cout << "TeXmacs] font " << family << size
         << " at " << dpi << " dpi not found\n";
    cout << "TeXmacs] loading ecrm" << size
        << " at " << dpi << " dpi instead\n";
  }
  if (load_tex_tfm ("ecrm", size, 10, tfm) &&
      load_tex_pk ("ecrm", size, dpi, 10, tfm, pk))
    {
      bench_cumul ("load tex font");
      return;
    }
#ifdef OS_WIN32
  else {
    string name= family * as_string (size) * "@" * as_string (dpi);
    cerr << "\n\nCould not open font " << name << "\nLoading default" << LF;
    cout << "Could not load font...\nLoading default" << LF;
    XNoTexWarn();
    if (load_tex_tfm ("ecrm", 10, 10, tfm) &&
       load_tex_pk ("ecrm", 10, 600, 10, tfm, pk))
      {
       bench_cumul ("load tex font");
       return;
      }
  }
#endif
  string name= family * as_string (size) * "@" * as_string (dpi);
  cerr << "\n\nI could not open " << name << "\n";
  FAILED ("Tex seems not to be installed properly");
  bench_cumul ("load tex font");
}

Here is the call graph for this function:

Here is the caller graph for this function: