Bug 39293 - FOP can't support bold,italic for chinese/other multiplybytes fonts
Summary: FOP can't support bold,italic for chinese/other multiplybytes fonts
Status: CLOSED WONTFIX
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: all
Hardware: Other other
: P2 enhancement
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
: 20827 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-13 04:02 UTC by scud
Modified: 2012-04-04 21:58 UTC (History)
1 user (show)



Attachments
this a pdf generate by adobe acrobat 7.0 (26.42 KB, application/octet-stream)
2006-04-13 09:10 UTC, scud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description scud 2006-04-13 04:02:32 UTC
most of multibyte language fonts not include "bold","italic" support.

so FOP can't depend font file to support it. english only include "26" letters. 
but other language include so many letters,so most of them not 
include "bold","italic" support.

adobe pdf maker or adboe pdf "printer" can support multibyte font by "emluator".
Comment 1 Jeremias Maerki 2006-04-13 08:01:07 UTC
Are you talking about TTC fonts (TrueType Collection)? If yes, that's already
supported. Just follow the instructions on the FOP website.
Comment 2 scud 2006-04-13 08:08:10 UTC
i know FOP support ttc and ttf. 

my meaning is FOP can't support "Bold" and "Italic" pdf format output. because 
none of multibyte fonts support "bold" and "italic".

so ,FOP should provide another method to solve this problem. if not ,then FOP 
can't output correctly pdf  when content include "bold" and "italic"
Comment 3 Jeremias Maerki 2006-04-13 08:34:40 UTC
I still don't know what kind of multibyte fonts you're talking about. TrueType?
OpenType? Other font formats? Anyway, it would help if you could attach a small
PDF generated with one of the Adobe tool that demonstrates the feature you want.
From there I can reverse-engineer and at least find out what you're after.

At any rate, it's a good idea for you to find a font file for each variant of
the font you want to use (normal, bold, italic, etc.) and use them. I don't
think FOP will support what you want anytime soon, unless you're willing to
invest time to implement this feature yourself.
Comment 4 scud 2006-04-13 08:57:00 UTC
ok. i just know truetype. multibyte languages include chinese,japanese etc.

and in my ken,none of chinese fonts support variant for "bold" and "italic".  
and i think other multibyte language fonts can't support those too.

as you can know,common chinese characters "GBK" include 6700+ letters,but 
english only include 26!


Comment 5 scud 2006-04-13 09:10:23 UTC
Created attachment 18090 [details]
this a pdf generate by adobe acrobat 7.0

this a pdf generate by adobe acrobat 7.0

include bold,italic,bold+italic chinese characters.
Comment 6 Chris Bowditch 2006-04-13 09:47:35 UTC
What you are asking for is an extension to the XSL FO specification. FOP is 
designed to conform to that standard and the standard does not provide a 
function for emulating bold or italic font metrics from regular fonts. 

The reason you are asking for this feature is because it is hard work to 
create bold and italic glyphs for fonts with so many glyphs. But it is also 
hard work to create the feature you are asking for.

Of course, patches are always welcome :)
Comment 7 Abun 2012-03-22 20:46:03 UTC
Dear everyone, 

This bug was reported six years ago, 2006.
I used FOP 1.0 and the problem is not fixed yet, if you allow me to say it a problem.

Scud may be a chinese speaker.
I am a japanese speaker.

I really want at least bold rendering support for multi-byte TTC or TTF font.
For example, Windows MS Mincho/Gothic TTC or IPA TTC or TTF fonts.
I am a consultant and sometimes need to offer DocBook-to-PDF output serivce using FOP processor.
This always causes a problem.

Please advise me to how to add such a support in FOP by myself in any way.
I think I will do it regardless it is a standard-compliant way or not.

Thank you very much.

ARAI Bunkichi, Kobu.Com
Comment 8 Glenn Adams 2012-03-22 21:00:04 UTC
(In reply to comment #7)
> Dear everyone, 
> 
> This bug was reported six years ago, 2006.
> I used FOP 1.0 and the problem is not fixed yet, if you allow me to say it a
> problem.
> 
> Scud may be a chinese speaker.
> I am a japanese speaker.
> 
> I really want at least bold rendering support for multi-byte TTC or TTF font.
> For example, Windows MS Mincho/Gothic TTC or IPA TTC or TTF fonts.
> I am a consultant and sometimes need to offer DocBook-to-PDF output serivce
> using FOP processor.
> This always causes a problem.
> 
> Please advise me to how to add such a support in FOP by myself in any way.
> I think I will do it regardless it is a standard-compliant way or not.
> 
> Thank you very much.
> 
> ARAI Bunkichi, Kobu.Com

At this point, I would oppose adding a feature to FOP to have it automatically synthesize a new font face (e.g., bold or italic).

I would recommend that you find or buy fonts that have the faces you wish to use, and then specify their use in your FO files.
Comment 9 Chris Bowditch 2012-03-23 10:17:19 UTC
I agree with Glenn. This is not a bug anyway, it's more of an enhancement request, which we decline to implement.
Comment 10 scud 2012-03-23 10:25:21 UTC
aha, see this again.

I fully understand what you said. But the fact is I can't buy the font face, It is not exist at all for multiple-bytes  language.
Comment 11 Glenn Adams 2012-03-23 16:10:59 UTC
(In reply to comment #10)
> aha, see this again.
> 
> I fully understand what you said. But the fact is I can't buy the font face, It
> is not exist at all for multiple-bytes  language.

that is not true in general; for example, for Japanese fonts we have:

Hiragino Kaku Gothic Pro W3 - normal face
Hiragino Kaku Gothic Pro W6 - bold face

Hiragino Mincho Pro W3 - normal face
Hiragino Mincho Pro W6 - bold face

you can specify these in XSL-FO content using two techniques:

(1) use difference font-family properties to switch between faces

<fo:block font-size="24pt">
  <fo:inline font-family="Hiragino Mincho Pro W3">プレーンフォント</fo:inline>
  <fo:inline font-family="Hiragino Mincho Pro W6">太字フォント</fo:inline>
</fo:block>

(2) specify font triplets in fop.xconf:

<font embed-url="Hiragino Mincho Pro W3.otf">
  <font-triplet name="Hiragino Mincho Pro" style="normal" weight="normal"/>
</font>
<font embed-url="Hiragino Mincho Pro W6.otf">
  <font-triplet name="Hiragino Mincho Pro" style="normal" weight="bold"/>
</font>

and then use a common family name with normal font-weight control:

<fo:block font-size="24pt" font-family="Hiragino Mincho Pro">
  <fo:inline font-weight="normal">プレーンフォント</fo:inline>
  <fo:inline font-weight="bold">太字フォント</fo:inline>
</fo:block>

as Vincent says, your bug report is indeed an enhancement request; i.e., to synthesize different font faces when one is not specifically available; while I agree this is possible, it often does not produce a pleasing result, and is sensitive to the original font format and other factors;

if someone (you?) wished to create a general mechanism for FOP to perform font face synthesis and submit a patch to perform this function, then I'm sure it would be seriously considered for inclusion in FOP...

however, absent a submission, it doesn't make sense to keep this "bug" open
Comment 12 Glenn Adams 2012-04-01 13:42:44 UTC
batch transition to closed for remaining resolved bugs
Comment 13 Glenn Adams 2012-04-04 21:58:57 UTC
*** Bug 20827 has been marked as a duplicate of this bug. ***