/[packages]/cauldron/libreoffice/pristine/SOURCES/0001-don-t-strip-font-names-of-apparent-script-suffixes-a.patch
ViewVC logotype

Contents of /cauldron/libreoffice/pristine/SOURCES/0001-don-t-strip-font-names-of-apparent-script-suffixes-a.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 812930 - (show annotations) (download)
Sat Jan 31 22:00:57 2015 UTC (9 years, 1 month ago) by schedbot
File size: 3044 byte(s)
Copying release 4.4.0.3-6.mga5 to pristine/ directory.
1 From 15e1c881684c0127c0ca989924bbf2508b4fd780 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Mon, 26 Jan 2015 15:00:29 +0000
4 Subject: [PATCH] don't strip font names of apparent script suffixes anymore
5
6 e.g. "CM Roman CE" should be left alone.
7
8 bump font cache id to invalidate old cached lists
9
10 I think this practice stems from Window 3.1/Word 95 where the encoding was
11 included in the font name
12 http://www.webcenter.ru/~kazarn/eng/fonts_ttf.htm#charsettbl Microsoft Office
13 still generates RTF files with weird-ass Win 3.1 style fontnames but any actual
14 existing fonts that happen to have names that fall into that pattern should be
15 left alone now.
16
17 Change-Id: Ibb704048d63b33ce510d6b1076700c6e94a0af2a
18 ---
19 unotools/qa/unit/testGetEnglishSearchName.cxx | 7 +++----
20 unotools/source/misc/fontdefs.cxx | 2 --
21 vcl/generic/fontmanager/fontcache.cxx | 2 +-
22 3 files changed, 4 insertions(+), 7 deletions(-)
23
24 diff --git a/unotools/qa/unit/testGetEnglishSearchName.cxx b/unotools/qa/unit/testGetEnglishSearchName.cxx
25 index dbc8b17..c9d8e1f 100644
26 --- a/unotools/qa/unit/testGetEnglishSearchName.cxx
27 +++ b/unotools/qa/unit/testGetEnglishSearchName.cxx
28 @@ -39,12 +39,11 @@ void Test::testSingleElement()
29 //trailingWhitespaces
30 test1 = GetEnglishSearchFontName( "Symbol " );
31 CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1);
32 - //removing Skripts
33 + //no longer remove script suffixes
34 test1 = GetEnglishSearchFontName( "Symbol(SIP)" );
35 CPPUNIT_ASSERT_EQUAL(OUString("symbol(sip)"),test1);
36 - //remove Whitespaces between
37 - test1 = GetEnglishSearchFontName( "Symbol (thai)" );
38 - CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1);
39 + test1 = GetEnglishSearchFontName( "CM Roman CE" );
40 + CPPUNIT_ASSERT_EQUAL( OUString("cmromance"),test1);
41 //remove special characters; leave semicolon, numbers
42 test1 = GetEnglishSearchFontName( "sy;mb?=ol129" );
43 CPPUNIT_ASSERT_EQUAL( OUString("sy;mbol129"),test1);
44 diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
45 index f368cc6..04c6fc4 100644
46 --- a/unotools/source/misc/fontdefs.cxx
47 +++ b/unotools/source/misc/fontdefs.cxx
48 @@ -367,8 +367,6 @@ OUString GetEnglishSearchFontName(const OUString& rInName)
49 if ( i != nLen )
50 rName.truncate(i);
51
52 - // Remove Script at the end
53 - rName = StripScriptFromName(rName.toString());
54 nLen = rName.getLength();
55
56 // remove all whitespaces and converts to lower case ASCII
57 diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx
58 index 56a15bf..e978eb7 100644
59 --- a/vcl/generic/fontmanager/fontcache.cxx
60 +++ b/vcl/generic/fontmanager/fontcache.cxx
61 @@ -38,7 +38,7 @@
62 #endif
63
64 #define FONTCACHEFILE "/user/psprint/pspfontcache"
65 -#define CACHE_MAGIC "LibreOffice PspFontCacheFile format 5"
66 +#define CACHE_MAGIC "LibreOffice PspFontCacheFile format 6"
67
68 using namespace std;
69 using namespace psp;
70 --
71 1.9.3
72

  ViewVC Help
Powered by ViewVC 1.1.30