*** empty log message ***
[bpt/emacs.git] / README.unicode
index 79613c9..4438cb1 100644 (file)
@@ -129,3 +129,74 @@ existing support and the extra stuff at
 
  * Old auto-save files, and similar files, such as Gnus drafts,
    containing non-ASCII characters probably won't be re-read correctly.
+
+
+
+New font handling mechanism with font backend method
+----------------------------------------------------
+
+This branch now contains new codes for handling fonts by multiple font
+backends.  The old font handling codes still exist completely parallel
+to the new codes, and the new codes are used only when you configure
+Emacs with the argument "--enable-font-backend" and run Emacs with the
+same argument.
+
+Which font backends to use can be specified by X resource
+"FontBackend".  For instance, if you want to use Xft fonts only,
+
+Emacs.FontBackend: xft
+
+will work.  If this resource is not set, Emacs tries to use all font
+backends available on your graphic device.
+
+The configure script, if invoked with "--enable-font-backend", checks
+existing of libraries freetype and fontconfig.  If they are both
+available, macro "USE_FONT_BACKEND" is defined in src/config.h.  In
+that case, the existing of Xft library is checked too.
+
+The new files are:
+       font.h -- header providing font-backend related structures
+               (most important ones are "struct font" and "struct
+               font_driver"), macros, and etc.
+       font.c -- main font handling code.
+       xfont.c -- font-driver on X for X core fonts.
+       ftfont.c -- generic font-driver for FreeType fonts providing
+               device-independent methods of struct font_driver.
+       xftfont.c -- font-driver on X using Xft for FreeType fonts
+               utilizing methods provided by ftfont.c.
+       ftxfont.c -- font-driver on X directly using FreeType fonts
+               utilizing methods provided by ftfont.c.
+
+So we already have codes for X.  For the other systems (w32 and mac),
+it seems that we need these files:
+       w32font.c -- font driver on w32 using Windows native fonts,
+               corresponding to xfont.c
+       atmfont.c -- font-driver on mac using ATM fonts, corresponding
+               to xfont.c
+As BDF fonts are currently used on w32, we may also implement these:
+       bdffont.c -- generic font-driver for BDF fonts, corresponding to
+               ftfont.c
+       bdfw32font.c -- font-driver on w32 using BDF fonts,
+               corresponding to ftxfont.c
+But, as FreeType already supports BDF fonts, if FreeType and
+Fontconfig are also available on w32, what we need may be:
+       ftw32font.c -- font-driver on w32 directly using FreeType fonts
+               utilizing methods provided by ftfont.c.
+
+And, for those to work, w32term.c (macterm.c) and w32fns.c (macfns.c)
+must be changed by the similar way as xterm.c and xfns.c (the parts
+"#ifdef USE_FONT_BACKEND" ... "#endif" should be checked).
+
+It may be interesting if Emacs supports a frame buffer directly and
+have these font driver.
+       ftfbfont.c -- font-driver on FB for FreeType fonts.
+       bdffbfont.c -- font-driver on FB for BDF fonts.
+
+Note: The fontset related codes are not yet matuared to work well with
+the font backend method.  So, for instance, even if you start Emacs
+as something like this:
+  % emacs --enable-font-backend -fn tahoma
+Non-ASCII Latin characters will not be displayed by the font "tahoma".
+In such a case, please try this:
+
+(set-fontset-font "fontset-default" 'latin '("tahoma" . "unicode-bmp"))