unifont.org >> LASi

2011-10-03 New Release Announcement: libLASi-1.1.1

Our development team is proud to announce the release of libLASi-1.1.1 which incorporates several bug fixes for the previous (1.1.0) release. The most important of these is a correction for the positioning of diacritical marks that has been suggested by Yotam Medini. Most of this change is internal, but it does require a backwards-incompatible change to part of our public API that is rarely used externally. So most users of libLASi will just need to recompile the applications that link to libLASi (as forced by our SOVERSION bump) without actually having to change those applications.

The libLASi-1.1.1 file release area (including release notes, a detailed ChangeLog, the source tarball, and a detached gpg signature for that tarball) is located at http://sourceforge.net/projects/lasi/files/lasi/1.1.1%20Source.

Enjoy using libLASi-1.1.1 to make some very nice looking PostScript results. Your feedback on the lasi-devel mailing list is welcome.

Alan W. Irwin on behalf of the libLASi developers.

2008-02-08 Previous Release Announcement: libLASi-1.1.0

The LASi development team is proud to announce the release of libLASi-1.1.0 which has significant improvements (a new build system based on CMake and some small code updates to make libLASi more robust) compared to prior releases.

The new CMake-based build system allows building libLASi on both Unix and Windows platforms and automatically detects freetype version so split releases to cater to different freetype versions are no longer necessary.

The robustness improvements mean that libLASi now renders an empty box rather than erroring out in those rare cases where glyph information returned by pango/cairo/fontconfig is not available or else is in a glyph form that is unusable by libLASi.

The file release area (including release notes, a detailed ChangeLog, the source tarball for version 1.1.0, and an md5 checksum for that tarball) is located at http://sourceforge.net/project/showfiles.php?group_id=187113.

Enjoy using libLASi to make some very nice looking PostScript results and your feedback is welcome.

-- Alan W. Irwin on behalf of the libLASi developers, 2008-02-08.


Sample LASi-generated document

libLASi is a library written by Larry Siden that provides a C++ stream output interface ( with operator << ) for creating Postscript documents that can contain characters from any of the scripts and symbol blocks supported in Unicode and by Owen Taylor's Pango layout engine. The library accomodates right-to-left scripts such as Arabic and Hebrew as easily as left-to-right scripts. Indic and Indic-derived Complex Text Layout (CTL) scripts, such as Devanagari, Thai, Lao, and Tibetan are supported to the extent provided by Pango and by the OpenType fonts installed on your system. All of this is provided without need for any special configuration or layout calculation on the programmer's part.

Although the capability to produce Unicode-based multilingual Postscript documents exists in large Open Source application framework libraries such as GTK+, QT, and KDE, libLASi was designed for projects which require the ability to produce Postscript independent of any one application framework.

libLASi is now a Sourceforge project -- Please visit http://sourceforge.net/projects/lasi to find out the latest development information.


This document outlines the motivation and strategy employed in the development of LASi.


libLASi-1.1.0 Latest Stable Release

Download the latest stable release, libLASi-1.1.0, from http://sourceforge.net/project/showfiles.php?group_id=187113.

Sourceforge SVN Repository

For the latest development version of the library, visit http://sourceforge.net/projects/lasi to learn more about accessing libLASi's SVN repository. To check out the latest code from the repository, you can use the following command line:

svn co https://lasi.svn.sourceforge.net/svnroot/lasi/trunk lasi

Font Resources

The example programs included with LASi contain Unicode text in various languages. To obtain Open Source and otherwise liberally-licensed fonts required for proper generation of the example Postscript output, please visit Unifont.org's Unicode Font Guide For Free/Libre Open Source Operating Systems.

Prerequisites and Dependencies

The code base in the Sourceforge SVN repository uses a CMake build system. You will need at least version 2.4.5 to build LASi from SVN.

LASi uses Owen Taylor's Pango text layout engine. Pango itself depends on the glib infrastructure library of the GTK+ toolkit and on the FreeType 2 font handling library.

