Is It Possible To Replace Fringe Bitmaps With Text in Emacs?

前端 未结 2 1191
自闭症患者
自闭症患者 2021-01-12 13:28

I\'d love to replace the ugly pixel arrows indicating truncated or wrapped lines with simple, tasteful text (maybe even a nice unicode character, like a \\u2026

2条回答
  •  抹茶落季
    2021-01-12 13:46

    No, it is not. Fringe “bitmaps” are really bitmaps, that is vectors of 0/1 bits, overlayed over the fringe. There is no way to directly render arbitrary unicode characters onto the fringe.

    What you can do, is to render a unicode character into a 0/1 bitmap yourself. Any decent image editor (e.g. Gimp, Photoshop, Pixelmator, Paint.net, etc.) can do this. Then convert this bitmap into an fringe bitmap vector. The format of fringe bitmaps is described in Customizing Fringe Bitmaps.

    Eventually you can use these bitmap vectors to replace the left-arrow, right-arrow (for truncated lines), left-curly-arrow, and right-curly-arrow (for continued lines) bitmaps, using the function define-fringe-bitmap.

    However, I'd say that this is more hassle than it is worth. The fringe is 8 pixels wide, so you'd have to squeeze your beautiful unicode character into an 8x8 bitmap. This means no subpixel rendering, no aliasing, no bytecode rendering, nothing of what makes characters on the screen nice and fancy. It'd be just as ugly as the arrows you have replaced.

提交回复
热议问题