UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
957 Views
Registered: ‎11-10-2017

Fault segmentation error due to font type

Hello ,

 

I have a custom X11 program in which i am trying to use font type like :

 

XFontStruct *font;

main(){

...

font = XLoadQueryFont(dpy,win,gc,"-*-*-*-*-*-*-24-*-*-*-*-*-iso8859-*");
XSetFont(dpy,win,gc,font->fid);
XDrawString(dpy,win,gc, x1, y1, "HELLO", 5);

XFlush(dpy);
.
.
..
}

 

I used the font description using : xfontsel  in ubuntu machine. The program runs fine on the machine, but when i deploy it on the board i get segmentation fault errors. 

 

I was able to point the errors to the use of font description instead of using default font style.. 

 

How do i include the different font styles on the board as well ??

 

Here is the boot image when i try to run my application with custom font style:

 

X11_Seg_Fault_Font_Style.JPG

 

Tags (4)
0 Kudos
3 Replies
Moderator
Moderator
891 Views
Registered: ‎04-24-2017

Re: Fault segmentation error due to font type

Hi @vish.bh30,

 

Try with different font the fonts supported in native Ubuntu doesn't work on all embedded linux.

 

IMAGE_INSTALL_append = " \
    ttf-dejavu-sans \
    ttf-dejavu-sans-mono \
    ttf-dejavu-sans-condensed \
    ttf-dejavu-serif \
    ttf-dejavu-serif-condensed \
    ttf-dejavu-common \
    "
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Adventurer
Adventurer
858 Views
Registered: ‎11-10-2017

Re: Fault segmentation error due to font type

Hi @sandeepg

 

Which file do i need to make these changes to?

is it :

 

<petalinux_project>\project-spec\meta-plnx-generated\conf\layer.conf

 

or

 

<petalinux_project>\\project-spec\meta-user\conf\layer.conf 

 

??

0 Kudos
Adventurer
Adventurer
836 Views
Registered: ‎11-10-2017

Re: Fault segmentation error due to font type

Hi @sandeepg

 

So i tried the fix you suggested in file :

<petalinux_project>\project-spec\meta-user\conf\layer.conf 

 

I got the following errors when i tried to generate a build :

Issue_font_build.JPG

 

Based on the fix you provided, i also tried adding some other type of fonts as well , but this is what i got during build :

 

Issue_font_build_other.JPG

 

 

error :

error_full.JPG

 

Is there any change done to the dejavu fonts in term of how they are downloaded ? Can we install it to embedded system build without downloading them . I see various fonts in my Linux machine , can't we use those ?

 

Regards,

Vishal

 

0 Kudos