Issue 22367 - Patch for debbuging problems on fontnames
Summary: Patch for debbuging problems on fontnames
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC5
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: hdu@apache.org
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-12 03:03 UTC by tora3
Modified: 2004-02-05 10:36 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch rev. 1.0 (5.51 KB, patch)
2003-11-12 03:04 UTC, tora3
no flags Details | Diff
Patch rev. 1.1 for OOo 1.1/1.1.1 (6.81 KB, patch)
2003-11-17 06:24 UTC, tora3
no flags Details | Diff
Patch rev. 2.0 for SRC680_m14s1 (2.25 KB, patch)
2003-11-17 06:25 UTC, tora3
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description tora3 2003-11-12 03:03:52 UTC
This patch will help you look into problems caused by font name mismatch on
UNIX machines, such as "Mojibake" in Japanese for garbage characters in English.
Once apply this patch, your OOo will produce diagnosis messages on your console
reporting what font names and texts are being involved. 

   To apply this patch, simply do the following:
     cd $SRC_ROOT/vcl/source/gdi
     patch < debugging_fontnames-1.0.patch.txt
     cd $SRC_ROOT/vcl
     rm -r xxxxxxxx.pro
     build debug=true add_cflagscxx=-DHDU_DEBUG
     cp -p lib/libvcl645*.so _OOo-install-dir_/program

Notes: 
   Make sure the $LANG environment variable is set appropriately before starting
the OOo, otherwise non-English fontnames or texts are not displayed correctly in
the console.

   This patch is based on the codes tagged with a tag name in cvs:
CWS_SRX645_OOO111FIX1_ANCHOR

   Most parts of this feature have been brought by the members of gsl,
especially HDU.

Tora
Comment 1 tora3 2003-11-12 03:04:52 UTC
Created attachment 11180 [details]
Patch rev. 1.0
Comment 2 christof.pintaske 2003-11-12 09:41:21 UTC
cp->hdu: i do not understand in what way this is particularly useful
nor do I understand what defining HDU_DEBUG might change. please have
a look at it if you want to have it.
Comment 3 hdu@apache.org 2003-11-12 11:51:03 UTC
Patch applied to CWS vcl16 for target OOo2.

HDU->CP: it just adds debugging output for GetDefaultFont(), which is
getting more interesting as OOo is ported to many more languages and
distributions.
Comment 4 hdu@apache.org 2003-11-12 13:11:53 UTC
.
Comment 5 tora3 2003-11-17 06:22:55 UTC
Additional small enhancement for investigation into fontname issues.
Here are two patches whose effects are same.

For OOo 1.1 or 1.1.1
  Patch: debugging_fontnames-1.1-for-OpenOffice_1_1.patch.txt
  cd $SRC_ROOT/vcl
  build.pl debug=true add_cflagscxx=-DHDU_DEBUG
  * This patch includes the changes in the previous patch
    debugging_fontnames-1.0.patch.txt

For SRC680_m14s1
  Patch: debugging_fontnames-2.0-for-SRC680_m14s1.patch.txt
  cd $SRC_ROOT/vcl
  build debug=true envcflagscxx=-DHDU_DEBUG
  * This patch does NOT include the changes in the previous patch
    debugging_fontnames-1.0.patch.txt

Tora
Comment 6 tora3 2003-11-17 06:24:33 UTC
Created attachment 11321 [details]
Patch rev. 1.1 for OOo 1.1/1.1.1
Comment 7 tora3 2003-11-17 06:25:50 UTC
Created attachment 11322 [details]
Patch rev. 2.0 for SRC680_m14s1
Comment 8 hdu@apache.org 2003-11-18 10:41:06 UTC
The topmost patch got into CWS vcl16. The other patches didn't make
it. If you think they are very important please open a followup issue.
Comment 9 tora3 2003-11-19 18:09:47 UTC
  I think all of these patches are important on the only special
occasion where the function of finding and fallbacking fontnames is
suspiciously working.

  In daily your development process, these patches might interfere
with your tasks by a plenty of diagnosis messages that don't have any
specific meanings.

  The main purpose of my uploading these patches was to allow  Asian
OOo users to solve by themselves:
 (1) garbage characters by setting font replace in the Tools > Options  
 (2) collecting information on what fonts are used in a variety of
platforms and proposing default font name lists in
share/registry/data/org/openoffice/VCL.xcu
  They can build libvclxxxxx.so by themselves on demand applying these
patches even if these patches are not included in the main source
codes. ja.openoffice.org has planned to deliver libvcl645li.so that
incorporates these patches to OOo 1.1/1.1.1 users.

  Please feel free to revise your source codes as you want. For
example, rename the macro name in the following line.

  #if OSL_DEBUG_LEVEL > 1
with
  #if FOO_BAR > 1

Comment 10 hdu@apache.org 2003-11-20 07:58:10 UTC
Ok.
To clarify my previous comment: the other patches didn't make it
because the CWS where the first patch got applied was already "hands
off for development". So I couldn't put them into that CWS because of
time constraints, not for other reasons.
Comment 11 tora3 2003-11-20 18:03:23 UTC
Thank you for your clarification. Now I understand.
Comment 12 hdu@apache.org 2004-02-05 10:36:31 UTC
CWS vcl16 is integrated. Closing.