Almost any modern Linux or similar free *nix operating system will already have the FreeType2 library installed. If you have the Gnome desktop or GTK+-based software like the Gimp installed on your system, then you may be able to use the glib and Pango libraries already present on your system.

If you decide to download glib and Pango, be sure to download "matched" libraries from the Gnome web site. For example, if you go to the download area for Gnome 2.8, you will find glib-2.4.6.tar.gz and pango-1.6.0.tar.gz. Glib-2.4.6 and pango-1.6.0 are "matched" for building a stable version of Gnome and should thus provide you good results when used with LASi.

General CMake Build Instructions for libLASi

As CMake is a new build system which many developers are not yet familiar with, we provide the following general CMake instructions to get you started:

1) Create an empty build directory and cd to it:

mkdir build_dir
cd build_dir

2) Configure libLASi using cmake or ccmake:

cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/prefix \
-DCMAKE_VERBOSE_MAKEFILE=ON /path/to/lasi/source/code >& cmake.out


ccmake -DCMAKE_INSTALL_PREFIX=/path/to/install/prefix \
-DCMAKE_VERBOSE_MAKEFILE=ON /path/to/lasi/source/code

The CMAKE_INSTALL_PREFIX option lets the user specify the install prefix and CMAKE_VERBOSE_MAKEFILE=ON insures the subsequent make commands give verbose results. ccmake is a GUI frontend for cmake that gives you other annotated options you can set.

3) Build and install libLASi:

make >& make.out
su -c "make install >& /tmp/make_install.out"

Note: 'su -c "<root command>"' is the conventional way to execute a command requiring root privileges on Linux. On some other systems, such as OS X, you might invoke "sudo" instead, while on other systems you might need to start a root shell using the "su" command.

Platform Specific Notes

Recent Linux distributions will already have most, if not all, of the tools and libraries that you need to build LASi already installed. This will likely not be the case on other platforms. Therefore, if you plan to build LASi on a non-Linux platform, be prepared to spend some time downloading and installing required tools like CMake and DOxygen, as well as dependent libraries like GLib and Pango.


Development of LASi takes place primarily on Linux workstations with fairly recent distributions installed. As a result, most of the tool and library dependencies described in the preceding section will normally already be present on your machine. A possible exception is CMake : be sure to get at least version 2.4.5.


We have achieved the best success with the least frustration by building the required tools and libraries directly from source code. However, if you don't really like this idea, you might want to try http://trac.macosforge.org/projects/macports/wiki which provides a Gentoo-like build experience.

Due to numerous problems encountered with Fink, we cannot recommend Fink at this time.

Here then are build instructions for Apple OS X:

1) Get CMake: Download the latest Darwin Universal (Tiger only installer) .dmg from www.cmake.org. This will install cmake in /usr/bin.

2) Get SVN: Matthew E. Porter provides SVN .dmg installers for OS X that do not require Fink. Importantly, these binaries are compiled with SSL support, which is required for checking out LASi from the Sourceforge SVN repository. The URL is http://metissian.com/projects/macosx/subversion/. This binary will be installed in /usr/local/bin .

3) Get PKG-CONFIG: Build from source. http://pkgconfig.freedesktop.org/releases/pkg-config-0.20.tar.gz. If you install libraries using different prefixes, don't forget to "export PKG_CONFIG_PATH" as necessary so that pkg-config can find the installed libraries. For example:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

4) Get DOXYGEN: Build it from source. Available from http://www.stack.nl/~dimitri/doxygen/ . DOxygen is needed to create the LASi documentation. Installs in /usr/local/bin by default.

5) Get libxml2 from http://xmlsoft.org/ and build it from source. This library is required to compile fontconfig.

6) Get fontconfig from http://www.fontconfig.org/wiki/ and build it from source.

7) Get FREETYPE: Build Freetype from source. Available from http://freetype.sourceforge.net/ . Using the defaults, Freetype will be installed in /usr/local/lib and --importantly-- the freetype.pc file will be found by LASi's CMake build system.

