Dave Coventry | 22 Dec 10:35 2014

[ft] Included header files location

I'm trying to use the Freetype headers.

I've run the freetype-config script with the --cflags option to
retrieve the appropriate compilation flags.

$ freetype-config --cflags

My cpp file invokes the headers:

#include <freetype2/ft2build.h>

but the 'make' fails:

$ make
g++     main.cpp  -lglut -lGLEW -lGL -o main
In file included from text.h:8:0,
                 from main.cpp:8:
/usr/include/freetype2/ft2build.h:37:29: fatal error:
config/ftheader.h: No such file or directory
 #include <config/ftheader.h>
compilation terminated.
make: *** [main] Error 1

Clearly it's not looking in /usr/include/freetype2/ for the 'config' directory.

I've tried softlinking the 'config' directory so that the compiler can
find it in the /usr/include directory, but a) this is porobably not
best practice and b) I get another error.
(Continue reading)

Werner LEMBERG | 13 Dec 06:59 2014

[ft] tutorial updated

I've just finished an update of the FreeType tutorial.  Enjoy!


In case you find errors, badly discussed concepts, etc., or would like
to have certain topics covered, please write to the list.

akovia | 12 Dec 14:58 2014

[ft] Crashing libfreetype.so.6.11.2

I am trying to find some info on how to troubleshoot this. I have many programs crashing on my system and they all have libfreetype.so.6.11.2 in common. I work with a lot of fonts and have a gut feeling it's a bad font somewhere, but I'm not sure how to track it down. I have reinstalled all packages related to freetype that I could find (fontconfig, pango, etc..), but nothing seems to work. When trying to purge it, it wants to remove half of my system due to dependencies so I never followed through with that. Searches on the net and mailing list archives haven't turned up anything that has been able to help.
My system is close to unusable and am trying to avoid a completely new install. Any guidance would be greatly appreciated.
xubuntu 12.04.4 LTS
Freetype mailing list
Freetype <at> nongnu.org
Werner LEMBERG | 7 Dec 00:14 2014

[ft] Announcing FreeType 2.5.4

FreeType 2.5.4 has been released.

It is available from




The latter site also holds older versions of the FreeType library.

See below for  the relevant snippet  from the  CHANGES file; all users
should upgrade.



PS: Downloads from  savannah.nongnu.org  will redirect to your nearest
    mirror site.   Files on  mirrors may  be subject to  a replication
    delay   of   up   to   24   hours.   In   case   of  problems  use



FreeType 2  is a software  font engine that  is designed to  be small,
efficient,  highly   customizable,  and  portable   while  capable  of
producing high-quality output (glyph images) of most vector and bitmap
font formats.

Note that  FreeType 2 is  a font service  and doesn't provide  APIs to
perform higher-level features, like text layout or graphics processing
(e.g.,  colored  text  rendering,  `hollowing',  etc.).   However,  it
greatly simplifies these tasks by providing a simple, easy to use, and
uniform interface to access the content of font files.

FreeType  2  is  released  under  two open-source  licenses:  our  own
BSD-like FreeType  License and the  GPL.  It can  thus be used  by any
kind of projects, be they proprietary or not.


CHANGES BETWEEN 2.5.3 and 2.5.4


    - A   variant  of   vulnerability  CVE-2014-2240   was  identified
      (cf.  http://savannah.nongnu.org/bugs/?43661) and  fixed in  the
      new CFF driver.  All users should upgrade.

    - The new auto-hinter code using HarfBuzz crashed for some invalid

    - Many fixes to better protect against malformed input.


    - Full auto-hinter support of the Devanagari script.

    - Experimental auto-hinter support of the Telugu script.

    - CFF stem darkening behaviour can now be controlled at build time
      using the eight macros


    - Some fields in the `FT_Bitmap'  structure have been changed from
      signed to unsigned type, which better reflects the actual usage.
      It  is also  an additional  means to  protect against  malformed

      This  change doesn't  break  the ABI;  however,  it might  cause
      compiler warnings.


    - Improvements to  the auto-hinter's algorithm to  recognize stems
      and local extrema.

    - Function `FT_Get_SubGlyph_Info' always returned an error even in
      case of success.

    - Version  2.5.1 introduced  major bugs  in  the cjk  part of  the
      auto-hinter, which are now fixed.

    - The  `FT_Sfnt_Tag'  enumeration  values  have  been  changed  to
      uppercase,  e.g.  `FT_SFNT_HEAD'.   The lowercase  variants  are
      deprecated.    This  is   for  orthogonality   with  all   other
      enumeration (and enumeration-like) values in FreeType.

    - `cmake' now supports builds of FreeType as an OS X framework and
      for iOS.

    - Improved project files for vc2010, introducing a property file.

    - The  documentation generator  for  the API  reference  has  been
      updated to produce  better HTML code (with proper  CSS).  At the
      same time, the documentation got a better structure.

    - The FT_LOAD_BITMAP_CROP flag is obsolete;  it is not used by any

    - The  TrueType  DELTAP[123]  bytecode instructions  now  work  in
      subpixel hinting  mode as described in  the ClearType whitepaper
      (i.e., for touched points in the non-subpixel direction).

    - Many small improvements to the internal arithmetic routines.
Kirk Wallace | 5 Dec 01:53 2014

[ft] FT outline and standalone fonts

Hello. I'm trying to get an idea of a good way to present a font list, 
then render a sample for each list item and also for th users text 
string. I'm not a strong programmer. I tend to look for example programs 
and beat on them until I get what I want, ... or not.

My application is based on TrueType Tracer,

which is a command line application that takes in a text string, font 
file name, and other bits, then spits out g-code that may be used to cut 
or engrave the string on a CNC machine. I'm working on a front-end
with Linux, Glade, GTK and Python that presents a list of font file 
names from an application font subdirectory, then renders a sample of 
"AaBb123" next to the font name, and also renders a sample of the user's 
text. I attached a screenshot or see this link:

I have it mostly working, except for:

1.) The font sample render uses the system font rather than the 
application font so if it is not installed, I get a generic sample. 
TTTracer doesn't have this problem because the command uses the font 
file path and name. My sample renderer takes a font name and family and 
seems to look to the system for the closest match.

2.) The sample and user text render fills in the character body, but the 
characters will be cut only on the outline. Also, CamBam stick fonts:

are needed, which have an outline but is so narrow that the sample 
render can't be seen.

I haven't found a solution for using uninstalled fonts, but I thought I 
might find a utility that worked like TTTracer but outputs a graphic. I 
happened upon an example that used Pango and Cairo which produced the 
outline render which fixes the outline fonts, plus makes the stick fonts 
visible, but this seems like the long way around and still has the 
problem with my local only fonts.

I would appreciate any hints on a better approach or links to examples 
or documents to study.

I am looking at dissecting TTTracer to maybe change the output type, but 
that is a bit above my skill level.

Thanks for any help.


Kirk Wallace
Freetype mailing list
Freetype <at> nongnu.org
Andreas Falkenhahn | 23 Nov 21:24 2014

Re: [ft] Rendering differences between 2.3.12 and 2.5.3

On 23.11.2014 at 20:17 Alexei Podtelezhnikov wrote:

> BTW, both FT_GlyphSlot_Embolden and FT_GlyphSlot_Oblique are not part
> of Freetype API and labeled experimental :)

Alright, I admit that this excuses everything ;)

> So I suggest you copy old
> version into your program and forget everything.

I've now added the 2.3.12 versions as FT_GlyphSlot_Embolden_2312() and
FT_GlyphSlot_Oblique_2312() to ftsynth.c just to make sure that I won't
forget to adapt freetype in case I'm upgrading to a newer version.


Best regards,
 Andreas Falkenhahn                            mailto:andreas <at> falkenhahn.com
Alexei Podtelezhnikov | 23 Nov 03:20 2014

[ft] Rendering differences between 2.3.12 and 2.5.3

> If the text rendered by freetype is only a little bit wider than it
> used to be, whole words might suddenly end up on a new line
> which can mess up the whole layout.

You've got to admit that 2.5.3 looks better. :)
Yes advances for emboldened text changed,
but ultimately Freetype is not a text layout engine,
so *you* can use old advances if you wish.

This is the change that you want to undo for yourself
Andreas Falkenhahn | 22 Nov 20:48 2014

[ft] Rendering differences between 2.3.12 and 2.5.3

I've been using freetype 2.3.12 for several years now in my application
and I am planning to update to the latest version soon. Unfortunately,
freetype 2.5.3 renders text that uses algorithmic emboldening or shearing
using FT_GlyphSlot_Embolden() and/or FT_GlyphSlot_Oblique() quite differently
than 2.3.12 did (cf. screenshots). 

As I've customers who maintain projects that contain hundreds of pages
of freetype rendered text it's very important that the way text is
rendered is consistent with previous versions or it might break the
layout, especially in case automatic line wrapping is used. If the
text rendered by freetype is only a little bit wider than it used to
be, whole words might suddenly end up on a new line which can mess up
the whole layout.

That's why I'd like to ask whether there is any option to force freetype
2.5.3 to give me the old look of version 2.3.12 or am I forced to
stay with 2.3.12 forever now?


Best regards,
 Andreas Falkenhahn                          mailto:andreas <at> falkenhahn.com
Freetype mailing list
Freetype <at> nongnu.org
Marco Wertz | 18 Nov 18:35 2014

[ft] Drawing monochrome pixels into byte buffer


what's the most efficient way to draw non-antialiased pixels into a byte buffer? I've had a 
look at FT_PIXEL_MODE_MONOCHROME but this uses only 1 bit per pixel whereas I want FreeType
to always plot 1 byte per pixel (255 for visible and 0 for invisible pixels). Setting "num_grays"
of FT_Bitmap to 2 didn't seem to have any effect with FT_Outline_Render().

So is there an easy way to make FT_Outline_Render() or FT_Outline_Get_Bitmap() draw monochrome
pixels as bytes instead of bits or do I have to do two passes, i.e. first draw monochrome
bits into a temporary bitmap and then map them to bytes?


Marco Wertz | 16 Nov 15:39 2014

[ft] Manually constructing an FT_Outline


are there any convenience functions or macros to manually construct an FT_Outline in a way that is
similar to the FT_Stroker APIs? e.g. functions like FT_Outline_LineTo(), FT_Outline_CubicTo()....would
come in really handy or do I really have to do all this manually?

Marco Wertz | 15 Nov 15:15 2014

[ft] FT_Stroker_ParseOutline() with optional rewind


it would've been nice if there had been an option to tell FT_Stroker_ParseOutline() not to
rewind the stroker object. Currently, it seems to be impossible to simply add new subpaths
to an existing stroker without getting the stroker rewinded first or am I missing something

That's why I have written a function named FT_Stroker_ParseOutline_NoRewind() that is the
same as FT_Stroker_ParseOutline() but doesn't call FT_Stroker_Rewind().