Recent

Author Topic: Pango GTk Error  (Read 4227 times)

captian jaster

  • Guest
Pango GTk Error
« on: August 08, 2010, 12:32:47 am »
Code: Pascal  [Select][+][-]
  1. program Base;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   GTK2,SysUtils;
  7.  
  8. Var
  9.  Btn,Window:pGTKWidget;
  10.  
  11. begin
  12.   GTK_Init(@argc,@argv);
  13.   Btn := gtk_button_new_with_label('Button');
  14.   Window := gtk_window_new(GTK_WINDOW_TOPLEVEL);
  15.   GTK_Container_Add(GTK_Container(Window),Btn);
  16.   GTK_Widget_Show(Window);
  17.   GTK_Widget_Show(Btn);
  18.   GTK_Main;
  19. end.
  20.  

Simple code to add a button.. right?
but i get this error:
File shape.c line 75 pango shape assertion failed
(glyphs->num_glyphs>0)
I looked up that it has something to do with the font but i dont know how to fix that.. >.> Help

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1918
Re: Pango GTk Error
« Reply #1 on: August 08, 2010, 10:46:48 am »
Why don't you use the LCL?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Pango GTk Error
« Reply #2 on: August 08, 2010, 01:17:53 pm »
I just ran your code and it worked fine. Probably you have some kind of error in your gtk2 installation.

I just download gtk2-runtime-2.16.6-2010-05-12-ash.exe from here:

http://gtk-win.sourceforge.net/home/index.php/en/Downloads

And your code worked. With Lazarus 0.9.28.2

 

TinyPortal © 2005-2018