Revision: 4254 http://vexi.svn.sourceforge.net/vexi/?rev=4254&view=rev Author: clrg Date: 2011-09-22 23:44:53 +0000 (Thu, 22 Sep 2011) Log Message: ----------- Fix
Modified Paths: -------------- trunk/org.vexi-vapp.viewfont/README.txt trunk/org.vexi-vapp.viewfont/src_main/org/vexi/fontviewer/main.t Property Changed: ---------------- trunk/org.vexi-vapp.viewfont/ Property changes on: trunk/org.vexi-vapp.viewfont ___________________________________________________________________ Modified: svn:ignore - .configuration gen .classpath .project .settings + .vexipath .configuration gen .classpath .project .settings Modified: trunk/org.vexi-vapp.viewfont/README.txt =================================================================== --- trunk/org.vexi-vapp.viewfont/README.txt 2011-09-22 23:28:13 UTC (rev 4253) +++ trunk/org.vexi-vapp.viewfont/README.txt 2011-09-22 23:44:53 UTC (rev 4254) @@ -1,5 +1,12 @@ You need the Vexi Widgets to run this application. -To run the font viewer, set the parameter 'fontdir' to the directory to search for fonts: +To run the font viewer, set the parameter 'fontdir' to the directory to search for fonts, +where 'fontdir' is a Vexi-accessible location as included in the Vexi arguments. -e.g. <vexi> <widgets.vexi> src fontdir="/home/charles/Desktop/chessfonts" \ No newline at end of file +Example with the vera font pack: + + vexi.jar widgets.vexi verafonts.vexi src fontdir=vexi.font + +Example with the Windows Fonts directory: + + vexi.jar widgets.vexi src "C:\Windows\Fonts" fontdir= Modified: trunk/org.vexi-vapp.viewfont/src_main/org/vexi/fontviewer/main.t =================================================================== --- trunk/org.vexi-vapp.viewfont/src_main/org/vexi/fontviewer/main.t 2011-09-22 23:28:13 UTC (rev 4253) +++ trunk/org.vexi-vapp.viewfont/src_main/org/vexi/fontviewer/main.t 2011-09-22 23:44:53 UTC (rev 4254) @@ -11,7 +11,7 @@ <spin id="fontsize" type="fontsize" minvalue="5" maxvalue="200" value="24" /> </ui:box> <bevel form="down"> - <scrollpane id="scroll" autohidehorizontal="true" autohidevertical="false"> + <scrollpane id="scroll" align="topleft" autohidehorizontal="true" autohidevertical="false"> <ui:box shrink="true"> <ui:box width="1" fill="#888888" /> <ui:box orient="vertical"> @@ -34,13 +34,14 @@ var setToType = function(v) { cascade = v; - var size = vexi.ui.font.height($font.value, $fontsize.value, "dy") * 1.2; + var size = vexi.ui.font.height($font.value, $fontsize.value.number, "dy") * 1.2; charsize = size > 32 ? size : 32; var prop = trapee.type; var n = $view.numchildren; for (var i=0; n>i; i++) { var c = $view[i]; - c[prop] = v; + c.font = $font.value; + c.fontsize = $fontsize.value.number; c.charsize = charsize; } } @@ -58,17 +59,20 @@ if (typeof(p)!="array") p = [p]; // get p as a resource) var r = vexi[""]; - for (var i=0; p.length>i; i++) - r = r[p[i]]; + vexi.trace(p); + vexi.trace(p.length); + for (var i,sub in p) { + if (sub) r = r[sub]; + } // load fonts from r for (var k in r) { // skip irrelevant files if (k.toLowerCase().indexOf(".ttf")==-1) continue; // add item to $font option widget - var f = .item(vexi.box); + var f = new .item(); f.text = k; f.value = r[k]; - $font[$font.numchildren] = f; + $font.add(f); } var startchar = 48; @@ -76,13 +80,15 @@ // populate $view for (var i=startchar; endatchar>i; i++) { - var c = fv.charview(vexi.box); - c.fontsize = $fontsize.value; + var c = new fv.charview(); + c.fontsize = $fontsize.value.number; c.charcode = i; c.charsize = 32; $view[i] = c; } + $font.value = $font.value; + vexi.ui.frame = thisbox; </ui:box> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn