[css-inline-3] Alternative initial-letter-align based on glyph bounds
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
Kindle has had a version of initial-letter implemented for several years, but the default alignment follows a behavior which doesn't seem possible with the initial-letter spec. Instead of using font-wide metrics for alignment, it measures the specific glyph bounds of the text under initial-letter. It then can align the lowest point of the glyph with the baseline of the body text.
The behavior can be viewed in our KindleCreate app (image below):
You can see the initial-letter (or drop cap as it's called here) actually takes up the 3 lines that are specified by the author. While a similar implementation in Safari would take up 4 since the descender knocks out an extra line.
I'm working on asking some of publisher contacts what the expected behavior would be when characters with descenders are used with initial-letter, but in the meantime wanted to get a feel for other people's thoughts here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the issue description and its screenshots, then compare the described KindleCreate behavior with the CSS initial-letter specification and Safari behavior. The open question is how initial-letter should align when glyph bounds, including descenders, differ from font-wide metrics; completion would require agreement on the intended behavior and a corresponding specification change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100