diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-26 15:00:29 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-01-27 17:04:07 +0000 |
commit | 599a191d28f210d896bd0578e540106da1efb056 (patch) | |
tree | d745c6b7cfb8e41dc708a3f70dca14d5f9de3280 /unotools | |
parent | f5a6a1ccfaa65385d1577c69288a92c3d2571f46 (diff) |
don't strip font names of apparent script suffixes anymore
e.g. "CM Roman CE" should be left alone.
bump font cache id to invalidate old cached lists
I think this practice stems from Window 3.1/Word 95 where the encoding was
included in the font name
http://www.webcenter.ru/~kazarn/eng/fonts_ttf.htm#charsettbl Microsoft Office
still generates RTF files with weird-ass Win 3.1 style fontnames but any actual
existing fonts that happen to have names that fall into that pattern should be
left alone now.
Change-Id: Ibb704048d63b33ce510d6b1076700c6e94a0af2a
(cherry picked from commit 15e1c881684c0127c0ca989924bbf2508b4fd780)
Reviewed-on: https://gerrit.libreoffice.org/14210
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/qa/unit/testGetEnglishSearchName.cxx | 7 | ||||
-rw-r--r-- | unotools/source/misc/fontdefs.cxx | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/unotools/qa/unit/testGetEnglishSearchName.cxx b/unotools/qa/unit/testGetEnglishSearchName.cxx index dbc8b173a9f1..c9d8e1fbe4b4 100644 --- a/unotools/qa/unit/testGetEnglishSearchName.cxx +++ b/unotools/qa/unit/testGetEnglishSearchName.cxx @@ -39,12 +39,11 @@ void Test::testSingleElement() //trailingWhitespaces test1 = GetEnglishSearchFontName( "Symbol " ); CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1); - //removing Skripts + //no longer remove script suffixes test1 = GetEnglishSearchFontName( "Symbol(SIP)" ); CPPUNIT_ASSERT_EQUAL(OUString("symbol(sip)"),test1); - //remove Whitespaces between - test1 = GetEnglishSearchFontName( "Symbol (thai)" ); - CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1); + test1 = GetEnglishSearchFontName( "CM Roman CE" ); + CPPUNIT_ASSERT_EQUAL( OUString("cmromance"),test1); //remove special characters; leave semicolon, numbers test1 = GetEnglishSearchFontName( "sy;mb?=ol129" ); CPPUNIT_ASSERT_EQUAL( OUString("sy;mbol129"),test1); diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index 79f282143f8c..133d77ad7903 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -367,8 +367,6 @@ OUString GetEnglishSearchFontName(const OUString& rInName) if ( i != nLen ) rName.truncate(i); - // Remove Script at the end - rName = StripScriptFromName(rName.toString()); nLen = rName.getLength(); // remove all whitespaces and converts to lower case ASCII |