groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] new backend for UTF-8 output


From: Bruno Haible
Subject: [Groff] new backend for UTF-8 output
Date: Mon, 10 Jan 2000 12:38:47 +0100 (MET)

Hello,

Here is a patch which enables groff to produce UTF-8 encoded Unicode output,
for use on ttys like the UTF-8 enabled xterm. It introduces a new option
"-Tutf8", similar to "-Tlatin1". The behaviour of existing backends is not
changed.

                  Bruno


2000-01-08  Bruno Haible  <address@hidden>

        * devutf8/Makefile.sub, devutf8/DESC.proto, devutf8/R.proto: New files.
        * Makefile.in (DEVDIRS): Add devutf8.
        * grotty/tty.cc: Include device.h.
          (glyph): Change type of 'code' to 'unsigned int'.
          (tty_printer): New field is_utf8. Constructor takes device argument.
          (tty_printer::tty_printer): If device if "utf8", set is_utf8.
          (tty_printer::add_char): Change type of first arg to 'unsigned int'.
          (tty_printer::put_char): New function.
          (tty_printer::end_page): Use put_char instead of ::putchar.
          (make_printer): Pass device to tty_printer constructor.
        * nroff.sh: Determine default device by calling 'locale'. As a
          fallback, look at all of $LC_ALL, $LC_CTYPE, $LANG, $LESSCHARSET.
          Recognize UTF-8 locales.
        * tmac/eqnrc: Recognize utf8 like latin1.
        * tmac/troffrc: Device utf8 needs tmac.tty.

diff -r -c3 groff-1.15.orig/Makefile.in groff-1.15/Makefile.in
*** groff-1.15.orig/Makefile.in Sat Dec 18 13:00:01 1999
--- groff-1.15/Makefile.in      Fri Jan  7 00:48:25 2000
***************
*** 1,4 ****
! # Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  #      Written by James Clark (address@hidden)
  # 
  # This file is part of groff.
--- 1,4 ----
! # Copyright (C) 1989-2000 Free Software Foundation, Inc.
  #      Written by James Clark (address@hidden)
  # 
  # This file is part of groff.
***************
*** 255,262 ****
    grohtml
  CPROGDIRS=pfbtops psbb
  PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
! DEVDIRS=devps devdvi devascii devlatin1 devX75 devX75-12 devX100 devX100-12 \
!   devlj4 devhtml
  OTHERDIRS=man tmac afmtodit grog nroff mm
  ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS)
  EXTRADIRS=devps/generate devdvi/generate xditview doc
--- 255,262 ----
    grohtml
  CPROGDIRS=pfbtops psbb
  PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
! DEVDIRS=devps devdvi devascii devlatin1 devutf8 \
!   devX75 devX75-12 devX100 devX100-12 devlj4 devhtml
  OTHERDIRS=man tmac afmtodit grog nroff mm
  ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDIRS)
  EXTRADIRS=devps/generate devdvi/generate xditview doc
diff -r -c3 groff-1.15.orig/doc/groff.texinfo groff-1.15/doc/groff.texinfo
*** groff-1.15.orig/doc/groff.texinfo   Thu Dec  9 10:42:29 1999
--- groff-1.15/doc/groff.texinfo        Fri Jan  7 00:44:21 2000
***************
*** 967,973 ****
  @item ascii
  For typewriter-like devices.
  @item latin1
! For typewriter-like devices using the ISO Latin-1 character set.
  @item lj4
  For an HP LaserJet4-compatible (or other PCL5-compatible) printer.
  @item html
--- 967,976 ----
  @item ascii
  For typewriter-like devices.
  @item latin1
! For typewriter-like devices using the ISO Latin-1 (ISO 8859-1) character set.
! @item utf8
! For typewriter-like devices using the Unicode (ISO 10646) character set with
! UTF-8 encoding.
  @item lj4
  For an HP LaserJet4-compatible (or other PCL5-compatible) printer.
  @item html
diff -r -c3 groff-1.15.orig/eqn/eqn.man groff-1.15/eqn/eqn.man
*** groff-1.15.orig/eqn/eqn.man Fri May 21 06:50:42 1999
--- groff-1.15/eqn/eqn.man      Fri Jan  7 00:47:55 2000
***************
*** 1,5 ****
  .ig \"-*- nroff -*-
! Copyright (C) 1989-1995 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
--- 1,5 ----
  .ig \"-*- nroff -*-
! Copyright (C) 1989-2000 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
***************
*** 743,751 ****
  (This is typically changed to 1 by the
  .B eqnrc
  file for the
! .B ascii
! and
  .B latin1
  devices.)
  .LP
  A more precise description of the role of many of these
--- 743,752 ----
  (This is typically changed to 1 by the
  .B eqnrc
  file for the
! .BR ascii ,
  .B latin1
+ and
+ .B utf8
  devices.)
  .LP
  A more precise description of the role of many of these
diff -r -c3 groff-1.15.orig/eqn/neqn.sh groff-1.15/eqn/neqn.sh
*** groff-1.15.orig/eqn/neqn.sh Fri May 21 06:50:42 1999
--- groff-1.15/eqn/neqn.sh      Fri Jan  7 00:37:48 2000
***************
*** 1,5 ****
  #!/bin/sh
  # Provision of this shell script should not be taken to imply that use of
! # GNU eqn with groff -Tascii|-Tlatin1 is supported.
  
  exec @address@hidden -Tascii ${1+"$@"}
--- 1,5 ----
  #!/bin/sh
  # Provision of this shell script should not be taken to imply that use of
! # GNU eqn with groff -Tascii|-Tlatin1|-Tutf8 is supported.
  
  exec @address@hidden -Tascii ${1+"$@"}
diff -r -c3 groff-1.15.orig/groff/groff.man groff-1.15/groff/groff.man
*** groff-1.15.orig/groff/groff.man     Tue Dec 21 08:12:37 1999
--- groff-1.15/groff/groff.man  Fri Jan  7 00:48:31 2000
***************
*** 1,5 ****
  .ig \"-*- nroff -*-
! Copyright (C) 1999 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
--- 1,5 ----
  .ig \"-*- nroff -*-
! Copyright (C) 1999-2000 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
***************
*** 105,111 ****
  For typewriter-like devices.
  .TP
  .B latin1
! For typewriter-like devices using the ISO Latin-1 character set.
  .TP 
  .B lj4
  For an HP LaserJet4-compatible (or other PCL5-compatible) printer.
--- 105,115 ----
  For typewriter-like devices.
  .TP
  .B latin1
! For typewriter-like devices using the ISO Latin-1 (ISO 8859-1) character set.
! .TP
! .B utf8
! For typewriter-like devices using the Unicode (ISO 10646) character set with
! UTF-8 encoding.
  .TP 
  .B lj4
  For an HP LaserJet4-compatible (or other PCL5-compatible) printer.
diff -r -c3 groff-1.15.orig/grotty/grotty.man groff-1.15/grotty/grotty.man
*** groff-1.15.orig/grotty/grotty.man   Fri May 21 06:50:42 1999
--- groff-1.15/grotty/grotty.man        Fri Jan  7 00:51:53 2000
***************
*** 1,5 ****
  .ig \"-*- nroff -*-
! Copyright (C) 1989-1995 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
--- 1,5 ----
  .ig \"-*- nroff -*-
! Copyright (C) 1989-2000 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
***************
*** 39,47 ****
  .B groff
  command
  with a
! .B \-Tascii
! or
  .B \-Tlatin1
  option.
  If no files are given,
  .B grotty
--- 39,48 ----
  .B groff
  command
  with a
! .BR \-Tascii ,
  .B \-Tlatin1
+ or
+ .B \-Tutf8
  option.
  If no files are given,
  .B grotty
***************
*** 118,126 ****
  for font and device description files;
  .I name
  is the name of the device, usually
! .B ascii
  or
! .BR latin1 .
  .TP
  .B \-h
  Use horizontal tabs in the output.
--- 119,128 ----
  for font and device description files;
  .I name
  is the name of the device, usually
! .BR ascii ,
! .B latin1
  or
! .BR utf8 .
  .TP
  .B \-h
  Use horizontal tabs in the output.
***************
*** 188,193 ****
--- 190,206 ----
  .I F
  of
  .B latin1 device.
+ .TP
+ .B @FONTDIR@/devutf8/DESC
+ Device description file for
+ .B utf8
+ device.
+ .TP
+ .B @FONTDIR@/devutf8/ F
+ Font description file for font
+ .I F
+ of
+ .B utf8 device.
  .TP
  .B @MACRODIR@/tmac.tty
  Macros for use with
diff -r -c3 groff-1.15.orig/grotty/tty.cc groff-1.15/grotty/tty.cc
*** groff-1.15.orig/grotty/tty.cc       Sun Sep 12 09:21:11 1999
--- groff-1.15/grotty/tty.cc    Fri Jan  7 12:07:00 2000
***************
*** 1,5 ****
  // -*- C++ -*-
! /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
       Written by James Clark (address@hidden)
  
  This file is part of groff.
--- 1,5 ----
  // -*- C++ -*-
