Launchpad has imported 28 comments from the remote bug at
https://bugzilla.novell.com/show_bug.cgi?id=379991.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2008-04-15T13:18:48+00:00 Mfabian wrote:

OpenOffice shows some the styles of some fonts in non-English
languages.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/17

------------------------------------------------------------------------
On 2008-04-15T13:26:02+00:00 Mfabian wrote:

Created an attachment (id=207981)
oo-font-style-name-non-english.png

In the oowriter menu go to “Format” → “Character”,
then select the font “Arial” and look at the available Typefaces.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/18

------------------------------------------------------------------------
On 2008-04-15T13:29:03+00:00 Mfabian wrote:

Created an attachment (id=207985)
fontforge-arial-italic-font-information.png

Font information of the Arial-ItalicMT font
according to fontforge.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/19

------------------------------------------------------------------------
On 2008-04-15T13:31:07+00:00 Mfabian wrote:

Created an attachment (id=207988)
arial-font-styles-in-gedit.png

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/20

------------------------------------------------------------------------
On 2008-04-16T12:53:34+00:00 Mfabian wrote:

Created an attachment (id=208312)
fc-family-list-faces.c

Test program. Compile with:

gcc -g -O0 -Wall -o fc-family-list-faces fc-family-list-faces.c
-lfontconfig

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/21

------------------------------------------------------------------------
On 2008-04-16T12:54:35+00:00 Mfabian wrote:

Output of the test program:

mfabian@magellan:~/c$ ./fc-family-list-faces arial
i=0 file=/usr/share/fonts/truetype/arialbi.ttf family=Arial familylang=en 
weight=200 slant=100 style=Negreta cursiva stylelang=ca
i=1 file=/local/fonts/vista/ariali.ttf family=Arial familylang=en weight=80 
slant=100 style=Cursiva stylelang=ca
i=2 file=/usr/share/fonts/truetype/ariali.ttf family=Arial familylang=en 
weight=80 slant=100 style=Cursiva stylelang=ca
i=3 file=/usr/share/fonts/vista/ariali.ttf family=Arial familylang=en weight=80 
slant=100 style=Cursiva stylelang=ca
i=4 file=/usr/share/fonts/vista/arialbi.ttf family=Arial familylang=en 
weight=200 slant=100 style=Negreta cursiva stylelang=ca
i=5 file=/local/fonts/vista/arialbi.ttf family=Arial familylang=en weight=200 
slant=100 style=Negreta cursiva stylelang=ca
mfabian@magellan:~/c$

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/22

------------------------------------------------------------------------
On 2008-04-16T13:00:56+00:00 Mfabian wrote:

As one can see in the output of the fontconfig test program,
we get the style names translated in Catalan, *although* the
test program explicitly requested them in English:

        pattern = FcPatternBuild (NULL,
                                  FC_FAMILY,
                                  FcTypeString,
                                  (unsigned char *) argv[1],
/*                                FC_STYLE, */
/*                                FcTypeString, */
/*                                "Italic", */
                                  FC_SLANT,
                                  FcTypeInteger,
                                  100,
                                  FC_STYLELANG,
                                  FcTypeString,
                                  "en",     ← style requested in English
                                  NULL);

Requesting the style "Italic" (commented out above) or
the slant value of 100 works, it really limits the the
fontset created from this pattern with

    fontset = FcFontList (NULL, pattern, objectset);

to only the slanted versions.

But requesting a language for the style does *not* work. Requesting an
non-existing language for the style, e.g. "xx" or "de" (The styles of
Arial have no German translation) results in an empty result.  But
requesting "en" or any other language where translations of the style
exist doesn’t limit the result to the requested language.

I guess it should, therefore this looks like a fontconfig bug to me.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/23

------------------------------------------------------------------------
On 2008-04-16T13:04:16+00:00 Mfabian wrote:

The fc-list shows similar behaviour to my test program:

mfabian@magellan:~$ fc-list Arial:style=Italic:stylelang=en
Arial:style=Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
mfabian@magellan:~$ fc-list Arial:style=Italic:stylelang=ca
Arial:style=Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
mfabian@magellan:~$ fc-list Arial:style=Italic:stylelang=de
mfabian@magellan:~$

