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

RE: [XSL-FO] em

Expand Messages
  • Bryan Rasmussen
    hmm maybe I m mistaken, my understanding was that em should be used with the @media print declaration in css as it didn t make any sense outside of a printed
    Message 1 of 11 , May 10, 2001
    • 0 Attachment
      hmm maybe I'm mistaken, my understanding was that em should be used with the
      @media print declaration in css as it didn't make any sense outside of a
      printed medium. Of course I just might have accepted some pedant's prejudice
      as being true, without thouroughly investigating the matter, although I've
      noticed that anytime I use em outside of print it totally screws everything.

      -----Original Message-----
      From: John E. Simpson [mailto:simpson@...]
      Sent: 10. maj 2001 16:14
      To: XSL-FO@yahoogroups.com
      Subject: Re: [XSL-FO] em


      Bryan Rasmussen wrote:

      > the question is if you're viewing your pdf on screen? cause em is a
      printers
      > measure, print them out and see if you still have the same problem. em is,
      > as far as I know, meaningless in a web situation cause it changes
      dependent
      > on users' screen resolutions

      Eh? Is that true? My understanding was that an em's "meaning" was
      dependent on font size, no matter what the medium. While in absolute
      terms, an em (in a given font size) on a low-res screen might be larger
      than an em (in the same font size) on a high-res printed page,
      *proportional to the font size in that medium* the two ems would still
      be the "same."
      ???
      ================================================================
      John E. Simpson | "I accidentally installed the deer
      http://www.flixml.org | whistles on my car backwards. Now
      XML Q&A: www.xml.com | everywhere I go, I'm chased by deer."
      | (Steven Wright)


      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
      ... I m not sure what CSS has to do with this; we re talking about XSL here. An em started as the size of the metal body of an M in a typeface,
      Message 2 of 11 , May 14, 2001
      • 0 Attachment
        At 08:28 10-05-2001, Bryan Rasmussen wrote:
        >hmm maybe I'm mistaken, my understanding was that em should be used with the
        >@media print declaration in css as it didn't make any sense outside of a
        >printed medium. Of course I just might have accepted some pedant's prejudice
        >as being true, without thouroughly investigating the matter, although I've
        >noticed that anytime I use em outside of print it totally screws everything.

        <confusion/>

        I'm not sure what CSS has to do with this; we're talking about XSL here.

        An "em" started as the size of the metal body of an M in a typeface, but
        has now come to mean a linear unit of measurement equal to the current font
        size. When working with a twelve-point font, 1 em == 12 pt. This should
        work equally well in print or on-line, and is in fact preferable to
        absolute measurement on-line, since all measurements will scale if the user
        changes his or her preferred font size.

        But this question was about FOP. FOP produces PDF, which is a static
        format designed for printing. Even when viewed on line, the text still
        can't be resized, and so therefore an em doesn't change.

        -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
        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. I won t use it. But if that s
        Message 3 of 11 , May 14, 2001
        • 0 Attachment
          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. I won't use it. But if
          that's true, then I'm confused as to why the FOP designers provide any
          support for it at all, which they seem to do, just strange inconsistent
          support.
          I guess I was just hoping to see if anyone knew how to set the font in one
          place in the fo document, such that using em would recognize it as the
          parent font of the document and therefore whenever I change the font size or
          style, it would change the preferred sizes of the wherever I had used the em
          unit.

          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.

          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.

          Josh

          _________________
          Josh Kimmel
          Content Developer
          iam technology


          ******************************************
          <confusion/>

          I'm not sure what CSS has to do with this; we're talking about XSL here.

          An "em" started as the size of the metal body of an M in a typeface, but
          has now come to mean a linear unit of measurement equal to the current font
          size. When working with a twelve-point font, 1 em == 12 pt. This should
          work equally well in print or on-line, and is in fact preferable to
          absolute measurement on-line, since all measurements will scale if the user
          changes his or her preferred font size.

          But this question was about FOP. FOP produces PDF, which is a static
          format designed for printing. Even when viewed on line, the text still
          can't be resized, and so therefore an em doesn't change.

          -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/
        • Tony Graham
          ... 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.
          Message 4 of 11 , May 14, 2001
          • 0 Attachment
            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
          • 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 5 of 11 , May 14, 2001
            • 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 6 of 11 , May 14, 2001
              • 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 7 of 11 , May 14, 2001
                • 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.