You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Pierrick Brihaye <pi...@wanadoo.fr> on 2004/04/23 20:20:19 UTC

Open source font models

Hi,

I'm evaluating :

1) Java
2) Open source

font models. I've had a look at iText, Batik and FOP. Since the FOP
community seems to be the most active, my message goes to this list ;-)

Here we go :

I've been confronted to the terrible :
[FATAL] Unicode cmap table not present
[FATAL] Unsupported format: Aborting

... when I tried to generate some font metrics for a true type font.

Indeed, the following comment in TTFFile.java :

//Read offset for all tables. We are only interested in the unicode table

is clear :-)

First question : is there any chance that the FOP programmers could be one
day interested by other tables ?

You could answer : get a Unicode mapped font ! But... maybe if you have a
look at the fonts I want to make available to the FOP font model, you will
surely admit that I have a serious problem. Ready ? Click :
http://www.yare.org/egypt/files/gardiner.zip

You will notice that :

Those fonts are... antique ;-) They were designed at a time when Unicode
didn't exist : that's why "the" font needs 5 files.
Those fonts *can't* be "Unicodified" until I can demonstrate to the Unicode
Consortium that they can be by writing a "real world" application.

I think you now better understand why I am *seriously* evaluating font
models.

So... second question :

Any plan for TTFFile.writeXXX methods (vs. TTFFIle.readXXX ones) and/or
PFMFile.unloadXXX methods (vs. PFMFile.load XXX ones) ?

Having a full programmatic access to the Glyph and to the mappings would be
a big step for me, but the big problem remains the font layout which needs a
very specific processing. That's my part of the works : those interested by
the problem can read the following, unfortunately very light document :
http://www.catchpenny.org/codage/

Notice that Batik is able to generate SVG fonts definitions
(http://www.w3.org/TR/SVG11/fonts.html) for the afore mentioned font files.
It demonstrates that Batik is less picky than FOP about mappings (but I
still don't know if it is an advantage or not :-).

Third question : are there any plans for supporting the SVG Font format ?

Since I am a Java XML developper egyptologist (yes !), it would be quite
easy for me to generate a hieroglyphic font engine that could allow me to
demonstrate that the hieroglyphs integration in Unicode could go beyond the
draft stage (http://www.dkuug.dk/JTC1/SC2/WG2/docs/n1944.pdf) but, frankly,
it would be easier for me if I were backed-up by the FOP community.

So... how can this community help me ?

Cheers,

p.b.







---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Pierrick Brihaye <pi...@wanadoo.fr>.
Hi,

> > font models. I've had a look at iText, Batik and FOP. Since the FOP
> > community seems to be the most active, my message goes to this list ;-)
>
> FOP more active than iText? Interesting.

I'm rather turned towards Apache projects : that might bring a lack of
objectivity :-)

> > First question : is there any chance that the FOP programmers could be
one
> > day interested by other tables ?
>
> Not the FOP programmers as they seem to be quite happy with the current
> TrueType support.

Understandable : see other post ;-)

> But obviously there are other people like you who need
> a few thing in addition. That counts just as much.

OK.

> > You could answer : get a Unicode mapped font ! But... maybe if you have
a
> > look at the fonts I want to make available to the FOP font model, you
will
> > surely admit that I have a serious problem. Ready ? Click :
> > http://www.yare.org/egypt/files/gardiner.zip
>
> Very cool!!! (Not the problem, but the task)

Isn't it ?

> > So... second question :
> >
> > Any plan for TTFFile.writeXXX methods (vs. TTFFIle.readXXX ones) and/or
> > PFMFile.unloadXXX methods (vs. PFMFile.load XXX ones) ?
>
> No need until today. Obviously, functionality such as this is not quite
> in the scope of this project.

For sure. BTW, notice the difference in namings.

> On the other side we will soon reorganize
> the FOP and Batik projects under a new umbrella where I'd like to
> separate some of the basic components (for example the font subsystem)
> from the main project codebase.

That's one of the good news I was waiting for :-) I would be happy to
contribute to such a (sub ?)-project.