i.e. requesting a certain stylelang in the pattern doesn’t
limit the result to the requested stylelang, only if the
stylelang doesn’t exist at all the result becomes empty.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/24

------------------------------------------------------------------------
On 2008-04-16T13:13:30+00:00 Mfabian wrote:

The reason why this problem doesn’t show up in Gnome applications
is apparently the following  code in pangofc-fontmap.c niear line 1918
in function pango_fc_family_list_faces:

              if (weight <= FC_WEIGHT_MEDIUM)
                {
                  if (slant == FC_SLANT_ROMAN)
                    {
                      has_face[REGULAR] = TRUE;
                      style = "Regular";
                    }
                  else
                    {
                      has_face[ITALIC] = TRUE;
                      style = "Italic";
                    }
                }
              else
                {
                  if (slant == FC_SLANT_ROMAN)
                    {
                      has_face[BOLD] = TRUE;
                      style = "Bold";
                    }
                  else
                    {
                      has_face[BOLD_ITALIC] = TRUE;
                      style = "Bold Italic";
                    }
                }

i.e. the 4 basic faces get special treatment, probably because Pango
wants to translate them on its own using gettext.

A font which had a more exotic style, say "Condensed" translated
in many languages would probably show the problem reportedd
here in Gnome as well.

(Qt has problems with fonts with many styles anyway, see bug #369466
and bug 330658 for example).

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/25

------------------------------------------------------------------------
On 2009-11-20T11:43:19+00:00 Hvogel wrote:

.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/52

------------------------------------------------------------------------
On 2010-11-12T14:45:28+00:00 2-pmladek wrote:

*** Bug 457427 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/84

------------------------------------------------------------------------
On 2010-11-15T07:32:40+00:00 Pgajdos-f wrote:

(In reply to comment #10)
> *** Bug 457427 has been marked as a duplicate of this bug. ***

Ok, so reopening this bug and reassign to me.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/85

------------------------------------------------------------------------
On 2010-11-23T09:13:15+00:00 Pgajdos-f wrote:

Upstream bug:
http://bugs.freedesktop.org/show_bug.cgi?id=27765

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/88

------------------------------------------------------------------------
On 2010-11-30T20:48:42+00:00 Pgajdos-f wrote:

Following patch (first try, naive, not upstreamable, ...) should
workaround the problem, at least for fc-match. Could you please test?

M17N/fontconfig

In case that this is not enough: could you please tell me how is
fontconfig used by *office?

Thanks


Index: fontconfig-2.8.0/src/fcmatch.c
===================================================================
--- fontconfig-2.8.0.orig/src/fcmatch.c
+++ fontconfig-2.8.0/src/fcmatch.c
@@ -413,6 +413,40 @@ FcFontRenderPrepare (FcConfig          *confi
        }
        else
            v = FcValueCanonicalize(&FcPatternEltValues (fe)->value);
+
+        /* This is workaround only!! */
+        if (fe->object == FC_STYLE_OBJECT)
+        {
+          FcPatternElt *le, *sle;
+          FcValue lang, stlang;
+          FcValueList *stlangs, *sts;
+          int l;
+
+          if ((le = FcPatternObjectFindElt(pat, FC_LANG_OBJECT)))
+            lang = FcValueCanonicalize(&FcPatternEltValues(le)->value);
+          else 
+          { /* I think it is not needed. */
+            lang.type = FcTypeString; 
+            lang.u.s = (const FcChar8 *)"en";
+          }
+          sle = FcPatternObjectFindElt(font, FC_STYLELANG_OBJECT);
+          stlangs = FcPatternEltValues(sle);
+          sts = FcPatternEltValues(fe);
+          l = 0;
+
+          do
+          {
+            stlang = FcValueCanonicalize(&stlangs->value);
+            if (FcLangCompare(stlang.u.s, lang.u.s) < FcLangDifferentLang)
+              break;
+            sts = FcValueListNext(sts);
+            l++;
+          } while ((stlangs = FcValueListNext(stlangs)));
+
+          lang = FcValueCanonicalize(&sts->value);
+          v.u.s = lang.u.s;
+        }
+
        FcPatternObjectAdd (new, fe->object, v, FcFalse);
     }
     for (i = 0; i < pat->num; i++)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/89

