freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Glyph/Outline Caching on Linux non-FT_GLYPH_FORMAT_OUTLINE outl


From: Werner LEMBERG
Subject: Re: [ft] Glyph/Outline Caching on Linux non-FT_GLYPH_FORMAT_OUTLINE outlines
Date: Wed, 05 Dec 2007 07:35:05 +0100 (CET)

> 1. I am considering adding FreeType modules which create outlines in
> a format other than FT_GLYPH_FORMAT_OUTLINE and will rasterize the
> outlines with its own renderer.

Interesting.  Can you elaborate?

> Has anyone out there tried anything similar, that is, using a
> non-FT_GLYPH_FORMAT_OUTLINE format?

AFAIK, you are the first one who tries this route.

> I would indeed prefer not to use another format.  Doing so loses all
> the benefit of the existing FT_Outline technology.  I do not see,
> though, a way to read my own file format, say format Q, create a
> FT_GLYPH_FORMAT_OUTLINE outline, and then render the Q-derived
> outlines with my own Q renderer without rendering *all* outlines in
> FT_GLYPH_FORMAT_OUTLINE format with the Q renderer.

You might contribute your code to FreeType. :-) Then it would be a
compile-time option to activate support for your renderer -- and you
could directly manipulate the data structures.

> One could add additional fields in the FT structures to specify
> which renderer to use, but that would break binary compatibility,
> thus breaking already compiled apps, as I see it.

Not necessarily.  The API and the public header files must stay the
same, of course, but internally you are allowed to extend structures
by appending data fields at the very end of the structures and you
still have binary compatibility.  At least this is how I understand
the mechanism, and we have done this repeatedly.

> 2. On Linux (RHEL4, for now), where is glyph and/or outline caching
> taking place?  Is the FreeType caching mechanism used, that is, the
> FTC_* methods?

FreeType isn't part of the Linux kernel.  Some applications do the
rendering by itself, other rely on the xft library, etc., etc.

> Is there a way to find this out short of reading the Linux source
> code?

No.

> So far, I have not found anything on this topic in reading about
> fontconfig, Render, and XFt.

Hmm.  Have you done a grep for `FTC_' over the X11 source tree?  A lot
of stuff is on freedesktop.org, and maybe its mailing lists can help
you further.  David has always tried to make the caching code as
generic as possible, so I think it should be not too difficult to make
it work with your planned extensions too.


    Werner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]