[Interest] Font over-line control.
Bill Crocker
william.crocker at analog.com
Fri Sep 4 12:23:42 CEST 2015
Hello Gang:
I use a QTextDocument to format HTML
for display in a QGraphicsTextItem.
Text can be over-lined with:
<span style="text-decoration:overline">ABC</span>
Is there any way to control the width
and vertical position of the over-line
line segment?
It looks like the line thickness comes from
font_engine->lineThickness().
Can I create my own font engine by deriving
from my existing font engine and overriding
the lineThickness() function?
I see QAbstractFontEngine but the doc says that
that is for embedded Linux and I am not embedded.
The vertical offset appears to be hard coded at
font_engine->ascent()+1 (which is too bad)
while the underline position comes from the font engine.
See: qtextlayout.cpp
Thanks.
Bill
More information about the Interest
mailing list