Mailinglist Archive: opensuse-bugs (4882 mails)

< Previous Next >
[Bug 379991] OpenOffice shows some the styles of some fonts in non-English languages
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 30 Nov 2010 20:48:44 +0000
  • Message-id: <20101130204844.4FD7ECC7CF@xxxxxxxxxxxxxxxxxxxxxx>

https://bugzilla.novell.com/show_bug.cgi?id=379991

https://bugzilla.novell.com/show_bug.cgi?id=379991#c13


Petr Gajdos <pgajdos@xxxxxxxxxx> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEEDINFO
InfoProvider| |bnc-team-ooo@xxxxxxxxxxxxxx
| |vell.com

--- Comment #13 from Petr Gajdos <pgajdos@xxxxxxxxxx> 2010-11-30 20:48:42 UTC
---
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++)

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >