Search code examples
emacsdot-emacs

How to use BDF fonts in Emacs for Windows


When trying to use a modified version of the Lisp snippet from the GNU Emacs FAQ (http://www.gnu.org/software/emacs/windows/Fonts-and-text-translation.html section 5.4) to load BDF fonts:

(setq bdf-directory-list '("~/fonts"))
(setq w32-bdf-filename-alist (w32-find-bdf-fonts bdf-directory-list))

I get a (void-function w32-find-bdf-fonts) error. I've tried this with Emacs for Windows Modified version 23.3-modified-3 (http://vgoulet.act.ulaval.ca/en/emacs/windows) and with EmacsPortable (http://vgoulet.act.ulaval.ca/en/emacs/windows). I'm unable to find any function with that or similar names in the documentation and grepping the Emacs CVS tree for w32-find-bdf-fonts found only the FAQ entry, so I'm guessing it's the FAQ that's wrong. What is the correct code?


Solution

  • It appears that BDF fonts are no longer supported in Emacs 23 on Windows. Refer to etc/NEWS file (which you can access from emacs using C-h n):

    ** BDF fonts no longer supported on MS-Windows. The font backend was completely rewritten for this release. The focus on Windows has been getting acceptable performance and full unicode support, including complex script shaping for native Windows fonts. A rewrite of the BDF font support has not happened due to lack of time and developers. If demand still exists for such a backend even with the improved language support for native Windows fonts, future development in this direction will most likely be based on the freetype library, giving access to a wider range of font formats.