Bug 7223

Summary: Subscripts and superscripts are too high/low
Product: DejaVu Reporter: Denis Jacquerye <moyogo>
Component: GeneralAssignee: Deja Vu bugs <dejavu-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: high CC: adam, motchy+freedesktop
Version: unspecified   
Hardware: x86 (IA32)   
OS: Windows (All)   
URL: http://sourceforge.net/mailarchive/message.php?msg_id=13818410
Whiteboard:
i915 platform: i915 features:
Attachments: DejaVu Superscripted Digits rendered with freetype2

Description Denis Jacquerye 2006-06-14 09:05:57 UTC
reported by Mike Brown

Subscripts and superscripts are way higher/lower in DejaVu Sans Mono than in
Bitstream Vera Mono
http://dejavu.sourceforge.net/wiki/images/d/d3/Ff-dvsm.png
http://dejavu.sourceforge.net/wiki/images/5/53/Ff-bvsm.png

spotted with DejaVu TTF in Firefox on Windows

Not reproducible

Cause: Positions and sizes of super- and subscripts set in TrueType tables are
not equal for DejaVu and Vera, but it is not known if Firefox uses them (more
information: http://sourceforge.net/mailarchive/message.php?msg_id=13818410 )
Comment 1 Bhikkhu Pesala 2006-12-11 04:03:18 UTC
All Bitstream fonts that I have looked at have a bug in the subscriptyoffset. It 
is entered as a negative value, when it should be positive. This is what it says 
at Microsoft Typography:

"The Subscript Y Offset parameter specifies a font designer's recommended 
vertical offset from the character baseline to the character baseline for 
subscript characters associated with this font. Values are expressed as a 
positive offset below the character baseline. If a font does not include all of 
the required subscript for an application, this parameter specifies the 
recommended vertical distance below the character baseline for those subscript 
characters."

Values are expressed as a POSITIVE value below the baseline, i.e. values with a 
negative value are ABOVE the baseline (>_<). I reported the bug to Bitstream, but 
they didn't seem to be too concerned. 
Comment 2 Ben Laenen 2006-12-11 04:14:16 UTC
(In reply to comment #1)
> All Bitstream fonts that I have looked at have a bug in the
> subscriptyoffset. It is entered as a negative value, when it should be
> positive.

That bug was fixed a long time ago in DejaVu. We now make use of the values 
FontForge makes by default (but we should perhaps go back to the values 
defined by Bitstream, except with the negative value made positive of course).
Comment 3 Bhikkhu Pesala 2006-12-16 12:56:03 UTC
The subscripts in DejaVu are currently sitting on the baseline. That is one way 
to design them, but then the subscriptyoffset should be zero. I prefer to have 
subscripts bisect the baseline. 
Comment 4 Nigel Stewart 2007-06-27 09:04:19 UTC
Created attachment 10475 [details]
DejaVu Superscripted Digits rendered with freetype2

Perhaps related to this more general bug about superscripts and
subscripts.  We're observing some issues with the vertical offset
for superscripted digits 0 to 9.  Display of a number as "1024 = 2¹⁰"
doesn't work very well with any of the DejaVu fonts.
Comment 5 Nigel Stewart 2007-08-22 12:47:01 UTC
Update: dejavu-ttf-2.19 same problem observed with the vertical offset
for superscripted digits 0 to 9.
Comment 6 Adam Spragg 2007-10-22 01:44:08 UTC
Just another addition here - it's not just the offsets, but I'm seeing large differences in the *sizes* of the superscript numerals. It's particularly noticeable on Sans Mono in a small font. I use Sans Mono for my terminal windows at 8 or 10pt, and the 0 is quite a bit bigger than 4-9, and 1-3 are again bigger than the 0.

This is with version DejaVu 2.20 on Debian unstable.
Comment 7 Krasnaya Ploshchad 2016-10-25 04:09:03 UTC
Is it possible to use 'jstf' table to adjust?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.