{"id":143,"date":"2007-05-12T16:08:05","date_gmt":"2007-05-12T14:08:05","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/fonts-rotate-font\/"},"modified":"2007-05-12T16:08:07","modified_gmt":"2007-05-12T14:08:07","slug":"fonts-rotate-font","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/fonts-rotate-font\/","title":{"rendered":"Fonts: Rotate Font"},"content":{"rendered":"<p><em>>  I was wondering if anyone knows how to draw curved or wavy text.<br \/>\n>I&#8217;d like to be able to draw some text that following the outside curve<br \/>\n>of a circle or similar and I&#8217;d like the letters to hug the specified<br \/>\n>curve line.<br \/>\n<\/em><br \/>\nYou have to position each character explicitly. If you want to rotate<br \/>\nthe individual letters, you can do this using code like the following<br \/>\nto rotate a font:<\/p>\n<p>[code lang=&#8221;delphi&#8221;] var<br \/>\n   LogFont: TLogFont;<\/p>\n<p> with MyCanvas do begin<br \/>\n   Font.Name := &#8216;Arial&#8217;;<br \/>\n   Font.Size := 24;<br \/>\n   Font.Style := [fsBold];<br \/>\n   GetObject(Font.Handle, @LogFont, SizeOf(LogFont));<br \/>\n   with LogFont do begin<br \/>\n     lfOrientation := 450;  \/\/ set to 45 degrees<br \/>\n     lfEscapement := lfOrientation end;<br \/>\n   Font.Handle := CreateFontIndirect(LogFont);<br \/>\n   \/\/ at this point, the font has been rotated, and you can draw as<br \/>\n   \/\/ many characters you want at the specified angle; repeat the<br \/>\n   \/\/ process of setting lfOrientation and lfEscapement and calling<br \/>\n   \/\/ CreateFontIndirect as many times as required to draw all of<br \/>\n   \/\/ the letters<br \/>\n[\/code]<br \/>\n-Steve<\/p>\n<p>[tags]Delphi, Graphic, Fonts[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>> I was wondering if anyone knows how to draw curved or wavy text. >I&#8217;d like to be able to draw some text&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[75,103,101],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-2j","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/143"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}