Exemple #1
0
void
kpathsea_init_prog (kpathsea kpse, const_string prefix,  unsigned dpi,  
                    const_string mode, const_string fallback)
{
  string font_var = concat (prefix, "FONTS");
  string header_var = concat (prefix, "HEADERS");
  string makepk_var = concat (prefix, "MAKEPK");
  string size_var = concat (prefix, "SIZES");
  
  /* Do both `pk_format' and `any_glyph_format' for the sake of xdvi; in
     general, mktexpk might apply to either, and the program will ask
     for the one it wants.  */
     
  /* Might have a program-specific name for mktexpk itself.  */
  if (getenv (makepk_var)) {
  /* If we did, we want to enable the program, I think.  */
    kpathsea_set_program_enabled (kpse, kpse_pk_format, 1, kpse_src_env);
    kpathsea_set_program_enabled (kpse, kpse_any_glyph_format, 1,kpse_src_env);

    kpse->format_info[kpse_pk_format].program
      = kpse->format_info[kpse_any_glyph_format].program
      = getenv (makepk_var);
  }

  /* A couple font paths have traditionally had application-specific
     environment variables to override all else; namely, XDVIFONTS and
     DVIPSHEADERS.  So set those if we have them.  */
  kpse->format_info[kpse_pk_format].override_path
    = kpse->format_info[kpse_gf_format].override_path
    = kpse->format_info[kpse_any_glyph_format].override_path
    = kpse->format_info[kpse_tfm_format].override_path
    = getenv (font_var);

  kpse->format_info[kpse_tex_ps_header_format].override_path
    = getenv (header_var);

  kpathsea_init_fallback_resolutions (kpse, size_var);
  kpathsea_xputenv_int (kpse, "MAKETEX_BASE_DPI", dpi);
  kpse->fallback_font = fallback;
  
  /* Ugliness.  See comments in kpse_make_tex in kpathsea/tex-make.c.  */
  kpathsea_xputenv (kpse, "MAKETEX_MODE", mode ? mode : DIR_SEP_STRING);
  
  free (font_var);
  free (header_var);
  free (makepk_var);
  free (size_var);
}
Exemple #2
0
void
kpse_init_fallback_resolutions ( string envvar)
{
  kpathsea_init_fallback_resolutions (kpse_def,  envvar);
}