From: Symion <kn...@ip...> - 2010-03-14 06:39:52
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Ah Kadir, you are working on the Ultimate font loader for Vpython!<br> Load any and all fonts into a numpy array?<br> <br> I used points object to store ASCII set because it is very fast when updating info.<br> Instead of drawing each font, it simply changes the color at the indexed place within an existing object.<br> No repositioning or creating objects required!<br> So it is fast!<br> However I had to (laboriously) draw this with a Font/Icon editor - Took me all afternoon!<br> It seems ttfquery might make things a lot easier.<br> Thanks.<br> <br> On 14/03/2010 2:28 AM, Kadir Haldenbilen wrote: <blockquote cite="mid:959...@we..." type="cite"> <style type="text/css"><!-- DIV {margin:0px;} --></style> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div>I have been working on this for a while also. There are some solutions here and there but needs to be put together.<br> <br> If you install the package ttfquery, then you can easily get font outline (contour) data for any font installed on your system, and use it for any (or let's ay most of the) character.<br> <br> I am trying to get 3D Text working for Vpython, for any font as above. For that, to be able to fill in the contours, we need a good triangulation method working in python. Again there are many, but I could not get any single one working. The so called best one comes from the OpenGLContext, but I could not get it going. I use "Triangle", aside, and its output is OK (after writing input-output interface programs), but then I could not "link" it to Vpython since it is an exe. I could not get the output array directly into my script without doing write/read to/from file.<br> <br> Once inside the contours is painted, then 3D is easy.<br> <br> Attached is a simple sample for drawing the contours with ttfquery.<br> <br> Kadir<br> </div> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"> <hr size="1"><b><span style="font-weight: bold;">From:</span></b> Symion <a class="moz-txt-link-rfc2396E" href="mailto:kn...@ip..."><kn...@ip...></a><br> <b><span style="font-weight: bold;">To:</span></b> Visual Python <a class="moz-txt-link-rfc2396E" href="mailto:vis...@li..."><vis...@li...></a><br> <b><span style="font-weight: bold;">Sent:</span></b> Sat, March 13, 2010 4:48:56 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> [Visualpython-users] Complete ASCII character set<br> </font><br> <meta http-equiv="x-dns-prefetch-control" content="off"> Here is a short program that has the Complete ASCII character set (32 to 126)<br> I have implemented it with a single Points object.<br> <br> Multi-colored<br> Variable size<br> Roughly based on Fixedsys font.<br> <br> Source Code: <a moz-do-not-send="true" rel="nofollow" target="_blank" href="http://home.iprimus.com.au/knoware/webpage/ASCII.py">ASCII.py</a><br> <br> <meta http-equiv="x-dns-prefetch-control" content="on"> </div> </div> </div> <br> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> ------------------------------------------------------------------------------ Download Intel&#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/intel-sw-dev">http://p.sf.net/sfu/intel-sw-dev</a></pre> <pre wrap=""> <fieldset class="mimeAttachmentHeader"></fieldset> _______________________________________________ Visualpython-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Vis...@li...">Vis...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/visualpython-users">https://lists.sourceforge.net/lists/listinfo/visualpython-users</a> </pre> </blockquote> </body> </html> |