понеделник, 20 декември 2010 г.

Uploading new font

It is possible to upload True Type Font  to the FriendlyARM

1. Upload the ttf file to /opt/Qtopia/lib/fonts

2. Edit the file fontdir which is text file and on a new board is empty.
Add a line with  format:
name file renderer italic weight size flags
 
FieldDescription
nameThe name of the font format, e.g.,Helvetica, Times, etc.
fileThe name of the file containing the font, e.g., helvR0810.bdf, verdana.ttf, etc.
rendererSpecifies the font engine that should be used to render the font, currently only the FreeType font engine (FT) is supported.
italicSpecifies whether the font is italic or not; the accepted values are y or n.
weightSpecifies the font's weight: 50 is normal, 75 is bold, etc.
sizeSpecifies the font size, i.e., point size * 10. For example, a value of 120 means 12pt. A value of 0 means that the font is scalable.
flagsThe following flag is supported:
  • s: smooth (anti-aliased)
All other flags are ignored.
 

For example to use Hebar for applications with cyrillic interface I add:
hebar hen.ttf FT n 50 0

Now without restart the font is accessible from Settings-Appearance-Font 
 

неделя, 19 декември 2010 г.

Stop the LED player!

If you need to use those GPIO pins connected to onboard LEDs the LED player should be stopped. To do this telnet to the board and with vi open this script file /etc/init.d/rcS

[root@FriendlyARM init.d]# vi rcS
(The beginning of the file omitted)
....
....
....
-------------------------------------------------------------------------------------------------------------------
syslogd                                          
/etc/rc.d/init.d/netd start                      
echo "                        " > /dev/tty1      
echo "Starting networking..." > /dev/tty1        
sleep 1                                          
/etc/rc.d/init.d/httpd start                     
echo "                        " > /dev/tty1      
echo "Starting web server..." > /dev/tty1        
sleep 1                                   
#/etc/rc.d/init.d/leds start                                        Comment out these lines!
#echo "                        " > /dev/tty1
#echo "Starting leds service..." > /dev/tty1
#echo "                        "           
#sleep 1                                   
                                          
/sbin/ifconfig lo 127.0.0.1               
/etc/init.d/ifconfig-eth0                 
                                          
/bin/qtopia &                             
echo "                                  " > /dev/tty1
echo "Starting Qtopia, please waiting..." > /dev/tty1

-------------------------------------------------------------------------------------------------------------------

Thats it. You can also remove  "sleep 1" and win two seconds faster boot time.