mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_win32.cxx
const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
  Fl_Fontdesc *f = fl_fonts + fnum;
  if (!f->fontname[0]) {
    const char* p = f->name;
    if (!p || !*p) {if (ap) *ap = 0; return "";}
    int type;
    switch (*p) {
    case 'B': type = FL_BOLD; break;
    case 'I': type = FL_ITALIC; break;
    case 'P': type = FL_BOLD | FL_ITALIC; break;
    default:  type = 0; break;
    }
    strlcpy(f->fontname, p+1, ENDOFBUFFER);
    if (type & FL_BOLD) strlcat(f->fontname, " bold", ENDOFBUFFER);
    if (type & FL_ITALIC) strlcat(f->fontname, " italic", ENDOFBUFFER);
    f->fontname[ENDOFBUFFER] = (char)type;
  }
  if (ap) *ap = f->fontname[ENDOFBUFFER];
  return f->fontname;
}
// turn a stored font name into a pretty name:
turn a stored font name into a pretty name.
turn a stored font name into a pretty name .
const char* Fl::get_font_name(Fl_Font fnum, int* ap) {
  Fl_Fontdesc *f = fl_fonts + fnum;
  if (!f->fontname[0]) {
    const char* p = f->name;
    if (!p || !*p) {if (ap) *ap = 0; return "";}
    int type;
    switch (*p) {
    case 'B': type = FL_BOLD; break;
    case 'I': type = FL_ITALIC; break;
    case 'P': type = FL_BOLD | FL_ITALIC; break;
    default:  type = 0; break;
    }
    strlcpy(f->fontname, p+1, ENDOFBUFFER);
    if (type & FL_BOLD) strlcat(f->fontname, " bold", ENDOFBUFFER);
    if (type & FL_ITALIC) strlcat(f->fontname, " italic", ENDOFBUFFER);
    f->fontname[ENDOFBUFFER] = (char)type;
  }
  if (ap) *ap = f->fontname[ENDOFBUFFER];
  return f->fontname;
}
const char * Fl :: get_font_name ( Fl_Font fnum , int * ap ) { Fl_Fontdesc * f = fl_fonts + fnum ; if ( ! f -> fontname [ 0 ] ) { const char * p = f -> name ; if ( ! p || ! * p ) { if ( ap ) * ap = 0 ; return " " ; } int type ; switch ( * p ) { case ' ' : type = FL_BOLD ; break ; case ' ' : type = FL_ITALIC ; break ; case ' ' : type = FL_BOLD | FL_ITALIC ; break ; default : type = 0 ; break ; } strlcpy ( f -> fontname , p + 1 , ENDOFBUFFER ) ; if ( type & FL_BOLD ) strlcat ( f -> fontname , " " , ENDOFBUFFER ) ; if ( type & FL_ITALIC ) strlcat ( f -> fontname , " " , ENDOFBUFFER ) ; f -> fontname [ ENDOFBUFFER ] = ( char ) type ; } if ( ap ) * ap = f -> fontname [ ENDOFBUFFER ] ; return f -> fontname ; }
turn a stored font name into a pretty name:
turn a stored font name into a pretty name :