groff
[Top][All Lists]
Advanced

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

Re: [Groff] character width in font files


From: Daiki Ueno
Subject: Re: [Groff] character width in font files
Date: Wed, 04 Aug 2010 15:15:00 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Werner LEMBERG <address@hidden> writes:

> Can you extend your patch so that it contains the replacement stuff
> from gnulib (as it is done e.g. in texinfo)?  This is a bigger task I
> fear since you probably have to modify groff's build system.

I now realized that making groff to use gnulib natively is a big task
since groff's build system needs to be migrated into automake.

I'm now thinking of a workaround: bundling a small library which uses
gnulib/automake inside groff's source tree, as the way libtoolized
programs bundle libltdl.

The attached patch is proof-of-concept.  To use,

 $ patch -p0 < groff-gl.diff
 $ gnulib-tool --create-testdir --dir=src/libs/gl wcwidth
 $ ./configure
 $ make # this will run "configure" in src/libs/gl

Werner LEMBERG <address@hidden> writes:

> Honestly, right now I'm not aware of a single one which *must* change.
> Could you provide examples?

For example, U+00D7 (MULTIPLICATION SIGN) should be double-width under
Japanese locale while it is single-width under latin locales.

> It really depends on the number of affected characters to decide which
> of the two suggested solution is preferable.

Yes, I'll check that later.

>> https://code.launchpad.net/~cjwatson/groff/charclass
>
> Thanks.  I'm bad in working with bazaar.  How can I get a diff file to
> the trunk?

 $ bzr init-repo --2a groff
 $ cd groff
 $ bzr branch lp:~cjwatson/groff/charclass
 $ cd charclass
 $ bzr diff -r ancestor:lp:groff

There might be a shorthand for this.  I'm also not good at using bazaar.

=== modified file 'Makefile.comm'
--- Makefile.comm       2009-01-08 08:28:25 +0000
+++ Makefile.comm       2010-08-04 05:11:27 +0000
@@ -20,7 +20,8 @@
 # Makefile.comm
 #
 INCLUDES=-I. -I$(srcdir) \
-  -I$(top_builddir)/src/include -I$(top_srcdir)/src/include
+  -I$(top_builddir)/src/include -I$(top_srcdir)/src/include \
+  -I$(tob_builddir)/src/libs/gl/gllib
 ALL_CCFLAGS=$(INCLUDES) $(CCDEFINES) $(CCFLAGS) $(CPPFLAGS)
 COMPILE.cpp=$(CCC) $(ALL_CCFLAGS) -c
 ALL_CFLAGS=$(INCLUDES) $(CDEFINES) $(CFLAGS) $(CPPFLAGS)
@@ -31,6 +32,7 @@
 LIBBIB=$(top_builddir)/src/libs/libbib/libbib.$(LIBEXT)
 LIBDRIVER=$(top_builddir)/src/libs/libdriver/libdriver.$(LIBEXT)
 LIBXUTIL=$(top_builddir)/src/libs/libxutil/libxutil.$(LIBEXT)
+LIBGNU=$(top_builddir)/src/libs/gl/gllib/libgnu.$(LIBEXT)
 MLIB=
 XLIBS=
 YTABH=

=== modified file 'Makefile.in'
--- Makefile.in 2009-03-07 07:33:49 +0000
+++ Makefile.in 2010-08-04 05:25:04 +0000
@@ -626,11 +626,17 @@
   contrib/mom/momdoc \
   contrib/gdiffmk/tests \
   src/libs/snprintf \
+  src/libs/gl/gllib \
+  src/libs/gl/gllib/uniwidth \
+  src/libs/gl/glm4 \
+  src/libs/gl/build-aux \
+  src/libs/gl \
   font/devps/old \
   font/util
+GLDIRS =src/libs/gl
 DISTDIRS=\
   $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(XDEVDIRS) $(OTHERDEVDIRS) \
-  $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS)
+  $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) $(GLDIRS)
 TARGETS=all install_bin install_data clean distclean mostlyclean \
   realclean extraclean distfiles TAGS depend uninstall_sub fonts
 
@@ -658,7 +664,7 @@
          -f $(top_srcdir)/Makefile.comm \
          -f $(top_srcdir)/Makefile.sub $(do)
 
-$(LIBDIRS): FORCE $(INCDIRS) $(PROGDEPDIRS)
+$(LIBDIRS): FORCE $(INCDIRS) $(PROGDEPDIRS) $(GLDIRS)
        @$(ENVSETUP); \
        if test $(srcdir) = .; then \
          srcdir=.; \
@@ -720,6 +726,18 @@
          -f $$srcdir/Makefile.sub \
          -f $(top_srcdir)/Makefile.dev $(do)
 
+$(GLDIRS): FORCE
+       @$(ENVSETUP); \
+       if test $(srcdir) = .; then \
+         srcdir=.; \
+       else \
+         srcdir=`cd $(srcdir); pwd`/$@; \
+       fi; \
+       test -d $@ || $(mkinstalldirs) $@; \
+       cd $@; \
+       test -f Makefile || $(SHELL) $$srcdir/configure; \
+       $(MAKE) $(do)
+
 $(OTHERDIRS): $(PROGDEPDIRS) $(CCPROGDIRS) $(CPROGDIRS)
 
 $(INCDIRS) $(PROGDEPDIRS) $(OTHERDIRS): FORCE

=== modified file 'src/devices/grotty/Makefile.sub'
--- src/devices/grotty/Makefile.sub     2003-04-15 15:13:06 +0000
+++ src/devices/grotty/Makefile.sub     2010-08-04 05:08:31 +0000
@@ -1,6 +1,6 @@
 PROG=grotty$(EXEEXT)
 MAN1=grotty.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
+XLIBS=$(LIBDRIVER) $(LIBGROFF) $(LIBGNU)
 MLIB=$(LIBM)
 OBJS=tty.$(OBJEXT)
 CCSRCS=$(srcdir)/tty.cpp

=== modified file 'src/roff/troff/Makefile.sub'
--- src/roff/troff/Makefile.sub 2004-10-10 19:57:22 +0000
+++ src/roff/troff/Makefile.sub 2010-08-04 05:08:12 +0000
@@ -1,6 +1,6 @@
 PROG=troff$(EXEEXT)
 MAN1=troff.n
-XLIBS=$(LIBGROFF)
+XLIBS=$(LIBGROFF) $(LIBGNU)
 MLIB=$(LIBM)
 OBJS=\
   dictionary.$(OBJEXT) \

Regards,
-- 
Daiki Ueno

reply via email to

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