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):
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
2. Fontname: Nimbus Sans L
3. Not all of the characters cannot be shown
2. Fontname: Kochi Mincho
3. All of the characters can be shown
oowriter and ooimpress are fine
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".
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
I am wondering if oocalc has any special path for font selection? Do
you mean the this design is specific for oocalc only?
bug 123685 is the bug with font recognition capability in oowriter
and ooimpress. It will be really ideal if oocalc has similar capability.
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).
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"?
Still happens on 1.1.2-14.6.EL4.
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.
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
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
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.
Tested with 1.1.2-17.6.EL4. It works fine after even Cut-n-Paste.
Confirmed fixed in openoffice.org-i18n-1.1.2-18.6.EL4. Checked with
all CJK and Indic locale.