<html><head>

<style id="css_styles"> 
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] {  list-style-position: inside;}
body { font-family: 'Segoe UI'; font-size: 12pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
a.em-mention[href] { text-decoration: none; color: inherit; border-radius: 3px; padding-left: 2px; padding-right: 2px; background-color: #e2e2e2; }
._em_placeholder {color: gray; border-bottom: 1px dotted lightblue;} ._em_placeholder:before{color:gray; content: '{{ ';} ._em_placeholder:after{color:gray; content: ' }}';}

 </style>
</head>
<body>Hi again.<div><br /></div><div>With some trepidation, I have a question about fonts again.  Not so much about fonts in general, but about display quality of the font I am using.</div><div><br /></div><div>I have a <font face="Consolas">QTableView</font> with a custom delegate.  The delegate editor is implemented as a <font face="Consolas" size="3" style="font-size: 16px;">QPlainTextEdit</font> widget which has a <font face="Consolas" size="3" style="font-size: 16px;">QSyntaxHighlighter</font> associated with it.</div><div><br /></div><div>I am loading a .ttf file at runtime and using it as the display font.  Initially the quality is pretty poor everywhere [attached screenshot <b>initial.png</b>].</div><div><br /></div><div>I found online the suggestion to create a font object, call <font face="Consolas" size="3" style="font-size: 16px;">.setHintingPreference(PreferNoHinting)</font> on it, then apply that to the <font face="Consolas" size="3" style="font-size: 16px;">QApplication</font> object [lines #175-177].  That seems to improve the display significantly.</div><div><br /></div><div>Except for the text displayed by the syntax highlighter.  That text is still pixelated [attached screenshot <b>highlighter.png</b>].  It's as though the <font face="Consolas" size="3" style="font-size: 16px;">.setHintingPreference()</font> call doesn't affect the syntax highlighter.</div><div><br /></div><div>Wondering if there's any way around this?</div><div><br /></div><div>Thanks again!</div><div><br /></div><div>/John</div><div><br /></div><div><i>[Sample code, screenshots and font file are attached]</i></div></body></html>