<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Font-Problem VC6.0 Windows]]></title><description><![CDATA[<p>Hallo</p>
<p>In meiner Applikation sollte sich die Font-Größe aus der Auflösung und den eingestellen Zeilen/Spalten ergeben.</p>
<p>int main(int argc, char* argv[])<br />
{<br />
HFONT font;<br />
LOGFONT myFont;<br />
HDC testDC;<br />
SIZE fontSize;<br />
UINT i;<br />
BOOL rc;</p>
<p>testDC = CreateCompatibleDC(0);</p>
<p>memset(&amp;myFont, 0, sizeof(myFont));</p>
<p>myFont.lfWeight = FW_MEDIUM;<br />
myFont.lfCharSet = ANSI_CHARSET;<br />
myFont.lfPitchAndFamily = FIXED_PITCH;<br />
myFont.lfQuality = ANTIALIASED_QUALITY;<br />
myFont.lfOutPrecision = OUT_RASTER_PRECIS;<br />
strcpy(myFont.lfFaceName , &quot;Courier New&quot;);</p>
<p>for (i = 0; i &lt; 10; i++) {<br />
myFont.lfHeight = 20 + i;<br />
myFont.lfWidth = 16;</p>
<p>font = CreateFontIndirect(&amp;myFont);</p>
<p>SelectObject(testDC, font);<br />
rc = GetTextExtentPoint32(testDC, &quot;X&quot;, 1, &amp;fontSize);<br />
if (rc == TRUE) {<br />
dprintf(&quot;Font (%d/%d) -&gt; (%d/%d)&quot;, myFont.lfWidth, myFont.lfHeight, <a href="http://fontSize.cx" rel="nofollow">fontSize.cx</a>, <a href="http://fontSize.cy" rel="nofollow">fontSize.cy</a>);<br />
}<br />
}</p>
<p>DeleteDC(testDC);</p>
<p>return 0;<br />
}</p>
<p>Output:<br />
Font (16/20) -&gt; (15/20)<br />
Font (16/21) -&gt; (16/21)<br />
Font (16/22) -&gt; (16/22)<br />
Font (16/23) -&gt; (17/23)<br />
Font (16/24) -&gt; (17/24)<br />
Font (16/25) -&gt; (17/25)<br />
Font (16/26) -&gt; (16/25)<br />
Font (16/27) -&gt; (16/27)<br />
Font (16/28) -&gt; (16/27)<br />
Font (16/29) -&gt; (16/29)</p>
<p>Wieso erhalte ich bei 16/24 einen Font mit einer Breite von 17? Dies darf nicht passieren, da der Text somit größer ist als der verfügbare Zeichenbereich. Bei 15/24 würde ich 16/24 erhalten - welche Logik steckt hier dahinter?</p>
<p>Danke!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192205/font-problem-vc6-0-windows</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 06:00:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192205.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 Sep 2007 16:30:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Tue, 11 Sep 2007 16:30:28 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>In meiner Applikation sollte sich die Font-Größe aus der Auflösung und den eingestellen Zeilen/Spalten ergeben.</p>
<p>int main(int argc, char* argv[])<br />
{<br />
HFONT font;<br />
LOGFONT myFont;<br />
HDC testDC;<br />
SIZE fontSize;<br />
UINT i;<br />
BOOL rc;</p>
<p>testDC = CreateCompatibleDC(0);</p>
<p>memset(&amp;myFont, 0, sizeof(myFont));</p>
<p>myFont.lfWeight = FW_MEDIUM;<br />
myFont.lfCharSet = ANSI_CHARSET;<br />
myFont.lfPitchAndFamily = FIXED_PITCH;<br />
myFont.lfQuality = ANTIALIASED_QUALITY;<br />
myFont.lfOutPrecision = OUT_RASTER_PRECIS;<br />
strcpy(myFont.lfFaceName , &quot;Courier New&quot;);</p>
<p>for (i = 0; i &lt; 10; i++) {<br />
myFont.lfHeight = 20 + i;<br />
myFont.lfWidth = 16;</p>
<p>font = CreateFontIndirect(&amp;myFont);</p>
<p>SelectObject(testDC, font);<br />
rc = GetTextExtentPoint32(testDC, &quot;X&quot;, 1, &amp;fontSize);<br />
if (rc == TRUE) {<br />
dprintf(&quot;Font (%d/%d) -&gt; (%d/%d)&quot;, myFont.lfWidth, myFont.lfHeight, <a href="http://fontSize.cx" rel="nofollow">fontSize.cx</a>, <a href="http://fontSize.cy" rel="nofollow">fontSize.cy</a>);<br />
}<br />
}</p>
<p>DeleteDC(testDC);</p>
<p>return 0;<br />
}</p>
<p>Output:<br />
Font (16/20) -&gt; (15/20)<br />
Font (16/21) -&gt; (16/21)<br />
Font (16/22) -&gt; (16/22)<br />
Font (16/23) -&gt; (17/23)<br />
Font (16/24) -&gt; (17/24)<br />
Font (16/25) -&gt; (17/25)<br />
Font (16/26) -&gt; (16/25)<br />
Font (16/27) -&gt; (16/27)<br />
Font (16/28) -&gt; (16/27)<br />
Font (16/29) -&gt; (16/29)</p>
<p>Wieso erhalte ich bei 16/24 einen Font mit einer Breite von 17? Dies darf nicht passieren, da der Text somit größer ist als der verfügbare Zeichenbereich. Bei 15/24 würde ich 16/24 erhalten - welche Logik steckt hier dahinter?</p>
<p>Danke!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363499</guid><dc:creator><![CDATA[happymozart]]></dc:creator><pubDate>Tue, 11 Sep 2007 16:30:28 GMT</pubDate></item><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Tue, 11 Sep 2007 18:03:30 GMT]]></title><description><![CDATA[<p>Vielleicht hilft dir das hier weiter:</p>
<p><a href="http://www.codeguru.com/forum/showthread.php?t=379565" rel="nofollow">http://www.codeguru.com/forum/showthread.php?t=379565</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363555</guid><dc:creator><![CDATA[a]]></dc:creator><pubDate>Tue, 11 Sep 2007 18:03:30 GMT</pubDate></item><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Wed, 12 Sep 2007 06:11:04 GMT]]></title><description><![CDATA[<p>Du kanst nur einen Wunsch an den Font-Mapper ausprechen was Du gerne hättest. Welcher physikalische Font am Ende rauskommt ist eine andere Sache.<br />
Das ist so by design vor allem weil nicht alle Fonts frei skalierbar sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363769</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Wed, 12 Sep 2007 06:11:04 GMT</pubDate></item><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Thu, 13 Sep 2007 11:29:12 GMT]]></title><description><![CDATA[<p>Danke für die Antworten</p>
<p>Beim &quot;Courier New&quot; handelt es sich meines Wissens um einen TrueTyp-Font und dieser solle doch eigentlich frei skalierbar sein. Verwendet ich z.B.: die Fonts &quot;&quot;DotumChe&quot; o. &quot;Lucida Console&quot; ist dies der Fall. Wieso verhält sich &quot;Courier New&quot; anders?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364592</guid><dc:creator><![CDATA[happymozart]]></dc:creator><pubDate>Thu, 13 Sep 2007 11:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Thu, 13 Sep 2007 11:33:41 GMT]]></title><description><![CDATA[<p>Das garantiert dennoch nicht punkt genaues Mapping!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364594</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364594</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 13 Sep 2007 11:33:41 GMT</pubDate></item><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Thu, 13 Sep 2007 13:00:30 GMT]]></title><description><![CDATA[<p>vielleicht steh ich gerade etwas auf der Leitung</p>
<p>Output &quot;Courier New&quot;:<br />
Font (16/10) -&gt; (15/8)<br />
Font (16/11) -&gt; (13/8)<br />
Font (16/12) -&gt; (14/12)<br />
Font (16/13) -&gt; (14/12)<br />
Font (16/14) -&gt; (14/14)<br />
Font (16/15) -&gt; (14/15)<br />
Font (16/16) -&gt; (15/16)<br />
Font (16/17) -&gt; (15/17)<br />
Font (16/18) -&gt; (16/18)<br />
Font (16/19) -&gt; (15/18)<br />
Font (16/20) -&gt; (15/20)<br />
Font (16/21) -&gt; (16/21)<br />
Font (16/22) -&gt; (16/22)<br />
Font (16/23) -&gt; (17/23)<br />
Font (16/24) -&gt; (17/24)<br />
Font (16/25) -&gt; (17/25)<br />
Font (16/26) -&gt; (16/25)<br />
Font (16/27) -&gt; (16/27)<br />
Font (16/28) -&gt; (16/27)<br />
Font (16/29) -&gt; (16/29)</p>
<p>Output &quot;DotumChe&quot; and &quot;Lucida Console&quot;:<br />
Font (16/10) -&gt; (16/10)<br />
Font (16/11) -&gt; (16/11)<br />
Font (16/12) -&gt; (16/12)<br />
Font (16/13) -&gt; (16/13)<br />
Font (16/14) -&gt; (16/14)<br />
Font (16/15) -&gt; (16/15)<br />
Font (16/16) -&gt; (16/16)<br />
Font (16/17) -&gt; (16/17)<br />
Font (16/18) -&gt; (16/18)<br />
Font (16/19) -&gt; (16/19)<br />
Font (16/20) -&gt; (16/20)<br />
Font (16/21) -&gt; (16/21)<br />
Font (16/22) -&gt; (16/22)<br />
Font (16/23) -&gt; (16/23)<br />
Font (16/24) -&gt; (16/24)<br />
Font (16/25) -&gt; (16/25)<br />
Font (16/26) -&gt; (16/26)<br />
Font (16/27) -&gt; (16/27)<br />
Font (16/28) -&gt; (16/28)<br />
Font (16/29) -&gt; (16/29)</p>
<p>Hab da jetzt schon etwas nachgelesen - eigentlich sollten sich die Vector-Fonts frei skalieren lassen, aber &quot;Courier New&quot; verhält sich anders zu den getesten Fonts. Ich versteh den Unterschied nicht - wieso lassen sich die anderen frei skalieren, nur diese nicht?</p>
<p>Sorry wenn ich hier auf der Leitung stehe bzw. lästig bin!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1364650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1364650</guid><dc:creator><![CDATA[happymozart]]></dc:creator><pubDate>Thu, 13 Sep 2007 13:00:30 GMT</pubDate></item><item><title><![CDATA[Reply to Font-Problem VC6.0 Windows on Fri, 28 Sep 2007 11:44:10 GMT]]></title><description><![CDATA[<p>Das Problem scheint sich durch &quot;Font Hinting&quot; erklären zu lassen</p>
<p>Danke an alle</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1374351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1374351</guid><dc:creator><![CDATA[happymozart]]></dc:creator><pubDate>Fri, 28 Sep 2007 11:44:10 GMT</pubDate></item></channel></rss>