groff
[Top][All Lists]
Advanced

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

[Groff] Character class support patch


From: brian m. carlson
Subject: [Groff] Character class support patch
Date: Thu, 3 Jan 2008 17:12:50 +0000
User-agent: Mutt/1.5.17 (2007-11-01)

Attached is a patch to implement character class support. This support is currently useless; no attributes can currently be applied to 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

ClassName and EquivalentClass are equivalent; you may use ranges to store characters, and using ranges is much more efficient than storing individually. This is why MostEfficient is the most efficient, even though it is equivalent to UppercaseAlphabet. Identifier and EquivIdentifier are equivalent; a hyphen that cannot denote a range stands for itself.

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.

The next method of attack is to implement attributes. Since the immediate goal is kinsoku shori handling, I will be investigating the behavior of the cflags request (flags 2 and 4) and how I can apply that to get the desired behavior. I must say that so far, it does not look like kinsoku shori handling is needed; lines cannot be broken around most glyphs, including CJK glyphs. I would appreciate any corrections to this line of reasoning if I am wrong.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
a typesetting engine: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: groff-charclass.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

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