summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-12 15:39:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-12 15:53:21 +0100
commit198a775ebccc69e71b97f048d1d6c4b9651662ad (patch)
tree93675e210808c1e07231bf9fa149a89c44b68509
parent92f3e68cd107b48ca24563e27c36afa963f392e3 (diff)
Related: fdo#82259 Show same preview for both Symbol variants
Change-Id: Iafabbe5068a1817b5be717018536e0d31117c434
-rw-r--r--svtools/source/misc/sampletext.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx
index e90b47546921..dd26f807c28d 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -41,6 +41,7 @@ bool isSymbolFont(const Font &rFont)
rFont.GetName().equalsIgnoreAsciiCase("MusiQwik") ||
rFont.GetName().equalsIgnoreAsciiCase("MusiSync") ||
rFont.GetName().equalsIgnoreAsciiCase("stmary10") ||
+ rFont.GetName().equalsIgnoreAsciiCase("Symbol") ||
rFont.GetName().startsWith("STIX") ||
isOpenSymbolFont(rFont);
}
@@ -53,6 +54,20 @@ bool canRenderNameOfSelectedFont(OutputDevice &rDevice)
OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice)
{
+ if (rDevice.GetFont().GetName() == "Symbol")
+ {
+ static const sal_Unicode aImplAppleSymbolText[] = {
+ 0x03BC, 0x2202, 0x2211, 0x220F, 0x03C0, 0x222B, 0x03A9, 0x221A, 0};
+ OUString sSampleText(aImplAppleSymbolText);
+ bool bHasSampleTextGlyphs = (-1 == rDevice.HasGlyphs(rDevice.GetFont(), sSampleText));
+ //It's the Apple version
+ if (bHasSampleTextGlyphs)
+ return OUString(aImplAppleSymbolText);
+ static const sal_Unicode aImplAdobeSymbolText[] = {
+ 0xF06D, 0xF0B6, 0xF0E5, 0xF0D5, 0xF070, 0xF0F2, 0xF057, 0xF0D6, 0};
+ return OUString(aImplAdobeSymbolText);
+ }
+
const bool bOpenSymbol = isOpenSymbolFont(rDevice.GetFont());
if (!bOpenSymbol)