[Top][All Lists]

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

[Devel] Re: FreeType and Type 1C fonts

From: David Turner
Subject: [Devel] Re: FreeType and Type 1C fonts
Date: Fri, 11 May 2001 16:11:56 +0200

Hi Ken,

Ken Carpenter a écrit :
> Hello, I came across the FreeType project recently, and
> had a couple of quick questions which I couldn't find
> answers for on the web site.
> I have a Java-based PDF renderer that currently works
> quite nicely for TrueType fonts, but cannot handle
> Type 1 or Type 1C fonts under Java.
> 1. Does FreeType support Adobe Type 1C fonts?  These seem
>    to be the preferred format within PDF files.
FreeType supports the format known as "CFF", which probably
is the thing that you call Type 1C. Several people are already
using it to manage fonts in PDF files actually..
> 2. Do you know if anyone else has used FreeType from Java?
>    I was planning on writing a Java Native Interface (JNI)
>    wrapper for FreeType if it supports Type 1C fonts, but
>    I don't want to reinvent the wheel if someone else
>    has already done it.
I believe that someone started a re-implementation (not a binding)
in Java for FreeType 1.x, but it was a long time ago and I don't
know what it became..

Regarding FreeType 2, no-one has been working on a Java binding
yet, or at least announced it ! Please feel free to start
this interesting challenge :-)

> 3. Are there any performance metrics for FreeType with
>    particular caching scenarios?  I would most likely be
>    caching only outlines, and not rendered characters
>    since I want true sub-pixel rendering (i.e., in the
>    sequence 'ee', each letter 'e' could have a different
>    set of coverage values).  Right now the Java code is
>    just too slow (over a second for a full page of 8-pt
>    text).  FYI, it seems to be the compositing that is
>    taking most of the time, not the rasterizing.
Well, you can still try the demo program called "fttimer", 
which will report rasterization speeds both in monochrome
and anti-aliased modes. The rasterizer is very fast in
my opinion, but you could also cache pixmaps in certain
cases (typically for small pixel sizes, use a small bitmap

FreeType 2 comes with a caching sub-system. It's just that
it's not fully documented yet, given that I could not find
the time to improve it as I intend to. I don't know if it'd
be a good idea to use it in a Java binding though..

I'd rather try to provide something that is as close as
possible to what FT2 provides, i.e. a font service..
Java2D seems a very interesting graphics library, and I'm
pretty certain you'd better use it (as well as the usual
Java high-speed containers) to perform your

Of course, if the compositing is the problem, there is
nothing you can really do to solve that within FT2 :-)


- David

reply via email to

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