------------------------------------------------------------------------
On 2010-12-06T08:21:07+00:00 Pgajdos-f wrote:

This patch is causing some crashes, I am working on it, but in
home:pgajdos/fontconfig from now.

Nothing to test now.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/92

------------------------------------------------------------------------
On 2010-12-06T16:14:08+00:00 Pgajdos-f wrote:

CCing potential testers.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/94

------------------------------------------------------------------------
On 2010-12-07T15:19:39+00:00 Pgajdos-f wrote:

You can download modified fontconfig from

http://download.opensuse.org/repositories/home:/pgajdos/openSUSE_Factory/x86_64/

where fc-match now works for me as intended and I didn't see any
application crashing during (short) session in VirtualBox.

This has not resolved original problem though. Pida, could you please
point me to the piece of code, where fontconfig library is called?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/95

------------------------------------------------------------------------
On 2010-12-08T11:15:09+00:00 2-pmladek wrote:

The related code should be in the libreoffice-libs-gui source package in
vcl/unx/source/fontmanager

You might also try to search the LibreOffice sources via 
http://opengrok.go-oo.org/. Then you might look at 
http://cgit.freedesktop.org/libreoffice/build/plain/bin/modules2.txt to find 
related source package. The file modules2.txt lists the top directories per 
source tarball, e.g. vcl is in libs-gui.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/96

------------------------------------------------------------------------
On 2011-01-27T14:03:40+00:00 Pgajdos-f wrote:

Hi again,

the workaround for fc-match:

--- fontconfig-2.8.0.orig/src/fcmatch.c
+++ fontconfig-2.8.0/src/fcmatch.c
@@ -413,6 +413,56 @@ FcFontRenderPrepare (FcConfig          *confi
        }
        else
            v = FcValueCanonicalize(&FcPatternEltValues (fe)->value);
+
+        /* This is workaround only!! */
+        if (fe->object == FC_STYLE_OBJECT)
+        {
+          FcPatternElt *le, *sle;
+          FcValue lang, stlang, style;
+          FcValueList *stlangs, *sts, *en_style;
+          int l;
+
+          /* Try to learn lang from pat. */
+          if ((le = FcPatternObjectFindElt(pat, FC_LANG_OBJECT)))
+            lang = FcValueCanonicalize(&FcPatternEltValues(le)->value);
+          else /* FC_LANG_OBJECT not found in pat. I think it can't happen. */
+          {
+            lang.type = FcTypeString; 
+            lang.u.s = (const FcChar8 *)"en";
+          }
+
+          sle = FcPatternObjectFindElt(font, FC_STYLELANG_OBJECT); /* element 
of font containing */
+          sts = FcPatternEltValues(fe); /* styles translations associated to 
font */
+                                                                   /*  langs 
of styles translations */
+
+          en_style = 0;
+          if (sle) /* style elt can be present, stylelang no (e. g. fc-match 
Times) */
+          {        /* if so, sts list contain only one value, so we can jump 
to style = .. */
+            stlangs = FcPatternEltValues(sle);
+            l = 0;
+
+            do  /* Find style corresponding to lang(.u.s). */
+            {
+              stlang = FcValueCanonicalize(&stlangs->value);
+              if (FcLangCompare(stlang.u.s, lang.u.s) < FcLangDifferentLang)
+                break;
+              if (FcLangCompare(stlang.u.s, "en") < FcLangDifferentLang)
+                en_style = sts; /* Will be used when translation not found for 
lang. */
+              sts = FcValueListNext(sts);
+              l++;
+            } while ((stlangs = FcValueListNext(stlangs)));
+          }
+
+          if (sts) /* Style translation was found for lang.u.s. */
+            style = FcValueCanonicalize(&sts->value);
+          else if (en_style) /* Not found, try English. */
+            style = FcValueCanonicalize(&en_style->value);
+          else /* Nor English found, take first one. */
+            style = FcValueCanonicalize(&FcPatternEltValues(fe)->value);
+
+          v.u.s = style.u.s;
+        }
+
        FcPatternObjectAdd (new, fe->object, v, FcFalse);
     }
     for (i = 0; i < pat->num; i++)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/97

------------------------------------------------------------------------
On 2011-01-27T14:05:33+00:00 Pgajdos-f wrote:

