|
今天在freetype的mailinglist上看到的。希望对初学者有点帮助。
Hello,
>
> Hello everyone,
> Its been two months I got my self in to FreeType mode. I need
> answers to
> some questions. As we all have some interest in Freetype this
> should not be
> a problem.
>
OK, here is a small description that should help you answer these
questions yourself:
- FreeType is a font engine. It's purpose is to scan font files
in order to retrieve certain info, like metrics, glyph images,
certain kinds of tables, etc...
It doesn't support font installation: you have to handle it a
font file pathname or a custom input stream, it will not pick
it up automatically from a system-wide or user-specific list
of "font names"
It doesn't support text layout, because this must be performed
at a higher level: proper text layout needs font installation,
font matching, current language knowledge, text encoding support,
graphics rendering system/library, etc....
- FontConfig is a library providing font installation / listing /
matching features. It currently uses FreeType 2, though this could
change in the future since its API only optionally mentions it.
- an X11 Font Server contains a font engine, though a very primitive
one (monochrome output only, many scalable metrics missing to the
application developer, and more).
The X11 Font Server also provides a font listing capability based on
the infamous XLFD *cough* "standard". Note that the location and format
of font files is completely hidden to X11 developers per se the spec,
which means that the X11 Font Protocol is pretty useless for any kind
of application that needs to perform sophisticated WYSIWYG text
processing. (Xprint is a joke, though it's useful for legacy applications).
That's also why some applications, like FrameMaker or Applix come
with their own deeply customized font server. That's also why OpenOffice
comes with its own font engine and fonts as well
- libXFT2 is a library that uses FreeType as a font engine, and FontConfig
for installation / matching. It's also capable of rendering anti-aliased
and LCD-optimized text to an X11 window (something the core X11 server
cannot do). It's capable of using the RENDER XFree86 extension within
the server when available, but doesn't require it. It's really very
convenient for X11 Developers. Moreover, unlike an X11 Font Server,
it allows you to retrieve information from the font files with
FreeType
- Pango is a text layout engine. It supports several font engines and
font installation schemes. For instance, it can be compiled to support
the following systems:
Description Font Engine Font Lister
X11 X11 Font Server X11 Font Server
Windows Win32 GDI Win32 GDI
FreeType FreeType Pango's own font listing (?)
Xft LibXft2 (=> FreeType) LibXft2 (=>FontConfig)
that's a very simplified view of a very complex library. I'm pretty certain
that Owen could give you more information. I suspect for example that the
"Xft" sub-system is capable of using either LibXft1 or LibXft2.
The Pango API is sufficiently abstract that a typical developer should never
need to dwelve into the FreeType internals to properly layout & render
internationalized text with it.
I will not answer anything about greatness or usefulness, since this really
depends on what you want to do. However, there are no plans to provide
listing/matching and text layout within FreeType, since these items were
precisely omitted from the library *by design*.
Hope this helps,
- David Turner
- The FreeType Project (www.freetype.org)
> 1. What is the greatness of Freetype over Pango?
>
> 2. How is Freetype superior to libXFt2 and X11 font server?
>
> 3. What functionality of Freetype does Pango, libXFt2 and X11
> font server
> use?
>
> 4. What will be the advantage of building a language support system
> ((similar to that of pango) for Freetype when pango already
> provides that?
>
>
> Please do reply. Hoping to get some good info ;)
>
> Thanks
>
> Aamir
>
> -----Original Message-----
> From: Jungshik Shin [mailto:[email protected]]
> Sent: Thursday, October 30, 2003 10:22 PM
> To: [email protected]
> Subject: Re: [Freetype] Face Familly Checking
>
> Jean Le Feuvre wrote:
> >>>FontConfig uses FreeType as far as I know, so using it will be
> >>>as slow as the solution he's currently using.
>
> >>It does cache the results, which makes it faster when you
> use the same
> >>font files more than once.
>
> That was my point.
>
> > True also, but my app is already performing font caching
> for reused font
> > files.
>
> Where? In memory or in ext. file. fontconfig cache it in
> ext.files so
> that cache is 'persistent' across application runs.
>
> Jungshik
>
> |
|