groff
[Top][All Lists]
Advanced

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

Re: [Groff] Character class support patch


From: Werner LEMBERG
Subject: Re: [Groff] Character class support patch
Date: Fri, 04 Jan 2008 08:44:20 +0100 (CET)

A first remark without looking at the details of the patch (which
looks very clean, BTW):

> character classes.  The syntax is as follows:
> 
> classes
>       <ClassName> = A B C D E
>       <EquivalentClass> = A - E
>       <UppercaseAlphabet> = <EquivalentClass> F - Z
>       <MostEfficient> = A - Z
>       <Identifier> = - A - Z a - z
>       <EquivIdentifier> = A - Z - a - z

What do you think of this syntax which reduces redundant syntactical
sugar:

  classes
    ClassName          A B C D E;
    EquivalentClass    A - E;
    UppercaseAlphabet  @EquivalentClass
                       F - Z;
    MostEfficient      A - Z;
    Identifier         - A - Z a - z;
    EquivIdentifier    A - Z - a - z;

I think we need a trailing comma or something like that to easily
support multiline entries (which greatly enhance readability).

Additionally, we need support for handling Unicode ranges:

    CJKpunct           u3000 - u303F;

> Even though character classes are stored in font files, they are
> properties of the glyphs, not of the fonts.  In other words, all
> instances of the glyph 'A' will have the same attributes.  You
> probably want to put the same classes and attributes in every font
> file; otherwise, you will get different results based on the order
> in which fonts are loaded.

I think we can live with that restriction.


    Werner




reply via email to

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