Closed
Bug 90385
Opened 24 years ago
Closed 23 years ago
Linux: how to print using FreeType
Categories
(Core :: Internationalization, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 144663
mozilla1.1alpha
People
(Reporter: bstell, Assigned: bstell)
Details
(Keywords: intl)
Attachments
(12 files, 15 obsolete files)
169.38 KB,
patch
|
Details | Diff | Splinter Review | |
66.41 KB,
image/png
|
Details | |
128.92 KB,
application/octet-stream
|
Details | |
82.82 KB,
image/png
|
Details | |
245.63 KB,
application/octet-stream
|
Details | |
5.28 KB,
image/png
|
Details | |
95.79 KB,
text/plain
|
Details | |
12.24 KB,
image/png
|
Details | |
120.58 KB,
text/plain
|
Details | |
42.70 KB,
application/octet-stream
|
Details | |
53.66 KB,
application/octet-stream
|
Details | |
1.52 KB,
patch
|
Details | Diff | Splinter Review |
assumming Mozilla is modified to use FreeType we will need to determine
how printing will work with FreeType
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updated•24 years ago
|
QA Contact: andreasb → ylong
Assignee | ||
Comment 1•24 years ago
|
||
My current plan is to generate Postscript and send it to Ghostscript for
which will rendering to the specific piece of hardware (the printer).
To maintain the best visual quality I plan to embedd the TrueType data in
the Postscript (AKA: Type42).
To provide for a large character set I plan to use CID keying.
To make the output as compact as possible I plan to do "incremental glyph
loading" (only send the needed glyphs).
The name for a Postscript CID keyed Type42 font is Type11.
I have "hand" built a Type11 font with incremental glyph loading.
I plan to start with the OpenOffice psprint code and add Type11 to it.
Comment 2•24 years ago
|
||
bstell:
Is there any PostScript printer which understands "Type42" ?
Assignee | ||
Comment 3•24 years ago
|
||
My plan is to send the data to Ghostscript not a Postscript printer.
Assignee | ||
Comment 4•24 years ago
|
||
For the first step I'm going to build a demo.
For the demo I will aim for functionality and will not spend time on things
I am fairly sure are doable. The demo should be able to print a Japanese
page but will have the following issues that will still need to be addressed:
hardcoded the font name (should come from CSS / prefs)
always load the one font in the begin document (should load fonts as needed)
always send the glyph data everytime a char is output (should keep track of
which glyphs have been sent so we only send them once)
assume the fonts supports all the needed chars
send the all the Unicode CID ranges (only need to send those where the font
has chars)
When the demo is working we can discuss what to do next.
Target Milestone: Future → mozilla1.1
Assignee | ||
Comment 6•24 years ago
|
||
Yuying: thanks for the nsbeta1 vote. I also really want to get this in. I
doubt however, I will have code ready before the freeze for 1.0.
Comment 7•24 years ago
|
||
Just FYI....
The ultimate solution to bug 121879 and
bug 126602 (and many other printing issues,
needless to say) appears to be FT printing.
Assignee | ||
Comment 8•24 years ago
|
||
could you expand on what 'FT printing' means
Comment 9•24 years ago
|
||
nsbeta1- . This is a post m1.0 feature .
Assignee | ||
Comment 10•24 years ago
|
||
sample postscript with the hmtx table
Assignee | ||
Comment 11•24 years ago
|
||
Assignee | ||
Comment 12•24 years ago
|
||
Assignee | ||
Comment 13•24 years ago
|
||
There are several problems:
Currently Ghostscript can has problems reading the metrics
from the incrementaly loaded glyphs.
Ghostscript seems to crash on certain fonts/glyphs.
The demo code is working but far from beautiful.
My Postscript is still limited so I'm probably doing many things wrong.
Assignee | ||
Comment 14•24 years ago
|
||
Assignee | ||
Comment 15•24 years ago
|
||
Assignee | ||
Comment 16•24 years ago
|
||
This bit puts the OpenOffice fontsubsetting code in
mozilla/gfx/src/ps/OpenOffice. I'm not sure where it should go right now.
Assignee | ||
Comment 17•24 years ago
|
||
I just wanted to get something started so I hacked in the gfs/src/ps dir to
make moz use truetype to print. This is a total hack and needs lots of rework.
It requires the modified OpenOffice printing code.
It is fairly buggy. It crashes Ghostscript.
Attachment #74255 -
Attachment is obsolete: true
Assignee | ||
Comment 18•24 years ago
|
||
this sort of works (still buggy)
Attachment #74252 -
Attachment is obsolete: true
Attachment #74275 -
Attachment is obsolete: true
Attachment #74737 -
Attachment is obsolete: true
Assignee | ||
Comment 19•24 years ago
|
||
Assignee | ||
Updated•24 years ago
|
Attachment #74276 -
Attachment is obsolete: true
Assignee | ||
Updated•24 years ago
|
Attachment #74254 -
Attachment is obsolete: true
Assignee | ||
Comment 20•24 years ago
|
||
Attachment #74739 -
Attachment is obsolete: true
Assignee | ||
Comment 21•24 years ago
|
||
Attachment #75131 -
Attachment is obsolete: true
Assignee | ||
Comment 22•24 years ago
|
||
Attachment #75013 -
Attachment is obsolete: true
Assignee | ||
Comment 23•24 years ago
|
||
Attachment #75009 -
Attachment is obsolete: true
Assignee | ||
Comment 24•24 years ago
|
||
this still needs:
1) code to find the correct font (currently hard coded to use '/tmp/font.ttf')
2) code to allow the existing AFM code to co-exist with this code
3) support for multiple fallback fonts
Attachment #75258 -
Attachment is obsolete: true
Assignee | ||
Comment 25•24 years ago
|
||
substitute '-' for spaces in family name
Assignee | ||
Comment 26•24 years ago
|
||
Separated FreeType2 access code (nsFreeType) from code that draws to screen
(nsFreeTypeX11).
Printing code now uses (a separate copy of) the font catalog.
Printing code now falls back to font prefs if CSS font not found.
This still needs lots of work.
Attachment #75671 -
Attachment is obsolete: true
Attachment #75673 -
Attachment is obsolete: true
Assignee | ||
Comment 27•24 years ago
|
||
the font came from this site: http://fonts.tom7.com/fonts98.html
Assignee | ||
Comment 28•24 years ago
|
||
(note: requires patched Ghostscript; see attachments)
Assignee | ||
Comment 29•24 years ago
|
||
Assignee | ||
Comment 30•24 years ago
|
||
(Note: requires patches to Ghostscript; see attachments)
Assignee | ||
Updated•24 years ago
|
Attachment #75876 -
Attachment description: png of www.mozilla.org/start using a font I found on the web → png of www.mozilla.org/start using a font I found on the web displayed via GhostScript
Assignee | ||
Updated•24 years ago
|
Attachment #75876 -
Attachment description: png of www.mozilla.org/start using a font I found on the web displayed via GhostScript → png of www.mozilla.org/start using a font I found on the web (displayed via GhostView)
Assignee | ||
Updated•24 years ago
|
Attachment #75879 -
Attachment description: png of www.yahoo.co.ja printout displayed via GhostView → png of www.yahoo.co.ja printout (displayed via GhostView)
Assignee | ||
Updated•24 years ago
|
Attachment #75873 -
Attachment description: Still needs lots of work. Print code now uses font catalog and prefs. → Print code now uses font catalog and prefs. Still needs lots of work.
Assignee | ||
Comment 31•24 years ago
|
||
Assignee | ||
Comment 32•24 years ago
|
||
Comment 33•24 years ago
|
||
Can Sun's china team verify Bstell's PS can be viewed on Solaris DPS?
Assignee | ||
Comment 34•24 years ago
|
||
Assignee | ||
Comment 35•24 years ago
|
||
Assignee | ||
Comment 36•24 years ago
|
||
Can Sun China try applying the patches to Ghostscript 6.53 and
ghostscript/ghostview/print the postscript examples?
Comment 37•24 years ago
|
||
Brian, No problem. We will do it later.
I just compiled mozilla with freetype enabled last week. And I will try your
patch this week.
Comment 38•24 years ago
|
||
Brian, I have built ghostscript on my workstation with your patch. And all the
ps files you uploaded work fine for me.
Comment 39•24 years ago
|
||
Pete, how about Solaris DPS? Does it work also?
Comment 40•24 years ago
|
||
My platform is SunOS 5.9 s81_51 sun4u sparc SUNW,Sun-Blade-100
And I used gcc to build ghostscript.
Masaki:I will try DPS later.
Assignee | ||
Comment 41•24 years ago
|
||
> I have built ghostscript on my workstation with your patch. And all the
> ps files you uploaded work fine for me.
very cool ;)
Just curious: do you use ghostview (gv) to display the output?
You might also want to try building the "tar/gz; minor fixes to OpenOffice
fontsubstting code" (attachment 75871 [details]) 'stand alone'. You could then generate
your own postscript.
Comment 42•24 years ago
|
||
Katakai, Can not use DPS to view those ps files. Does DPS need upgrade?
Brain, I'm using gs to view them.
Assignee | ||
Comment 43•24 years ago
|
||
I finally figured a way to handle the "gsave/grestore removes the incremental
glyph definitions":
1) Wrap the gsave calls to push a hash on a stack of inc-glyph hashes.
2) Everytime a glyph to be drawn check if the bit in the font's bit array is
set. If the bit is not set then set the bit, add an entry for the
font/glyphID to the current (top of stack) inc-glyph hash, and output the
outline info.
3) Wrap the grestore call to pop the current inc-glyph hash and clear the
bit in the font's bit array for the font/glyphID pairs that are found in the
hash
Assignee | ||
Comment 44•23 years ago
|
||
Comment 45•23 years ago
|
||
All,
> My plan is to send the data to Ghostscript not a Postscript printer.
We shouldn't assume the destination for printing is only ghostscript.
It would not be acceptable on non-Linux system which do not have ghostscript. If
the system has the ghostscript but if user needs to
update to the latest to use Mozilla, it would not be acceptable too.
It's OK if we consider only power-users of Linux. They can configure
their ghostscript and Mozilla easily by their needs. But it does not
work for normal enduser and Linux/Unix distributors.
It would be OK if the first version of prototype is only Type42 and
requires ghostscript patch, but the final version of this support
should have Type1 or Type3 embedded fonts also, to support
existing PostScript printers and existing ghostscript.
I think it would be required,
- output is Type42, Type1 or Type3 embedded fonts
- Should have UI for selection of these types on preferences dialog
- Should have preference to control the default value
If there is a distribution who doesn't want to update ghostscript
but wants to support Mozilla FreeType2 printing, the distribution
can define "type3" or "type1" in preference as e.g. "freetype2.
print.outputformat".
Assignee | ||
Comment 46•23 years ago
|
||
> We shouldn't assume the destination for printing is only ghostscript.
> It would not be acceptable on non-Linux system which do not have
> ghostscript.
Could you list the systems where Linux/Unix Mozilla/Netscape works
but Ghostscript is not available?
> If the system has the ghostscript but if user needs to
> update to the latest to use Mozilla, it would not be acceptable too.
Could you state why you think it not acceptable to ask the user
to update Ghostscript?
> It would be OK if the first version of prototype is only Type42 and
> requires ghostscript patch, but the final version of this support
> should have Type1 or Type3 embedded fonts also, to support
> existing PostScript printers and existing ghostscript.
How do you plan to support CJK fonts with existing printers?
Do you plan to implement font subsetting to handle the 8 bit font limit?
Assignee | ||
Comment 47•23 years ago
|
||
Attachment #75871 -
Attachment is obsolete: true
Assignee | ||
Comment 48•23 years ago
|
||
no longer need fix for composite glyphs
Attachment #75669 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #79547 -
Attachment description: tar/gz; fix composite glyph layout bug → tar/gz; OpenOffice code with fix for composite glyph layout bug
Assignee | ||
Comment 49•23 years ago
|
||
*** This bug has been marked as a duplicate of 144663 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 50•23 years ago
|
||
Mark as verified due bug 144663 handles all the free type print issues.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•