I am thinking about better solution -- get working patterns with
FC_STYLELANG specified.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/98

------------------------------------------------------------------------
On 2011-01-27T15:01:51+00:00 Pgajdos-f wrote:

However, this is not related to this bug at all. I will try explain,
what I have found and what would help in my opinion.

First, for each font we have defined four lists:
FAMILY     .. family name in different languages
FAMILYLANG .. languages corresponding to entries in FAMILY
STYLE      .. style name in different languages
STYLELANG  .. languages corresponding to entries in STYLE

As far as I can see, STYLE and STYLELANG are handled in fontconfig
similar way as FAMILY and FAMILYLANG respectively. But, these two pairs
are handled differently by Office:

FcResult eFamilyRes = rWrapper.FamilyFromPattern( pFSet->fonts[i], &family );
FcResult eStyleRes = rWrapper.FcPatternGetString( pFSet->fonts[i], FC_STYLE, 0, 
&style );

This is in my opinion wrong, because I believe FamilyFromPattern()
chooses the name in right language, but
FcPatternGetString(..,FC_STYLE,0,..) takes the _first_ element from the
list.

If all from the above is true, then all what remains is to implement
StyleFromPattern() function (very similar to FamilyFromPattern()) and
change one line in countFontconfigFonts().

Could someone with better experience with Office patching and building
to try this out?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/99

------------------------------------------------------------------------
On 2011-01-31T10:23:27+00:00 Pgajdos-f wrote:

Never mind, I believe I have a solution.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/101

------------------------------------------------------------------------
On 2011-01-31T10:24:27+00:00 Pgajdos-f wrote:

Created an attachment (id=411219)
Patch against libs-gui/vcl/unx/source/fontmanager/fontconfig.cxx.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/102

------------------------------------------------------------------------
On 2011-01-31T10:27:47+00:00 Pgajdos-f wrote:

Kendy, could you please have a look at this patch and could you please
reassign this to right person?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/103

------------------------------------------------------------------------
On 2011-01-31T13:14:36+00:00 Mmeeks-i wrote:

I'll forward to the dev mailing list ... thanks Petr ! :-) Caolan would
want a look I think.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/105

------------------------------------------------------------------------
On 2011-02-01T07:56:56+00:00 Pgajdos-f wrote:

(In reply to comment #24)
> I'll forward to the dev mailing list ... thanks Petr ! :-) Caolan would want a
> look I think.

Definitely. Take this as very first try. I didn't test it much while I
don't have time for that now, maybe later this week.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/106

------------------------------------------------------------------------
On 2014-05-13T05:03:14+00:00 Hmuelle wrote:

openSUSE 11.0 is end of life, issue should be tracked upstream regarding c#24.
Closing upstream.

If bug still exists in newer and  still supported version of openSUSE
please report a new bug against this version.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/121

------------------------------------------------------------------------
On 2014-05-13T07:52:51+00:00 Pgajdos-f wrote:

As far as I remember, the patch from comment 22 is upstreamed yet.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/105900/comments/122


** Changed in: openoffice
       Status: Unknown => Won't Fix

** Changed in: openoffice
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libreoffice in Ubuntu.
https://bugs.launchpad.net/bugs/105900

Title:
  [Upstream] Bold, Italics, and Bold Italics not in English on Fonts
  menu

Status in LibreOffice Productivity Suite:
  Fix Released
Status in Fontconfig - Font Configuration Library:
  Fix Released
Status in The OpenOffice.org Suite:
  Won't Fix
Status in “fontconfig” package in Ubuntu:
  Triaged
Status in “libreoffice” package in Ubuntu:
  Fix Released
Status in “openoffice.org” package in Ubuntu:
  Invalid
Status in “openoffice.org” package in openSUSE:
  New

Bug description:
  Binary package hint: openoffice.org

  Using the current ooo packages for Feisty, open Writer, type a few
  characters, and then go to the Format --> Character menu. In the Font
  tab under Typeface, the options listed are:

  Normal
  cursiva
  Negreta
  Negreta cursiva

  The system in question is en_US.  I've had Feisty on this computer for
  some time and do not recall seeing this before (not certain I used the
  Font menu though).

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/105900/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to