Closed Bug 197129 Opened 22 years ago Closed 21 years ago

Large characters that overflow their frame (e.g. trailing serif F) leave a trail

Categories

(Core Graveyard :: GFX: Win32, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 96041
mozilla1.4beta

People

(Reporter: carosendahl, Assigned: kmcclusk)

References

Details

(Whiteboard: edt_x3)

Attachments

(1 file)

Steps to reproduce: =================== 1. Launch Composer 3. Make sure you are in Times New Roman 4. Increase your font size to about 18pt (use the "+A" button) 5. Type a bunch of f's (ie: "fffffffffff") 6. Put your cursor into the middle of the word 7. Press the delete key a few times Expected behavior: The white space at the end is blank. Observed beahvior: The last 'f' is leaving pieces behind. This only happens with Times (a serif font) and when the point is 18+. This also only happens with the letter 'f'. (Haven't checked any other languages besides English).
Whiteboard: edt_x3
OS: Windows 2000 → All
Hardware: PC → All
->Views (painting problem)
Assignee: font → roc+moz
Component: Layout: Fonts and Text → Layout: View Rendering
It's not views. It's text drawing outside of the frame bounds.
Component: Layout: View Rendering → Layout: Fonts and Text
How about Gfx:Win32? Although one might consider it a font bug.
Assignee: roc+moz → kmcclusk
Component: Layout: Fonts and Text → GFX: Win32
No :) I think gecko uses the correct bounding box for the font, but fonts are allowed to have glyphs that extend outside of the normal bounds. There are APIs to get the max extent of the glyphs; gfx/frames need to use these to find out if text extends outside of the frame boundaries, and layout needs some way to allow frames to invalidate rects larger than their bounds.
I think Mac will have to use this OutlineMetrics call: http://developer.apple.com/techpubs/macosx/Carbon/text/FontManager/Font_Manager/fm_ref_chap/index.html we need to get the yMin and yMax out of there.
The Windows equivalent is GetOutlineTextMetrics, which returns an OUTLINETEXTMETRIC structure http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_569e.asp That includes two bites at the cherry, otmAscent and otmDescent, and otmMacAscent and otmMacDescent. We already use otmDescent internally to calculate the position of underlines, btw.
I think these two bugs are related to this bug: bug 96041, bug 106101. Making them dependent on this bug.
Blocks: 96041, 106101
Priority: -- → P1
Target Milestone: --- → mozilla1.4beta
I don't think bug 106101 is related -- I think that's about which font's metrics we use when multiple fonts are used to display the text. This bug and bug 96041 are about glyphs that overflow the font's metrics horizontally -- we need a GFX API for that information and then nsTextFrame needs to use that API when setting nsHTMLReflowMetrics::mOverflowArea (and calling nsFrame::StoreOverflow). I think our current APIs use the bounding box for vertical stuff already, so there's not an issue of vertical overflow. I don't see any reason this bug shouldn't be marked as a duplicate of bug 96041.
Summary: Trailing Serif F's leave a trail → Large characters that overflow their frame (e.g. trailing serif F) leave a trail
*** Bug 210398 has been marked as a duplicate of this bug. ***
re: comment #8 Such APIs already exist, BTW. These are the #ifdef MOZ_MATHML GetBoundingMetrics that MathML uses for its precise placements (the bounding metrics is a struct allowing us to get the "plain" and "overflow" areas to deal with all situations). It is what each platform that wishes to support MathML is required to implement. The latest in the series was Xft. C.f. bug 128153 comment 30 for quick reference & illustrative screenshots showing indeed the differences between the CSS rect metrics and the precise bounding metrics. This is indeed a dup of bug 96041. [I have mentioned in the past that mRect is way too restrictive as a basis for a modern layout engine (it locks the _thinking_) and that switching to mArea might be a better basis. Then one could argue that mArea has to be a circle, polygon, bounding metrics, or whatever, but the point being that it will help think out of the vanilla rect, and extra information could be stashed in a much more natural and forward looking manner (e.g., to meet those peculiar demands of CSS3).]
Attached file Testcase
*** Bug 271043 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 96041 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: