vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

superscript is incorrectly rendered inside tables #238

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a table with some cells
2. put something <sup>in superscript</sup>
3. render

What is the expected output? What do you see instead?
expected is a good superscript rendering, but it fails to do so.

What version of the product are you using? On what operating system?
0.6 beta2

Please provide any additional information below.
The the rendering of the superscript seems to be influenced by altering the 
global line-height of the document.

Original issue reported on code.google.com by excepti...@hotmail.com on 25 Feb 2011 at 8:27

GoogleCodeExporter commented 9 years ago
How are you globally modifying the line height? Something like * { line-height: 
1em; }? Do you have a sample document?

A quick perusal of the W3 spec for HTML4 doesn't indicate how superscript 
should be rendered. Am I missing something? I have seen other places indicate 
that the rise should be half a character and not based on line height. However, 
if this is your primary complaint it affects text outside a table as well.

Original comment by eclecticgeek on 28 Feb 2011 at 7:25

GoogleCodeExporter commented 9 years ago

Original comment by fabien.menager on 14 May 2011 at 11:32

GoogleCodeExporter commented 9 years ago
Actually it is not needed to alter the global line-height of the document.

The following just demonstrates the current problems:

<td>Some <span class="s1">special</span> text.</td>

inside a table, and some css:

span.s2 {
   font-size: 50%;
}

It seems like changing color the text inside a table-cell has effect, but 
font-resizing isnt honored at all.

Original comment by excepti...@hotmail.com on 23 Sep 2011 at 10:05

GoogleCodeExporter commented 9 years ago
Font sizing appears to work correctly. Your sample code is using the wrong 
class name inside the table.

The problem with superscript appears to be related to text that is not 
contained within a block-level element. A work-around to the problem is to 
surround your text with some type of block element, e.g. P or DIV.

Original comment by eclecticgeek on 24 Sep 2011 at 12:47

GoogleCodeExporter commented 9 years ago
attaching test document

Original comment by eclecticgeek on 24 Sep 2011 at 12:48

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00