237 questions
1
vote
1
answer
2k
views
Gnuplot pngcairo arial-bold font Pango-WARNING
I'm using Gnuplot 4.6 in Windows with the pngcairo terminal to plot some stuff. If I try to use the arial-bold font I get the following error:
Pango-WARNING **: couldn't load font "arial-bold, Not-...
0
votes
1
answer
198
views
Pango text gets blurring when GL viewport is changed
I am working with a piece of code which was rendering a texture containing text written using Pango, in a particular GL viewport. I have now had to change the viewport, and put the texture at a ...
2
votes
1
answer
1k
views
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)
...
1
vote
1
answer
429
views
Line breaks in Statusbar
I have a program here that uses the GTK Status bar and I'd like to have multi-line output in it. When I try to output multiple lines into it, I get glyphs instead as seen below:
I'd expect it to work ...
1
vote
1
answer
781
views
Open type font issue
Basically,this is a problem of displaying a minority language.
Let me make it brief:
I've been trying to make my Opentype font(which has some features in it) work properly on non-windows(on windows, ...
1
vote
1
answer
3k
views
How does one format multiple lines of Zenity --list --text?
Formatting with Pango Markup has been shown to work on one --info --text entry in this stackoverflow answer.
I would like to use a monospace font for a multiline list of block devices (avoiding ...
3
votes
2
answers
2k
views
GTK TextView tags to pango markup
I want to extract the formated text in a GtkTextView as html or pango markup language.
Having a small text editor with formating like this. So the formating elements are simple
<b>, <i>, ...
2
votes
0
answers
210
views
Updating pango broke gtkmm (Arch)
I just updated the pango package (running Arch Linux), and now I can't link any of my gtkmm code. Here's the error:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../lib/libpangocairo-1.0.so: ...
0
votes
1
answer
913
views
gtk font rendering using native windows handle
I made a small gui app for rendering text using gtk+2. To tackle horrible fonts on win32. I am creating a cairo surface using native windows handle (HDC). Now font look beautiful in windows but it ...
18
votes
2
answers
12k
views
Building Pango with Cairo support
I'm attempting to build a new version of wireshark 1.10 on a RHEL5 box with the intent of making an RPM so that customers that I support can install it. Possibly others if I can find a place to host ...
3
votes
1
answer
201
views
CULLong-type constructor not visible when installing pango and GIO with cabal on Windows
I'm trying to install Threadscope on Windows 8 in order to follow along the Parallel and Concurrent Programming in Haskell –book.
I successfully installed the GTK+ –bundle and subsequently tried ...
0
votes
2
answers
2k
views
How to colour fonts in Gtk3 label/entry widgets in Vala?
I'm really enjoying experimenting with Vala, and have managed to solve most of the snags I've encountered so far. But the one that's causing me a bit of time-wasting right now is the colouring (and ...
1
vote
1
answer
399
views
how to use japanese characters in pygtk?
I am using japanese characters in a graphical user interface using python-gtk. However, instead of seeing japanese characters, I see squares with letters and numbers inside. I think I should use pango ...
1
vote
0
answers
120
views
How can I translate a pango.FontDescription to something that Reportlab understands?
In a PyGTK+ based program, I'm using Reportlab to generate PDF output. I'd like to enable users to select a font for that PDF output (partly due to this issue). The canonical way within (Py)GTK+ is ...
0
votes
1
answer
215
views
Integrating fribidi with Tk source code
I see in the tk source code in the Tkbind.c, TkEvent.c and TkEntry.c that there are a set of pointers, eventPtr, dispPtr, bindPtr, and a few more pointing to different C-structures.
There is ...
2
votes
1
answer
2k
views
C++ pango text orientation
I'm trying to label the y-axis in a plot built using pango.
I'm unable to orient the text to run vertically up along the y-axis.
Relevant portion of code is:
#include <gtkmm.h>
Pango::...
1
vote
2
answers
3k
views
Pango and FreeType -- not rendering text, just weird pixels
I'm trying to get Pango to control FreeType. I've successfully got FreeType to render into a bitmap but Pango doesn't seem to know what's going on, I'm obviously not doing something correctly.
This ...
0
votes
1
answer
655
views
python & gtk3 - cairo_context.show_layout method is missing
My code looks like
from gi.repository import PangoCairo
from gi.repository import Gtk
class Column(Gtk.DrawingArea):
getContext = lambda self: PangoCairo.create_context(self.get_window()....
9
votes
1
answer
6k
views
What is a simple example of using Pango to render text into an image using a FreeType font?
I want to render text using Pango, but I can't find example code that does not use Cairo. Can someone give me a simple example of Pango usage with a FreeType backend? This is how I think it should ...
0
votes
1
answer
352
views
Fail while build pango-1.4.1
Im trying to install pango-1.4.1 package to my Linux machine (a prerequisit to gtk+-2.0 lib). The used distro is:
CentOS release 5.9 (Final)
Linux 2.6.18-274.18.1.el5 #1 SMP Thu Feb 9 12:45:52 EST ...
5
votes
3
answers
10k
views
How to install pango for Python on Windows?
Since ReportLab does not support Python 3 I am now attempting to generate PDF with cairo, which works but lacks text-wrapping support. The next step seems to require pango and its Python-bindings, but ...
3
votes
1
answer
2k
views
How to set font from file in Pango and Mono
I have simple application that prints text and determines its size in pixels.
static void Main(string[] args)
{
Application.Init();
var screen = Screen.Default;
var layout = new Pango....
1
vote
1
answer
3k
views
Calculate size of textstring in pygtk pango for text fill
I'm searching for a method to pre calculate the width of a text string with variable length with python gtk/pango.
I want to use it for adjusting text size automatically fill a given space, for a GUI ...
8
votes
2
answers
2k
views
Working around a big memory leak in GTK when redrawing a label
I'm using the latest release of the PyGTK All-in-One installer (2.24.2) for Python 2.7 which includes Cairo 1.10.8, Pango 1.29.4, PyGTK 2.24.0, and PyGobject 2.28.3 (I think).
The following code ...
1
vote
2
answers
3k
views
Change font rendering (non-antialiased) with pango
How do I render a string with pango using custom antialiasing and hinting settings?
I tried PangoCairo.set_antialias(cairo.ANTIALIAS_NONE) (in pygtk), but it had no effect. I'd like to be able to ...
0
votes
1
answer
392
views
wxPython binary created in pyinstaller creates ugly output on Fedora/RHEL
I have searched far and wide for two weeks trying to solve my issue and nothing has done much good, so I'm at the end of my string here! I created a custom printer-selection app for my workplace in ...
1
vote
1
answer
683
views
Change GtkScale font/align/color
Is there a simple way to change the value-text's font, align and color of a GtkScale widget? For example, I want to have a red and bold number, instead of the standard black one.
2
votes
0
answers
2k
views
Difference in rendered text width measured between freetype and pango/cairo
I am trying to predict how wide the text will appear rendered by pango library but I am trying to achieve it in bare Freetype for performance sake.
To answer the commenters - yes I measured ...
1
vote
1
answer
313
views
How to output lowercase strings in AwesomeWM rc.lua?
I'm using AwesomeWM vicious datewidget. I'm trying to output the date and time in wibox, in my rc.lua, with this format Feb 17, 12:10 AM (%b %d, %l:%M:%p) but I want the AM(%p) to be lowercase.
I've ...
6
votes
1
answer
2k
views
Fit line to width with Pango and Cairo (Pycairo)
I've several lines of text and I'd like each to fit in width (scaling the font size) to the width of the Context. Is there a way of doing this?
I'm using pangocairo and python for this.
10
votes
0
answers
273
views
Looking for an OSD supporting align attribute, multiple span or div elements, multiple columns [closed]
Please let me know if there is an OSD on-screen-display program or techinque for Xorg/Linux platform which can render XML in a much richer way than pango, at least support align attribute, and ...
4
votes
0
answers
999
views
RRDTool 'graph' command throws Glib and Pango error, installed with Homebrew on Mac OS X
The question is:
How do I make RRDTool generate graphs on Mac OS X ?
I installed rrdtool using homebrew on Mac OS x 10.6.8.
I'm able to create a database, update some data and fetch the data, but ...
3
votes
3
answers
13k
views
How to fix Invalid UTF-8 string passed to pango_layout_set_text()
I'm getting the following warning from my application that uses gtk+:
(foo:11333): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()
the function that is emitting the warning ...
7
votes
1
answer
9k
views
problems installing Pango-1.30.1
I have encountered a problem installing Pango-1.30 on a Ubuntu 12.04 platform. During ./configure step I receive a message saying "Could not enable any of Freetype, X11, Cairo, or Win32 backends. ...
0
votes
1
answer
711
views
Converting a Pango Font Description to a string in Vala
I am trying to convert a Pango Font Description returned from a Font Chooser Dialog in GTK 3 to a string, however the C function:
pango_font_description_to_string()
Does not work, as it is a ...
1
vote
1
answer
802
views
Can I automatically flow two font styles in a Pango Cairo Layout?
I want two paragraphs with different styles of text, one above the other. This is the quickest way to describe it:
<p style="font-size: 20pt">Para 1</p><p style="font-size: 10pt">...
0
votes
1
answer
1k
views
Memory leak in GTK# + Cairo + Pango
I'm using Mono + GTK# + Cairo + Pango on Ubuntu 12.04 and I found some memory leaks when using a Pango.Layout object.
I'm drawing some animation with a framerate of about 30 fps and my memory only ...
0
votes
1
answer
89
views
my vcproj does not comiple when added in another sln (already containing some other project)
I have pangoft2.vcproj. Once I have set the include directories etc., it compiles successfully.
Now, in a new .sln (where I have a pango.vcproj), I add this pangoft2.vcproj. Now, when I compile the ...
2
votes
1
answer
3k
views
Convert 8 bit color component to 16 bit color component
I am writing a GTK+ application that is using Pango text attributes to determine the color and other aspects of the text written onto a GtkLabel using something like this:
attributes = ...
3
votes
4
answers
4k
views
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 , ...
6
votes
1
answer
3k
views
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 ...
2
votes
2
answers
2k
views
Trying to format a string into columns with python
I am trying to format a string to display two columns for a high score table. Python is able to do this well when using print
print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x)
but when trying to use ...
0
votes
1
answer
407
views
Python Image Library and Gtk.FontSelectionDialog
I want to get PIL to draw the text using their fonts to get them, I use this code:
fdia = Gtk.FontSelectionDialog("Font")
response = fdia.run()
if response == Gtk.ResponseType.OK:
self.ui.eFont....
2
votes
1
answer
3k
views
PyGTK Transparent Window
I want the window transparent, but the label to be 100% in opacity. How can I achieve this? BTW: I noticed when I upgraded to Ubuntu 12.04's unity interface that window.set_opacity wasn't working like ...
8
votes
2
answers
9k
views
Loading a font from a file to pango?
I have a code uses Cairo and Pango to create an image :
#include<stdio.h>
#include<cairo.h>
#include<pango/pangocairo.h>
#define IMAGE_WIDTH 650
#define IMAGE_HEIGHT 150
#define ...
2
votes
1
answer
10k
views
Change text color of label in GTK in C
I am using Gtk 2.0.
I am trying to change the text color/font color of the label.
How difficult can it get? I am just trying things like gtk_widget_modify_text etc to no avail. I want to go the "...
0
votes
1
answer
1k
views
Set a text in the drawing area
I'd like to set a text into Drawing Area object, using pygtk.
So, I created a drawing area and set up a callback function using "expose event" signal.
Then I coded a function to set the text.
What ...
0
votes
2
answers
342
views
Are there any native gtkmm classes to Queue commands/data from the signal handler functions of the widgets?
I have constructed a Gtkmm GUI with miscellaneous widgets. On invoking the signal, each widget is intended to construct a "string" using user input data that is sent over the network. Thus I think, ...
0
votes
1
answer
642
views
How can I scale text with Pango-Sharp in only one (horizontal) direction?
I need to write some text with pango-sharp, but depending on the number of characters scale the width.
This is what I currently have:
var layout = new Pango.Layout (Core.PangoContext);
layout....
3
votes
1
answer
3k
views
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 ...