unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: 59243@debbugs.gnu.org
Cc: Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#59243: 28.2.50; Larger Fringe Bitmaps
Date: Sun, 13 Nov 2022 11:08:19 +0100	[thread overview]
Message-ID: <9fc85987-cc78-2f9b-60e1-b893dbe9b848@daniel-mendler.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

Dear Emacs maintainers,

on Emacs 28, when using large screens, I find the fringe bitmaps
barely recognizable. I've seen there has been a previous discussion
about using characters for the fringe, such that we get scaling, but
this seems to be a longer term effort.

For now if we want to stick to bitmaps of width 8, we could still do
a bit better by using thicker lines, by using the space more
completely and by increasing the height of the bitmaps slightly.

Please consider the fringe bitmaps I've defined in bigger-fringe.el.
This is a cheap change which nevertheless should increase
accessibility a little bit. I override the bitmaps defined in
fringe.c, flymake.el, diff.el and diff-hl.el. The file
bigger-fringe.el contains the command `fringe-bitmap-test', which
I've used to create a screenshot of the updated fringe bitmaps. I've
attached the screenshot for comparison.

[-- Attachment #2: screenshot.png --]
[-- Type: image/png, Size: 76083 bytes --]

[-- Attachment #3: bigger-fringe.el --]
[-- Type: text/plain, Size: 7281 bytes --]

(package-initialize)
(require 'flymake)
;;(require 'diff-hl)
(require 'diff-mode)

(defun fringe-bitmap-test ()
  (interactive)
  (pop-to-buffer (get-buffer-create "*fringe-bitmap-test*"))
  (erase-buffer)
  (dolist (bitmap fringe-bitmaps)
    (insert (format "%s %s\n%s"
                    (propertize "x" 'display `(left-fringe ,bitmap error))
                    bitmap
                    (propertize "\n" 'face '(:height 1))))))

