• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Freetype/2 based on Freetype 2

Started by miturbide, 2007.05.17, 05:37:52

Previous topic - Next topic

miturbide

Martín Itúrbide
OS2World.com NewsMaster
Open Source Advocate

Skype - martiniturbide
Google Talk - martiniturbide@gmail.com

warpcafe

Hi all,

let me start by telling that I don't know too much about the internals of FT2 and what it takes to get the thing run on OS2/eCS (beyond a c++ compiler). I can imagine that it involves a lot of dirty ground-level skills and grey cells to do the job.

Nevertheless:
Has anyone a clue whether a FT2/2 (freetype version 2.x for OS/2) would have benefits over using Innoteks font engine... and assuming we could have a FT2/2: Would it work with Mozilla etc. without additional work?

You see - what drives me most is to know if a FT2/2 would be "better" in matters of stability/performance and (most important:) quality! I don't know if you have noticed that Innoteks engine does smooth fonts but to the price of the font*sizes* being... well, somehow "glitched"...
If you compare a rendered version of e.g. a website in Mozilla with a "plain" one (no font engine) you will notice that the rendered pages use fonts which are "too small". If a ported FT2/2 would overcome that (even if it wouldn't render faster than now), that would be worth a bounty which I would spend quite *some* dollars for! I would even beg the bounty admins to drop my TrueCrypt bounty share in favor of FT2/2 since it seems that nothing will happen in that regards any more... ;-)

Ideas? Answers? Suggestions? Comments?
Anyone? :-)

Cheers
Thomas
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy

Blonde Guy

I looked at the source code for freetype, and it doesn't look very hard to port. However, the Innotek Font Engine does more, regarding anti-aliased text. It also offers an API to render text.

I think if you want to port, you should get on IRC at netlabs and see if you can get help from the original authors of the Font Engine. Supporting the same API would mean that OpenOffice.org and the Mozilla browsers would work right away.

I think the OS/2 part isn't so hard, because this font rendering is an end run around the built-in OS/2 font handling. I haven't had a good look at the Innotek API, though.
Expert Consulting for OS/2 and eComStation

ezwarper

AFAIK, Innotek Font Engine IS actually based on Freetype 2.x (that's why we have antialiased text, for example).
Considering that, due to PM design limitations (monochrome fonts, so no anti-aliasing), the developers had to bypass the native OS/2 TrueType engine (TRUETYPE.DLL) - which adds some overhead in rendering -, I think they did a good job.  The OS/2 engine is faster of course, but Innotek's one offers more.  One feature the Innotek FreeType implementation still misses however is OpenType Fonts (OTF) support.

So, as it's very hard to expect any future development of this software by Innotek, and we can't actually implement a new (possibly system-wide) font rendering engine without rewriting at least those parts of the PM that handle that logic, I fear it could be no that simple to have a plain port of FreeType/2 in OS/2.
(We should also remember that, before the Innotek Font Engine, the FreeType implementation in OS/2 (FreeType/2) was stuck to v1.2 (if I recall correctly), mainly due to the antialiasing issue that couldn't be easily overcome).
But, apart from a slightly slower rendering (compared to the 'original' OS/2 truetype engine), and from minor (mainly cosmetics) issues, I found IFE v2.60 a good alternative to normal rendering, so much that I completely replaced OS/2 rendering engine with Innotek's one for the whole system!

Hope this may be useful for the discussion.

abwillis

Truetype (or freetype) is still used even if ft2lib is in use, from the readme:
- the IBM truetype engine does not recognize certain DBCS fonts
  correctly and makes it impossible for FT2LIB to use them.
  There is a modified Freetype/2 replacement available that addresses
  this issue.

My thought was to update the freetype/2 to be based on freetype2.  Freetype2 is already working on OS/2, we use it in Mozilla now for instance.  What is missing is the work that Michal did that made it possible to replace truetype.  I had looked at it but gave up on trying to figure out how to integrate Michal's code.  My thought was that freetype had probably progressed in ways other than just anti-aliasing and the update should complement ft2lib.
Andy

warpcafe

Hi Andy,

yep - that's what we need to know:
What is the difference between the freetype we have and the (new) freetype 2?
What are the benefits, drawbacks. Which "engine" is the prerequisite of the other one (or not) and how can/must they match?

The timeline basically went as follows:
- In the beginning, there was the OS/2 "font engine"
- then we had freetype ("on top" of it ?)
- then came along Innotek
- Now Innotek doesn't appear to maintain the stuff any more, but freetype is updating

...which leads us to the question(s):
- What would be the outcome if we would have that "new" freetype on OS/2?
- would it be "better" than using Innotek "only"
- does it require Innoteks software (benefits?) or would they "collide" to some extent?

Regards,
Thomas
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy

kim

Noticed the release of FreeType so it seems that this bounty is moving...

abwillis

That is an update to the existing version still based on Freetype 1.3.1.  It may be just as good for us as one based on Freetype 2 though it seems there should be some advantage to the newer versions. Freetype 1.x has the code by Michal that allows it to replace Truetype.  Freetype 2 does not have this code and the code from 1.x would have to be updated to work with the 2.x codebase.  I looked at doing this at one point but it got beyond me which is what prompted me to put up the bounty suggestion to see if anyone else thought it was worthwhile.  Even with ft2lib either truetype or freetype is still required on the system and it seems there should be some advantage to Freetype 2 codebase (though it may not be anything that would benefit us, this I can't say for sure).
Andy

warpcafe

Hi Andy,

okay, that was a more than helpful feedback, I think I've got the picture now.
As far as I understand by your description, the work would allow us at least to have a choice: To see if the "new" ported stuff has some benefits over what we have now. Okay, that might not be a lot and might not be "worth the efforts" - but:
This work will allow us to have an updated codebase which could ease incorporating future enhancements from the FreeType codebase (keeping up with the code) and furthermore, we will have Michals work "commonly or publicly available" for others to use/enhance/maintain/debug it.

Hmm... I think we could go for that bounty. Volunteers, everyone? ;-)

Regards,
Thomas
"It is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that"
- G.H. Hardy