Loading ...
Sorry, an error occurred while loading the content.

RE: [XSL-FO] em

Expand Messages
  • Joshua Kimmel
    Hey, now that s some good information. Thank you for pointing it out to me. Josh ... From: Tony Graham [mailto:Tony.Graham@ireland.sun.com] Sent: Monday, May
    Message 1 of 11 , May 14 6:56 AM
    • 0 Attachment
      Hey, now that's some good information. Thank you for pointing it out to me.

      Josh

      -----Original Message-----
      From: Tony Graham [mailto:Tony.Graham@...]
      Sent: Monday, May 14, 2001 9:51 AM
      To: XSL-FO@yahoogroups.com
      Subject: RE: [XSL-FO] em


      Joshua Kimmel wrote at 14 May 2001 09:38:47 -0400:
      > Additionally, I haven't found anything that says that the current use of
      the
      > em unit is equal to the fonts current size. CSS books still claims its
      use
      > as being equal to the M of the current font, and fop's support for the em
      > unit doesn't hold up to that either.

      >From the XSL CR:

      5.9.7.2. Relative Lengths

      A relative length is a unit-based value that is measured against
      the current value of the font-size property.

      There is only one relative unit of measure, the "em". The
      definition of "1em" is equal to the current font size. For example,
      a value of "1.25em" is 1.25 times the current font size.

      When an em measurement is used in an expression, it is converted
      according to the font-size value of the current property's
      context. The result of the expression is an absolute length. See ยง
      7.7.4 font-size on page 193

      Regards,


      Tony Graham
      ------------------------------------------------------------------------
      Tony Graham mailto:tony.graham@...
      Sun Microsystems Ireland Ltd Phone: +353 1 8199708
      Hamilton House, East Point Business Park, Dublin 3 x(70)19708

      To unsubscribe from this group, send an email to:
      XSL-FO-unsubscribe@egroups.com



      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Christopher R. Maden
      ... An em-spec d measurement can t change *while viewing* a PDF, because the font size can t change. When formatting a document
      Message 2 of 11 , May 14 7:00 AM
      • 0 Attachment
        At 06:38 14-05-2001, Joshua Kimmel wrote:
        >If that's true about using the em, that it doesn't change based on the font
        >sizes with in my fo document, then that's cool.

        <confusion amount="more"/>

        An em-spec'd measurement can't change *while viewing* a PDF, because the
        font size can't change. When formatting a document using XSL, 1 em will
        always be the current font size. It won't *change* as such, over time, but
        1 em will mean different lengths in different FOs, depending on the font
        size in use for that FO.

        >My old method was to measure the width of the "M" in whatever font manually,
        >then code it in as a variable, and then just multiply by it wherever I
        >needed to maintain a size of say exactly 60 characters in the specified
        >font.

        Ah. An average character width, unless you're using a fixed-pitch
        typeface, is not going to be 1 em. It will vary based on the face itself;
        a good way to take the measure is to type out the lowercase alphabet in
        that face and measure it.

        >Additionally, I haven't found anything that says that the current use of the
        >em unit is equal to the fonts current size.

        I believe Tony's quote from the spec fulfilled that. Out of curiousity:
        where were you looking?

        >CSS books still claims its use
        >as being equal to the M of the current font, and fop's support for the em
        >unit doesn't hold up to that either.

        Section 4.3.2 of CSS 2 says "em: the 'font-size' of the relevant font";
        section 6.1 of CSS 1 says much the same. If books about CSS disagree with
        the spec, they're wrong. In any case, we're dealing with XSL, which
        addresses a slightly different domain from CSS, and expectations based on
        CSS may prove misleading.

        -Chris
        --
        Christopher R. Maden, XML Consultant
        DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
        <URL: http://crism.maden.org/consulting/ >
        PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA
      • Joshua Kimmel
        I appreciate the information I ve been given. I believe I have been schooled effectively. :) 1st lesson learned. Read spec more carefully. 2nd lesson.
        Message 3 of 11 , May 14 7:15 AM
        • 0 Attachment
          I appreciate the information I've been given. I believe I have been
          "schooled" effectively. :)

          1st lesson learned. Read spec more carefully.
          2nd lesson. Don't trust all CSS information to be mostly true in FO.
          3rd lesson. read better books.

          Now that I feel I have a better understanding of the em in the FO realm, has
          anybody used it in FOP?

          I mean, if I'm using it to determine a column width, and I have multiple
          fonts and sizes within my document, how do I code so a specific font is
          within the scope of that column width?

          Josh


          At 06:38 14-05-2001, Joshua Kimmel wrote:
          >If that's true about using the em, that it doesn't change based on the font
          >sizes with in my fo document, then that's cool.

          <confusion amount="more"/>

          An em-spec'd measurement can't change *while viewing* a PDF, because the
          font size can't change. When formatting a document using XSL, 1 em will
          always be the current font size. It won't *change* as such, over time, but
          1 em will mean different lengths in different FOs, depending on the font
          size in use for that FO.

          >My old method was to measure the width of the "M" in whatever font
          manually,
          >then code it in as a variable, and then just multiply by it wherever I
          >needed to maintain a size of say exactly 60 characters in the specified
          >font.

          Ah. An average character width, unless you're using a fixed-pitch
          typeface, is not going to be 1 em. It will vary based on the face itself;
          a good way to take the measure is to type out the lowercase alphabet in
          that face and measure it.

          >Additionally, I haven't found anything that says that the current use of
          the
          >em unit is equal to the fonts current size.

          I believe Tony's quote from the spec fulfilled that. Out of curiousity:
          where were you looking?

          >CSS books still claims its use
          >as being equal to the M of the current font, and fop's support for the em
          >unit doesn't hold up to that either.

          Section 4.3.2 of CSS 2 says "em: the 'font-size' of the relevant font";
          section 6.1 of CSS 1 says much the same. If books about CSS disagree with
          the spec, they're wrong. In any case, we're dealing with XSL, which
          addresses a slightly different domain from CSS, and expectations based on
          CSS may prove misleading.

          -Chris
          --
          Christopher R. Maden, XML Consultant
          DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
          <URL: http://crism.maden.org/consulting/ >
          PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA


          To unsubscribe from this group, send an email to:
          XSL-FO-unsubscribe@egroups.com



          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        Your message has been successfully submitted and would be delivered to recipients shortly.