> > Notice that Batik is able to generate SVG fonts definitions
> > (http://www.w3.org/TR/SVG11/fonts.html) for the afore mentioned font
files.
> > It demonstrates that Batik is less picky than FOP about mappings (but I
> > still don't know if it is an advantage or not :-).
>
> I guess this is all about requirements.

Well, for FOP related ones... yes. Basically, the strategy is the following
:

1) Get the font contents. I've made it with Batik (apart an apparently
harmless ArrayOutOfBoundsException) and got SVG-Font outputs.
2) Remap the characters to "pseudo-Unicode" ones. Not difficult (but surely
boring).
3) Implement a layout strategy which will be based on control characters
(basically : "under" or "beside", the problem being that there can be a fair
amount of levels). Depending of what is before of after a character, the
position *and* the size of a hieroglyph should be adjusted. That is the main
difference with "classic" fonts behaviours.
4) Map this behaviour on a Java Objects (e.g. GlyphVector and FOP Text
components). Maybe the most difficult thing to do...
5) Consider font substitution when one has to deal with mixed
hieroglyphic/non-hieroglyphic characters.

> > Third question : are there any plans for supporting the SVG Font format
?
>
> One todo item is to support SVG fonts as Type 3 fonts in the PDF and PS
> Transcoders (SVG to XY transformation using Batik). But this is pretty
> low priority given our available resources.

Understandable as well.

> > So... how can this community help me ?
>
> As long as your work is at least partially within the scope of FOP
> (meaning you also want to generate PDF via XSL-FO and/or SVG with
> hieroglyphic fonts)

Yes : PDF exports would be one a great proof of concept. Having a
hieroglyphic capable AWT would be another one. I'm also working on it...

> On the contrary. If it's just the
> font subsystem you're interested in

Essentially at the moment...

Well... I'll continue my investigations but I would definitely be interested
in a font project at Apache's.

Cheers,

p.b.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Jeremias Maerki <de...@greenmail.ch>.
Hello Pierrick

On 23.04.2004 20:20:19 Pierrick Brihaye wrote:
> Hi,
> 
> I'm evaluating :
> 
> 1) Java
> 2) Open source
> 
> font models. I've had a look at iText, Batik and FOP. Since the FOP
> community seems to be the most active, my message goes to this list ;-)

FOP more active than iText? Interesting.

> Here we go :
> 
> I've been confronted to the terrible :
> [FATAL] Unicode cmap table not present
> [FATAL] Unsupported format: Aborting
> 
> ... when I tried to generate some font metrics for a true type font.
> 
> Indeed, the following comment in TTFFile.java :
> 
> //Read offset for all tables. We are only interested in the unicode table
> 
> is clear :-)
> 
> First question : is there any chance that the FOP programmers could be one
> day interested by other tables ?

Not the FOP programmers as they seem to be quite happy with the current
TrueType support. But obviously there are other people like you who need
a few thing in addition. That counts just as much.

> You could answer : get a Unicode mapped font ! But... maybe if you have a
> look at the fonts I want to make available to the FOP font model, you will
> surely admit that I have a serious problem. Ready ? Click :
> http://www.yare.org/egypt/files/gardiner.zip

Very cool!!! (Not the problem, but the task)

> You will notice that :
> 
> Those fonts are... antique ;-) They were designed at a time when Unicode
> didn't exist : that's why "the" font needs 5 files.
> Those fonts *can't* be "Unicodified" until I can demonstrate to the Unicode
> Consortium that they can be by writing a "real world" application.
> 
> I think you now better understand why I am *seriously* evaluating font
> models.
> 
> So... second question :
> 
> Any plan for TTFFile.writeXXX methods (vs. TTFFIle.readXXX ones) and/or
> PFMFile.unloadXXX methods (vs. PFMFile.load XXX ones) ?

No need until today. Obviously, functionality such as this is not quite
in the scope of this project. On the other side we will soon reorganize
the FOP and Batik projects under a new umbrella where I'd like to
separate some of the basic components (for example the font subsystem)
from the main project codebase. Like this, the font subsystem could
become a little subproject of its own defining its own scope, just like
the PDF library could use parsing support for PDF. I see no problem with
accepting patches adding the methods you suggest. We're always glad if
we get help in the maintenance of our code.

> Having a full programmatic access to the Glyph and to the mappings would be
> a big step for me, but the big problem remains the font layout which needs a
> very specific processing. That's my part of the works : those interested by
> the problem can read the following, unfortunately very light document :
> http://www.catchpenny.org/codage/
> 
> Notice that Batik is able to generate SVG fonts definitions
> (http://www.w3.org/TR/SVG11/fonts.html) for the afore mentioned font files.
> It demonstrates that Batik is less picky than FOP about mappings (but I
> still don't know if it is an advantage or not :-).

I guess this is all about requirements.

> Third question : are there any plans for supporting the SVG Font format ?

One todo item is to support SVG fonts as Type 3 fonts in the PDF and PS
Transcoders (SVG to XY transformation using Batik). But this is pretty
low priority given our available resources.

> Since I am a Java XML developper egyptologist (yes !), it would be quite
> easy for me to generate a hieroglyphic font engine that could allow me to
> demonstrate that the hieroglyphs integration in Unicode could go beyond the
> draft stage (http://www.dkuug.dk/JTC1/SC2/WG2/docs/n1944.pdf) but, frankly,
> it would be easier for me if I were backed-up by the FOP community.
>
> So... how can this community help me ?

As long as your work is at least partially within the scope of FOP
(meaning you also want to generate PDF via XSL-FO and/or SVG with
hieroglyphic fonts) I think there will be noone turning down any help
(and especially code) you can give. On the contrary. If it's just the
font subsystem you're interested in, it's probably better to poll the
other committers first to see whether anyone feels negatively on having
you work exclusively on special features for the font subsystem. FOP as
a whole should somehow profit from your work. Stretched as we are a
distraction without benefit wouldn't be too good.

So how can we help you? If you'd like to start coding here I suggest you
subscribe to fop-dev@xml.apache.org to discuss development issues. You
can send in patches (unified diffs against CVS HEAD) via BugZilla which
one of the committers is going to review and apply. If nothing happens just
bang on the table. I'll be glad to lend a hand as time permits but my
priorities lie elsewhere ATM. We've got a bunch of new committers now
which hopefully have more time to review patches.

I hope this answers your questions. We'd be delighted to have you
working with us. If you have any questions, just ask.

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Pierrick Brihaye <pi...@wanadoo.fr>.
Hi,

> Pierrick,
>
> from my point of view I would be interested in seeing the TTFReader and
> PFMReader modified to consider several maps, beside just unicode. I think
such
> functionality would be very good for FOP.

Thanks for your support : it was my first question ;-)

> Changes to layout that you mention in your other post will likely get a -1
> from me. I think they will distract from FOP's main objective of getting a
> working layout that meets the requirements of the XSL-FO spec. I dont
believe
> the layout features you describe are in the XSL-FO spec.

They aren't and thus your -1 is understandable.

But... aren't the FOP developpers over-confident in font "native"
capabilities ? Sorry, no offence there : I just want to point out the fact
that font management by a JVM (the underlying OS in fact) can be... very
poor.

For example :

can you get proper arabic PDF outputs from FOP ? As far as I've seen, there
is no glyph substitution.
can you get proper vocalized arabic from Mozilla on Windows 98
(http://bugzilla.mozilla.org/show_bug.cgi?id=180112) ? As far as I've seen,
they is no negative advance for vowels.
...

In other terms, shall we *all* suffer from this poor font management by OSes
? Are Pango or the nearly defunct ;-( GNU Classpath font project
(http://www.brawer.ch/software/fonts/) our only bottles in the sea ?

What I'd want is the opportunity to have a full programmatic language for
font layouts : I mean an open, non patented, if possible human-radable one
:-) Well... did I say an XSL-like language that could be embeded in an
SVG-font ? Sorry :-)

At least, a way to elegantly (write-)access to Java generated GlyphVectors
would be a minimum IMHO.

But... I am maybe just paranoiac ? If so, don't hesistate to tell me : I am
not a dangerous one :-)

> You could always
> write to the XSL working group to voice your requirements

Of course and this is definitely my goal on the long term. I hope our
discussions and your experience will be a good backup.

Thank you for your intesrest.

Best regards,

p.b.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Chris Bowditch <bo...@hotmail.com>.
Pierrick Brihaye wrote:

> Hi,
> 
> 
>>It's neither a feature nor a bug. It's simply a gap in the
>>implementation IMO. It really depends on your requirements. If you only
>>have these obsolete fonts that FOP doesn't understand, it is surely
>>worth trying to fix this. You may simply have to determine how much work
>>it will be and if you (!) think it is worth it. We're certainly not
>>going to turn a fix like that down.
> 
> 
> The problem is that the fonts are licensed : there are free to use but can't
> be modified :-( Otherwise, it could have been quite easy to reprocess them
> in a font utility and, at first, merge them :-)
> 
> Remember also that Batik can handle them just because they considered
> several maps :

Pierrick,

from my point of view I would be interested in seeing the TTFReader and 
PFMReader modified to consider several maps, beside just unicode. I think such 
functionality would be very good for FOP.

Changes to layout that you mention in your other post will likely get a -1 
from me. I think they will distract from FOP's main objective of getting a 
working layout that meets the requirements of the XSL-FO spec. I dont believe 
the layout features you describe are in the XSL-FO spec. You could always 
write to the XSL working group to voice your requirements, and you never know 
the features might be added in a future release of the spec.

Thanks,

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Pierrick Brihaye <pi...@wanadoo.fr>.
Hi,

> It's neither a feature nor a bug. It's simply a gap in the
> implementation IMO. It really depends on your requirements. If you only
> have these obsolete fonts that FOP doesn't understand, it is surely
> worth trying to fix this. You may simply have to determine how much work
> it will be and if you (!) think it is worth it. We're certainly not
> going to turn a fix like that down.

The problem is that the fonts are licensed : there are free to use but can't
be modified :-( Otherwise, it could have been quite easy to reprocess them
in a font utility and, at first, merge them :-)

Remember also that Batik can handle them just because they considered
several maps :

http://cvs.apache.org/viewcvs.cgi/xml-batik/sources/org/apache/batik/svggen/font/table/

Frommypoint of view, a good compromise would be to support SVG fonts in
FOP... althought I find ths format quite limited. But... that'is another
matter:-)

Cheers,

p.b.



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Jeremias Maerki <de...@greenmail.ch>.
It's neither a feature nor a bug. It's simply a gap in the
implementation IMO. It really depends on your requirements. If you only
have these obsolete fonts that FOP doesn't understand, it is surely
worth trying to fix this. You may simply have to determine how much work
it will be and if you (!) think it is worth it. We're certainly not
going to turn a fix like that down.

On 26.04.2004 18:46:00 Pierrick Brihaye wrote:
> Thank you. In fact, what I have described has fortunately (?) a broader
> scope than my little own problem : it look like FOP is not able to deal with
> every TTF font. It looks like a bug but I could understand if it were a
> feature : is it worth to try to cope with obsolete fonts ?

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Pierrick Brihaye <pi...@wanadoo.fr>.
Hi,

----- Original Message ----- 
From: "Chris Bowditch" <bo...@hotmail.com>

> We are interested in other font tables, but most of the FOP development
team
> have full time jobs and work on FOP in their spare time.

No problem : I am myself a full spare time Open Source developper :-)

> Jeremias Maerki is FOP's Font expert.

Over to you Jeremias :-)

> He may be able to give a more useful
> reply to your questions. All I can say is we are interested in your
thoughts
> on missing functionality in FOP.

Thank you. In fact, what I have described has fortunately (?) a broader
scope than my little own problem : it look like FOP is not able to deal with
every TTF font. It looks like a bug but I could understand if it were a
feature : is it worth to try to cope with obsolete fonts ?

Cheers,

p.b.










---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Open source font models

Posted by Chris Bowditch <bo...@hotmail.com>.
Pierrick Brihaye wrote:

<snip/>

> First question : is there any chance that the FOP programmers could be one
> day interested by other tables ?

We are interested in other font tables, but most of the FOP development team 
have full time jobs and work on FOP in their spare time. Since XSL-FO is such 
a complex beast and there are so few developers, time is rather scare.

<snip/>

> I think you now better understand why I am *seriously* evaluating font
> models.

Jeremias Maerki is FOP's Font expert. He may be able to give a more useful 
reply to your questions. All I can say is we are interested in your thoughts 
on missing functionality in FOP. Any help with implementing these features 
will be very gratefully received.

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org