Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
CMS layout descriptor and fonts sample

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Themes
View previous topic :: View next topic  
Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5664

PostPosted: Mon Apr 23, 2007 11:13 pm    Post subject: CMS layout descriptor and fonts sample Reply with quote

How to use CMS? Get a layout descriptor that suits you (+ fonts the layout uses), and copy it to ui-profiles folder in TB data directory (Options->Datadir, see documentation/0.9.55b announcement).

This is only a sample, for CMS designers Wink

Code:
<?xml version="1.0" encoding="UTF-8"?>
<cms version="1.0">
    <colors mode="day" bgcolor="ffffff" fgcolor="000000" nxcolor="ff0000" pxcolor="0000ff"/>
    <colors mode="night" bgcolor="000000" fgcolor="ffffff" nxcolor="ff0000" pxcolor="0000ff"/>
    <fonts>
        <font name="36px" file="font.36px.png"/>
        <font name="72px" file="font.72px.png"/>
        <font name="medium" system="400100"/>
        <font name="big" system="400110"/>
    </fonts>
    <screen mode="full" w="176" h="220">
        <area x="0" y="4" w="166" h="20" font ="medium">
            <value>{coords}</value>
        </area>
        <area x="166" y="0" w="10" h="10">
            <value>{status}</value>
        </area>
        <area x="0" y="22" w="172" h="20" font ="36px">
            <value>{time}</value>
        </area>
        <area x="0" y="50" w="132" h="72" font="72px" align="right">
            <value>{spd}</value>
        </area>
        <area x="132" y="54" w="40" h="20">
            <value>[km/h]</value>
        </area>
        <area x="132" y="70" w="40" h="24" font ="big">
            <value>{wpt-dist}</value>
        </area>
        <area x="132" y="92" w="40" h="24" font ="big">
            <value>/{spd}</value>
        </area>
        <area x="0" y="130" w="86" h="20">
            <value>Altitude [m]</value>
        </area>
        <area x="86" y="130" w="86" h="20">
            <value>Speed Avg [km/h]</value>
        </area>
        <area x="0" y="146" w="86" h="20" font ="big">
            <value>{spd-avg}</value>
        </area>
        <area x="86" y="146" w="86" h="20" font ="big">
            <value>000.0</value>
        </area>
        <area x="0" y="174" w="86" h="20">
            <value>Distance [km]</value>
        </area>
        <area x="86" y="174" w="86" h="20">
            <value>wpt azi [{0x1E}]</value>
        </area>
        <area x="0" y="190" w="86" h="20" font ="medium">
            <value>{time-t}</value>
        </area>
        <area x="86" y="190" w="86" h="20" font ="big">
            <value>{dist-t}</value>
        </area>

    </screen>
</cms>


Use {0x1E} or ° with UTF-8 encoding

Available variables:

    - numeric

    * coords - current location [format according to settings]
    * time - current time [hh:mm]
    * time-t - total time [hh:mm:ss]
    * time-t-auto - total time [hh:mm:ss]
    * alt - altitude [m]
    * alt-d vertical speed [m/s]
    * spd - speed
    * spd-d - dec/acceleration [m/s]
    * spd-max/spd-avg - max/average speed
    * spd-avg-auto - "auto" average speed
    * spd.i - speed (integer part)
    * spd.i-max - speed max (integer part)
    * spd.i-avg - average speed (integer part)
    * spd.i-avg-auto - "auto" average speed (integer part)
    * spd.d - speed (decimal part)
    * spd.d-max - speed max (decimal part)
    * spd.d-avg - average speed (decimal part)
    * spd.d-avg-auto - "auto" average speed (decimal part)
    * course - current course
    * dist-t - distance travelled
    * wpt-azi - azimuth to wpt
    * wpt-dist - distance to wpt
    * wpt-vmg
    * wpt-eta
    * wpt-alt
    * sat - number of satelites
    * fix - fix quality
    * asc-t
    * desc-t

    - "graphical"

    * status


Font specification:

- bitmap fonts: fixed-width, 24 chars, transparent background (see samples Wink )
- "system" fonts also available (but they depend on device, firmware/OS version and god knows what else... try-and-see) in hexa format FFSSZZ (face-style-size):
FF - 40 (proportional), 20 (monospace), 00 (system)
SS - 04 (underlined), 02 (italic), 01 (bold), 00 (plain)
ZZ - 10 (big), 00 (medium), 08 (small)

Example: 200008 is monospace plain small font.



font.36px.png
 Description:
 Filesize:  853 Bytes
 Viewed:  81679 Time(s)

font.36px.png



font.72px.png
 Description:
 Filesize:  1.79 KB
 Viewed:  81679 Time(s)

font.72px.png




Last edited by kruch on Wed Jul 22, 2009 9:08 am; edited 3 times in total
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5664

PostPosted: Wed Apr 25, 2007 7:52 am    Post subject: Reply with quote

The example above use B/W scheme, but of course, you can use any colors pair.

To change the color of bitmap font, just change fgcolor - you do not have to change the bitmap!
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 4988

PostPosted: Wed Apr 25, 2007 3:48 pm    Post subject: Reply with quote

Can there any support to view the CMS in landscape mode- Everything rotate 90 Degress. Very Happy
Back to top
View user's profile Send private message Visit poster's website
guest



Joined: 08 Oct 2006
Posts: 4988

