pango

How to initialize Pango under Win32?

Having downloaded Pango and GLib from the GTK+ Project's Win32 downloads page and having created and configured a Win32 project under Visual Studio 2005 so it points to the proper lib and include directories, how do you initialize Pango for rendering to a Win32 window? Should the first call be to pango_win32_get_context()? Calling that ...

Processing CSS bolder and lighter in Pango

I am using Pango in an application implementing part of the CSS specification and so far I have been stumped by the font-weight: (bolder|lighter) attribute. According to specification, 'bolder' selects the next weight that is assigned to a font that is darker than the inherited one. 'lighter' is similar, but works in the oppos...

Extracting Glyph Kerning Information C++

After asking my previous question about Uniscribe glyph kerning, and not yet receiving an answer, plus further reading on google etc, it seems Uniscribe may not support extracting glyph kerning information from a font. I therefore have a simple followup question - are there any good examples (preferably with some C++ code) of extracting...

Are there any examples of a Python PyGTK Pango editor toolbar?

I am looking for an example application written in Python and PyGTK. There should be an editor out there somewhere that already does this. Some app with a text editor row of buttons: - Font - Bold/italic/underline - etc I am hoping to avoid reinventing the wheel on this one! thanks ...

How to escape characters in Pango markup?

My program has a gtk.TreeView which displays a gtk.ListStore. The gtk.ListStore contains strings like this: "<span size='medium'><b>"+site_title+"</b></span>"+"\n"+URL Where URL is (obviously) a URL string. Sometimes there are characters in URL that cause pango to fail to parse the markup. Is there a way to escape URL as a whole so...

Using GTK/GDK to get Pango-rendered pixels

I'm trying to get a bitmap rendered by Pango with a given character, in this case the letter "T". I thought this should work, but it just prints out garbage.. In this code, gtk_window is already initialized as a GTK window. int width, height; PangoLayout *layout = gtk_widget_create_pango_layout(gtk_window, "T"); PangoFontDescription *...

How do I do text wrapping in pyCairo + Pango?

What I need pyCairo to do is : generate an image of size 100x100 containing some text and an image from filesystem as background the text should be within a box which has text wrapping of size 20x20 with bottom left corner at (40,40). save this image ...

[Win32] Font rendering problems using Pango + Cairo + Fontconfig using Visual Studio, under GCC works fine

Hi all! I have a big problem, and I hope you can help me. I'm porting a game from Linux to Windows, and using MinGW works fine (except for some crashes that I don't know how, but this is not my problem now) Game use Fontconfig (2.4.2-3), Cairo (1.8.8) and Pango (1.26.0) to render text. Problem is that, using Visual Studio, I can't se...

How should I display a constantly updating timer using PyGTK?

I am writing a timer program in Python using PyGTK. It is precise to the hundredths place. Right now, I am using a constantly updated label. This is a problem, because if I resize the window while the timer is running, Pango more often than not throws some crazy error and my program terminates. It's not always the same error, but differe...

Disappearing characters in cairo font rendering

I use cairo to render a simple text onto a cairo surface. I use a freetype font for that (Vera.ttf if that matters). It works, but sometimes characters disappear from the output. In fact only the numbers. I drew a text 'Demostream 1..' and sometimes the '1' disappears from the output and I have absolutely no idea why. The number is defit...

GTKSharp, Pango, set font size quirkiness

Hi guys, I'm using GTK Sharp to work on some GUI for my app. Take a look at this chunk of code: Pango.FontDescription fontdesc = new Pango.FontDescription(); fontdesc.Family = "Sans"; //fontdesc.Size = 12; fontdesc.Weight = Pango.Weight.Semibold; SyncInfo.ModifyFont(fontdesc); Gdk.Color fontcolor = new Gdk.Color(255,255,255); SyncInf...

Pango-WARNING **: failed to choose a font, expect ugly output.

I'm getting this error when starting anything that uses the Pango library. I'm using Kubuntu 9.10. I've done 'sudo apt-get --reinstall install' on libgtk* libcairo* libpango* and fontconfig, with no luck. Could someone point me in the right direction? Thanks. ...

How to get a glyph outline of a true type character on a linux system

Hello, I'm searching for a library to get the outline of a glyph in a true type font on a linux system. We are using Pango and Cairo but unfortunatly I didn't find anything. I'm looking for somethig similar to GlyphTypeface.GetGlyphOutline under .NET Any help or hints are appreciated! Thanks in advance ...

How to tell whether a font is monospace using GTK and Pango?

I have a PangoFontDescription and I want to know whether it describes a monospace font. I have seen the function pango_font_family_is_monospace() in the Pango API documentation but after several hours of puzzling it is still not clear to me what the relationships are between PangoFontFamily, PangoFontMap, PangoFont, PangoFontset, Pango...

Will GTK's pango and cairo work well in Cocoa and MFC applications.

I'm writing a GUI program and decided to go native on all platforms. But for all the stuff i need to draw myself i would like to use the same drawing routines because font and unicode handling is so difficult and complex. Do you see any negative points in useing Pango/Cairo. Well on MacOSX i havent succeded installing Pango/Cairo yet....

Cross platform way to get a list of availble fonts...

I'm using Pango and Cairo. Is there a simple way to get a list of available fonts? I'm willing to use another library, provided the solution is fairly simple. ...

Compiling cairo and pango --with-included-modules

I'm trying to compile cairo together with pango to enable advanced font rendering in my application. I got it to work, but I cannot use unicode characters (i.e. I tested with Chinese character). When I run my application I get this message: (process:42776): Pango-WARNING **: Failed to load Pango module '/Users/pollux/Downloads/cairo_p...

How to install pangocairo with python bindings on 32bit OSX 10.6

I'm having difficulties building the pangocairo bindings on my OSX 10.6 machine and would like to know how to proceed. To sketch the background, I'm writing a wxwindows application in Python with wxpython that draws on a cairo canvas. I have been able to compile all dependencies for this with the extra difficulty that I need 32bit (inst...

-package Cabal-1.8.0.6 breaks pango installation on Mac

When installing Haskell pango on mac (sudo cabal install pango), the first problem is that it tries to install packages I've already installed. I've install haskell98 (successfully), but pango tries to install it again, and when the compilation is complete it gives this error: Registering haskell98-1.0.1.1... Installing library in /User...

Libtool think that a "library was moved" but it isn't the case...

Hello all, I am currently recompiling gtk+ and dependencies from source (I have no other choices). All my custom packages are installed in a specific custom point (let's call it /packages) (it can seem odd but this time again, I have no other choices). When I try to recompile pango, it needs freetype. Freetype is already installed in ...