CSS ex unit sizing

Ivor Hewitt ivor at ivor.org
Wed Jun 8 19:11:27 BST 2005


On Wednesday 08 Jun 2005 11:11, Ivor Hewitt wrote:
> Hi,
>
> This patch produces correct css "-ex" unit sizings.
>
> Unfortunately it requires/would require a Qt patch to provide this support
> for QFontMetrics, I've dropped Trolltech a line about this too since it's a
> handy addition to the API.
>
Hmm, ok I was considering adding the truetype code for this into khtml 
separately, ideally I'd like direct access the FT_Face that Qt is using for 
the QFont, however this is private to the Qt API for obvious reasons.

I can think of two options:-

1. I could add QFONT_HAS_XHEIGHT to the Qt header and then make the code 
conditional on having a patched qt-copy
2. I could add the code to loadup a freetype font and query the metrics in the 
css code. 

Option 1 seems much cleaner, but would restrict its usefulness to developers 
building qt-copy.
Option 2 is horrid, but would mean that we could access other detailed font 
metrics if we needed to for other purposes (more exact spacing).

Opinions/Rants/Flames?

Regards,

-- 
Ivor Hewitt.
http://www.ivor.it - tech | http://www.ivor.org - hedge




More information about the kfm-devel mailing list