PostPosted: Mon May 21, 2007 1:47 am    Post subject: coordinates Reply with quote

Hi Kruch

Thanks for all your work. I modified theme provided by x2fer to suit the nokia 6234 which works very well. I think it could be improved for my requirements if Lat and Long could be placed seperately ie as seperate items.
Back to top
View user's profile Send private message Visit poster's website
Zvedavec1



Joined: 28 Aug 2007
Posts: 8
Location: Czech Republic

PostPosted: Thu Sep 06, 2007 2:06 pm    Post subject: navrh na prepinani CMS temat Reply with quote

Slo by udelat prepinani mezi CMS thematama?

jak to tak chapu, nahrane muze byt vzdy jen jedno a to v rootu adresare ui-profiles.

Slo by udelat aby kazde thema bylo v samostatne pojmenovanem adresari a prepinat mezi nimi?

_________________
10 SIN
20 GOTO HELL

Geokesuju pod nickem Destr
Back to top
View user's profile Send private message Send e-mail
Zoki



Joined: 12 Mar 2007
Posts: 17
Location: Beograd Srbija

PostPosted: Sat Oct 13, 2007 11:12 am    Post subject: Reply with quote

Hi Krouch!
Is it possible to calibrate variables in CMS?
For example is it possible to add or to subtract meters from altitude. And how?
I have tried to edit CMS but with no success.
It might be useful if you want to enter manually airport altitude.
Zoki
Back to top
View user's profile Send private message
mor1



Joined: 29 Feb 2008
Posts: 6

PostPosted: Sun Mar 16, 2008 7:24 pm    Post subject: Reply with quote

Is it possible to add max acceleration? It would be useful for drivers Wink.
Back to top
View user's profile Send private message
osmaren



Joined: 22 Mar 2008
Posts: 3

PostPosted: Sun Mar 23, 2008 2:53 am    Post subject: visual cms editing Reply with quote

Does anyone know? Is there a program to depict those xml files on Windows? You know so I can change the xml ode and watch the results in realtime?
Back to top
View user's profile Send private message
jonni



Joined: 22 Apr 2008
Posts: 1
Location: Denmark

PostPosted: Fri Apr 25, 2008 1:16 pm    Post subject: spd(normal)vs(decimal part)vs(integer part) Reply with quote

What is the difference between - spd(normal)...spd(integer part) and (decimal part)
Back to top
View user's profile Send private message
stu.cz



Joined: 26 Apr 2008
Posts: 20

PostPosted: Fri May 02, 2008 10:24 am    Post subject: Re: CMS layout descriptor and fonts sample Reply with quote

kruch wrote:
How to use CMS? Get a layout descriptor that suits you (+ fonts the layout uses), and copy it to ui-profiles folder in TB data directory (Options->Datadir, see documentation/0.9.55b announcement).



Ahoj, prosím tě jak si zobrazím waypont jméno nebo komentář v CMS? Díky
Hallo, how I can displayed waipoint name or comment in the CMS? Thanks
Back to top
View user's profile Send private message
DaBear



Joined: 15 Apr 2008
Posts: 19

PostPosted: Mon May 19, 2008 8:54 pm    Post subject: Re: visual cms editing Reply with quote

osmaren wrote:
Does anyone know? Is there a program to depict those xml files on Windows? You know so I can change the xml ode and watch the results in realtime?


Have a look at this just put the html.xsl into the same place as your xml and view the xml with Internet Explorer.

jonni wrote:
What is the difference between - spd(normal)...spd(integer part) and (decimal part)


If the speed is 123.45 km/h, then 123 is the integer part and 45 is the decimal part.
Back to top
View user's profile Send private message
edcode



Joined: 29 Apr 2008
Posts: 7

PostPosted: Mon May 26, 2008 8:35 pm    Post subject: font problem Reply with quote

I've created my own font and it works well, but there is just one little problem.
The font is a substitute for the coordinates which are shown with the system font but the system font is in couple of themes still to big. So what about the directions (E,N,W,S)?
The direction letters are in system font and no one of the 24 digits in the font png sample are assigned for those direction letters (I've tried).
So how I can obtain the direction letters in my own font to replace the system font?

_________________
Siemens SXG75 + Holux GPSlim 236 BT mouse
Back to top
View user's profile Send private message
yearling



Joined: 18 Apr 2007
Posts: 285

PostPosted: Mon Jun 16, 2008 9:41 pm    Post subject: Fonts Reply with quote

There is 5 non-segments fonts (96-72-60-48-36px) for CMS developers Wink
They were tested on N6233 (320x240px).
As smaller fonts I use system fonts.



fonts.zip
 Description:

Download
 Filename:  fonts.zip
 Filesize:  7.07 KB
 Downloaded:  611 Time(s)

Back to top
View user's profile Send private message
MrKev



Joined: 13 Jan 2008
Posts: 778
Location: Nikdykde

PostPosted: Mon Aug 24, 2009 3:08 pm    Post subject: Reply with quote

System fonts on my SE k750i


00.jpg
 Description:
Snap
 Filesize:  38.36 KB
 Viewed:  55206 Time(s)

00.jpg



SysFonts.rar
 Description:
System Fonts

Download
 Filename:  SysFonts.rar
 Filesize:  105.7 KB
 Downloaded:  171 Time(s)


_________________
Ti, co nedokáží psát programy, k nim píšou nápovědu.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Themes All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group