mod/maxgui.mod/fltkmaxgui.mod/src/fl_set_fonts_mac.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 "";}
    strlcpy(f->fontname, p, ENDOFBUFFER);
    int type = 0;
    if (strstr(f->name, "Bold")) type |= FL_BOLD;
    if (strstr(f->name, "Italic")) type |= FL_ITALIC;
    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 "";}
    strlcpy(f->fontname, p, ENDOFBUFFER);
    int type = 0;
    if (strstr(f->name, "Bold")) type |= FL_BOLD;
    if (strstr(f->name, "Italic")) type |= FL_ITALIC;
    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 " " ; } strlcpy ( f -> fontname , p , ENDOFBUFFER ) ; int type = 0 ; if ( strstr ( f -> name , " " ) ) type |= FL_BOLD ; if ( strstr ( f -> name , " " ) ) type |= FL_ITALIC ; 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 :