News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Orbiter on Zaurus III

Started by dothedog, October 19, 2006, 05:22:18 AM

Previous topic - Next topic

archived

Chris.m
I finally got my hybrid/core built and am trying to run the orbiter on the zaurus. I have run into a bit of a problem that I hope is easily fixed. My orbiter loads etc. then segfaults out saying that it can't open the Arial font. Openzaurus doesn't distribute the MS fonts. Is there a way to do this without using the MS truetype fonts?

Rob

archived

Hi Rob,

You could try getting the fonts for a linux box and copy them to your zaurus, it should work. Here's the path : /usr/share/fonts/truetype/msttcorefonts. You could copy all *.ttf files.

Best regards,
Cristian Miron

archived

Chris,
Sorry I haven't gotten back to you on this, I've been doing a bit of traveling for the last few weeks.

I copied the arial*.ttf files from a windows box to /usr/share/fonts/truetype/msttcorefonts. Now I get a bunch of errors like this:

ERROR: Xlib: ErrorHandler_Grabber() // static int X11wrapper::ErrorHandler_Grabber(Display*, XerrorEvent*)

Xlib: ErrorHandler_Grabber()
  type: 0
  display : 0x2473b0
  serial : 286
  error_code :
  request_code : .
  minor_code :
  resourcid : 48234501
ErrorText  : BadFont (invalid Font parameter)

Segmentation Fault

Also above that I get:

ERROR: Xlib: ErrorHandler_Grabber() // static int X11wrapper::ErrorHandler_Grabber(Display*, XerrorEvent*)

Xlib: ErrorHandler_Grabber()
  type: 0
  display : 0x40a00968
  serial : 261
  error_code :
  request_code : <
  minor_code :
  resourcid : 50331731
ErrorText  : BadGC (invalid GC parameter)

All this is in the terminal that I start the Orbiter.

In the log file I get:


archived

Chris,
Quote
Let's try this one then : http://only.mawhrin.net/~geometer/zaurus/fonts/mscf.html Smile
That is for Qtopia. I am running openzaurus GPE which uses X11.

The BadGC error is concerning as well. Any ideas?

Rob

archived

Hmm... then I guess there is no other solution but to use SDL_ttf with other supported fonts.
Maybe you should start with a hello world application with sdl_ttf. Once this is working, you can temporary hardcode the font name and path in Orbiter to test it.

Best regards,
Cristian Miron

archived

Chris,
Ok, I have sdl_ttf installed on the zaurus. I'm not sure how to do a "hello world" compile using sdl_ttf. Also, How do I hard code the font path into the Orbiter binary?

Rob

archived

You can check SDL_ttf's page http://www.libsdl.org/projects/SDL_ttf/ and download http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.8.tar.gz for example. Then compile showfont.c file (which is actually a "hello world!" application written to demonstrate minimal functionality of sdl_ttf). Once this working, send me a message and I'll guide you want to do next.

Best regards,
Cristian Miron

archived

Chris.m,
Sorry about the long silence, I got a bit busy at work, I broke my build environment, then I broke my laptop. Long story. Anyway, I finally got the build environment back up and compiled showfont.c and it does work. What's next?

Rob

archived

Hi Rob,

I guess the next step would be to see what's different in Orbiter. Go to src/Orbiter/SDL/OrbiterRenderer_SDL.cpp, RenderText method. You'll see that the path to the font is hardcoded. You can play with it (use same argument path we used for showfont app).

Best regards,
Cristian Miron

archived

Are you talking about this block?


void OrbiterRenderer_SDL::RenderText(string &TextToDisplay,DesignObjText *Text,TextStyle *pTextStyle, PlutoPoint point)
{
   PLUTO_SAFETY_LOCK(cm,OrbiterLogic()->m_ScreenMutex);

       SDL_Rect TextLocation;
       TextLocation.x = point.X + Text->m_rPosition.X;
       TextLocation.y = point.Y + Text->m_rPosition.Y;
       TextLocation.w = Text->m_rPosition.Width;
       TextLocation.h = Text->m_rPosition.Height;

#ifdef WIN32
#ifdef WINCE
       string BasePath = "C:\\Windows\\Fonts";
#else
       char pWindowsDirector[MAX_PATH];
       GetWindowsDirectory(pWindowsDirector, MAX_PATH);
       string BasePath = string(pWindowsDirector) + "\\Fonts";
#endif

#else
       string BasePath="/usr/share/fonts/truetype/msttcorefonts";
#endif //win32


The path in "string BasePath" is correct there.

archived

One other thing I did notice. when I try to start orbiter I get:

sh: /usr/bin/X11/xset: not found
sh: /usr/bin/X11/xset: not found
Copyright (C) ...

Not sure if it makes a difference...

archived

How exactly should I configure this on the core?
This is what I am doing:
Add Orbiter
Select user
select 640x480 for size
check uses wifi connection
full regen.
Is this correct? Is there something i need to do in advanced?

archived

Hi Rob,

I believe that pluto uses arial and verdana fonts most of the time, so be sure you have these files in "usr/share/fonts/truetype/msttcorefonts". Also confirm with showfont test application. If it doesn't work, you have two solutions:
1) hardcode in RenderText a font which is working
or
2) write a "return;" at the beginning of RenderText; this will disable text rendering for now and we'll get back to it once the other things will work.

Best regards,
Cristian Miron

archived

Chris.m,
I decided to try to rebuild using the latest code. Now I am running into a problem with PlutoUtils. I get the following error:

| arm-linux-g++ -c -I/home/oc60174/oe/build/tmp/staging/arm-linux/include-I./ -I../ -I../DCE/ -I../VIPShared/ -I/home/oc60174/oe/build/tmp/staging/arm-linux/include/mysql -I/home/oc60174/oe/build/tmp/staging/arm-linux/lib -I/home/oc60174/oe/build/tmp/staging/arm-linux/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_DEVEL_DEFINES -DUSE_LZO_DATAGRID -D_GNU_SOURCE -I/home/oc60174/oe/build/tmp/staging/arm-linux/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fpermissive-Wall -ggdb3 Other.cpp -o Other.o
| Other.cpp:111:7: warning: no newline at end of file
| arm-linux-g++ -c -I/home/oc60174/oe/build/tmp/staging/arm-linux/include-I./ -I../ -I../DCE/ -I../VIPShared/ -I/home/oc60174/oe/build/tmp/staging/arm-linux/include/mysql -I/home/oc60174/oe/build/tmp/staging/arm-linux/lib -I/home/oc60174/oe/build/tmp/staging/arm-linux/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_DEVEL_DEFINES -DUSE_LZO_DATAGRID -D_GNU_SOURCE -I/home/oc60174/oe/build/tmp/staging/arm-linux/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fpermissive-Wall -ggdb3 ProcessUtils.cpp -o ProcessUtils.o
| ProcessUtils.cpp:24: error: declaration of `int* __errno_location()' throws different exceptions
| /home/oc60174/oe/build/tmp/staging/arm-linux/include/bits/errno.h:38: error: than previous declaration `int* __errno_location() throw ()'
| make: *** [ProcessUtils.o] Error 1
| FATAL: oe_runmake failed

Any Ideas?