8) Get CAIRO from http://xmlsoft.org/ and build it from source.

9) Get GLIB and PANGO from the Gnome project. At the time of this writing, the latest version was 2.16.13: http://ftp.gnome.org/pub/GNOME/platform/2.16/2.16.3/sources/ . Download the latest versions of glib and pango. Be sure to build and install glib first. These will be installed in /usr/local/lib by default.

10) Finally you should now be able to build LASi without any problems. :-)

Other *Nix Systems

On other, non-Linux *Nix systems be prepared to spend some time chasing down missing dependencies. The instructions for OS X above will give you a fair idea of what may be required.

You may find that your life is easier if you install a recent version of the GCC compiler suite along with GNU gmake.

You will almost certainly need to use the C++ standard library that comes with the GCC compiler suite (Even compilers like Intel's icpc compiler uses the GNU C++ standard library when linking projects on Linux). Other C++ libraries, such as on Sun Solaris, may not be sufficiently up-to-date.

Make utilities on some platforms, such as OpenBSD, do not have some of the capabilities of GNU gmake which are used frequently, so you will probably save yourself some trouble by using gmake.

After carefully satisfying all dependencies by installing packages from the ports tree or from source, we encountered no problems building libLASi on OpenBSD version 4.0 on i386.


These instructions from Werner Smekal should allow anybody to compile libLASi on Windows platforms with the MinGW and Visual C++ compiler:

1) Download the following from http://www.gimp.org/~tml/gimp/win32/downloads.html :

Unzip all packages in a directory, e.g. C:\Dev\gtk .

2) Download from ftp://ftp.jclark.com/pub/xml/expat.zip:

Unzip expat.zip and copy only the xmlparse.dll in the bin directory to C:\Dev\gtk\bin. Rename xmlparse.dll to libexpat.dll.

3) Some additional things need to be ironed out:

Requires: pango,freetype2
Libs: -L${libdir} -lpangoft2-1.0
Cflags: -I${includedir}/pango-1.0

cd C:\Dev\gtk\lib
pexports ..\bin\freetype6.dll > freetype.def
lib /machine:i386 /def:freetype.def

4) Set environment variables for cmake (USER_ROOTDIR is the development directory, e.g. C:\Dev\gtk):

rem setup glib, pango, cairo, freetype, pkg-config
set PKG_CONFIG_PATH=%USER_ROOTDIR%\gtk\lib\pkgconfig
set PATH=%USER_ROOTDIR%\gtk\bin;%PATH%

5) Build libLASi in a command line environment:

mkdir build (we assume the lasi directory is in the same folder as the build)
cd build
make -G "MinGW Makefiles" -DBUILD_SHARED=ON -DCMAKE_INSTALL_PREFIX=C:\Dev\gtk ../lasi
mingw32-make install (compiles and install into gtk directory)

If you have trouble building LASi ...

If you have trouble building LASi, the usual culprits are:

API Documentation

Note: The DOxygen documentation generated when you build LASi will be more up-to-date than the documentation here. However as the API is already quite stable, the differences will be few:


Examples are provided in the examples subdirectory of the software distribution. The makefiles included with the examples illustrate how to link a program against LASi. Here is a simple example of what source code using LASi looks like.

Original Author

Larry Siden lsiden@gmail.com is the original author of LASi.

Project Maintainers and Development Staff

Please visit http://sourceforge.net/projects/lasi/ for the most current information regarding project maintainers and development staff.



My friend, Ed Trager, who first envisioned and motivated me to write LASi, suggested that I assign the name "Lasi" to this project, as "Lasi" is composed of the first two letters of my first name, Larry, followed by the first two letters of my last name, Siden. Since this immediately delighted by own sense of vanity, I had no trouble indulging Ed. Out of concern that the name "Lasi" might invite ridicule by jeolous programming rivals who would no doubt take every opportunity to mock it's connection to the beloved TV canine hero, I changed it's spelling to the post-modern, hi-tech moniker "LASi".