Re: Re: Re: Implementing OpenType font support, how hard?

2006-09-11 Thread Bertrand Delacretaz

On 8/4/06, Bertrand Delacretaz [EMAIL PROTECTED] wrote:


...I'll discuss the plan
with my project's stakeholders and hopefully get the green light to
invest time in this...


Good news, I got the green light and will be working on these OpenType
improvements in the next few weeks.

I'll use the dependencies of issue 40464 [1] to document my progress,
and of course discuss the details here.

-Bertrand

[1] http://issues.apache.org/bugzilla/showdependencytree.cgi?id=40464


Re: Re: Implementing OpenType font support, how hard?

2006-08-04 Thread Bertrand Delacretaz

On 8/3/06, Jeremias Maerki [EMAIL PROTECTED] wrote:


...Sorry, I haven't been clear. Adam obviously grabbed a class [1] from
Victor's FOray, adapted it to FOP and put a different license header on
top. So, it's not that simple. As a first point, we'll need a license
grant from Victor for this file or get him to commit it himself to FOP
under his ICLA or we use his file and modify it without removing the
original license header (I don't like that last option). Not sure how
best to deal with this


Ok, thanks for the clarification. I'll see if Victor would agree to
donate this one class as a temporary solution, until FOP uses FOray.
If not I'll write another implementation.

Again, thanks everybody for your comments  - I'll discuss the plan
with my project's stakeholders and hopefully get the green light to
invest time in this.

-Bertrand


Re: Re: Implementing OpenType font support, how hard?

2006-08-03 Thread Bertrand Delacretaz

Hi, and thanks everybody for your replies.

On 8/2/06, Jeremias Maerki [EMAIL PROTECTED] wrote:


...No, I've been able to restore kerning support. If there's still some
commented code I should probably remove it now. Can you give me a
pointer?...


You're right, kerning works for builtin fonts at least. It doesn't
seem to work in my tests with user-specified fonts, but I've just done
a quick test.


...I wonder if supporting Type 1 outlines would be worth the effort. So far,
I've never seen an OpenType font with Type 1 outlines. Have you?...


Seems like most of the standard OpenType fonts on my MacOSX system use
Type 1 outlines.

But you're right that supporting TrueType outlines would be a good
start already.


 2c) Verify that the character encodings are correct...



...The problem is that FOP does not currently support generating a
ToUnicode table. Victor Mote has the fixed in FOray and we have a patch
in Bugzilla that uses that code to do the same for FOP. Since nobody has
dealt with the legal part of grabbing someone else's code in this case,
the patch hasn't been applied, yet.

The patch:
http://issues.apache.org/bugzilla/show_bug.cgi?id=5335


IIUC what's needed here is to contact Adam Strzelecki, author of the
patch, and ask him to Grant license to ASF for inclusion in ASF works
(as per the Apache Software License ยง5)? This is how things are done
when patches are uploaded via http://issues.apache.org/jira.


...Finishing 2) would then also mean finishing
FOrayFont to the degree that it can be used in FOP. I guess that will
need further deliberation...


I've studied FOray and integrating it is probably out of scope for my
current work. It doesn't look too hard, but it impacts quite a lot of
existing code, so I fear there might be hidden roadbumps in there.

OTOH I agree that using it (and maybe re-integrating that code in
FOP?) seems to make more sense than doing a lot of work on FOP's
current font-handling code.

Also, from other's comments in this thread, it seems like handling
smart font features (glyph substitutions) might be a lot of work,
better done in a (yet hypothetical) second phase once basic OpenType
support works well.

At this point, my plan, for a first phase, would be

-Integrate Adam Strzelecki's patch to support extended character sets cleanly

-Check that OpenType fonts with TrueType outlines are usable as custom
fonts, including kerning. Fix things as needed, and have a look at
what's needed to support Type 1/CFF outlines.

-Try to get a few OpenType reference fonts that can be distributed
with FOP for testing and demonstration (I'd ask some font editors, the
fonts can be crippled if they want, for example by removing portions
of the glyph sets).

The smart fonts stuff would (maybe) come later, the above might be
sufficient for my current project. I'm being much less ambitious than
yesterday...but the above looks like a useful concrete step.

WDYT?

-Bertrand


Re: Re: Implementing OpenType font support, how hard?

2006-08-03 Thread Bertrand Delacretaz

On 8/3/06, Manuel Mall [EMAIL PROTECTED] wrote:

On Thursday 03 August 2006 21:04, Simon Pepping wrote:



... The main problem with all these smart font features is that you
 cannot implement them in rendering without also implementing them in
 the linebreaking code



...That comment does not only apply to line breaking, justification,
hyphenation, word spacing, are all affected. That is layout needs to
know the exact metrics the renderer is going to use.


Doesn't kerning cause the same problem as smart font features (like
automatic ligatures)? It also causes the total width of a group of
character to change when the group is split between two lines.

-Bertrand


Re: Re: Implementing OpenType font support, how hard?

2006-08-03 Thread Simon Pepping
On Thu, Aug 03, 2006 at 05:40:36PM +0200, Bertrand Delacretaz wrote:
 At this point, my plan, for a first phase, would be
 
 -Integrate Adam Strzelecki's patch to support extended character sets 
 cleanly
 
 -Check that OpenType fonts with TrueType outlines are usable as custom
 fonts, including kerning. Fix things as needed, and have a look at
 what's needed to support Type 1/CFF outlines.
 
 -Try to get a few OpenType reference fonts that can be distributed
 with FOP for testing and demonstration (I'd ask some font editors, the
 fonts can be crippled if they want, for example by removing portions
 of the glyph sets).
 
 The smart fonts stuff would (maybe) come later, the above might be
 sufficient for my current project. I'm being much less ambitious than
 yesterday...but the above looks like a useful concrete step.
 
 WDYT?

This sounds very useful to me.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu


Re: Re: Implementing OpenType font support, how hard?

2006-08-02 Thread Bertrand Delacretaz

Hoi Jeremias,

I'll reply on the other points tomorrow, but for now:


...AFAIK, OpenType allows different variants of a font in one font file
(ex. normal and bold). We've had requests to support those font files.
Have you found out during your investigations what would be involved in
supporting this and would this be in scope for your work?...


AFAIK, several OpenType fonts can be packaged in a single file as
TrueType Collections with a .TTC  file extension. If that's what
you're thinking about, extracting the individual fonts from such a
file shouldn't be a problem.

-Bertrand