Closed
Bug 17503
Opened 26 years ago
Closed 24 years ago
vertical placement of text in widgets is wrong
Categories
(Core :: Layout: Form Controls, enhancement, P3)
Tracking
()
RESOLVED
FIXED
People
(Reporter: ji, Assigned: buster)
Details
(Whiteboard: partially fixed)
Attachments
(5 files)
Build: 1999102808
OS: RH6.0
This is a generic problem for all the text field widgets on RH6.0.
The problem is that the text entered in the text field is not
displayed in the center of the widget. For ascii characters, they
look okay except that the characters are located in the higher part
of the widget. But for the double-byte characters, not the whole
characters are displayed. The upper part of the double-byte characters
are cut off.
Steps of reproduce:
1. Open a new mail compose window.
2. Enter a Japanese character in the subject field.
You'll see the upper part of the character is cut off.
Updated•26 years ago
|
Assignee: trudelle → beppe
Component: XP Toolkit/Widgets → Editor
Comment 1•26 years ago
|
||
That's Editor, not an XPToolkit widget.
Updated•26 years ago
|
Component: XP Toolkit/Widgets → Editor
Comment 4•26 years ago
|
||
For some reason, the component got changed back to XPTool Kit. Now it's back to Editor.
Updated•26 years ago
|
Assignee: beppe → ftang
Comment 5•26 years ago
|
||
assigning this one to Frank.
Updated•26 years ago
|
Assignee: ftang → buster
Comment 6•26 years ago
|
||
I think this is a generic text field issue. Reassig this back to buster.
Erik- could you also take a look at this. Is that possible we use bigger
Japanese font w/ smaller ASCII font which have smaller matrix that cause this ?
If so, please reassign that to yourself. Thanks.
Comment 7•26 years ago
|
||
ji- is there a better test cases which will show the same problem in html form?
We should provide test cases which do not require input method installed if
possible. If the html form show the same problem. Please attach the html pages
which have pre set Japanese in the URL field above. This way, editor engineer
who do not have input method install can also investigate the problem. Thanks.
Comment 8•26 years ago
|
||
Normal English text is being displayed too high in the text field.
(owner: buster?)
The fact that Japanese characters end up being too big and truncated at the top
is a separate problem. (owner: erik; see 13578)
| Reporter | ||
Comment 10•26 years ago
|
||
attached html is a bugzilla page with a mixed string of ascii and Japanese
characters in the URL text field.
I think it might be caused by both of the reasons: ascii text is being displayed
too high in the text widget and Japanese characters are being displayed too
big. If you look at the location field of the browser, you'll see the url entered
in the text field is higher than the "Search" text on the right.
Comment 11•26 years ago
|
||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M12
Updated•26 years ago
|
Priority: P3 → P1
| Assignee | ||
Comment 12•26 years ago
|
||
the 10/29/99 10:39 test case doesn't show the problem. it shows "abcABC" I'll
added a screen grab of the results in the latest M11 build.
| Assignee | ||
Comment 13•26 years ago
|
||
| Assignee | ||
Comment 14•26 years ago
|
||
Comment 15•26 years ago
|
||
I suspect that you don't have Japanese fonts on your system.
Here's what it shoud look like (by displaying it now on yesterday's Win32 build.)
Comment 16•26 years ago
|
||
| Assignee | ||
Comment 17•26 years ago
|
||
is there some fairly easy way to load japanese fonts on my NT box? ftang,
momoi? know anybody who can help me do this if it's hard?
| Assignee | ||
Comment 18•26 years ago
|
||
is there any way you could supply an image for what it ought to look like? this
may help me determine if it's really a centering problem, or maybe an
ascent/decent problem in the style context.
Comment 19•26 years ago
|
||
The image I supplied at: 11/10/99 15:10 is what it should look like. The reported problem is on Linux and
on Windows, it looks better.
To install a Japanese font (Bitstream Cyberbit) on Windows, follow the=se steps:
1. Get Bitstream Cyberbit font:
http://rocknroll/users/momoi/publish/Fonts/BitstreamUnicode/V2.0/Cyberbit.ZIP
2. Unarchive it and put it somewhere temporarily.
3. Use Controkl Panel | Font | File | Install New Font menu to select this font and install.
4. Once this is done, Mozilla will pick up this font and begin displaying all the languages this font
supports without yo doing anything. (Note: If a web page is not labeled, you need to use View | Character Set
menu to set en encoding.)
Comment 20•26 years ago
|
||
I'm not saying that on Windows, it is perfectly centered. But at least you see all the parts of each font glyph.
Updated•26 years ago
|
Whiteboard: [PDT+] [TESTCASE NEEDED] → [PDT+] [TESTCASE NEEDED] [no firm start/end date yet]
Updated•26 years ago
|
Summary: [DOGFOOD]text field doesn't display text in the center of the widget → [DOGFOOD] vertical placement of text in widgets is wrong
Comment 21•26 years ago
|
||
Cc:ing rods, in case there are some CSS issues here.
Comment 22•26 years ago
|
||
I think it's important to realize that we are talking about several different
problems here. The one that Steve should be most concerned about is the fact
that plain English text is displayed too high in text fields (eg URL bar) both
on Linux and Windows. Steve, I would urge you to concentrate on this problem
initially, rather than installing a Japanese font and using that.
There are 2 other problems on Linux with Japanese text. One problem is that
Japanese fonts on Linux are large and not scalable. So the Japanese text ends
up being larger than English text.
Another problem is that the Unix GFX currently tries to solve the Japanese
underline problem (underline intersects Japanese and is ugly) by raising the
Japanese text. This contributes to the truncation problem mentioned in this
report.
I must emphasize that we ought to look at the English centering problem first.
Let's attack this problem one piece at a time. Divide and conquer.
Comment 23•26 years ago
|
||
So, Steve, I could help you if you tell me what code to look at. Specifically,
is there any code that attempts to center the text? Or are you simply relying
on the underlying layout engine to place the first line of text at the right
position? It may be using the ascent or max ascent of the font to place the
text, without taking the line-height (i.e. including leading) into account.
Where is the code that determines the vertical height of a single-line text
field? Is there any padding? Is the padding supposed to be both above and below
the text? Are we forgetting to add the padding to the ascent, so that the
padding disappears above the text, and it looks too high?
| Assignee | ||
Comment 24•26 years ago
|
||
erik: your plan of attack sounds good. I'll get you some detailed answers to
your questions this afternoon. Any help would be greatly appreciated.
Comment 25•26 years ago
|
||
Buster-
1. Do yo have a linux box ? Every Linux box come w/ japanese font installed.
2. Just concentrate on the fact the base line is too high.
Comment 26•26 years ago
|
||
I just discovered some inconsistencies between the Windows and Unix versions of
Mozilla. The height and ascent related fields are not being interpreted in the
same way. More details to follow.
Comment 27•26 years ago
|
||
If we get a workaround, we can move to PDT-. Assigning to erik per bobj. erik,
please see bobj, he has some ideas.
Comment 28•26 years ago
|
||
If we can just make the vertical padding in text fields larger as a workaround,
then this would no longer be a dogfood PDT+ bug. If that is easier than
fixing it for M12, we should just do that, and then reassign to buster to do
the real fix.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [PDT+] [TESTCASE NEEDED] [no firm start/end date yet] → [PDT+] [TESTCASE NEEDED] will check in 11/29
Comment 29•26 years ago
|
||
I have come up with a fix to make the height-related fields follow the Windows
version more closely. In addition, I have come up with a temporary fix to make
the fonts larger in CJK (East Asian) locales. In the future, we should modify
the layout engine to take large fonts into account. This may be non-trivial.
Comment 30•26 years ago
|
||
By the way, even plain English text on Windows is still not centered correctly,
so I will re-assign this bug to buster after I have checked in the fix for the
Unix font height stuff and CJK hack.
Updated•26 years ago
|
Assignee: erik → buster
Severity: major → normal
Status: ASSIGNED → NEW
Priority: P1 → P3
Whiteboard: [PDT+] [TESTCASE NEEDED] will check in 11/29 → [PDT+] partially fixed; please remove DOGFOOD and PDT+
Comment 31•26 years ago
|
||
I have checked in the temporary fix for East Asian text on Unix. I have also
logged a new bug so that we can work on the real fix:
http://bugzilla.mozilla.org/show_bug.cgi?id=20394
Re-assigning this bug back to buster, so that he can look at the English
centering problem (which happens even on Windows). However, I believe this
problem is not DOGFOOD and not PDT+. Please re-evaluate.
| Assignee | ||
Comment 32•26 years ago
|
||
erik says this is no longer PDT+. cc'ing jar and jan so they can re-evaluate
with PDT team. If PDT+ is indeed removed, please set to M14 as well.
Updated•26 years ago
|
Whiteboard: [PDT+] partially fixed; please remove DOGFOOD and PDT+ → partially fixed
Target Milestone: M12 → M14
Comment 33•26 years ago
|
||
Steve, I'm setting this to M14 for you and removing the PDT+
Comment 34•26 years ago
|
||
Putting on PDT- radar.
Comment 35•26 years ago
|
||
taking off dependency of 12658
Updated•26 years ago
|
Summary: [DOGFOOD] vertical placement of text in widgets is wrong → vertical placement of text in widgets is wrong
Whiteboard: [PDT-]partially fixed → partially fixed
Comment 36•26 years ago
|
||
updating summary fields, removing PDT- and [dogfood]
Severity: normal → enhancement
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Component: Editor → HTML Form Controls
Resolution: --- → REMIND
Target Milestone: M14 → M20
| Assignee | ||
Comment 37•26 years ago
|
||
There's an assumption here that the text within a single line text control
should be centered regardless of the height of the text control. This is
certainly the case if you do not specify the height, since a single line text
control is by default one line tall. But there isn't anything in the CSS spec
that says that text within a text control is centered. In fact, FWIW, in IE5 as
well as the current mozilla implementation, the text is flush upper left, just
as if the text control were a single line tall.
Single-line text controls are laid out as follows:
--------------------- <---- text control border-top
| | <---- text control padding-top
| .............. |
| .ABC . | <---- text control content, by default
| . . | <---- below this first line is all the excess height
| .............. |
| | <---- text control padding-bottom
|-------------------| <---- text control border-bottom
This is how mozilla and IE5 both work. Nav 4.x did not allow setting the height
of a text control, so there is no backwards compatibility issue.
I propose we leave this exactly as is. Page authors who want the effect of
centered text in tall text controls can use padding-top to push down the text
content relative to the top edge.
As an enhancement, we could offer a new "moz-center" alignment attribute to get
centered vertical alignment. But CSS-2 offers no clear way to
vertically center a block within another block, as would be needed to fulfill
this request.
If I understand Erik's comments correctly, the other problems reported in this
bug are either fixed or already described in other bugs. So I'm marking this
REMIND, setting severity to "enhancement", and milestone to M20. Erik, if I
misunderstood and there's still some problem that needs to be addressed, please
open a new bug or reopen this bug if you think that's more appropriate.
Changing component to HTML Form Controls. This really has nothing to do with
the editor itself, it's a layout issue (I know, the line there is fuzzy.)
Updated•26 years ago
|
QA Contact: claudius → ckritzer
Comment 38•26 years ago
|
||
Thanks for the info. I'll leave this bug marked RESOLVED REMIND for now, but I
still have a question (if I may). I didn't realize that the height of the text
control is set "externally". I thought that the height of a single-line text
control would be directly related to the size of the font inside it. That is
how I would like it to be, because then you could achieve "true" centering. Is
it too difficult to make the text control height depend directly on the font
size? Or undesirable for other reasons?
| Assignee | ||
Comment 39•26 years ago
|
||
Is the absence of a height style property, the text is centered according to
calculations that use the font metrics. An explicit height property overrides
this default calculation.
Comment 40•26 years ago
|
||
Do the single-line text fields in the product have an explicit height property?
| Assignee | ||
Comment 41•26 years ago
|
||
what do you mean by "in the product?" I'm sure some XUL-based UI's set explicit
heights, and some don't. cc-ing paul h. who would know better than I.
Comment 42•26 years ago
|
||
I mean our own XUL/CSS. In Mozilla. If you don't set the height explicitly,
does the text control automatically assume that you want a single line?
| Assignee | ||
Comment 43•26 years ago
|
||
height and "number of lines" are totally independent. "height" is a box layout
attribute. number of lines is as per HTML 4.0 spec: <input> is by definition
single line, and <textarea> is multiple lines (as many lines as the content
requires.) The height of a <textarea> can be explicitly set to the line height
of course, but that does not make it a single line text control, just a short
multi-line text control.
Comment 44•26 years ago
|
||
I am not aware of any place where we have height= in the xul or css for
html:input type="text". We do set min-height for html:input type="text" in the
global.css file. This min-height may be wrong and if so could be removed. We
would probably just have to confirm with german.
Comment 46•24 years ago
|
||
REMIND is deprecated per bug 35839.
Status: RESOLVED → REOPENED
Resolution: REMIND → ---
Comment 47•24 years ago
|
||
seems effectively fixed.
Status: REOPENED → RESOLVED
Closed: 26 years ago → 24 years ago
Resolution: --- → FIXED
Comment 49•23 years ago
|
||
chaging QA contact to the default QA owner. Thx!
QA Contact: madhur → tpreston
You need to log in
before you can comment on or make changes to this bug.
Description
•