<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 20, 2016 at 11:27 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><span style="color:rgb(34,34,34)">Using built-in fonts I also get text rendered smaller than expected.</span><br></div></div>
<br>
However, I think it's a matter of DPI. I guess VTK assumes a DPI of 72<br>
somewhere?<br>
<br>
With the following, the text is rendered in the expected size:<br>
<br>
    auto logicalDpiY = QApplication::screens().at(0)-<wbr>>logicalDotsPerInchY();<br>
    ...<br>
    textProperty->SetFontSize(<wbr>qRound(10 * (logicalDpiY / 72.0)));<br>
<span class="">    textProperty-><wbr>SetFontFamilyAsString("Noto Sans");<br>
<br>
</span>So I'm compensating for VTK's assumption about 72 DPI by increasing<br>
the font size (on my system Qt's logicalDotsPerInchY() reports<br>
96.2526).<br>
<br>
I guess I should also figure out how to be notified when the widget is<br>
moved to another screen and update the size, since the DPI of the<br>
other screen might be different.<br></blockquote><div><br></div><div>Aha, yes, VTK does assume 72 DPI by default. We very recently added the ability to change that for text rendering purposes. Call vtkRenderWindow::SetDPI to update it to what Qt is using, and the text rendering should adjust accordingly. Let me know if that fixes it.</div><div><br></div><div>Dave </div></div></div></div>