summaryrefslogtreecommitdiff
path: root/svtools/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-10-21 09:33:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-10-21 11:27:39 +0100
commite84482a38363004d5dc2fde24e57d4215b48797a (patch)
tree3b060be8bfb764ac030b520d2347be407100a4df /svtools/inc
parent41c083a7ade3feb7f5b6516f859db00fa8e2cf72 (diff)
Use language/script specific CTL/CJK sample text in font preview
i.e. font names are often typically in English, so fairly useless to take the English name to preview what effect the font will have in a CTL/CJK script. More languages and scripts need to be added, but this should be sufficient to bootstrap this up
Diffstat (limited to 'svtools/inc')
-rw-r--r--svtools/inc/svtools/sampletext.hxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/svtools/inc/svtools/sampletext.hxx b/svtools/inc/svtools/sampletext.hxx
index 09ba499955fc..f7903d85ed67 100644
--- a/svtools/inc/svtools/sampletext.hxx
+++ b/svtools/inc/svtools/sampletext.hxx
@@ -32,6 +32,7 @@
#include <rtl/ustring.hxx>
#include <unicode/uscript.h>
#include <i18npool/lang.h>
+#include <com/sun/star/i18n/ScriptType.hpp>
#include <vcl/fontcapabilities.hxx>
class OutputDevice;
@@ -41,13 +42,24 @@ SVT_DLLPUBLIC UScriptCode otCoverageToScript(vcl::UnicodeCoverage::UnicodeCovera
SVT_DLLPUBLIC bool isSymbolFont(const Font &rFont);
SVT_DLLPUBLIC bool isOpenSymbolFont(const Font &rFont);
+
SVT_DLLPUBLIC bool canRenderNameOfSelectedFont(OutputDevice &rDevice);
-SVT_DLLPUBLIC rtl::OUString makeRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice);
-SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForSelectedFont(OutputDevice &rDevice);
+//These ones are typically for use in the font dropdown box beside the
+//fontname, so say things roughly like "Script/Alphabet/Name-Of-Major-Language"
+SVT_DLLPUBLIC rtl::OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice &rDevice);
+SVT_DLLPUBLIC rtl::OUString makeShortRepresentativeTextForSelectedFont(OutputDevice &rDevice);
+SVT_DLLPUBLIC rtl::OUString makeShortRepresentativeTextForScript(UScriptCode eScript);
+//For the cases where the font doesn't fully support a script, but has partial support
+//for a useful subset
+SVT_DLLPUBLIC rtl::OUString makeShortMinimalTextForScript(UScriptCode eScript);
+
+//These ones are typically for use in the font preview window in format character
+SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const Font &rFont);
SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForLanguage(LanguageType eLang);
SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForScript(UScriptCode eScript);
SVT_DLLPUBLIC rtl::OUString makeMinimalTextForScript(UScriptCode eScript);
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */