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

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
testcase.

> 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:

http://sourceforge.net/projects/fonttools/
https://docs.google.com/spreadsheet/ccc?key=0ArCKGq7OfNmMdFZiSFQzQ1VqV0ttQ2hYMUtHYnB0N1E&usp=sharing

Cheers,

John

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