Back to index

texmacs  1.0.7.15
Classes | Functions
font.cpp File Reference
#include "font.hpp"
#include "gui.hpp"
#include "Freetype/tt_file.hpp"

Go to the source code of this file.

Classes

struct  error_font_rep

Functions

 RESOURCE_CODE (font)
font error_font (font fn)
int script (int sz, int level)
string default_chinese_font_name ()
string default_japanese_font_name ()
string default_korean_font_name ()

Function Documentation

Definition at line 195 of file font.cpp.

                             {
  if (tt_font_exists ("fireflysung")) return "fireflysung";
  if (tt_font_exists ("uming")) return "uming";
  if (tt_font_exists ("儷黑 Pro")) return "lihei";
  if (tt_font_exists ("华文细黑")) return "heiti";
  if (tt_font_exists ("simsun")) return "simsun";
  if (tt_font_exists ("SimSun")) return "apple-simsun";
  return "roman";
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 206 of file font.cpp.

                              {
  if (tt_font_exists ("ipam")) return "modern";
  if (tt_font_exists ("sazanami")) return "sazanami";
  if (tt_font_exists ("ttf-japanese-gothic")) return "ttf-japanese";
  if (tt_font_exists ("ヒラギノ明朝 ProN W6")) return "kaku";
  if (tt_font_exists ("MS PGothic")) return "ms-gothic";
  if (tt_font_exists ("MS PMincho")) return "ms-mincho";
  return "roman";  
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 217 of file font.cpp.

                            {
  if (tt_font_exists ("unbatang")) return "modern";
  if (tt_font_exists ("UnBatang")) return "modern";
  if (tt_font_exists ("AppleGothic")) return "apple-gothic";
  if (tt_font_exists ("Gulim")) return "gulim";
  return "roman";
}

Here is the call graph for this function:

Here is the caller graph for this function:

font error_font ( font  fn)

Definition at line 176 of file font.cpp.

                     {
  string name= "error-" * fn->res_name;
  return make (font, name, tm_new<error_font_rep> (name, fn));
}

Here is the caller graph for this function:

RESOURCE_CODE ( font  )
int script ( int  sz,
int  level 
)

Definition at line 186 of file font.cpp.

                           {
  int i;
  if (level<0) level=0;
  if (level>2) level=2;
  for (i=0; i<level; i++) sz= (sz*2+2)/3;
  return sz;
}

Here is the caller graph for this function: