Wednesday, October 17, 2007

A Dirty Italics Hack

This patch will make fonts already acting properly for italics go to "SUPER ITALICS"

So if you have been following along, you'll know that italics aren't working for certain fonts. I have created a really dirty (like roll around in the mud dirty) hack... a little description as given on IRC

xrayon: just give me the dirtiest part
mullin: the dirty part is reading whether a font should be italic or not
mullin: so I do some casting where I shouldn't
mullin: so during init time I read whether the font should be italic, and I set a variable that is kept around until draw time
mullin: at draw time I retrieve that variable, if the variable is true
mullin: I shear all text glyphs a little bit
mullin: making them look italics

The Patch

Project Page

No comments: