Open Bug 294070 Opened 20 years ago Updated 2 years ago

Selection of text reduces the font size of the first letter if :first-letter is set

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows 2000
defect

Tracking

()

People

(Reporter: danzcontrib, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8b2+) Gecko/20050512
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8b2) Gecko/20050512

If you select text with the latest trunk (rv:1.8b2) Gecko/20050512) with 
first-letter in the style of a paragraph or a division, the font size is reduced

Reproducible: Always



Expected Results:  
highlight the text without modification
Attached file selection and first-letter problem (obsolete) —
Attached file colorful testcase
colored background on div and first-letter shows reduced height of character
background when first letter is set. This gives the illusion of shrinking
font-size if character is selected.
Attachment #183534 - Attachment is obsolete: true
confirming Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050513

It can also be seen doing selections on testcase of 
Bug 275138 {inc} ::first-letters are too big and overlap 
https://bugzilla.mozilla.org/attachment.cgi?id=169012
Assignee: general → nobody
Severity: minor → normal
Status: UNCONFIRMED → NEW
Component: General → Layout: Block and Inline
Ever confirmed: true
Product: Mozilla Application Suite → Core
QA Contact: general → layout.block-and-inline
Version: unspecified → Trunk
In my build
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050513

I do not see any reduction of text[font]-size, though I do see a smaller
selection "size"/area.
The first-letter font doesn't change.  Its background area is in fact not the
full font metrics height, but this is sort of by design... at least for floated
first-letters.  rbs, could we somehow change the fix for bug 21616 to only kick
in when the first-letter is floated?
Maybe we can store the line layouts first-letter frame in the TextReflowData,
and then look at its display value in this code?
Yeah, it is by design... a trade-off between a largish line-spacing (on the
whole line...) or a smallish background area (on just the first letter).

I for one prefer the smallish background.

Reporter, Hermann Schwab, Justin Wood, try "font-size: 300%" on the first-letter
style. Then see what your think about an old build (with the largish
line-spacing) or a more recent build (with a smallish background area).
Ah, right.  It's also an issue for non-floated first-letter, so nevermind
comment 5 and 6.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: