CSS ex unit sizing

David Faure faure at kde.org
Thu Jun 9 12:08:16 BST 2005


On Wednesday 08 June 2005 20:11, Ivor Hewitt wrote:
> 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

That's quite useless since nobody is using qt-copy except developers.
(and if any distributor uses qt-copy, he'd end up with a binary that doesn't run against
the normal Qt, a very bad idea - ask Suse, they did that at some point...)

> 2. I could add the code to loadup a freetype font and query the metrics in the 
> css code. 

Which is slow because it means loading the font twice, right?

IMHO the right thing to do is lobby for the method to be added to Qt4, and commit
the khtml code with #if 0 until then.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kfm-devel mailing list