groff
[Top][All Lists]
Advanced

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

Re: [Groff] Bugs in mm, accents, multi-line macros and font glyphs


From: P. Alejandro Lopez-Valencia
Subject: Re: [Groff] Bugs in mm, accents, multi-line macros and font glyphs
Date: Tue, 8 Jan 2002 17:19:38 -0500

----- Original Message -----
From: "Ted Harding" <address@hidden>
To: "P. Alejandro Lopez-Valencia" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, January 08, 2002 11:49 AM
Subject: RE: [Groff] Bugs in mm, accents, multi-line macros and font glyph


> Hi Alejandro,
>
> On 08-Jan-02 P. Alejandro Lopez-Valencia wrote:
> > When using multi-line macros such as .WA/.WE and .IA/.IE,
> > the accent macros do not work, while using high bit latin1
> > codes does. I am sure this happens in other macros as well.
> > See the attached example files.
>
> I am not sure why this does not work. However, it is not
> just the "accent macros" which do not work: the whole
> string sequence "\*:" etc is output literally in your
> PDF file, i.e. "\*" is not being interpreted as the lead-in
> for a defined string reference. This must have something
> to do with the definition of .WA etc., which I have not had
> time to investigate to the point of finding out why it happens.
>

Good to know this is actually a bug :)

> However, I would also point out, at this point, that .mm
> partially includes the "improved accent definitions" which
> can be found in the ms macros (written by James Clark).
> In the ms macros, you need to invoke the macro ".AM" in order
> to activate these; in the mm macros, it looks as though these
> are invoked automatically when the macros are read in.
>

[long and elucidating explanation of groff accent mechanisms]

Well. I did not know that! I assumed DWB 2.1 ditroff functionality with the
addition of 8-bit cleanness. My experience is mostly troff in Solaris and
DEC unices/VMS. I haven't used ditroff/groff seriously since version 1.11 ,
mostly because I haven't had a workstation or an i386 UNIX box on my desk
since 1995. I started using TeX more or less at the same time in the late
80's and after having to content myself with either Macintoshes or Wintel
boxes I have either used TeX or a word processor depending on the actual
task
at hand. Having found the win32 port, I took to reacquaint myself with my
preferred text-processor.

> > I also noticed the accent macros in mm and ms (possibly in me
> > too, but I never have used those) are using the old practice
> > of building composite characters, instead of calling the already
> > existing accented glyphs in the fonts (I see this as useful only
> > in the dvi driver and only if there is no migration to the EC/TC
> > fonts). The problem of fonts with 7 bit character sets is something
> > of the past, except in the TeX world.
>
> Here I respectfully disagree with you. Your argument holds only
> (and this is as far as it goes) when you are using languages
> for which you already have adequate fonts. To cover all European
> languages with all their accented characters as single glyphs
> you will need several fonts; there is not enough room in
> 8 bits for everything.
>
> I also suspect that you may be making an underlying assumption
> that you can cover all you need with 8 bits (apologies if you
> are already thinking in Unicode!) -- and if this is so then
> the above examples show that this is not adequate.

I am thinking in UNICODE, and I accept your apologies ;).

I think we disagree on nothing. I have the same perception as you do. Now, I
do admit that my present needs are limited to Mid- and South- Western Europe
Languages, and for those, fonts in "ISO-Adobe-Latin" encoding (also known as
"Adobe Standard Encoding") are more than enough. Furthermore, it is only now
that I have the need to write documents in Spanish or German (my first and
second languages) as I have written almost everything in English (my third)
for many years.

And that's where I have a little beef. Wether we like it or not, the fonts
used by the PS driver are the "LaserWriter 35 fonts" that have prebuilt
glyphs for most accented characters used in  Western Europe (and you can
even write Finnish with them ;). Considering that groff made do with the
7-bit limitation of old troff and ditroff, I thought that groff had already
an internal mechanism to map the accent macros to the actual font glyphs.

> Also, I believe you have a limited view of groff's accent resources
> (i.e. you are thinking solely in terms of "o\'" and so on, using
> the old original troff escape sequences). This, as explained above,
> has been extended to a general accent-building mechanism.

I can see that now, yet I stand by my little beef above. I concede that the
ability to build any accented character is extremely valuable and powerful.

[snip]

> > As well, the resulting composite characters are not searchable
> > if one creates PDF as final output from the PS driver.
>
> That argument only works, I think, if you are in a unique
> font-encoding (unless, again, you are thinking in Unicode).
> Otherwise, I don't see how can begin to search for the
> character even if it has been incorporated as a single glyph.

Aha! Well, if you do the exercise with my little PDF you'll notice that you
can actually search for รณ and find it only those cases where I used the
8-bit character (Latin1 xF3, UTF-8 xC3B3). Of course searching is a function
of the underlying locale encoding, thus I wouldn't expect to be able to
search Japanese text on this system (not being win2k).

> So please don't knock groff's accented-character resources.

Hey, I'm not knocking groff! You just felt someone said your baby is not
perfect :) And whose baby is perfect? I am a great guy (I think) and all my
friends love me (I'm sure), but I know that when I was a child I was capable
of disassembling a ball bearing and therefore I wasn't welcome anywhere. I
still have some serious personality warts. Now, If that's with people, what
about software that after all is created by not so perfect people? ;)

> If you can make all that you need in terms of the glyphs
> in fonts which you already have available, then by all
> means do so: using the ".char" mechanism you can map
> any escape sequence you choose to a given glyph in some
> font. Otherwise, people will need the capacity to extend
> their repertoire of glyphs by creating composite characters
> as above; and for this there is, in principle, no limit
> within groff.

I agree. What I can see is that I'll need to extend the accent macros for
the PS driver so that they access the right font glyphs. I'll need to learn
all about macro writing and font management in groff. After I do it I guess
that could go into the contributions :).




reply via email to

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