PDF::API2 underlining text

Discussion in 'Perl Misc' started by ccc31807, Mar 19, 2010.

  1. ccc31807

    ccc31807 Guest

    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.
    ccc31807, Mar 19, 2010
    #1
    1. Advertising

  2. On 2010-03-19 17:08, Ben Morrow <> wrote:
    > Quoth ccc31807 <>:
    >> 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
    Peter J. Holzer, Mar 20, 2010
    #2
    1. Advertising

  3. ccc31807

    ccc31807 Guest

    On Mar 20, 9:00 am, "Peter J. Holzer" <> 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.
    ccc31807, Mar 22, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike

    justify text and PDF::API2 module

    mike, Feb 17, 2005, in forum: Perl Misc
    Replies:
    0
    Views:
    115
  2. Bruce Horrocks
    Replies:
    0
    Views:
    374
    Bruce Horrocks
    Jan 24, 2006
  3. Ted Byers
    Replies:
    3
    Views:
    137
    Peter J. Holzer
    Dec 17, 2008
  4. Oliver 'ojo' Bedford

    Setting text with PDF::API2

    Oliver 'ojo' Bedford, Nov 20, 2009, in forum: Perl Misc
    Replies:
    1
    Views:
    105
    Peter J. Holzer
    Nov 20, 2009
  5. Jasper2000

    PDF::API2 (Creating PDF files)

    Jasper2000, Mar 11, 2010, in forum: Perl Misc
    Replies:
    1
    Views:
    272
    Jasper2000
    Mar 11, 2010
Loading...

Share This Page