Display of large drop-cap has ridiculously large top and bottom margins

RESOLVED DUPLICATE of bug 21616

Status

()

Core
Layout: Text
RESOLVED DUPLICATE of bug 21616
14 years ago
14 years ago

People

(Reporter: John W. Kennedy, Unassigned)

Tracking

({qawanted})

Trunk
x86
All
qawanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Using the CSS "first-letter" feature to produce a large drop cap is virtually
useless, as the displayed result is too ugly, with huge top and bottom margins.
Compare IE6.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
(Reporter)

Comment 1

14 years ago
Created attachment 165291 [details]
Simple test case

This is a reduced copy of a real file illustrating the problem.

Comment 2

14 years ago
You asked for 72pt size on the first, that's what you're getting.  (Using points
for measurement of a screen size is not a hot idea in any case.)

->Layout
Assignee: firefox → nobody
Component: General → Layout
Keywords: qawanted
Product: Firefox → Browser
QA Contact: firefox.general → core.layout
Version: unspecified → Trunk
(Reporter)

Comment 3

14 years ago
Created attachment 165303 [details]
This is how it looks on Firefox 1.0. Ugly.
(Reporter)

Comment 4

14 years ago
Created attachment 165304 [details]
This is how it looks on IE6. Correct.
(Reporter)

Comment 5

14 years ago
Created attachment 165305 [details]
Done on Firefox by using a GIF instead of doing it the right way.
(Reporter)

Comment 6

14 years ago
The use of points is merely an artifact of two hours of screwing around with the
file, trying to get it to work right. Points, percentage, whatever. Trying to do
a drop cap the way the CSS standards (1 and 2.1) say to do it gives unacceptable
results.
(->floats & confirm for a look, I see this in 1.8a4 linux)

dunno what the specs say, but mozilla's apparent making room for the line box
for the floated character, instead of the glyph only, seems sensible... If you
want less space above and below the drop cap, you can specify
    p.prose:first-letter { margin: -.2em 0; }
Note that that conveniently causes IE to screw up, looks like specifying any
vertical margins on it is ignored but also disables the apparent magic hack that
made it look right to you in the first place ...or something

related stuff in bug 21616
Status: UNCONFIRMED → NEW
Component: Layout → Layout: Fonts and Text
Ever confirmed: true
OS: Windows XP → All
QA Contact: core.layout → core.layout.fonts-and-text
(Reporter)

Comment 8

14 years ago
I agree that IE's support is unstable.

For the rest, all I know is that the CSS 1 spec at w3c.org says, "Do this to get
a drop cap," the CSS 2.1 spec says, "Do this to get a drop cap," the O'Reilly
chick book says, "Do this to get a drop cap," and the first three websites
returned by a Google search on '"drop caps" css' say, "Do this to get a drop
cap," but when I do it with Firefox, the result is too unsightly for production use.
This is in fact a duplicate of bug 21616.  Does setting the line-height (per bug
21616 comment 7) also break IE?

*** This bug has been marked as a duplicate of 21616 ***
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 10

14 years ago
I am not convinced that this actually is a dup of 21616 (which seems to involve
vertical, rather than horizontal problems), but both will clearly involve the
same reengineering.
You need to log in before you can comment on or make changes to this bug.