Pango in 7.7.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pango in 7.7.1

Annick

Hi,

I am unable to use Pango in 7.7.1.

I would like to run e test such as this one :
===
| window composite bloc aString layout width height taille |
window := ApplicationWindow new.
composite := CompositePart new.
window component: composite.
aString := 'Bonjour, le monde'.
bloc := VisualBlock block: 
[:gc :box |
gc newCairoContextWhile: 
[:aCR |
layout := aCR newLayout alignCenter.
" fontDescriptionString: 'Arial, 9.2';"
taille := 16 * 0.815.
layout fontDescriptionString: 'Arial, ' , taille printString.
layout text: aString.
width := layout width.
height := layout height.
aCR source: ColorValue darkGreen.
aCR moveTo: 10 @ 10.
layout showOn: aCR.
aCR rectangle: (10 @ 10 extent: (Point x: width y: height)).
aCR stroke]]
bounds: (0 @ 0 extent: 30 @ 40).
composite add: bloc.
window openWithExtent: 800 @ 600
=============

I get a failure on loading the library.

Annick Fron

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Pango in 7.7.1

Travis Griggs-4
On Tue, Nov 9, 2010 at 8:37 AM, Annick Fron <[hidden email]> wrote:

Hi,

I am unable to use Pango in 7.7.1.

I would like to run e test such as this one :
===
| window composite bloc aString layout width height taille |
window := ApplicationWindow new.
composite := CompositePart new.
window component: composite.
aString := 'Bonjour, le monde'.
bloc := VisualBlock block: 
[:gc :box |
gc newCairoContextWhile: 
[:aCR |
layout := aCR newLayout alignCenter.
" fontDescriptionString: 'Arial, 9.2';"
taille := 16 * 0.815.
layout fontDescriptionString: 'Arial, ' , taille printString.
layout text: aString.
width := layout width.
height := layout height.
aCR source: ColorValue darkGreen.
aCR moveTo: 10 @ 10.
layout showOn: aCR.
aCR rectangle: (10 @ 10 extent: (Point x: width y: height)).
aCR stroke]]
bounds: (0 @ 0 extent: 30 @ 40).
composite add: bloc.
window openWithExtent: 800 @ 600
=============

I get a failure on loading the library.

Annick, if you are trying to use the packaged parcel and precompiled library, you don't have Pango support. Unfortunately. The way the libraries were/are built, makes it impossible for pango libraries you might download to work with the cairo one.

If you want to use the full pango/cairo stack on Windows, my current recommendation is to download the whole stack from gtk. I've wrapped them all up as a zip which you can download:

http://dl.dropbox.com/u/8893516/win32CairoPango.zip

Then you need to make sure the various xxxxLibrary methods point to those names. For example, the cairo library in that drop is called libcairo-2.dll, rather than cairo.dll. The 7.8 versions of the packages that are in the repository right now, probably work with 7.7.1. I'm not in a position to download stock 7.7.1 for windows right now to test for sure, but I can't think of any changes I made to those, that were specific to 7.8 changes.

One thing you need/should change in your example, is the first line to read:

layout := Pango.Layout default alignCenter.

HTH

--
Travis Griggs
(<sarcasm>sent from this mail application I love so much</sarcasm>)


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Pango in 7.7.1

Annick
Hi Travis,

I have used your dlls and modified the libraries.
Yet I have a bug when evaluating
Pango.Layout default


Namely it calls the following method :
PangoContext>>manageHandle:
super manageHandle: aBlock.
LibPango
pango_cairo_context_set_shape_renderer: handle
with: ShapeAttribute shapeRendererCallback
with: nil
with: nil

and super has no manageHandle: method.

Annick
Le 12 nov. 2010 à 14:09, Travis Griggs a écrit :

On Tue, Nov 9, 2010 at 8:37 AM, Annick Fron <[hidden email]> wrote:

Hi,

I am unable to use Pango in 7.7.1.

I would like to run e test such as this one :
===
| window composite bloc aString layout width height taille |
window := ApplicationWindow new.
composite := CompositePart new.
window component: composite.
aString := 'Bonjour, le monde'.
bloc := VisualBlock block: 
[:gc :box |
gc newCairoContextWhile: 
[:aCR |
layout := aCR newLayout alignCenter.
" fontDescriptionString: 'Arial, 9.2';"
taille := 16 * 0.815.
layout fontDescriptionString: 'Arial, ' , taille printString.
layout text: aString.
width := layout width.
height := layout height.
aCR source: ColorValue darkGreen.
aCR moveTo: 10 @ 10.
layout showOn: aCR.
aCR rectangle: (10 @ 10 extent: (Point x: width y: height)).
aCR stroke]]
bounds: (0 @ 0 extent: 30 @ 40).
composite add: bloc.
window openWithExtent: 800 @ 600
=============

I get a failure on loading the library.

Annick, if you are trying to use the packaged parcel and precompiled library, you don't have Pango support. Unfortunately. The way the libraries were/are built, makes it impossible for pango libraries you might download to work with the cairo one.

If you want to use the full pango/cairo stack on Windows, my current recommendation is to download the whole stack from gtk. I've wrapped them all up as a zip which you can download:

http://dl.dropbox.com/u/8893516/win32CairoPango.zip

Then you need to make sure the various xxxxLibrary methods point to those names. For example, the cairo library in that drop is called libcairo-2.dll, rather than cairo.dll. The 7.8 versions of the packages that are in the repository right now, probably work with 7.7.1. I'm not in a position to download stock 7.7.1 for windows right now to test for sure, but I can't think of any changes I made to those, that were specific to 7.8 changes.

One thing you need/should change in your example, is the first line to read:

layout := Pango.Layout default alignCenter.

HTH

--
Travis Griggs
(<sarcasm>sent from this mail application I love so much</sarcasm>)

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc