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

395RE: [XSL-FO] em

Expand Messages
  • Christopher R. Maden
    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
    • Show all 11 messages in this topic