(define-fringe-bitmap 'empty-line
  [#b00000000
   #b11111111
   #b00000000]
  nil nil '(top t))

(define-fringe-bitmap 'right-curly-arrow
  [#b01111100
   #b01111110
   #b00000011
   #b00000011
   #b00000011
   #b01000011
   #b01100111
   #b01101111
   #b01111110
   #b01111000
   #b01111110
   #b01111111])

(define-fringe-bitmap 'left-curly-arrow
  [#b00111110
   #b01111110
   #b11000000
   #b11000000
   #b11000000
   #b11000010
   #b11100110
   #b11110110
   #b01111110
   #b00011110
   #b01111110
   #b11111110])

(define-fringe-bitmap 'hollow-rectangle
  [#b11111111
   #b11111111
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11111111
   #b11111111])

(define-fringe-bitmap 'vertical-bar
  [#b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000])

(define-fringe-bitmap 'horizontal-bar
  [#b11111111
   #b11111111
   #b11111111]
  nil nil 'bottom)

(define-fringe-bitmap 'filled-rectangle
  [#b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111])

(define-fringe-bitmap 'filled-square
  [#b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111
   #b11111111])

(define-fringe-bitmap 'hollow-square
  [#b11111111
   #b11111111
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11000011
   #b11111111
   #b11111111])

(define-fringe-bitmap 'down-arrow
  [#b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b11011011
   #b11011011
   #b11111111
   #b01111110
   #b00111100
   #b00011000])

(define-fringe-bitmap 'up-arrow
  [#b00011000
   #b00111100
   #b01111110
   #b11111111
   #b11011011
   #b11011011
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000
   #b00011000])

(define-fringe-bitmap 'right-arrow
  [#b01100000
   #b01110000
   #b00111000
   #b00011100
   #b00001110
   #b11111111
   #b11111111
   #b00001110
   #b00011100
   #b00111000
   #b01110000
   #b01100000])

(define-fringe-bitmap 'left-arrow
  [#b00000110
   #b00001110
   #b00011100
   #b00111000
   #b01110000
   #b11111111
   #b11111111
   #b01110000
   #b00111000
   #b00011100
   #b00001110
   #b00000110])

(define-fringe-bitmap 'bottom-right-angle
  [#b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b11111111
   #b11111111
   #b11111110]
  nil nil 'bottom)

(define-fringe-bitmap 'top-right-angle
  [#b11111110
   #b11111111
   #b11111111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111]
  nil nil 'top)

(define-fringe-bitmap 'bottom-left-angle
  [#b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11111111
   #b11111111
   #b01111111]
  nil nil 'top)

(define-fringe-bitmap 'top-left-angle
  [#b01111111
   #b11111111
   #b11111111
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000]
  nil nil 'top)

(define-fringe-bitmap 'left-bracket
  [#b01111111
   #b11111111
   #b11111111
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11100000
   #b11111111
   #b11111111
   #b01111111])

(define-fringe-bitmap 'right-bracket
  [#b11111110
   #b11111111
   #b11111111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b00000111
   #b11111111
   #b11111111
   #b11111110])

(define-fringe-bitmap 'exclamation-mark
  [#b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00111000
   #b00000000
   #b00000000
   #b00111000
   #b00111000
   #b00111000])

(define-fringe-bitmap 'left-triangle
  [#b00000011
   #b00000111
   #b00001111
   #b00011111
   #b00111111
   #b01111111
   #b11111111
   #b11111111
   #b01111111
   #b00111111
   #b00011111
   #b00001111
   #b00000111
   #b00000011])

(define-fringe-bitmap 'right-triangle
  [#b11000000
   #b11100000
   #b11110000
   #b11111000
   #b11111100
   #b11111110
   #b11111111
   #b11111111
   #b11111110
   #b11111100
   #b11111000
   #b11110000
   #b11100000
   #b11000000])

(define-fringe-bitmap 'question-mark
  [#b00111100
   #b01111110
   #b11101111
   #b11100111
   #b11100111
   #b11100111
   #b00000111
   #b00001110
   #b00011100
   #b00011100
   #b00111000
   #b00111000
   #b00000000
   #b00000000
   #b00111000
   #b00111000
   #b00111000])

(with-eval-after-load 'diff-mode
  (define-fringe-bitmap 'diff-fringe-add
    [#b00011000
     #b00011000
     #b00011000
     #b11111111
     #b11111111
     #b00011000
     #b00011000
     #b00011000])

  (define-fringe-bitmap 'diff-fringe-del
    [#b11111111
     #b11111111
     #b11111111])

  (define-fringe-bitmap 'diff-fringe-rep
    [#b00111000
     #b00111000
     #b00111000
     #b00111000
     #b00111000
     #b00111000
     #b00111000
     #b00111000
     #b00000000
     #b00000000
     #b00111000
     #b00111000
     #b00111000]))

(with-eval-after-load 'flymake
  (define-fringe-bitmap 'flymake-double-exclamation-mark
    [#b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b11100111
     #b00000000
     #b00000000
     #b11100111
     #b11100111
     #b11100111]))

(advice-add 'diff-hl-define-bitmaps :after
            (lambda ()
              (define-fringe-bitmap 'diff-hl-bmp-insert
                [#b00011000
                 #b00011000
                 #b00011000
                 #b11111111
                 #b11111111
                 #b00011000
                 #b00011000
                 #b00011000])

              (define-fringe-bitmap 'diff-hl-bmp-delete
                [#b11111111
                 #b11111111
                 #b11111111])

              (define-fringe-bitmap 'diff-hl-bmp-i
                [#b00111000
                 #b00111000
                 #b00111000
                 #b00000000
                 #b00000000
                 #b00111000
                 #b00111000
                 #b00111000
                 #b00111000
                 #b00111000
                 #b00111000
                 #b00111000
                 #b00111000])))

             reply	other threads:[~2022-11-13 10:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13 10:08 Daniel Mendler [this message]
2022-11-13 11:47 ` bug#59243: 28.2.50; Larger Fringe Bitmaps Eli Zaretskii
2022-11-13 13:08   ` Daniel Mendler
2022-11-13 13:48     ` Eli Zaretskii
2022-11-13 17:49 ` Juri Linkov
2022-11-13 18:17   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9fc85987-cc78-2f9b-60e1-b893dbe9b848@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=59243@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).