<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx</link><description>Joseph asked in the newsgroups the other day: 
 
 I have a problem rendering some Unicode characters. I have a particular instance although it is representative of a more general problem. 
 I have a sequence of five Unicode characters. They are 0A38</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#10236616</link><pubDate>Sun, 13 Nov 2011 18:47:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236616</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;Okay, the docs are talking about some of the new functions they added -- not all functions. And none of those new functions are GetCharacterPlacement replacement functions.&lt;/p&gt;
&lt;p&gt;GetCharacterPlacement is not being updated. If you want to do more than it does and you want to support XP, than moving to Uniscribe is your only option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236616" width="1" height="1"&gt;</description></item><item><title>re: Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#10236607</link><pubDate>Sun, 13 Nov 2011 18:15:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236607</guid><dc:creator>Pierre</dc:creator><description>&lt;p&gt;I&amp;#39;m trying to do something rather basic, and would prefer to use GetCharacterPlacement rather than wade into Uniscribe.&lt;/p&gt;
&lt;p&gt;The problem I&amp;#39;m having is that for simple English script, the characters returned in lpGlyphs[] bear no resemblance to the original input. I must be doing something wrong.&lt;/p&gt;
&lt;p&gt;Here is my code:&lt;/p&gt;
&lt;p&gt;	GCP_RESULTSW gcp_results;&lt;/p&gt;
&lt;p&gt;	wchar_t ww[] = L&amp;quot;Gnarfle&amp;quot;;&lt;/p&gt;
&lt;p&gt;	int len = wcslen(ww);&lt;/p&gt;
&lt;p&gt;	memset(&amp;amp;gcp_results, NUL, sizeof(gcp_results));&lt;/p&gt;
&lt;p&gt;	gcp_results.lStructSize = sizeof(gcp_results);&lt;/p&gt;
&lt;p&gt;	gcp_results.lpOrder = (UINT *)calloc(len, sizeof(UINT));	// order after reordering&lt;/p&gt;
&lt;p&gt;	memset(gcp_results.lpOrder, NUL, len * sizeof(UINT));&lt;/p&gt;
&lt;p&gt;	gcp_results.lpGlyphs = (WCHAR *)calloc(len, sizeof(WCHAR));&lt;/p&gt;
&lt;p&gt;	memset(gcp_results.lpGlyphs, NUL, len * sizeof(WCHAR));&lt;/p&gt;
&lt;p&gt;	gcp_results.nGlyphs = len;&lt;/p&gt;
&lt;p&gt;	gcp_results.lpGlyphs[0] = 0;	// normal ligation&lt;/p&gt;
&lt;p&gt;	GetCharacterPlacementW(hdc, ww, len, 0, &amp;amp;gcp_results, &lt;/p&gt;
&lt;p&gt;		GCP_GLYPHSHAPE| GCP_REORDER | GCP_LIGATE);&lt;/p&gt;
&lt;p&gt;Results after calling GetCharacterPlacementW:&lt;/p&gt;
&lt;p&gt;ww: [0]=0047/G [1]=006E/n [2]=0061/a [3]=0072/r [4]=0066/f [5]=006C/l [6]=0065/e &lt;/p&gt;
&lt;p&gt;gcp_results.lpOrder &amp;nbsp;[0]=0 [1]=1 [2]=2 [3]=3 [4]=4 [5]=5 [6]=6 &lt;/p&gt;
&lt;p&gt;gcp_results.lpGlyphs &amp;nbsp;[0]=002A/* [1]=0051/Q [2]=0044/D [3]=0055/U [4]=0049/I [5]=004F/O [6]=0048/H &lt;/p&gt;
&lt;p&gt;What is in &amp;#39;lpGlyphs&amp;#39;??&lt;/p&gt;
&lt;p&gt;I did a test with Arabic, and lpGlyphs returns with non-Arabic characters. Why doesn&amp;#39;t this work?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236607" width="1" height="1"&gt;</description></item><item><title>re: Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#10236603</link><pubDate>Sun, 13 Nov 2011 17:28:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236603</guid><dc:creator>Pierre</dc:creator><description>&lt;p&gt;The documentation for some functions (ex: ScriptGetFontFeatureTags, ScriptGetFontAlternateGlyphs, ScriptGetFontLanguageTags) says it requires &amp;quot;Minimum supported client: Windows Vista&amp;quot;.&lt;/p&gt;
&lt;p&gt;See:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd368547%28v=VS.85%29.aspx"&gt;msdn.microsoft.com/.../dd368547%28v=VS.85%29.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, Visual Studio 2010 documentation.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236603" width="1" height="1"&gt;</description></item><item><title>re: Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#10236590</link><pubDate>Sun, 13 Nov 2011 16:12:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236590</guid><dc:creator>Michael S. Kaplan</dc:creator><description>&lt;p&gt;Um, Uniscribe was added in Windows 2000 (and updated in XP and XP SP2). It requires complex script support to be installed until Vista, but that is a far cry from unavailable!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236590" width="1" height="1"&gt;</description></item><item><title>re: Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#10236586</link><pubDate>Sun, 13 Nov 2011 15:55:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10236586</guid><dc:creator>Pierre</dc:creator><description>&lt;p&gt;For some applications, TextOutW or ExtTextOutW are too simplistic. In my app I have to display the letters along a curved arc. Each letter requires creating an individual font with a different lfEscapement and lfOrientation. It would be nice to display the letters correctly.&lt;/p&gt;
&lt;p&gt;Uniscribe only works on Vista and WIndows 7. A lot of my customers are still using XP.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10236586" width="1" height="1"&gt;</description></item><item><title>Arabic Presentation Form | keyongtech</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#9363200</link><pubDate>Thu, 22 Jan 2009 08:27:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9363200</guid><dc:creator>Arabic Presentation Form | keyongtech</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.keyongtech.com/2542066-arabic-presentation-form"&gt;http://www.keyongtech.com/2542066-arabic-presentation-form&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9363200" width="1" height="1"&gt;</description></item><item><title>GetCharacterPlacement not working | keyongtech</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#9361002</link><pubDate>Thu, 22 Jan 2009 04:14:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9361002</guid><dc:creator>GetCharacterPlacement not working | keyongtech</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.keyongtech.com/2542021-getcharacterplacement-not-working"&gt;http://www.keyongtech.com/2542021-getcharacterplacement-not-working&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9361002" width="1" height="1"&gt;</description></item><item><title>UCS-2 to UTF-16, Part 5: What's on the Next Level?</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#9000414</link><pubDate>Wed, 15 Oct 2008 10:03:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000414</guid><dc:creator>Sorting it all Out</dc:creator><description>&lt;p&gt;Previous blogs in this series of blogs on this Blog: Part 0: The intro, sans content Part 1: Getting&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9000414" width="1" height="1"&gt;</description></item><item><title>GPOS w/o GSUB in a TTF on XP SP2 can be FUBAR</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#1963345</link><pubDate>Tue, 27 Mar 2007 15:48:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1963345</guid><dc:creator>Sorting It All Out</dc:creator><description>&lt;p&gt;(This post might win an award for strangest title, unless you deal with OpenType!) The GetCharacterPlacement&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1963345" width="1" height="1"&gt;</description></item><item><title>re: Stick a fork in GetCharacterPlacement</title><link>http://blogs.msdn.com/b/michkap/archive/2005/09/23/472656.aspx#473450</link><pubDate>Sat, 24 Sep 2005 02:51:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:473450</guid><dc:creator>Michael S. Kaplan</dc:creator><description>David -- ICU does not have full support for rendering as many scripts.... and this really is a rendering issue.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=473450" width="1" height="1"&gt;</description></item></channel></rss>