After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 95885 - [GNOMEVER2.3] extesion for i18n printing with font subsettings
[GNOMEVER2.3] extesion for i18n printing with font subsettings
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: fonts
CVS
Other All
: Normal major
: ---
Assigned To: Hidetoshi Tajima
Hidetoshi Tajima
Depends on:
Blocks:
 
 
Reported: 2002-10-16 02:02 UTC by Naoyuki Ishimura
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (6.34 KB, patch)
2002-12-07 17:22 UTC, Chema Celorio
none Details | Review

Description Naoyuki Ishimura 2002-10-16 02:02:24 UTC
installer uses freetype to get TrueType font family/subfamily/fullname.
And freetype 2.1.3 does handle only Unicode encoded ASCII names.
But Solaris CJK TrueType has localized names in them, so these names will be
??? or such font entry is not written.
Comment 1 Hidetoshi Tajima 2002-11-26 22:45:17 UTC
Want to apply two changes into libgnomeprint to enable CJK printing,
and also it could be done quikckly.

[change in libgnomeprint/installer]
   Add CJK TrueType fonts into gnome-print.fontmap 
  file. The current one has only latin font 
  information on Solaris.
  
  Adding this change enabled CJK printing itself,   
but it results in a large size of ps output since whole font glyphs
are embedded in the ps output and making it very slowly printed.

  Hence, we need to add the following change so
that only a required subset of font glyphs to be embedded into the ps
output.

[change in libgnomeprint/libgnomeprint]
  Use the font subsetter code for multibyte character printing.

   The font subsetter code in the 'sft' sub-directory was copied over
*as is* from the OpenOffice.org where it was first developed and
integrated.
  [That's the only reason why the patch is large, while only a subset
of functions are used. but we don't like to commit a risk to break the
patch by cutting it out.]

Please review two patches in sun-patches module
in cvs. They are at libgnomeprint/324-95885-s.diff and
libgnomeprint/325-95885-s.diff.
Comment 2 Hidetoshi Tajima 2002-12-03 19:25:56 UTC
changing summary to suite to what the patch is proposing.
Comment 3 Chema Celorio 2002-12-03 21:14:41 UTC
This fuctionality is great, I'd love to have it in gnome-print.

However, we no longer build, use or ship gnome-font-install. Can you
update the patch to reflect this? After you do, I will be more than
happy to review it and apply it.

I'm going to put the bug in NEEDINFO for now, please reopen after you
update the patch.

thanks again,
Chema
Comment 4 Chema Celorio 2002-12-07 17:21:21 UTC
Attached an updated patch (doesn't include the sft directory).

Changes I made:
- sft lives in the toplevel directory, not in libgnomeprint
- the "if (pso->encodedbytes == 1)" goes inside gff_pso_ensure_buffer
so that the _ensure_buffer functions takes care of embeding the font,
how it wants to do it (subset or not) becomes a decision for that
function.
- removed the font-install part of the patch since we don't have an
installer anymore.

Stuff that we need to resolve:
1. const gchar *no_type42 = g_getenv("GNOME_PRINT_NO_TYPE42"); needs
not to be an enviromental variable but a config option side
GnomePrintConfig (but don't worry about this part, I will fix this
issue myself since the code in GnomePrintConfig needs work)
2. On the original patch, the font names where modified and thus
changed the structure of the gnome-print fontmap (which is wrong since
it breaks older fontmaps for the users). Since we no longer have a
font-map, we need to update the patch to be able to interpret the name
given by fontconfig.

Question:
Is the code inside 'sft' unmodified from the openoffice.org?
Comment 5 Chema Celorio 2002-12-07 17:22:59 UTC
Created attachment 12821 [details] [review]
patch
Comment 6 Hidetoshi Tajima 2002-12-12 01:04:33 UTC
>Is the code inside 'sft' unmodified from the openoffice.org?

Mostly, unmodified. The original is found at
oo_1.0.1_src/psprint/source/fontsubset/ in
OpenOffice 1.0.1 tarball. An only major change 
was to remove the reference to GSUB code (written
in C++).
Comment 7 Hidetoshi Tajima 2002-12-18 01:05:08 UTC
Chema: With further testing, we've realized that:
	gf_pso_sprintf (pso, "/Encoding 256 array 01 255 {1 index exch 0 put}
for def\n");
have to be like:
	gf_pso_sprintf (pso, "/Encoding 256 array 01 255 {1 index exch
.notdef put} for def\n");

to work with Adobe Interpreter. Please apply this change when you
commit the patch in.
Comment 8 Hidetoshi Tajima 2002-12-18 01:24:30 UTC
oops, sorry. It had to be "/.notdef", so the correct code is:
	gf_pso_sprintf (pso, "/Encoding 256 array 0 1 255 {1 index exch
/.notdef put} for def\n");
Comment 9 Chema Celorio 2002-12-18 01:59:22 UTC
It would be best if the patch was updated. It doesn't need to happen
right now, but some time in the future. The patch is still not ready
to go in, it needs a bit of work.
Comment 10 Jody Goldberg 2003-11-11 17:43:53 UTC
Is there any chance of updating the patch per chema's suggestions ? 
It would be nice to get this in for gnome-2.6
Comment 11 Hidetoshi Tajima 2003-11-11 18:33:54 UTC
Yes, I'll do and attach a new patch.
will reassign to myself.
Comment 12 Andreas J. Guelzow 2004-01-24 06:28:00 UTC
Any chance to receive a patch before code-freeze ?
Comment 13 Jody Goldberg 2004-08-11 16:38:12 UTC
I suspect any patch would conflict horribly with the pdf/ps2 changes for
fontsubsetting.  Hopefully those have addressed this too.  If not we can reopen