Summary: | Incorrect height (ascent and descent) for font | ||
---|---|---|---|
Product: | DejaVu | Reporter: | Pierre Ossman <pierre-bugzilla> |
Component: | Mono Sans | Assignee: | Deja Vu bugs <dejavu-bugs> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | mono-fix-ascent-descent.patch |
Description
Pierre Ossman
2012-01-10 02:59:08 UTC
I did a quick attempt at trying to fix this, but I'm clearly missing some details here. I did this: Index: src/DejaVuSansMono.sfd =================================================================== --- src/DejaVuSansMono.sfd (revision 2503) +++ src/DejaVuSansMono.sfd (working copy) @@ -29,13 +29,13 @@ OS2TypoDescent: -492 OS2TypoDOffset: 0 OS2TypoLinegap: 410 -OS2WinAscent: 1901 +OS2WinAscent: 1992 OS2WinAOffset: 0 -OS2WinDescent: 483 +OS2WinDescent: 618 OS2WinDOffset: 0 -HheadAscent: 1901 +HheadAscent: 1992 HheadAOffset: 0 -HheadDescent: -483 +HheadDescent: -618 HheadDOffset: 0 OS2Vendor: 'PfEd' Lookup: 1 0 0 "'locl' Localized Forms in Latin lookup 0" {"'locl' Localized Forms in Latin lookup 0-1" } ['locl' ('latn' <'ISM ' 'KSM ' 'LSM ' 'NSM ' 'SKS ' 'SSM ' > ) ] Which definitely increased the height of the font. Unfortunately it increased it too much, which gives a bit of a gap for U+2551. I also don't know how the other ascent and descent values should be adjusted. Apply the same offset? Or is there also a scale involved? Created attachment 55379 [details] [review] mono-fix-ascent-descent.patch For reference, my changes in their current form. U+2551 should actually overlap a little... The glyphs just aren't hinted yet which makes the overlap a bit ugly. But without the slight overlap it would also just The other box glyphs should have been drawn higher to span the entire vertical space. Also, in the downstream bug report: the screenshot of the current behaviour is actually how it's supposed to look... Hmm... okay. I would have thought that the current state is one pixel too short, and the modified version is one pixel too high (at 10pt@96dpi). If you have some overlap, how would alpha be properly handled? Still, the original reason I opened the bug was that things looked compressed. I know this is rather subjective, but I don't currently have a good idea on how to make it more tangible. I figured the bar glyph was a good data point. I did a quick check with other fonts, and they do seem to be as cramped as DejaVu, so the current rendering is "normal" I guess. Doesn't say it's the proper thing to do though, and I still say that things are more readable with a bit more spacing. :) |
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.