[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #64519] font description file should allow kern pairs with arbitrar
From: |
Dave |
Subject: |
[bug #64519] font description file should allow kern pairs with arbitrary printable glyphs as first element |
Date: |
Wed, 9 Aug 2023 04:47:21 -0400 (EDT) |
Update of bug #64519 (project groff):
Summary: font description file should allow kern pairs with
hyphen as first element => font description file should allow kern pairs with
arbitrary printable glyphs as first element
_______________________________________________________
Follow-up Comment #1:
How about dashes?
Let's add excessive kerning between a dash and some other character to easily
see whether it's being honored.
First, satisfy yourself that there are no dashes already specified in the
kernpairs section.
$ sed -n '/^kernpairs/,/^$/p' /usr/share/groff/current/font/devps/TR | grep
'e[mn]'
Now let's define one for the en dash. The commands below require a sed that
puts newlines in the output when a \n appears in the replacement pattern.
Adventures in bug #64061 tell us this is many but not all seds.
$ mkdir -p /tmp/groff/devps
$ export GROFF_FONT_PATH=/tmp/groff
$ cp /usr/share/groff/current/font/devps/TR /tmp/groff/devps
$ sed -i '/^kernpairs$/aT en -500\nen T -500' /tmp/groff/devps/TR
$ printf '.nf\nT\(enU\nU\(enT\n' | groff > output_file.ps
Looking at output_file.ps reveals that, as hoped, these new kernpairs "kern"
the en dash and the T by substantially backing them over each other, so the
effect is easy to see.
What about doing the same thing with the em dash?
$ sed -i '/^kernpairs$/aT em -500\nem T -500' /tmp/groff/devps/TR
$ printf '.nf\nT\(emU\nU\(emT\n' | groff > output_file.2.ps
Frustratingly, the kern pair starting with the em dash fails, just as the
hyphen did and the en dash didn't.
So at the moment it appears hit or miss whether a given nonalphabetic glyph
can be the left one of a kernpair. I'm sure there's a systematic way to test
all the glyphs in the font, but I hope that root-cause-analyzing the hyphen
and em dash failures will reveal any other affected glyphs.
(Remember to tidy up after yourself.
$ rm -rf output_file.ps output_file.2.ps /tmp/groff
$ unset GROFF_FONT_PATH
If you leave the /tmp directory in place and GROFF_FONT_PATH in your
environment, you'll get some rather ugly typography later when you don't
intend it!)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64519>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/