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

50 questions
1
vote
0 answers

Pango does not give the location for certain graphemes

I was writing a program to render text to an image and draw bounding boxes around characters using Pango, Cairo and PangoCairo. I am using the Rust bindings to these libraries called gtk-rs. After laying out the next I am splitting the text into…
1
vote
2 answers

Gstreamer text overlay from variables on memory

Im running the command such as following and this command broadcasts the video to ethernet port. But here is my question that how I can add overlay onto video where overlay values are stored in shared memory and may change any time. gst-launch-1.0…
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
  • 125
  • 2
  • 10
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
vote
0 answers

PangoCairo shows cluttered text when cairo context is scaled

I'm playing around with PangoCairo and found out that if the cairo context is scaled, pango draws letters closer together when scale is less than 1 and spaced from each other when scale is more than one. Here is the minimum example (I've took it…
zmij
  • 57
  • 7
1
vote
0 answers

Pango and X11, font description mismatch and display issues

Being relatively new to X11, I've been trying to make font rendering painless in my C example program. After giving up on making Xtf work reliabily, pangocairo seemed like the next best choice. I have encountered however an issue: pango doesn't…
K.S
  • 11
  • 2
1
vote
2 answers

Why are wxWindows and PangoCairo used together?

I'm probably way out of the loop, but it seems weird to use a native look GUI library and then - if you're not using wxGTK - shoehorn in a text renderer from a different GUI library. What's the deal here?
Mark Green
  • 1,310
  • 12
  • 19
1
vote
0 answers

pango cairo php configuration

I am trying to make pangocairo to write text on the image. I followed several threads in StackOverflow and followed all. the criteria for this is to install Pango Cairo gtk libpangocairo and I checked the already installed program and found that…
raju
  • 277
  • 1
  • 4
  • 12
1
vote
0 answers

cairocffi throws an error with pango

context = cairocffi.Context(surface) # pangocairo.pango_cairo_set_antialias(cairo.ANTIALIAS_SUBPIXEL) context.translate(movex, movey) context.rotate(twist) layout = gobject_ref(pangocairo.pango_cairo_create_layout(context._pointer)) In the last…
iLoveCamelCase
  • 450
  • 10
  • 21
1
vote
1 answer

Memory Leak in Pango

I am using Pango library alongside Cairo, without GTK, in a test-drive application which I'm currently compiling on MacOSX. I have a memory leakage problem, that I have traced to this function: void draw_with_cairo (void) { PangoLayout *layout; …
arashka
  • 1,226
  • 3
  • 17
  • 30
1
vote
0 answers

Is it possible to get the minimum ascent of all characters in font via fontconfig or pango?

I can see in pango that we can query the maximum ascent (i.e. vertical distance from the horizontal baseline to the highest ‘character’ coordinate). But I also need the minimum ascent. Is this possible via pango/fontconfig or some other library?…
patchwork
  • 1,161
  • 3
  • 8
  • 23
1
vote
2 answers

How to convert Cairo Image surface to opencv Mat in c++

I Have a cairo Image surface in cairomm library Cairo::RefPtr cropSurface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, Width,Height); How can I convert it to an Opencv Mat in c++?
Saeed.Torabzadeh
  • 121
  • 2
  • 10
1
vote
4 answers

Multiple pages in single PDF with CAIRO?

I'm using c# and Cairo to create a pdf file.I want to make a multiple page pdf and I can't find any samples.I only found this one : http://lists.cairographics.org/archives/cairo/2008-September/014949.html any help or suggestion will be highly…
Mina N
  • 231
  • 3
  • 8
  • 17
0
votes
1 answer

Render antialiased text with Pango

I'm trying to modify text2image from the Tesseract OCR training code to output antialiased text. I've tried tried the suggestions from both Andreas and Constantine in this SO Question: Change font rendering (non-antialiased) with pango but the…
Danny
  • 2,482
  • 3
  • 34
  • 48
0
votes
0 answers

I want to install pango with cairo backend on windows 11, can anyone guide me?

I've looked at multiple posts on SO about how setting up pango or cairo is giving them errors and i tried setting it up a few times myself, but unfortunately there are just so many errors in the entire process that i decided to start from scratch,…