Function: frame-char-width

frame-char-width is a function defined in frame.c.

Signature

(frame-char-width &optional FRAME)

Documentation

Width in pixels of characters in the font in frame FRAME.

If FRAME is omitted or nil, the selected frame is used. On a graphical screen, the width is the standard width of the default font. For a terminal screen, the value is always 1.

View in manual

Probably introduced at or before Emacs version 19.23.

Aliases

ediff-frame-char-width (obsolete since 27.1)

Source Code

// Defined in /usr/src/emacs/src/frame.c
{
#ifdef HAVE_WINDOW_SYSTEM
  struct frame *f = decode_any_frame (frame);

  if (FRAME_WINDOW_P (f))
    return make_fixnum (FRAME_COLUMN_WIDTH (f));
  else
#endif
    return make_fixnum (1);
}