Resolves: rhbz#682716 pa-IN isn't handled well by fontconfig

f41
Caolán McNamara 14 years ago
parent 9c3cde8a07
commit 4345637b17

@ -0,0 +1,39 @@
From 7ec1571c31faff1f649dce4312271c47fc867fe3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 8 Mar 2011 16:10:43 +0000
Subject: [PATCH] Resolves: rhbz#682716 pa-IN isn't handled by fontconfig well
i.e. pa-IN gets fontconfig to consider all "pa" and "pa-pk" fonts, see
fdo#35118 for what I'd like fontconfig to do instead and prioritize generic
"pa" over "pa-pk" in thsis case.
Looking at the current list of fontconfig languages, this is the only one
likely afflicted at the moment, so help fontconfig out here.
---
vcl/unx/source/fontmanager/fontconfig.cxx | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index d7a888d..7a40084 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -993,9 +993,15 @@ rtl::OUString PrintFontManager::Substitute(const rtl::OUString& rFontName,
const FcChar8* pTargetNameUtf8 = (FcChar8*)aTargetName.getStr();
rWrapper.FcPatternAddString( pPattern, FC_FAMILY, pTargetNameUtf8 );
- const FcChar8* pLangAttribUtf8 = (FcChar8*)rLangAttrib.getStr();
if( rLangAttrib.getLength() )
+ {
+ const FcChar8* pLangAttribUtf8;
+ if (rLangAttrib.equalsIgnoreAsciiCase(OString(RTL_CONSTASCII_STRINGPARAM("pa-in"))))
+ pLangAttribUtf8 = (FcChar8*)"pa";
+ else
+ pLangAttribUtf8 = (FcChar8*)rLangAttrib.getStr();
rWrapper.FcPatternAddString( pPattern, FC_LANG, pLangAttribUtf8 );
+ }
// Add required Unicode characters, if any
if ( rMissingCodes.getLength() )
--
1.7.4.1

@ -28,7 +28,7 @@
Summary: Free Software Productivity Suite Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Version: 3.3.1.2 Version: 3.3.1.2
Release: 4%{?dist} Release: 5%{?dist}
License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
Group: Applications/Productivity Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop URL: http://www.documentfoundation.org/develop
@ -119,6 +119,7 @@ Patch31: 0001-Resolves-fdo-33701-ensure-node-outlives-path.patch
Patch32: 0001-Resolves-rhbz-672818-bandaid-for-crash-in-SwTxtNode-.patch Patch32: 0001-Resolves-rhbz-672818-bandaid-for-crash-in-SwTxtNode-.patch
Patch33: 0001-valgrind-don-t-leave-an-evil-thread-running-after-ma.patch Patch33: 0001-valgrind-don-t-leave-an-evil-thread-running-after-ma.patch
Patch34: 0001-install-high-resolution-icons.patch Patch34: 0001-install-high-resolution-icons.patch
Patch35: 0001-Resolves-rhbz-682716-pa-IN-isn-t-handled-by-fontconf.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir} %define instdir %{_libdir}
@ -756,6 +757,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch32 -p1 -b .rhbz672818-bandaid-for-crash-in-SwTxtNode-.patch %patch32 -p1 -b .rhbz672818-bandaid-for-crash-in-SwTxtNode-.patch
%patch33 -p1 -b .valgrind-don-t-leave-an-evil-thread-running-after-ma.patch %patch33 -p1 -b .valgrind-don-t-leave-an-evil-thread-running-after-ma.patch
%patch34 -p1 -b .install-high-resolution-icons.patch %patch34 -p1 -b .install-high-resolution-icons.patch
%patch35 -p1 -b .rhbz682716-pa-IN-isn-t-handled-by-fontconf.patch
touch scripting/source/pyprov/delzip touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip touch scripting/util/provider/beanshell/delzip
touch scripting/util/provider/javascript/delzip touch scripting/util/provider/javascript/delzip
@ -2101,6 +2103,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{basisinstdir}/program/kde-open-url %{basisinstdir}/program/kde-open-url
%changelog %changelog
* Tue Mar 08 2011 Caolán McNamara <caolanm@redhat.com> 3.3.1.2-5
- Resolves: rhbz#682716 pa-IN isn't handled well by fontconfig
* Tue Mar 08 2011 David Tardon <dtardon@redhat.com> 3.3.1.2-4 * Tue Mar 08 2011 David Tardon <dtardon@redhat.com> 3.3.1.2-4
- install 128x128 px icons - install 128x128 px icons

Loading…
Cancel
Save