New issue
Advanced search Search tips

Issue 806173 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Feature

Blocking:
issue 800693



Sign in to add a comment

Add sTypoAscender and sTypoDescender to FontMetrics

Project Member Reported by kojii@chromium.org, Jan 26 2018

Issue description

While fAscent and fDescent of SkPaint::FontMetrics gives the ascender/descender following the platform convention, there are cases where we need sTypoAscender and sTypoDescender from 'OS/2' table.

* Computing em-height ascent/descent. The logic isn't spec'ed yet, but
  what Gecko does looks reasonable.
  https://github.com/whatwg/html/issues/2470#issuecomment-291425136
* Positioning underline and overline looks best served by the em-height
  ascent/descent. We implemented the logic in  issue 681857  (r468821)
  and, unlike the previous try to use cap-height, this seems to stick.
* There seems to be needs to avoid platform-specific metrics for web
  fonts. See issue 800693 and OpenType spec for stasTypoAscender:
  https://www.microsoft.com/typography/otspec/os2.htm#sta
  says "The goal is to free applications from Macintosh or Windows-specific
  metrics".

Blink has a code to read OS/2 table directly to experiment  issue 681857 , and since this sticks, it's good to move it to SkPaint::FontMetrics.
 

Comment 1 by kojii@chromium.org, Jan 26 2018

Blocking: 800693

Sign in to add a comment