To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=18285





------- Additional comments from [EMAIL PROTECTED] Thu Oct  6 09:36:34 -0700 
2005 -------
Continued from my previous comment.....


Let me state what this patch does as far as I can understand and after I've
communicated with the patch author. Wherever Firefly has written comment in
Chinese in the patch, I have added a corresponding English comment as possible
(attachment 30159). I didn't remove his Chinese comment as it is his patch, but
also because if he needed to look at and modify it again, the original comment
will be readily accessible to him.

The patch actually does three things in one shot, two of which relevant to this
bug, they are:
(i) Enable virtual bold / italic style
(ii) Address Embedded Bitmap issue in virtual bold / italic style

And the additional feature is:
(iii) Specific optimization to CJK font by increasing the darkness (gamma) of
the font face when display on screen, particularly to CJK and Thailand font with
point size < 20. This will improve the blurry glyph so that they will be clearer
and much more comfortable to our eyes. Only CJK and Thai fonts are
targetted/affected.

The specific optimization to CJK font could be a bit tricky, and can actually be
splited as a separate patch if the module/bug owner feels uneasy about it.


------------------------------------------------------

In the order suggested in the patch, here is what the patch sets out to do:
IMPORTANT NOTICE: Item 4 & 5 are what I consider as MUST_DO to fix this bug. 

1. Define the GammaInit function

The GammaInit function is defined here as a reference scale for the gamma value
(darkness) of a font. So that when there is a need to increase the darkness
(gamma value) of a font (see item 2), there is no need to re-define the gamma
value again as a reference function already exists. The only thing to do is to
pass the value of gamma_table[x] (see item 6).

2. Search fonts with code page 874, 932, 936, 949, 950, 1361. 

Target these fonts with Gamma enhancement by passing the argument 'mbUseGamma =
true', which will call the Autohint function in freetype.

The code page represents their corresponding country code as documented in the
patch:

+#define TT_CODEPAGE_RANGE_874    (1L << 16) /* Thai */
+#define TT_CODEPAGE_RANGE_932    (1L << 17) /* JIS/Japan */
+#define TT_CODEPAGE_RANGE_936    (1L << 18) /* Chinese: Simplified */
+#define TT_CODEPAGE_RANGE_949    (1L << 19) /* Korean Wansung */
+#define TT_CODEPAGE_RANGE_950    (1L << 20) /* Chinese: Traditional */
+#define TT_CODEPAGE_RANGE_1361   (1L << 21) /* Korean Johab */

In essence, fonts with these country codes will have CJK optimization turned on;
the optimization will increase the Gamma value (darkness) applicable to the
font, so that they will be more clear and less blurry when shown on the screen
(See also item 6 below).

3. If BYTECODE_INTERPRETER is not defined, hinting is still enabled 

Basically, there are two ways to do font hinting in freetype:

a) Bytecode interpreter (which is not enabled by commercial Linux distro to
avoid Apple's patent issue) 
b) freetype's internal autohinter 

In essence, this is to tell OpenOffice.org to use hinting even when Bytecode
interpreter is disabled.

Firefly suggested it is his personal preference rather than a needed
requirement, so it is open to suggestions.

-------------------------------------------------------------

Item 4 & 5 are a bit confusing, but I'll try to explain it as simple as
possible. They are the core fixes of this patch relevant to the bug.

4. Enable virtual italic style

This is to enable virtual italic style when the italic font file of a typeface
is not detected.

But, as I have written in my previous comment, Embedded Bitmap font _cannot_ be
italicized. 

As a result embedded bitmap needs to revert back to vector first, 
hence there are two possible paths for enabling virtual style:

4a) TTF w/ no embedded bitmap (eg. Bitstream Vera Serif, AR PL Mingti2L Big5) :
== Regular vector font -> Enable italic style in OOo -> Italic vector style 

4b) TTF w/ embedded bitmap (eg. AR PL New Sung, Microsoft MingLiu) :
== Regular Embedded bitmap font -> Enable italic style in OOo -> Revert back to
vector font -> Italic vector style


As you can see, a separate path is needed to support virtual italic style for
embedded bitmap.

However, you will see in item 5 that virtual bold style for bitmap is handled
_differently_.

Reviewer(s), please take notice of this.


5. Enable virtual bold style

When the bold font file of a typeface is not detected, virtual bold style is
enabled:
Workflow suggested in the patch:

5a) TTF w/ no embedded bitmap (eg. AR PL Mingti2L Big5) :
== Regular vector font -> Enable bold style in OOo -> Bold vector style

5b) TTF w/ embedded bitmap (eg. AR PL New Sung, Microsoft MingLiu) :
== Regular Embedded bitmap font -> Enable bold style -> Bold *Bitmap* style

OK, here is the difference: Embedded Bitmap _can_ be emboldened. 

Hence the path for processing Embedded bitmap to display virtual bold style is
to write a separate algorithm to display Bold *Bitmap* style. There is _no_ need
to revert back to vector font in this case.


In case you are wondering, for bold AND italic style, the path is to revert back
to vector font first as item 4 suggested.

---------------------------------------------------------------

6. If the font size is < 20, then increasing the gamma (darkness) of the font 
face.

In simple word, CJKT font will become darker for font size < 20.
This will be _very_ helpful to the Linux users from these countries. Other fonts
are not affected.


Alright, I think this comment is long enough to be digested all at once. :)

Item 4b) actually has some relationship with item 6, but I'll let you guys take
a peek at the code first.  =)

-> npower, 

If you can help on getting a review for this patch, we really appreciate it. As
soon as Firefly gets back to me on the JCA signature, I think we can start to
get this patch moving.

Then OpenOffice.org will rock again :-) .

Hey, KOffice already solves this problem so the OOo developers shouldn't be far
behind =P .

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to