Bug 113728 - [CSS 2.1 Conformance] font-size 0px or 1px or 1pt are not rendered
Summary: [CSS 2.1 Conformance] font-size 0px or 1px or 1pt are not rendered
Status: RESOLVED UNMAINTAINED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.8.4
Platform: Ubuntu All
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL: http://test.csswg.org/suites/css2.1/l...
Keywords: testcase, triaged
: 302255 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-02 18:21 UTC by Yours Truly
Modified: 2024-05-06 18:40 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
example font-size: 1px (13.03 KB, text/html)
2007-06-13 22:54 UTC, Yours Truly
Details
Generator for more examples (304.30 KB, text/html)
2007-06-19 23:40 UTC, Yours Truly
Details
differences between browsers (287.09 KB, image/jpeg)
2008-05-06 17:23 UTC, FiNeX
Details
Simple testcase, showing small text, formatted by inline-css in a span element (187 bytes, text/html)
2008-08-24 14:53 UTC, Dominik Tritscher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yours Truly 2005-10-02 18:21:33 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Unlisted Binary Package
OS:                Other

When rendering inline CSS on a SPAN element with font-size: 1px or font-size: 1pt Konqueror renders fonts too large.

Last screenshot on this page - http://mardeg.sitesled.com/scripts/js/emailogo/index.html

Note that page has a link to a javascript page that will generate any number of minimal test cases you want.

As the screenshots indicate, the CSS in question renders correctly in every other html engine including Safari which I believe uses AppleWebKit based on KHTML so I don't know whether it's the KHTML engine at fault or if it's solely due to Konqueror not allowing Settings -> Configure Konqueror -> Fonts, Minimum Font size to be set lower than 2 I'd appreciate some feedback on this.

I'm using Qemu on windows XP SP2 with Knoppix 4.0.1 running KDE 3.4.1
Comment 1 Thiago Macieira 2005-10-02 18:37:34 UTC
Confirmed.
Comment 2 Ian P. Christian 2005-10-03 23:14:10 UTC
Patch to fix.

 # svn diff kdebase/kcontrol/konqhtml/appearance.cpp
Index: kdebase/kcontrol/konqhtml/appearance.cpp
===================================================================
--- kdebase/kcontrol/konqhtml/appearance.cpp    (revision 464354)
+++ kdebase/kcontrol/konqhtml/appearance.cpp    (working copy)
@@ -47,7 +47,7 @@

   m_minSize = new KIntNumInput( fMinSize, gb );
   m_minSize->setLabel( i18n( "M&inimum font size:" ) );
