Right-to-left languages?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
lanqu
Posts: 1
Joined: 2012-04-14T07:55:31-07:00
Authentication code: 8675308

Re: Right-to-left languages?

Post by lanqu »

I have the same problem in Windows 7 OS =( May be I need just to switch some parameter?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Right-to-left languages?

Post by fmw42 »

lanqu wrote:I have the same problem in Windows 7 OS =( May be I need just to switch some parameter?
I think you need PANGO to make it work and that may be available only if you use the latest cygwin. But I am not a windows user, so I will defer to those who know more than I.
Keld_von_Eyben
Posts: 5
Joined: 2010-04-21T02:08:15-07:00
Authentication code: 8675308

Re: Right-to-left languages?

Post by Keld_von_Eyben »

I will try upgrading our IM implementation to use Pango later this year.
Pango is new to me, but if it solves the left-to-right issue its really a unique solution.
/Keld
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Right-to-left languages?

Post by fmw42 »

Najeh
Posts: 4
Joined: 2012-04-16T17:20:10-07:00
Authentication code: 8675308

Re: Right-to-left languages?

Post by Najeh »

Hi,

Thank you for this great work!!

But i still have an issue when trying to use 'pango' :(
I'm trying to render an rtl text ( arabic text ) with imagmagick. I read many topics about this issue and how ImageMagick handle RTL langauages ( using reverse, and direction options), but this does not solve the main problem and text outputted still not the right one and if we try to mix rtl and ltr language, the problem become more visible.

And when i read this fork, i see the pango solution.

Trying to make some tests picked from this page :http://www.imagemagick.org/Usage/text/#pango , i had many errors as shown here :

convert -background lightblue pango:"Anthony Thyssen" pango.gif
convert: pas de délégué pour décoder ce format d'image `Anthony Thyssen' @ error/constitute.c/ReadImage/533.
convert: nom de fichier d'image absent `pango.gif' @ error/convert.c/ConvertImageCommand/3017.

I will translate this text : convert: no delegate to access this image format : `Anthony Thyssen' @ error/constitute.c/ReadImage/533
convert: missed image filename 'pango.gif' @ error/convert.c/ConvertImageCommand/3017

Note: i just installed ImageMagick 6.7.6-5 with perl enabled and rsvg delegation.

Image Magick work fine and standard command 'convert' work fine also.

This is the output of the command: convert -list configure:

Path: /usr/local/lib/ImageMagick-6.7.6/config/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -pthread
CODER_PATH /usr/local/lib/ImageMagick-6.7.6/modules-Q16/coders
CONFIGURE ./configure '--with-rsvg=yes' '--with-perl=/usr/bin/perl'
CONFIGURE_PATH /usr/local/etc/ImageMagick/
COPYRIGHT Copyright (C) 1999-2012 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib fontconfig freetype jpeg jng lcms png rsvg tiff x11 xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-wmf=no --with-perl=/usr/bin/perl
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick/
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.7.6/modules-Q16/filters
HOST i686-pc-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick
LDFLAGS -L/usr/local/lib -L/usr/lib
LIB_VERSION 0x676
LIB_VERSION_NUMBER 6,7,6,5
LIBRARY_PATH /usr/local/lib/ImageMagick-6.7.6
LIBS -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lpng12 -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -L/lib -lrsvg-2 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lxml2 -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2012-04-16
SHARE_PATH /usr/local/share/ImageMagick-6.7.6
SVN_REVISION 7385
TARGET_CPU i686
TARGET_OS linux-gnu
TARGET_VENDOR pc
VERSION 6.7.6
WEBSITE http://www.imagemagick.org

Path: [built-in]

Name Value
-------------------------------------------------------------------------------
NAME ImageMagick


Any help please?

Thank you
Najeh
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Right-to-left languages?

Post by fmw42 »

type

convert -list format

see if you have a line such as:

PANGO* PANGO r-- Pango Markup Language (Pangocairo 1.30.0)

However, I am surprized that it is not rw- Seems to missing the write.

But this does work:

convert -background lightblue -size 150 \
pango:"Anthony Thyssen is the main author of IM Examples" \
pango_size.gif

See
http://www.imagemagick.org/Usage/text/#pango
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Right-to-left languages?

Post by anthony »

fmw42 wrote:type

Code: Select all

convert -list format
see if you have a line such as:
PANGO* PANGO r-- Pango Markup Language (Pangocairo 1.30.0)
However, I am surprized that it is not rw- Seems to missing the write.
pango: is ONLY an input (image creation) format. It is NOT a actual image file format, just a text to image coder. Muchl ike label: or caption:. So of course you can not write to it!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Najeh
Posts: 4
Joined: 2012-04-16T17:20:10-07:00
Authentication code: 8675308

Re: Right-to-left languages?

Post by Najeh »

Thank you for the reply.

above the outpout of the command: convert -list format

PANGO* PANGO --- Pango Markup Language

Thank you for the help.
Najeh
Najeh
Posts: 4
Joined: 2012-04-16T17:20:10-07:00
Authentication code: 8675308

Re: Right-to-left languages?

Post by Najeh »

I tried to reinstall all this packages with yum command:#yum install pango-devel pango cairo-devel cairo
and i noticied that all is already well installed ( see the outpout above ) :


[root@ds221 ~]# yum install pango-devel pango cairo-devel cairo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* atomic: www7.atomicorp.com
* base: mirror.bofh.so
* extras: mirror.bofh.so
* updates: mirror.bofh.so
Setting up Install Process
Package pango-devel-1.14.9-8.el5.centos.3.i386 already installed and latest version
Package pango-1.14.9-8.el5.centos.3.i386 already installed and latest version
Package cairo-devel-1.2.4-5.el5.i386 already installed and latest version
Package cairo-1.2.4-5.el5.i386 already installed and latest version
Nothing to do
[root@ds221 ~]#


The problem still the same. What i'm missing?

Thank you for your help.
Najeh
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Right-to-left languages?

Post by magick »

Your Pango package is too old. ImageMagick requires Pango 1.28.1 or above.
Najeh
Posts: 4
Joined: 2012-04-16T17:20:10-07:00
Authentication code: 8675308

Re: Right-to-left languages?

Post by Najeh »

Hi,
Unfortunally although i installed pango 1.28.1, i still have the same problem!

It's very strange! ImageMagick was well installed ( ImageMagick-6.7.6-5 ), i re-installed it to be sure that all is OK, but still have the error:

Above, the trace of the error after installing pango 1.28.1:


make[2]: Rien à faire pour « install-exec-am ».
make[2]: Rien à faire pour « install-data-am ».
make[2]: quittant le répertoire « /usr/local/src/pango-1.28.1/tests »
make[1]: quittant le répertoire « /usr/local/src/pango-1.28.1/tests »
make[1]: entrant dans le répertoire « /usr/local/src/pango-1.28.1 »
make[2]: entrant dans le répertoire « /usr/local/src/pango-1.28.1 »
make[2]: Rien à faire pour « install-exec-am ».
test -z "/usr/lib/pkgconfig" || //bin/mkdir -p "/usr/lib/pkgconfig"
/usr/bin/install -c -m 644 pango.pc pangox.pc '/usr/lib/pkgconfig'
make[2]: quittant le répertoire « /usr/local/src/pango-1.28.1 »
make[1]: quittant le répertoire « /usr/local/src/pango-1.28.1 »
[root@ds221 pango-1.28.1]# convert -background lightblue pango:"Anthony Thyssen" pango.gif
convert: error while loading shared libraries: librsvg-2.so.2: cannot open shared object file: No such file or directory
[root@ds221 pango-1.28.1]# convert -background lightblue pango:"Anthony Thyssen" pango.gif
convert: pas de délégué pour décoder ce format d'image `Anthony Thyssen' @ error/constitute.c/ReadImage/533.
convert: nom de fichier d'image absent `pango.gif' @ error/convert.c/ConvertImageCommand/3017.
[root@ds221 pango-1.28.1]#


Thank you
Najeh
Post Reply