freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: FreeType -> PS/PDF


From: Vadim Plessky
Subject: [Devel] Re: FreeType -> PS/PDF
Date: Mon, 24 Dec 2001 17:37:02 +0000

On Sunday 23 December 2001 15:37, Leonard Rosenthol wrote:
|   At 05:22 PM 12/23/2001 +0000, Vadim Plessky wrote:
|   >"Providing a way to convert the used fonts to PostScript fonts" is
|   > indeed a quite important issue.
|
|            I wrote for my former employer the code for using FreeType to
| get the information necessary to embed fonts in PDF files.  I've been
| meaning to rewrite it and add it to the FreeType distro.

Will the license be compatible with FreeType and/or BSD?
What kind of license your former employer is using?

|
|            Some of that work could also be used for PS generators, but
| there are difference in certain types of font handling (most notably that
| PS wants TTF fonts as Type42, while PDF can handle them natively).
|
|            I do think, however, that such a module for FT would be a
| valuable one and I'm certainly willing to help work on it!
|
|   >Font conversion (TrueType -> PostScript) is happening in Qt library.
|   >
|   >Latest release of Qt, Qt3, allows either Font Embedding (via font
|   > conversion of TTF fonts or "direct embedding" of PS T1 fonts) or
|   > generating PS/PDf "as is", without any fonts embedded (it's
|   > configurable).
|
|            Do you know what they are doing in Qt?  Is it full or subset
|   embedding?  Is it Type 42, conversion of TTF->Type 1, or do they do "fake

It is full embedding, at least in Qt2 which I use.
looking at PS file generated by Qt, I see
%%Creator: Converted from TrueType by Qt using PPR
I have asked once TrollTech what is "PPR" but got no answer.
If you want to try once more - I think you should contact Lars Knoll 
<address@hidden>, but I am not confident for 100%.

Embedded font is PS Type3 font, so all TrueType hints are lost, and there are 
no PS hints generated.
I need to say here that (because of this fact) resulting PS (or PDF produced 
from it by GS) looks terrible in Adobe Acrobat 4.0 (I tested Windows version 
of Acrobat).
But text looks excellent when printed on my Epson Stylus Color 660 (720dpi, 
IIRC).
At the same time, preview of that file in Ghostscript shows quite nice glyphs 
- so it seems GS does better job for displaying PS Type3 fonts than Acrobat. 
:-)

[NOTE: I remember that David Turner wrote some time ago that Acrobat 5.0 uses 
new different algorithm for auto-hinting of PS fonts, and ignores hints for 
embedded fonts; I haven't tested Acrobat 5.0 and can't confirm this, but 
overall it seems quite realistic and reasonable ]
 
Option to *embed* or *do not embed* font when printing is configurable in Qt3 
(QtConfig file) I don't know wether Qt3 has some APi to embed subset of the 
font.
// good question, BTW.
 
|   subsetting" by conversion Type 3's?
|
|   >Another quite important question is support for SVG.
|   >You have mentioned that:
|   >" It would be capable of generating outlines. Converting them to
|   >PostScript is trivial."
|   >Does it mean that converting outlines to SVG would also be trivial?
|
|            Hopefully, like Postscript, it would mean treating text as text
|   (and NOT converting to outlines!) with optional CEF font embedding.

there was quite interesting discussion on <address@hidden> mailing list
 (WAI == Web Accessibility Innitiative)
thread subject is "Acrobat PDF & Accessibility" - I recommend to take a look 
on it.
It worth to mention here that, according to that thread and some posters,  
some PDF-generating software positions *each glyph individually*, therefor 
you can't just "copy and paste" text - as it's required by WCAG (Web Content 
Accessibility Guidelines)
So, embedding some text in PDF (and/or SVG) doesn't offer you warrantry that 
you can retrieve text later (for reading via some Screen Reader, for example)
It's probably not related to FreeType or font convertor questions, but if we 
think about converting some documents to PDF, we should keep these issues in 
mind. 

|
|   >PDF is definitly getting higher
|   >priority in Adobe than PostScript, so I would say generating PDF, but
|   > not PostScript, from vector objects should be top prioroty for all
|   > projects related to layouting.
|
|            I agree!!!!
|
|            Especially since it provides a way for inclusion of non-layout
|   information (hyperlinks, bookmarks, structure, etc.) that isn't present
| in Postscript and can be useful for electronic documents.   And if you want
| Postscript, then use pdf2ps (or the equivalent) to convert.
|
|   >There are several very important issues come here to mind.
|   >  a) font hinting
|   >  b) anti-aliasing
|
|            I'll second Vadim on this one also!  These are the two main
| reason why you do NOT convert text to outlines (ever!) unless you plan to
| "play with the letter shapes".  Hints and anti-aliased rendering are VERY
| IMPORTANT for both printed as well as screen rendered text.

and, as I mentioned above, for Accessibility as well.
I am not big expert in Accessibility so far (but working on improoving my 
skills), but if we finally come to some open-source SVG-to-PDF or 
2D-graphics-with-text-to-PDF generator, I think we should take care about 
blind people or people with visual disabilities in advance.
It will not cost a lot of extra code but can make thousands, if not millions, 
of people happy!
 
|
|            The other item that is missing from this list, when considering
|   the possibility that the data will go to a format for distribution to
| other people (eg. SVG, PDF) is that without text you can't do textual
|   analysis!   This means that the document can't be searched or indexed -
| AND it also means that it is no longer accessible to people who require
| screen readers.
|
|   >I have checked and found that Adobe uses [in their Adobe SVG 3.0
|   >  plugin] own cross-platform graphics library. Most likely, it's used
|   > not only in SVG plugin but in Adobe Illustrator, Pagemaker, and other
|   > programs which require either PostScriupt or SVG rendering.
|
|            Adobe has two core libraries that provide the graphics services
| to their applications.  CoolType is the name of their text & font library,
| and AGM (Adobe Graphics Manager) is the 2D graphics/vector stuff.  You can
| see these if you are running on Mac OS or Windows with any Adobe
| application - look in the DLL's/shlibs at the names.
|

ah, thanks for clarification!
// me just wondering what wil be Adobe's reaction if KDE's library will be 
named, say, KoolType :-)

Still it seems Adobe added several extra libraries for their SVG 3.0 viewer 
(I refer here to Linux version of it):
address@hidden adobesvg-3.0]$ ls lib*
libACE.so  libAGM.so  libBIB.so  libCoolType.so  libNPSVG3.so  libSVGCore.so

AGM and CoolType are here, but there are also ACE, BIB, NPSVG3 and SVGCore.
NPSVG3 is Netscape Plugin SVG 3.0, SVGCore is SVG Core.
And it's yet unclear what is ACE and BIB.

[...]
|
|   Leonard

-- 

Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/




reply via email to

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