W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css3-fonts][css-text-decor] Decorating superscripts/subscripts

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 13 May 2013 21:05:09 -0700 (PDT)
To: www-style@gtalbot.org
Cc: www-style@w3.org
Message-ID: <428813345.15179370.1368504309220.JavaMail.root@mozilla.com>

GĂ©rard Talbot wrote:

> > This 'font-variant-position' property [1] is not a replacement for
> > the existing subscript/superscript mechanism in HTML which uses a
> > combination of 'font-size'
> Most browsers use in their user agent style sheet:
> sub, sup {font-size: smaller;}
> /* though Appendix D gives small, sub, sup {font-size: .83em} */

It's a combination of font-size: smaller *and* a baseline shift via 'vertical-align':

>From http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css#520 -

  sub {
    vertical-align: sub;
    font-size: smaller;
    line-height: normal;
  sup {
    vertical-align: super;
    font-size: smaller;
    line-height: normal;

But this feature is *not* trying to be a replacement for that, the
wording in the spec explains why.

> In several places in that superscript-underline.html test page, the
> text in that webpage uses/says "superscript" when in fact it should
> be using/saying "subscript".

The example uses both subscript and superscripts.  I updated the

> John, I really have to ask you this: which software do you use for
> gathering typography metrics of TTF fonts under Linux (debian
> distributions like Kubuntu)?

I dumped it out with FontTools/ttx and used the spreadsheet below to
calculate the metrics in percentages:



Received on Tuesday, 14 May 2013 04:05:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:29 UTC