Bug 134021 - [patch] oocalc not able to use the fontset for different languages
Summary: [patch] oocalc not able to use the fontset for different languages
Alias: None
Product: Fedora
Classification: Fedora
Component: openoffice.org   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact:
Keywords: i18n
Depends On:
Blocks: 137149
TreeView+ depends on / blocked
Reported: 2004-09-29 01:01 UTC by Leon Ho
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version: openoffice.org-i18n-1.1.2-18.6.EL4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-16 06:49:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
screenshot of oocalc with c'n'p (55.95 KB, image/png)
2004-12-09 04:37 UTC, Lawrence Lim
no flags Details
proposed patch to svx to use settings locale as the locale to fill base fonts defaults from (2.60 KB, patch)
2004-12-09 11:38 UTC, Caolan McNamara
no flags Details | Diff

Description Leon Ho 2004-09-29 01:01:00 UTC
Description of problem:
When using oocalc on different languages, oocalc unable to recongize
and use the fontset in VCL.xcu.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. LANG=ja_JP.UTF-8 oocalc
2. look at the font name
3. cut and paste strings from browser (http://www.yahoo.co.jp) to oocalc
Actual results:
2. Fontname: Nimbus Sans L
3. Not all of the characters cannot be shown

Expected results:
2. Fontname: Kochi Mincho
3. All of the characters can be shown

Additional info:
oowriter and ooimpress are fine

Comment 1 Dan Williams 2004-10-01 14:24:48 UTC
This is by design, you have to use Tools->Language Settings->Languages
and change the default document langauge to "Japanese".  Then you will
get the default font for Calc to be "Kochi Gothic".

Comment 2 Leon Ho 2004-10-04 05:28:29 UTC
Thanks for the comment. I have tried Tools -> Options -> Language
Settings -> Languages and changed to "Japanese" and then restarted oocalc.

It seems the default font has not changed (i.e. still Nimbus Sans L). 

One thing to note is that ooimpress and oowriter do not need special
settings for different langauges to get different default fonts so
they are very ideal.

Also noted that "Asian languages support" is enabled by default which
is nice.

I am wondering if oocalc has any special path for font selection? Do
you mean the this design is specific for oocalc only?

Comment 3 Lawrence Lim 2004-10-06 06:46:18 UTC
bug 123685 is the bug with font recognition  capability in oowriter
and ooimpress. It will be really ideal if oocalc has similar capability.

Comment 4 Dan Williams 2004-10-19 18:33:12 UTC
Ok, If you set "Default languages for Documents"->Asian (rather than
"none" like by default) then it will work correctly.

OOo doesn't right now have any facility to determine the "normal"
language that the user uses, other than LANG/LC*.  There's also no
real way to say "Ok, first run of OOo, set defaults to be your native
language".  This issue will have to be punted for now.

(You could do this by replacing the preference schemas that OOo uses,
but then there is still no way to know what your "default" language is).

Comment 5 Leon Ho 2004-10-20 04:32:30 UTC
Ok, setting that manually works for oocalc.

But my question is: Why oocalc has to set "Default languages for
Documents"->Asian" manually, but oowriter works (with correct japanese
font) without setting "Default languages for Documents"->Asian"?

Comment 6 Leon Ho 2004-11-30 04:54:40 UTC
Still happens on 1.1.2-14.6.EL4. 

Comment 7 Lawrence Lim 2004-12-09 04:37:54 UTC
Created attachment 108175 [details]
screenshot of oocalc with c'n'p

Row 1 is the result of the cut and paste without modifying the font selection.
Currently, it is default to Nimbus Sans L.

Row 4 is the correct result for the cut and paste. Will require to change the
font selection to Kochi Mincho manually.

Comment 8 Caolan McNamara 2004-12-09 11:38:32 UTC
Created attachment 108191 [details]
proposed patch to svx to use settings locale as the locale to fill base fonts defaults from

Proposed patch to svx to use settings locale as the locale to fill base fonts
defaults from

Comment 9 Caolan McNamara 2004-12-09 11:46:25 UTC
How about this patch, *seems* to do the right thing, and seems logical
to me, though perhaps there are catastrophic sideeffects down the line

Writer and Calc/etc use two totally seperate engines for text, but I
see that 
SdrModel::SetTextDefaults in svx/source/svdraw/svdmodel.cxx does
pretty much this, and
sw/source/ui/config/fontcfg.cxx SwStdFontConfig::GetDefaultFor seems
to do something similiar as well.

Comment 11 Akira TAGOH 2004-12-10 16:51:46 UTC
Tested with 1.1.2-17.6.EL4. It works fine after even Cut-n-Paste.

Comment 12 Lawrence Lim 2004-12-16 06:49:00 UTC
Confirmed fixed in openoffice.org-i18n-1.1.2-18.6.EL4. Checked with
all CJK and Indic locale.


Note You need to log in before you can comment on or make changes to this bug.