Prev: FAQ 8.44 How do I tell the difference between errors from the shell and perl?
Next: Perl HTML searching
From: ccc31807 on 19 Mar 2010 12:37 I've looked but must be missing something -- how do you underline text? Is it part of the font object, as Bold or Italic or Roman? Or is it some kind of transformation of text, like the translate method? Thanks, CC.
From: Ben Morrow on 19 Mar 2010 13:08 Quoth ccc31807 <cartercc(a)gmail.com>: > I've looked but must be missing something -- how do you underline > text? Put a line underneath it? > Is it part of the font object, as Bold or Italic or Roman? > > Or is it some kind of transformation of text, like the translate > method? 'Underlined' is not a property of the character, like 'bold' or 'italic'. It's just a straight line stuck underneath the line of text. (It's also *really* tacky and should be avoided in anything purporting to be properly typeset.) I'm sure it's straightforward to find out where the text begins and ends; then just move those two points down a point or so and draw a line between them. Ben
From: Peter J. Holzer on 20 Mar 2010 09:00 On 2010-03-19 17:08, Ben Morrow <ben(a)morrow.me.uk> wrote: > Quoth ccc31807 <cartercc(a)gmail.com>: >> I've looked but must be missing something -- how do you underline >> text? > > Put a line underneath it? > >> Is it part of the font object, as Bold or Italic or Roman? >> >> Or is it some kind of transformation of text, like the translate >> method? > > 'Underlined' is not a property of the character, like 'bold' or > 'italic'. It's just a straight line stuck underneath the line of text. > (It's also *really* tacky and should be avoided in anything purporting > to be properly typeset.) I'm sure it's straightforward to find out where > the text begins and ends; then just move those two points down a point > or so and draw a line between them. Position and thickness of the line should probably depend on the font size and maybe also on font family and weight. I remember that GEM fonts (GEM was a windowing system for PCs and Atari ST in the 1980's) included the offset of the upper and lower edge of the underline. Postscript and Truetype fonts don't, AFAIK. hp
From: ccc31807 on 22 Mar 2010 12:54
On Mar 20, 9:00 am, "Peter J. Holzer" <hjp-usen...(a)hjp.at> wrote: > > 'Underlined' is not a property of the character, like 'bold' or > > 'italic'. It's just a straight line stuck underneath the line of text. > > (It's also *really* tacky and should be avoided in anything purporting > > to be properly typeset.) I'm sure it's straightforward to find out where > > the text begins and ends; then just move those two points down a point > > or so and draw a line between them. > I remember that GEM fonts I remember using GEM on old Amstrad machines. They had the power supply in the back of the monitor and had problems burning up. Still, I like GEM, especially when the alternatives on clones was DOS 3.x. As to the underlining, I omitted it from the documents and no one said anything, so at this point no news is good news. Thanks, CC. |