GNU bug report logs -
#16028
24.3.50; Latest build completely breaks my thumnail frames code
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Mon, 2 Dec 2013 15:53:02 UTC
Severity: normal
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #122 received at 16028 <at> debbugs.gnu.org (full text, mbox):
Yet simpler:
(defun enlarged-font-name (fontname frame increment)
"FONTNAME, after enlarging font size of FRAME by INCREMENT.
FONTNAME is the font of FRAME."
(when (query-fontset fontname)
(let ((ascii (assq 'ascii (aref (fontset-info fontname frame) 2))))
(when ascii (setq fontname (nth 2 ascii)))))
(let ((xlfd-fields (x-decompose-font-name fontname)))
(unless xlfd-fields (error "Cannot decompose font name"))
(let ((new-size (+ (string-to-number
(aref xlfd-fields xlfd-regexp-pixelsize-subnum))
increment)))
(unless (> new-size 0) (signal 'font-too-small (list new-size)))
(aset xlfd-fields xlfd-regexp-pixelsize-subnum
(number-to-string new-size)))
;; Set point size & width to "*", so frame width adjusts to new font
(aset xlfd-fields xlfd-regexp-pointsize-subnum "*")
(aset xlfd-fields xlfd-regexp-avgwidth-subnum "*")
(x-compose-font-name xlfd-fields)))
(defun enlarge-font-by (increment)
(let* ((old-font (cdr (assq 'font (frame-parameters (selected-frame)))))
(new-font (enlarged-font-name old-font (selected-frame) increment)))
(modify-frame-parameters
(selected-frame) (list (cons 'font new-font)
(cons 'scroll-bar-width 6)))))
(enlarge-font-by -4)
This bug report was last modified 11 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.