-  m_minSize->setRange( 2, 30 );
+  m_minSize->setRange( 1, 30 );
   connect( m_minSize, SIGNAL( valueChanged( int ) ), this, SLOT( slotMinimumFontSize( int ) ) );
   connect( m_minSize, SIGNAL( valueChanged( int ) ), this, SLOT( changed() ) );
   QWhatsThis::add( m_minSize, i18n( "Konqueror will never display text smaller than "
Comment 3 Yours Truly 2005-10-12 20:11:11 UTC
I tried without success to set it manually in file ~/.kde/share/config/konquerorrc by changing the line in section [HTML Settings] to MinimumFontSize=1

If anyone does get it to display properly with that workaround, please attach a screenshot here.
Comment 4 Frank Osterfeld 2006-08-24 12:38:53 UTC
It works here if you set MinimumFontSize=1 in konquerorrc and start a new konq instance.
However, I would vote to mark this as WONTFIX, as allowing font size 1 just for this purpose doesn't make much sense. By default, it has a higher value, so people would have to change the setting.
This gimmick just doesn't work with the minimum font size setting (which is in general a good thing, the benefits outweight this gimmick not working).
Comment 5 Yours Truly 2006-12-07 03:46:41 UTC
from the Konqueror faq:
http://www.konqueror.org/faq/#AsanauthorofawebsitehowcanIidentifyKonquerorfromotherbrowsers

"We are working very hard on making all the differences go away thus making any differentiation impossible - or rather needless."

This would seem to go against setting WONTFIX on this.
Comment 6 Yours Truly 2007-06-13 22:54:48 UTC
Created attachment 20852 [details]
example font-size: 1px

URL in comment #1 has been changed to http://mardeg.hyperphp.com
Comment 7 Yours Truly 2007-06-19 23:40:03 UTC
Created attachment 20909 [details]
Generator for more examples

When the page host is down, like now :(
Comment 8 FiNeX 2008-05-06 17:21:35 UTC
I've just tested on Firefox 2, konqueror 3.5.9 and 4 (trunk r804500).

The generated email (from the testcase on comment #7) is different.

See the next screenshot for an example.

konqueror doesn't render like firefox.
Comment 9 FiNeX 2008-05-06 17:23:40 UTC
Created attachment 24651 [details]
differences between browsers
Comment 10 Dominik Tritscher 2008-08-24 14:48:53 UTC
I created a more basic testcase (see attachment) that simply follows the steps described in the initial report.
Displaying that sample page with a span-element and inline-css setting the font-size to 1pt shows the text in the smallest font-size allowed by konquerors font settings.
The smallest possible font-size is 2pt in konqueror4.
As the CSS2.1 specification cleary recommends to not allow such small font-sizes (CSS2.1, Chapter 15.7, Note 1 - http://www.w3.org/TR/CSS21/fonts.html#font-size-props) I pledge for WONTFIX
Comment 11 Dominik Tritscher 2008-08-24 14:53:43 UTC
Created attachment 27021 [details]
Simple testcase, showing small text, formatted by inline-css in a span element
Comment 12 Gérard Talbot (no longer involved) 2010-05-26 06:34:05 UTC
Dominik, I also think that anything below/smaller than 9px should not be allowed and should not be reported as a bug. +1 for WONTFIX

Gérard
Comment 13 Gérard Talbot (no longer involved) 2011-01-12 03:17:52 UTC
News and update.

Konqueror 4.5.5 requires a minimum font-size of 2pt, which is going to be rounded up to 3px.

At least 39 testcases from the (latest release is RC4) CSS 2.1 test suite
http://test.csswg.org/suites/css2.1/20101210/html4/toc.html
in particular in chapter 15, are going to fail in Konqueror 4.5.5 because of such limitation and because 'font-size: 0' is not rendered accordingly.

http://lists.w3.org/Archives/Public/public-css-testsuite/2011Jan/0059.html

Here's such list:

http://test.csswg.org/suites/css2.1/20101210/html4/font-size-001.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-002.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-003.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-004.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-005.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-012.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-013.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-014.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-015.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-023.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-024.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-026.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-027.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-034.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-035.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-037.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-038.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-045.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-046.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-047.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-048.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-049.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-056.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-057.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-059.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-067.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-068.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-070.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-078.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-079.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-080.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-081.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-089.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-090.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-092.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-093.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-100.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-101.htm
http://test.csswg.org/suites/css2.1/20101210/html4/font-size-102.htm

The negative font-size testcases (eg: 'font-size: -1px') are coded in a
way that rely on the tested browsers to render appropriately 'font-size:
0'.

Recently, it was said that Chrome 9 now supports 'font-size: 0':
http://lists.w3.org/Archives/Public/public-css-testsuite/2011Jan/0060.html

So, it seems that, to be compliant with CSS 2.1, Konqueror *_has to_* support 'font-size: 2px', 'font-size: 1px' and 'font-size: 0px'.

"
There is nothing in the specification that states that the font can't be set at 1px or 0. There is nothing that makes these cases invalid. The user agent if it wants to be compatible needs to support a way to get to 0px.
"
http://lists.w3.org/Archives/Public/public-css-testsuite/2011Jan/0061.html

regards, Gérard
Comment 14 Janek Bevendorff 2012-06-18 17:43:33 UTC
Message from the Bugsquad and Konqueror teams: This bug is closed as outdated, as we do not have the manpower to maintain the KDE3 version anymore. If you still can reproduce this issue with Konqueror 4.8.4 or later, please open a new report. Thank you for your understanding.
Comment 15 Gérard Talbot (no longer involved) 2012-06-20 18:50:15 UTC
> Message from the Bugsquad and Konqueror teams: This bug is closed as
> outdated, as we do not have the manpower to maintain the KDE3 version
> anymore. If you still can reproduce this issue with Konqueror 4.8.4 or
> later, please open a new report. Thank you for your understanding.

This bug affects Konqueror 4.8.4 with the KHTML rendering engine and with the webkit rendering engine in about 100 tests from the CSS 2.1 test suite.

I'm afraid we need to open a NEW BUG REPORT here... or we could just change 3.4.2 to 4.8.4 ...

Gérard
Comment 16 Gérard Talbot (no longer involved) 2012-06-21 02:27:20 UTC
The thing is if I close this bug and reopen a brand new one, then votes and voters are lost and +CC-list-ed people are lost too. So, I have to REOPEN this bug report.

Therefore, I'm REOPENING this bug.

Gérard
Comment 17 Gérard Talbot (no longer involved) 2012-06-21 17:55:39 UTC
*** Bug 302255 has been marked as a duplicate of this bug. ***
Comment 18 Christoph Cullmann 2024-05-06 18:40:02 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann