GNU bug report logs - #16028
24.3.50; Latest build completely breaks my thumnail frames code

Previous Next

Package: emacs;

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 #119 received at 16028 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16028 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#16028: 24.3.50;	Latest build completely breaks my thumnail
 frames code
Date: Tue, 10 Dec 2013 11:31:33 +0100
> Can you please test this on X?  I'd like to know if this is a Windows
> specific problem.

A simple way to reproduce this it in a proper bug report:

(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 'tool-bar-lines 0)
			    (cons 'menu-bar-lines 0)
			    (cons 'scroll-bar-width 6)))))

(enlarge-font-by -4)

martin




This bug report was last modified 11 years and 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.