! /* Copyright (C) 1989-2000 Free Software Foundation, Inc.
       Written by James Clark (address@hidden)
  
  This file is part of groff.
***************
*** 19,24 ****
--- 19,25 ----
  Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  
  #include "driver.h"
+ #include "device.h"
  
  #ifndef SHRT_MIN
  #define SHRT_MIN (-32768)
***************
*** 103,109 ****
  public:
    glyph *next;
    short hpos;
!   unsigned char code;
    unsigned char mode;
    void *operator new(size_t);
    void operator delete(void *);
--- 104,110 ----
  public:
    glyph *next;
    short hpos;
!   unsigned int code;
    unsigned char mode;
    void *operator new(size_t);
    void operator delete(void *);
***************
*** 136,158 ****
  }
  
  class tty_printer : public printer {
    glyph **lines;
    int nlines;
    int cached_v;
    int cached_vpos;
!   void add_char(unsigned char, int, int, unsigned char);
  public:
!   tty_printer();
    ~tty_printer();
    void set_char(int, font *, const environment *, int, const char *name);
    void draw(int code, int *p, int np, const environment *env);
    void begin_page(int) { }
    void end_page(int page_length);
    font *make_font(const char *);
  };
  
! tty_printer::tty_printer() : cached_v(0)
  {
    nlines = 66;
    lines = new glyph *[nlines];
    for (int i = 0; i < nlines; i++)
--- 137,162 ----
  }
  
  class tty_printer : public printer {
+   int is_utf8;
    glyph **lines;
    int nlines;
    int cached_v;
    int cached_vpos;
!   void add_char(unsigned int, int, int, unsigned char);
  public:
!   tty_printer(const char *device);
    ~tty_printer();
    void set_char(int, font *, const environment *, int, const char *name);
    void draw(int code, int *p, int np, const environment *env);
+   void put_char(unsigned int);
    void begin_page(int) { }
    void end_page(int page_length);
    font *make_font(const char *);
  };
  
! tty_printer::tty_printer(const char *device) : cached_v(0)
  {
+   is_utf8 = !strcmp(device,"utf8");
    nlines = 66;
    lines = new glyph *[nlines];
    for (int i = 0; i < nlines; i++)
***************
*** 171,177 ****
    add_char(f->get_code(i), env->hpos, env->vpos, ((tty_font *)f)->get_mode());
  }
  
! void tty_printer::add_char(unsigned char c, int h, int v, unsigned char mode)
  {
  #if 0
    // This is too expensive.
--- 175,181 ----
    add_char(f->get_code(i), env->hpos, env->vpos, ((tty_font *)f)->get_mode());
  }
  
! void tty_printer::add_char(unsigned int c, int h, int v, unsigned char mode)
  {
  #if 0
    // This is too expensive.
***************
*** 266,271 ****
--- 270,302 ----
    }
  }
  
+ void tty_printer::put_char (unsigned int wc)
+ {
+   if (is_utf8 && wc >= 0x80) {
+     char buf[6+1];
+     int count;
+     char *p = buf;
+     if (wc < 0x800)
+       count = 1, *p = (unsigned char) ((wc >> 6) | 0xC0);
+     else if (wc < 0x10000)
+       count = 2, *p = (unsigned char) ((wc >> 12) | 0xE0);
+     else if (wc < 0x200000)
+       count = 3, *p = (unsigned char) ((wc >> 18) | 0xF0);
+     else if (wc < 0x4000000)
+       count = 4, *p = (unsigned char) ((wc >> 24) | 0xF8);
+     else if (wc <= 0x7FFFFFFF)
+       count = 5, *p = (unsigned char) ((wc >> 30) | 0xFC);
+     else
+       return;
+     do *++p = (unsigned char)(((wc >> (6 * --count)) & 0x3F) | 0x80);
+       while (count > 0);
+     *++p = '\0';
+     fputs(buf,stdout);
+   } else {
+     putchar(wc);
+   }
+ }
+ 
  void tty_printer::end_page(int page_length)
  {
    if (page_length % font::vert != 0)
***************
*** 340,349 ****
        putchar('\b');
        }
        if (p->mode & BOLD_MODE) {
!       putchar(p->code);
        putchar('\b');
        }
!       putchar(p->code);
        hpos++;
      }
      putchar('\n');
--- 371,380 ----
        putchar('\b');
        }
        if (p->mode & BOLD_MODE) {
!       put_char(p->code);
        putchar('\b');
        }
!       put_char(p->code);
        hpos++;
      }
      putchar('\n');
***************
*** 365,371 ****
  
  printer *make_printer()
  {
!   return new tty_printer;
  }
  
  static void usage();
--- 396,402 ----
  
  printer *make_printer()
  {
!   return new tty_printer(device);
  }
  
  static void usage();
diff -r -c3 groff-1.15.orig/nroff/nroff.man groff-1.15/nroff/nroff.man
*** groff-1.15.orig/nroff/nroff.man     Tue Dec 28 09:27:25 1999
--- groff-1.15/nroff/nroff.man  Fri Jan  7 00:27:36 2000
***************
*** 1,5 ****
  .ig \"-*- nroff -*-
! Copyright (C) 1989-1999 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
--- 1,5 ----
  .ig \"-*- nroff -*-
! Copyright (C) 1989-2000 Free Software Foundation, Inc.
  
  Permission is granted to make and distribute verbatim copies of
  this manual provided the copyright notice and this permission notice
***************
*** 54,62 ****
  The
  .B \-T
  option with an argument other than
! .B ascii
! and
  .B latin1
  will be ignored.
  The
  .B \-h
--- 54,63 ----
  The
  .B \-T
  option with an argument other than
! .BR ascii ,
  .B latin1
+ or
+ .B utf8
  will be ignored.
  The
  .B \-h
diff -r -c3 groff-1.15.orig/nroff/nroff.sh groff-1.15/nroff/nroff.sh
*** groff-1.15.orig/nroff/nroff.sh      Tue Dec 28 09:27:25 1999
--- groff-1.15/nroff/nroff.sh   Fri Jan  7 00:25:50 2000
***************
*** 3,14 ****
  
  prog="$0"
  # Default device.
! if test "X$LC_CTYPE" = "Xiso_8859_1" || test "X$LESSCHARSET" = "Xlatin1"
! then
!       T=-Tlatin1
! else
!       T=-Tascii
! fi
  opts=
  safer=-S
  
--- 3,27 ----
  
  prog="$0"
  # Default device.
! # First try the "locale charmap" command, because it's most reliable.
! # On systems where it doesn't exist, look at the environment variables.
! case "`locale charmap 2>/dev/null`" in
!   UTF-8 )      T=-Tutf8 ;;
!   ISO-8859-1 ) T=-Tlatin1 ;;
!   *)
!      case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
!        *.UTF-8 )                   T=-Tutf8 ;;
!        iso_8859_1 | *.ISO-8859-1 ) T=-Tlatin1 ;;
!        *)
!           case "$LESSCHARSET" in
!             utf-8 )  T=-Tutf8 ;;
!             latin1 ) T=-Tlatin1 ;;
!             *)       T=-Tascii ;;
!           esac
!           ;;
!      esac
!      ;;
! esac
  opts=
  safer=-S
  
diff -r -c3 groff-1.15.orig/tmac/eqnrc groff-1.15/tmac/eqnrc
*** groff-1.15.orig/tmac/eqnrc  Sun Sep 12 09:21:15 1999
--- groff-1.15/tmac/eqnrc       Fri Jan  7 00:30:51 2000
***************
*** 51,56 ****
--- 51,57 ----
  
  ifdef ascii ! define n %1% !
  ifdef latin1 ! define n %1% !
+ ifdef utf8 ! define n %1% !
  ifdef n !
  set nroff 1
  !
diff -r -c3 groff-1.15.orig/tmac/tmac.tty-char groff-1.15/tmac/tmac.tty-char
*** groff-1.15.orig/tmac/tmac.tty-char  Fri May 21 06:50:47 1999
--- groff-1.15/tmac/tmac.tty-char       Fri Jan  7 00:33:02 2000
***************
*** 1,8 ****
  .\" This file defines standard troff characters and some groff characters for
! .\" use with -Tascii and -Tlatin1.
  .\"
  .\" These definitions are chosen so that, as far as possible, they:
! .\" - work with both -Tascii and -Tlatin1.
  .\" - work on devices that display only the last overstruck character
  .\"   as well as on devices that support overstriking
  .\" - represent the character's graphical shape (not its meaning)
--- 1,8 ----
  .\" This file defines standard troff characters and some groff characters for
! .\" use with -Tascii, -Tlatin1 and -Tutf8.
  .\"
  .\" These definitions are chosen so that, as far as possible, they:
! .\" - work with all of -Tascii, -Tlatin1 and -Tutf8.
  .\" - work on devices that display only the last overstruck character
  .\"   as well as on devices that support overstriking
  .\" - represent the character's graphical shape (not its meaning)
diff -r -c3 groff-1.15.orig/tmac/troffrc groff-1.15/tmac/troffrc
*** groff-1.15.orig/tmac/troffrc        Sun Oct 31 15:30:35 1999
--- groff-1.15/tmac/troffrc     Fri Jan  7 00:29:09 2000
***************
*** 12,17 ****
--- 12,18 ----
  .do ds troffrc!X100-12 tmac.X
  .do ds troffrc!ascii tmac.tty
  .do ds troffrc!latin1 tmac.tty
+ .do ds troffrc!utf8 tmac.tty
  .do ds troffrc!lj4 tmac.lj4
  .do ds troffrc!html tmac.html
  .do if d troffrc!\*[.T] \
*** /dev/null   Sat Aug  7 13:45:41 1999
--- groff-1.15/devutf8/Makefile.sub     Fri Jan  7 00:09:46 2000
***************
*** 0 ****
--- 1,32 ----
+ DEV=utf8
+ FONTS=R I B BI
+ DEVFILES=$(FONTS) DESC
+ CLEANADD=$(FONTS) DESC
+ 
+ RES=240
+ CPI=10
+ LPI=6
+ 
+ $(FONTS): R.proto
+       @echo Making $@
+       @-rm -f $@
+       @(charwidth=`expr $(RES) / $(CPI)` ; \
+        sed -e "s/^name [A-Z]*$$/name $@/" \
+            -e "s/^\\([^       ]*\\)   [0-9]+  /\\1    $$charwidth     /" \
+            -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
+            -e "s/^internalname .*$$/internalname $@/" \
+            -e "/^internalname/s/BI/3/" \
+            -e "/^internalname/s/B/2/" \
+            -e "/^internalname/s/I/1/" \
+            -e "/^internalname .*[^ 0-9]/d" \
+            $(srcdir)/R.proto >$@)
+ 
+ DESC: DESC.proto
+       @echo Making $@
+       @-rm -f $@
+       @sed -e "s/^res .*$$/res $(RES)/" \
+           -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
+           -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
+           -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
+           $(srcdir)/DESC.proto >$@
+ 
*** /dev/null   Sat Aug  7 13:45:41 1999
--- groff-1.15/devutf8/DESC.proto       Sat Aug  7 01:48:26 1999
***************
*** 0 ****
--- 1,8 ----
+ res 240
+ hor 24
+ vert 40
+ unitwidth 10
+ sizes 10 0
+ fonts 4 R I B BI
+ tcommand
+ postpro grotty
*** /dev/null   Sat Aug  7 13:45:41 1999
--- groff-1.15/devutf8/R.proto  Sat Jan  8 20:53:31 2000
***************
*** 0 ****
--- 1,461 ----
+ name R
+ internalname 0
+ spacewidth 24
+ charset
+ !     24      0       0x0021
+ "     24      0       0x0022
+ #     24      0       0x0023
+ sh    "
+ $     24      0       0x0024
+ Do    "
+ %     24      0       0x0025
+ &     24      0       0x0026
+ aq    24      0       0x0027
+ (     24      0       0x0028
+ )     24      0       0x0029
+ *     24      0       0x002A
+ +     24      0       0x002B
+ pl    "
+ ,     24      0       0x002C
+ ---   24      0       0x002D
+ .     24      0       0x002E
+ /     24      0       0x002F
+ sl    "
+ 0     24      0       0x0030
+ 1     24      0       0x0031
+ 2     24      0       0x0032
+ 3     24      0       0x0033
+ 4     24      0       0x0034
+ 5     24      0       0x0035
+ 6     24      0       0x0036
+ 7     24      0       0x0037
+ 8     24      0       0x0038
+ 9     24      0       0x0039
+ :     24      0       0x003A
+ ;     24      0       0x003B
+ <     24      0       0x003C
+ =     24      0       0x003D
+ eq    "
+ >     24      0       0x003E
+ ?     24      0       0x003F
+ @     24      0       0x0040
+ at    "
+ A     24      0       0x0041
+ B     24      0       0x0042
+ C     24      0       0x0043
+ D     24      0       0x0044
+ E     24      0       0x0045
+ F     24      0       0x0046
+ G     24      0       0x0047
+ H     24      0       0x0048
+ I     24      0       0x0049
+ J     24      0       0x004A
+ K     24      0       0x004B
+ L     24      0       0x004C
+ M     24      0       0x004D
+ N     24      0       0x004E
+ O     24      0       0x004F
+ P     24      0       0x0050
+ Q     24      0       0x0051
+ R     24      0       0x0052
+ S     24      0       0x0053
+ T     24      0       0x0054
+ U     24      0       0x0055
+ V     24      0       0x0056
+ W     24      0       0x0057
+ X     24      0       0x0058
+ Y     24      0       0x0059
+ Z     24      0       0x005A
+ [     24      0       0x005B
+ lB    "
+ \     24      0       0x005C
+ rs    "
+ ]     24      0       0x005D
+ rB    "
+ a^    24      0       0x005E
+ ^     "
+ ha    "
+ _     24      0       0x005F
+ ru    "
+ ul    "
+ \`    24      0       0x0060
+ ga    "
+ a     24      0       0x0061
+ b     24      0       0x0062
+ c     24      0       0x0063
+ d     24      0       0x0064
+ e     24      0       0x0065
+ f     24      0       0x0066
+ g     24      0       0x0067
+ h     24      0       0x0068
+ i     24      0       0x0069
+ j     24      0       0x006A
+ k     24      0       0x006B
+ l     24      0       0x006C
+ m     24      0       0x006D
+ n     24      0       0x006E
+ o     24      0       0x006F
+ p     24      0       0x0070
+ q     24      0       0x0071
+ r     24      0       0x0072
+ s     24      0       0x0073
+ t     24      0       0x0074
+ u     24      0       0x0075
+ v     24      0       0x0076
+ w     24      0       0x0077
+ x     24      0       0x0078
+ y     24      0       0x0079
+ z     24      0       0x007A
+ lC    24      0       0x007B
+ {     "
+ ba    24      0       0x007C
+ or    "
+ |     "
+ rC    24      0       0x007D
+ }     "
+ a~    24      0       0x007E
+ ~     "
+ r!    24      0       0x00A1
+ char161       "
+ ct    24      0       0x00A2
+ char162       "
+ Po    24      0       0x00A3
+ char163       "
+ Cs    24      0       0x00A4
+ char164       "
+ Ye    24      0       0x00A5
+ char165       "
+ bb    24      0       0x00A6
+ char166       "
+ sc    24      0       0x00A7
+ char167       "
+ ad    24      0       0x00A8
+ char168       "
+ co    24      0       0x00A9
+ char169       "
+ Of    24      0       0x00AA
+ char170       "
+ Fo    24      0       0x00AB
+ char171       "
+ no    24      0       0x00AC
+ char172       "
+ rg    24      0       0x00AE
+ char174       "
+ a-    24      0       0x00AF
+ char175       "
+ de    24      0       0x00B0
+ char176       "
+ +-    24      0       0x00B1
+ char177       "
+ S2    24      0       0x00B2
+ char178       "
+ S3    24      0       0x00B3
+ char179       "
+ aa    24      0       0x00B4
+ char180       "
+ char181       24      0       0x00B5
+ ps    24      0       0x00B6
+ char182       "
+ md    24      0       0x00B7
+ char183       "
+ ac    24      0       0x00B8
+ char184       "
+ S1    24      0       0x00B9
+ char185       "
+ Om    24      0       0x00BA
+ char186       "
+ Fc    24      0       0x00BB
+ char187       "
+ 14    24      0       0x00BC
+ char188       "
+ 12    24      0       0x00BD
+ char189       "
+ 34    24      0       0x00BE
+ char190       "
+ r?    24      0       0x00BF
+ char191       "
+ `A    24      0       0x00C0
+ char192       "
+ 'A    24      0       0x00C1
+ char193       "
+ ^A    24      0       0x00C2
+ char194       "
+ ~A    24      0       0x00C3
+ char195       "
+ :A    24      0       0x00C4
+ char196       "
+ oA    24      0       0x00C5
+ char197       "
+ AE    24      0       0x00C6
+ char198       "
+ ,C    24      0       0x00C7
+ char199       "
+ `E    24      0       0x00C8
+ char200       "
+ 'E    24      0       0x00C9
+ char201       "
+ ^E    24      0       0x00CA
+ char202       "
+ :E    24      0       0x00CB
+ char203       "
+ `I    24      0       0x00CC
+ char204       "
+ 'I    24      0       0x00CD
+ char205       "
+ ^I    24      0       0x00CE
+ char206       "
+ :I    24      0       0x00CF
+ char207       "
+ -D    24      0       0x00D0
+ char208       "
+ ~N    24      0       0x00D1
+ char209       "
+ `O    24      0       0x00D2
+ char210       "
+ 'O    24      0       0x00D3
+ char211       "
+ ^O    24      0       0x00D4
+ char212       "
+ ~O    24      0       0x00D5
+ char213       "
+ :O    24      0       0x00D6
+ char214       "
+ mu    24      0       0x00D7
+ char215       "
+ /O    24      0       0x00D8
+ char216       "
+ `U    24      0       0x00D9
+ char217       "
+ 'U    24      0       0x00DA
+ char218       "
+ ^U    24      0       0x00DB
+ char219       "
+ :U    24      0       0x00DC
+ char220       "
+ 'Y    24      0       0x00DD
+ char221       "
+ TP    24      0       0x00DE
+ char222       "
+ ss    24      0       0x00DF
+ char223       "
+ `a    24      0       0x00E0
+ char224       "
+ 'a    24      0       0x00E1
+ char225       "
+ ^a    24      0       0x00E2
+ char226       "
+ ~a    24      0       0x00E3
+ char227       "
+ :a    24      0       0x00E4
+ char228       "
+ oa    24      0       0x00E5
+ char229       "
+ ae    24      0       0x00E6
+ char230       "
+ ,c    24      0       0x00E7
+ char231       "
+ `e    24      0       0x00E8
+ char232       "
+ 'e    24      0       0x00E9
+ char233       "
+ ^e    24      0       0x00EA
+ char234       "
+ :e    24      0       0x00EB
+ char235       "
+ `i    24      0       0x00EC
+ char236       "
+ 'i    24      0       0x00ED
+ char237       "
+ ^i    24      0       0x00EE
+ char238       "
+ :i    24      0       0x00EF
+ char239       "
+ Sd    24      0       0x00F0
+ char240       "
+ ~n    24      0       0x00F1
+ char241       "
+ `o    24      0       0x00F2
+ char242       "
+ 'o    24      0       0x00F3
+ char243       "
+ ^o    24      0       0x00F4
+ char244       "
+ ~o    24      0       0x00F5
+ char245       "
+ :o    24      0       0x00F6
+ char246       "
+ di    24      0       0x00F7
+ char247       "
+ /o    24      0       0x00F8
+ char248       "
+ `u    24      0       0x00F9
+ char249       "
+ 'u    24      0       0x00FA
+ char250       "
+ ^u    24      0       0x00FB
+ char251       "
+ :u    24      0       0x00FC
+ char252       "
+ 'y    24      0       0x00FD
+ char253       "
+ Tp    24      0       0x00FE
+ char254       "
+ :y    24      0       0x00FF
+ char255       "
+ .i    24      0       0x0131
+ /L    24      0       0x0141
+ /l    24      0       0x0142
+ OE    24      0       0x0152
+ oe    24      0       0x0153
+ ah    24      0       0x02C7
+ ab    24      0       0x02D8
+ a.    24      0       0x02D9
+ ao    24      0       0x02DA
+ ho    24      0       0x02DB
+ a"    24      0       0x02DD
+ *A    24      0       0x0391
+ *B    24      0       0x0392
+ *G    24      0       0x0393
+ *D    24      0       0x0394
+ *E    24      0       0x0395
+ *Z    24      0       0x0396
+ *Y    24      0       0x0397
+ *H    24      0       0x0398
+ *I    24      0       0x0399
+ *K    24      0       0x039A
+ *L    24      0       0x039B
+ *M    24      0       0x039C
+ *N    24      0       0x039D
+ *C    24      0       0x039E
+ *O    24      0       0x039F
+ *P    24      0       0x03A0
+ *R    24      0       0x03A1
+ *S    24      0       0x03A3
+ *T    24      0       0x03A4
+ *U    24      0       0x03A5
+ *F    24      0       0x03A6
+ *X    24      0       0x03A7
+ *Q    24      0       0x03A8
+ *W    24      0       0x03A9
+ *a    24      0       0x03B1
+ *b    24      0       0x03B2
+ *g    24      0       0x03B3
+ *d    24      0       0x03B4
+ *e    24      0       0x03B5
+ *z    24      0       0x03B6
+ *y    24      0       0x03B7
+ *h    24      0       0x03B8
+ *i    24      0       0x03B9
+ *k    24      0       0x03BA
+ *l    24      0       0x03BB
+ *m    24      0       0x03BC
+ *n    24      0       0x03BD
+ *c    24      0       0x03BE
+ *o    24      0       0x03BF
+ *p    24      0       0x03C0
+ *r    24      0       0x03C1
+ ts    24      0       0x03C2
+ *s    24      0       0x03C3
+ *t    24      0       0x03C4
+ *u    24      0       0x03C5
+ *f    24      0       0x03C6
+ *x    24      0       0x03C7
+ *q    24      0       0x03C8
+ *w    24      0       0x03C9
+ +h    24      0       0x03D1
+ +f    24      0       0x03D5
+ +p    24      0       0x03D6
+ -     24      0       0x2010
+ hy    "
+ en    24      0       0x2013
+ em    24      0       0x2014
+ `     24      0       0x2018
+ oq    "
+ '     24      0       0x2019
+ bq    24      0       0x201A
+ lq    24      0       0x201C
+ rq    24      0       0x201D
+ Bq    24      0       0x201E
+ dg    24      0       0x2020
+ dd    24      0       0x2021
+ bu    24      0       0x2022
+ %0    24      0       0x2030
+ fm    24      0       0x2032
+ sd    24      0       0x2033
+ fo    24      0       0x2039
+ fc    24      0       0x203A
+ rn    24      0       0x203E
+ f/    24      0       0x2044
+ Im    24      0       0x2110
+ Re    24      0       0x211B
+ tm    24      0       0x2122
+ Ah    24      0       0x2135
+ <-    24      0       0x2190
+ ua    24      0       0x2191
+ ->    24      0       0x2192
+ da    24      0       0x2193
+ <>    24      0       0x2194
+ lA    24      0       0x21D0
+ uA    24      0       0x21D1
+ rA    24      0       0x21D2
+ dA    24      0       0x21D3
+ hA    24      0       0x21D4
+ fa    24      0       0x2200
+ pd    24      0       0x2202
+ te    24      0       0x2203
+ es    24      0       0x2205
+ gr    24      0       0x2207
+ mo    24      0       0x2208
+ nm    24      0       0x2209
+ \-    24      0       0x2212
+ mi    "
+ **    24      0       0x2217
+ sr    24      0       0x221A
+ pt    24      0       0x221D
+ if    24      0       0x221E
+ /_    24      0       0x2220
+ AN    24      0       0x2227
+ OR    24      0       0x2228
+ ca    24      0       0x2229
+ cu    24      0       0x222A
+ is    24      0       0x222B
+ tf    24      0       0x2234
+ ti    24      0       0x223C
+ ap    "
+ =~    24      0       0x2245
+ ~~    24      0       0x2248
+ ~=    "
+ !=    24      0       0x2260
+ ==    24      0       0x2261
+ <=    24      0       0x2264
+ >=    24      0       0x2265
+ sb    24      0       0x2282
+ sp    24      0       0x2283
+ ib    24      0       0x2286
+ ip    24      0       0x2287
+ c+    24      0       0x2295
+ c*    24      0       0x2297
+ pp    24      0       0x22A5
+ lc    24      0       0x2308
+ rc    24      0       0x2309
+ lf    24      0       0x230A
+ rf    24      0       0x230B
+ la    24      0       0x2329
+ ra    24      0       0x232A
+ CR    24      0       0x240D
+ br    24      0       0x2502
+ bv    "
+ rk    24      0       0x251D
+ lk    24      0       0x2525
+ lt    24      0       0x256D
+ rt    24      0       0x256E
+ rb    24      0       0x256F
+ lb    24      0       0x2570
+ sq    24      0       0x25A1
+ lz    24      0       0x25CA
+ ci    24      0       0x25EF
+ ff    24      0       0xFB00
+ fi    24      0       0xFB01
+ fl    24      0       0xFB02
+ Fi    24      0       0xFB03
+ Fl    24      0       0xFB04
*** /dev/null   Sat Aug  7 13:45:41 1999
--- groff-1.15/devutf8/NOTES    Sat Jan  8 20:53:12 2000
***************
*** 0 ****
--- 1,57 ----
+ The following from groff_char.7 are unmapped:
+ 
+        f        \(Fn            florin
+        <=       \(lh            handleft
+        =>       \(rh            handright
+        -)       \(st            suchthat
+        p        \(wp            weierstrass      Weierstrass p
+        -        \(an            arrowhorizex     horizontal arrow extension
+ 
+ The following from the original troff manual (by Ossanna and Kernighan) are
+ unmapped:
+ 
+        <=       \(lh            handleft
+        =>       \(rh            handright
+                 \(bs                             solid ball
+ 
+ Character 0x002D has not been given a name because its Unicode name
+ "HYPHEN-MINUS" is so ambiguous that it's unusable for serious typographic use.
+ 
+ The following are mentioned in the original troff manual but not in
+ groff_char.7:
+ 
+                 \(sr                             square root
+                 \(rn                             overline
+                 \(is                             integral sign
+ 
+ The following, mentioned in the original troff manual, are only approximate:
+ 
+                 \(lk                       middle part of big left curly brace
+                 \(rk                       middle part of big right curly 
brace
+ 
+ \(bv has been mapped to 0x2502, not 0x2759, because it appears to mean
+ "bar vertical", not "bold vertical".
+ 
+ The line
+ char173       24      0       0x00AD
+ has been removed, because tmac.tty contains the line
+ ".if c\[char173] .shc \[char173]"
+ (i.e. if char173 is defined, then tell the troff engine that it shall use
+ char173 as soft hyphen - otherwise it will use hy = HYPHEN), and char173 in
+ Markus Kuhn's UCS-fonts looks more like a minus sign than like a hyphen.
+ Once Markus Kuhn's fonts are fixed, this line should be added again, because
+ ISO-8859-x describes the soft hyphen character as "a graphic character that
+ is imaged by a graphic symbol identical with, or similar to, that representing
+ HYPHEN, for use when a line break has been established within a word" - which
+ is exactly groff's use of 'shc'.
+ 
+ Using unnamed characters:
+ Assume you want to use a Unicode character not provided in the list, say
+ U+20AC. You need to do two things:
+ - Add a line "---     24      0       0x20AC" (the second column is
+   computed as 24 * wcwidth(0x20AC)) to the file R.proto, or, when groff
+   is already installed, to the four fonts files in
+   $(prefix)/share/groff/font/devutf8/.
+ - In your source file, use the notation \N'8364' where 8364 is the decimal
+   representation of 0x20AC.
+ 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]