Пример #1
0
void
revert_command (Widget w, XtPointer client_data, XtPointer call_data)
{
  char_type *c;
  font_type *f = (font_type *) client_data;
  charcode_type code = FONT_CURRENT_CHARCODE (*f);
  char_type *original = FONT_CHAR (*f, code);
  
  /* Set the pointer in the font structure to null, so `read_char' will
     have to reread the character.  */
  FONT_CHAR (*f, code) = NULL;
  
  /* Reread the character.  */
  c = read_char (*f, code);
  if (c == NULL)
    FATAL2 ("xbfe: Character %d has somehow been deleted from `%s'",
            FONT_CURRENT_CHARCODE (*f), FONT_NAME (*f));

  show_char (XtParent (w), f, c);

  /* Release the storage the current character is using.  We must do
     this after rereading the character from the font, so that the same
     memory is not used.  If that happens, `bitmap_set_values' thinks
     nothing has changed.  */
  free_bitmap (&BCHAR_BITMAP (*original));
  free (original);
}
Пример #2
0
/**
 * Returns the display name of a GUI element whose font can be configured.
 * @param	ce	The GUI element
 * @return	A name used in the font configuration page
 */
QString KScopeConfig::getFontName(FontElement ce) const
{
	return FONT_NAME(ce);
}