Kaydet (Commit) 198a775e authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: fdo#82259 Show same preview for both Symbol variants

Change-Id: Iafabbe5068a1817b5be717018536e0d31117c434
üst 92f3e68c
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment