Questions tagged [pangocairo]

Pangocairo is a part of Pango that enables creation of Pango contexts on Cairo surfaces.

Pangocairo allows the creation of Pango contexts on Cairo contexts for the purpose of adding text to a Cairo-manipulated image or drawing.

Documentation: https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html

45 questions
13
votes
2 answers

Difference between GtkWindow and GdkWindow?

At the beginning of my Gtk-Gdk-Cairo-Pango app, I create the window: GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); First, there is GtkWindow, but gtk_create_window returns GtkWidget, not GtkWindow, why? Then, some functions, like…
exebook
  • 27,243
  • 27
  • 105
  • 196
8
votes
3 answers

How to fix degree symbol not showing correctly in R on Linux/Fedora 31

Any map I make with: ggplot() + geom_sf() produces the expected map, but does not show the degree sign correctly, as appears from the following picture. The answer given in this answer on SO - degree symbol incorrect in map axis labels - does…
giocomai
  • 1,805
  • 13
  • 21
6
votes
1 answer

Building Pango Cairo for Android NDK

I found someone who ported over Pango Cairo for Android NDK (blog post, source code). However I have not been succesfull in compiling his example project. Has anyone managed to do so and can tell me what I am doing wrong? This is what I have tried…
Michoel
  • 230
  • 2
  • 7
5
votes
1 answer

Using PangoCairo with PyGObject API

I am porting a Python2 script that uses Pango for drawing text to a Cairo surface. It works fine using the old PyGtk API with the pangocairo package. My system (Debian Jesse) doesn't have Python3 packages for PyGtk and instead uses the newer Gtk+…
Kevin Thibedeau
  • 3,152
  • 12
  • 24
4
votes
1 answer

Create Pango Layout Before Cairo Surface

In my application, I am using Pango and Cairo to create text textures. These textures have their width fixed, but should scale their height to fit text contents. The parent objects involved in this situation will then scale their heights to match…
user3995702
4
votes
1 answer

Dynamic text in Pango/Cairo

I've a feeling I might be missing something with Pango. Almost everything in the API seems geared towards displaying static text with the exception of two functions to draw/move a cursor at a particular position which suggests there might be a built…
Mike
  • 2,475
  • 1
  • 9
  • 19
3
votes
1 answer

How to get Pango Cairo to word wrap properly?

I'm having problems getting Pango Cairo to word wrap. Below is some demo code. I am setting the layout's width to the same as the red rectangle, so I would expect it to wrap to the red rectangle. As it is, it is simply putting one word on each line,…
Joe
  • 42,600
  • 24
  • 134
  • 225
2
votes
1 answer

Segmentation fault rendering text to cairo context

It's my first time using pangomm and I am trying to render some text to a Cairo::Context, but when i try to access anything from the Pango::Layout object the program throws the following error: (process:7175): glibmm-CRITICAL **: 15:36:58.578:…
Vinicius
  • 23
  • 2
2
votes
0 answers

Can't use custom fonts to PHP Imagick with Pango / another solution for arabic ligatures

We have an Image processing microservice that created rich images with text on top of it and we are in the process of adding arabic locale to our website While translating some of the content to Arabic our translator told us that the text in…
sUP
  • 592
  • 2
  • 15
2
votes
1 answer

pango_cairo_layout_path method does not respect kerning

I'm using pango library to do some text layout and cairo backend for rendering. It seems to me that the pango_cairo_layout_path method does not respect kerning. I'm using c# bindings for pango and cairo that are provided with the gtk# project. Also…
ZDimitris
  • 31
  • 5
2
votes
1 answer

AttributeError: 'module' object has no attribute 'cairo_font_map_get_default'

If I try to run this example from the cairo website, I get: AttributeError: 'module' object has no attribute 'cairo_font_map_get_default' I guess I'm missing some packages? (I'm on Ubuntu 14.04) However, I try to find the dev packages I would need,…
knocte
  • 14,579
  • 6
  • 67
  • 110
2
votes
4 answers

How to get the default font used by the system using pygtk or pango?

I have a fontbutton using pygtk. Initially, i do not want to set the font, as the system will take its default one. My question is what is the line of code to get the default font used by the system , so that i keep things default at first. Later…
mrabhiram
  • 53
  • 1
  • 5
1
vote
0 answers

Cairo blur surface

I can't figure this out , can you guys help a bit I have am original cairo surface srf and its context c now I am creating another surface shadow and superimposing it on previous one by cairo_t *cr = c; cairo_surface_t *shadow =…
1
vote
1 answer

New Lines Ignored in PangoLayout

I'm working on a program where I'm using PangoLayout for text layout and Cairo for rendering, and I'm having trouble with text with multiple lines (or rather, text that contains new line characters). It appears that Pango is truncating the text…
Luke Zhou
  • 93
  • 2
  • 9
1
vote
1 answer

cairo_debug_reset_static_data() issue using pango library

I've a problem with cairo_debug_reset_static_data() function when I combine both pango lib and cairo as I am getting the following assertion when its get called. draw: cairo-hash.c:217: _cairo_hash_table_destroy: Assertion `hash_table->live_entries…
1
2 3