Closed
Bug 293852
Opened 20 years ago
Closed 17 years ago
text-anchor middle/end does not work with small font sizes
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: edA-qa, Unassigned)
References
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050511 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050511 Firefox/1.0+ In the attachment there is a demonstation of two text layout problems, where the text is being positioned somewhere (which to the user) appears totally random if its size is outside a specific size range. Related but distinct issues: 290044, 291785, 292837 Reproducible: Always Actual Results: (Screenshot attached in case platform settings change layout) Error #1: Orange text is simply missing, should be overlapped on Green text. Error #2: Red text is partially visible at top of browser, should be overlapped on blue text. Expected Results: All text should be aligned form the center point growing downwards as size increases.
| Reporter | ||
Comment 1•20 years ago
|
||
Source file for reproduction
| Reporter | ||
Comment 2•20 years ago
|
||
Comment 3•19 years ago
|
||
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
| Reporter | ||
Comment 4•19 years ago
|
||
Reproduction code works even worse in DeerPark Alpha 2 -- there is no text displayed anymore.
Comment 5•19 years ago
|
||
*** Bug 313505 has been marked as a duplicate of this bug. ***
Comment 6•19 years ago
|
||
From Bug 313505 From my investigation, it looks like this is an issue with using small fonts i.e. with a size less than 0.5 within cairo/win32. If you increase the font-size numbers (say x 10 or x 100 if necessary) and rescale the viewbox similarly the resultant file should display correctly. cairo-win32-font.c has a function _compute_transform which is used to calculate the logical_size of a font. This rounds up to the nearest whole number as it has to be passed to _win32_scaled_font_get_scaled_hfont which puts it into a LOGFONT structure that needs an integer value.
Comment 7•18 years ago
|
||
*** Bug 350566 has been marked as a duplicate of this bug. ***
Comment 8•18 years ago
|
||
*** Bug 362659 has been marked as a duplicate of this bug. ***
Comment 9•18 years ago
|
||
Confirming that text is not rendered at all on Windows with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061203 Minefield/3.0a1.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 11•17 years ago
|
||
changed title to make it easier to find.
Summary: Text location altered by text-size (incorrectly positioned text) → text-anchor middle/end does not work with small font sizes
Comment 13•17 years ago
|
||
Can we get some kind of workaround in FF ? The bug is 2.5 years old ... Like a wrapper multiplying everything by 1000 before passing to this function and then dividing the result.
Comment 14•17 years ago
|
||
This file reproduces the problem and clearly shows how the text-anchor="end" is not rendered correctly at different font sizes. This is quite a serious issue and is much worse at longer string lengths.
Attachment #288026 -
Flags: review+
Updated•17 years ago
|
Attachment #288026 -
Flags: review+
Comment 15•17 years ago
|
||
The file I attached demo's the problem where the text does not end consistently at the correct place when you use text-anchor=end.
To reproduce this problem (I reproduced it on XP and Win2K)
- Open this file in Firefox (reproduced in v2.0.0.5 and earlier versions)
- If you have only 1 tab open then all seems to work fine !!
- When there is at least two tabs open then the problem will be visible
Description of problem
Expect to see:
18 lines of text, with decreasing font sizes, right aligned to a
vertical red line that appears at x=500.
What we get:
We get the 18 lines of text. However they don't all align at the same
x value. The first line (size=21) is approx ok. The next three lines
(20,19,18) end at varying distances before the red line. The
next four lines (17,16,15,14) all overshoot and end to the right of the
red line. This pattern repeats as the font size reduces.
NOTE:
- The problem is worse the longer the text string.
- For very short strings the positioning is very close to correct
- Becomes a big issue if have several different length strings which
are right aligned to a vertical edge. In this case the alignment is
not correct (as it depends on string length) and looks very bad.
- Problem doesn't happen if have only one tab open in FF !! (could this
be a help in tracking it down??)
Richard Hogan
Comment 16•17 years ago
|
||
Fixed by check in for bug 392233
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•