adobe-webplatform / dropcap.js

Beautiful CSS drop caps made easy
Other
932 stars 69 forks source link

Exclusion area doesn’t always include descender for non-atomic initial letters #8

Open acusti opened 9 years ago

acusti commented 9 years ago

The issue is well-illustrated in 2.8 Space Around Initial Letters from the spec.

It’s reproducible in the demo on Chrome 39 and Safari 8.0.2 with the letter “J” when you choose Baskerville, Garamond, or Palatino as the drop cap font family. For the letter “Q”, on the other hand, the exclusion area includes all of the descender in Palatino (plus extra), almost all of it in Garamond, and part, but not all of it, in Baskerville. See:

Baskerville

`J` in Baskerville

`Q` in Baskerville

Garamond

`J` in Garamond

`Q` in Garamond

Palatino

`J` in Palatino

`Q` in Palatino

sylvain-galineau commented 9 years ago

I will try to look into these; since the platform does not expose font metrics we do our best effort to figure them out but this does not always work. You may want to try to add the 'dcjs-descender' class to these elements and see if it helps. Let me know...