ChrisZim / edb-debugger

Automatically exported from code.google.com/p/edb-debugger
GNU General Public License v2.0
0 stars 0 forks source link

AnalyzerWidget, triangle symbol and Unicode font #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On Windows, the default Qt font seems to be something non-Unicode so instead of 
a triangle there is a square in the analyzer widget.

I added this line to AnalyzerWidget::paintEvent:
painter.setFont(QFont("Lucida Sans Unicode"));
and now it correctly draws the triangle, although it looks pretty small.

I did some googling but I haven't found any info about the preferred way to get 
Qt to use the default or any Unicode font. And there don't seem to be any fonts 
that are guaranteed to be on Linux, Windows and OSX.

Original issue reported on code.google.com by evan.teran on 3 Oct 2012 at 3:22

GoogleCodeExporter commented 9 years ago
First of all, very speedy reporting :-).

I suppose the "best" solution would be the set the font and size in a

    #ifdef Q_OS_WIN32
    #endif

block.

Or, if all else fails, I could just use an image of the triangle and draw it 
manually. Either way, good catch.

Original comment by evan.teran on 3 Oct 2012 at 5:13

GoogleCodeExporter commented 9 years ago
I've updated the SVN to special case Win32 during painting. It now switches 
fonts when drawing the triangle, then switches back when done.

Original comment by evan.teran on 3 Oct 2012 at 5:13