Skip to content

[css-inline-3] Alternative initial-letter-align based on glyph bounds #5220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stantonma opened this issue Jun 16, 2020 · 6 comments
Open

Comments

@stantonma
Copy link

stantonma commented Jun 16, 2020

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):

Screen Shot 2020-06-16 at 10 42 12 AM

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.

Screen Shot 2020-06-16 at 10 50 43 AM

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.

@stantonma stantonma added the css-inline-3 Current Work label Jun 16, 2020
@astearns
Copy link
Member

If you had another paragraph under that one with the same settings and an 'i' as the initial letter, would the glyph of the 'i' appear larger? The design we arrived at tries to ensure that the size of the initial letter does not change depending on the presence or absence of a descender.

@stantonma
Copy link
Author

Yes, the glyphs appear larger/smaller based on the character chosen.

@dauwhe
Copy link
Contributor

dauwhe commented Jun 18, 2020

Yeah, one of our foundational rules in typesetting is visual consistency. The line-height should not change from page to page, even to fix widows or orphans. If I create a dropcap, its point size should not change depending which letter it happens to be. The whole idea of initial letters is aligning to the cap height and baseline, not taking up a certain number of lines of space.

This is also unlikely to be a large problem in implementations using Latin scripts, as initial letters are usually capitals, and capitals seldom have descenders.

@stantonma
Copy link
Author

The whole idea of initial letters is aligning to the cap height and baseline, not taking up a certain number of lines of space.

But couldn't there be a case where the designer wants a consistent numbers of lines? Are we ignoring that use case?

This is also unlikely to be a large problem in implementations using Latin scripts, as initial letters are usually capitals, and capitals seldom have descenders.

Agree, though "Q" seems to be the exception in the many fonts.

@dauwhe
Copy link
Contributor

dauwhe commented Jun 22, 2020

But couldn't there be a case where the designer wants a consistent numbers of lines? Are we ignoring that use case?

I don't believe I've found examples in the wild like that, but I'd be quite interested in seeing them! The examples we've found in books about typography, in tools like InDesign, and in books and magazines around the world all seem to suggest that the cap height/baseline alignment is what is desired.

@fantasai
Copy link
Collaborator

@stantonma Thinking to close this issue no-change based on @dauwhe’s arguments. Do you disagree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants