rework sample text generator for different scripts
split out code that creates sample text for different scripts add extra scripts and sample text add extra space between sample text preview and font name add guess-script from opentype unicode coverage bits split out code that knows the names of symbol fonts which don't have symbol encoding set
This commit is contained in:
parent
b2250f4d98
commit
6016eb1ec1
6 changed files with 1409 additions and 924 deletions
|
@ -217,6 +217,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
|
|||
svtools/source/misc/itemdel \
|
||||
svtools/source/misc/langtab \
|
||||
svtools/source/misc/langhelp \
|
||||
svtools/source/misc/sampletext \
|
||||
svtools/source/misc/stringtransfer \
|
||||
svtools/source/misc/svtaccessiblefactory \
|
||||
svtools/source/misc/svtdata \
|
||||
|
|
|
@ -124,6 +124,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtfkeywd.hxx,svtools/r
|
|||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtfout.hxx,svtools/rtfout.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtftoken.h,svtools/rtftoken.h))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ruler.hxx,svtools/ruler.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sampletext.hxx,svtools/sampletext.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/scriptedtext.hxx,svtools/scriptedtext.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/scrwin.hxx,svtools/scrwin.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sfxecode.hxx,svtools/sfxecode.hxx))
|
||||
|
|
51
svtools/inc/svtools/sampletext.hxx
Normal file
51
svtools/inc/svtools/sampletext.hxx
Normal file
|
@ -0,0 +1,51 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* [ Caolan McNamara <caolanm@redhat.com> ]
|
||||
* Portions created by the Initial Developer are Copyright (C) 2010 the
|
||||
* Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Caolan McNamara <caolanm@redhat.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
|
||||
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
|
||||
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
|
||||
* instead of those above.
|
||||
*/
|
||||
#ifndef INCLUDED_SVTOOLS_SAMPLETEXT_HXX
|
||||
#define INCLUDED_SVTOOLS_SAMPLETEXT_HXX
|
||||
|
||||
#include "svtools/svtdllapi.h"
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <unicode/uscript.h>
|
||||
#include <vcl/fontcapabilities.hxx>
|
||||
|
||||
class OutputDevice;
|
||||
class Font;
|
||||
|
||||
SVT_DLLPUBLIC UScriptCode otCoverageToScript(vcl::UnicodeCoverage::UnicodeCoverageEnum eOTCoverage);
|
||||
|
||||
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);
|
||||
|
||||
SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForScript(UScriptCode eScript);
|
||||
SVT_DLLPUBLIC rtl::OUString makeMinimalTextForScript(UScriptCode eScript);
|
||||
|
||||
#endif
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
File diff suppressed because it is too large
Load diff
1283
svtools/source/misc/sampletext.cxx
Normal file
1283
svtools/source/misc/sampletext.cxx
Normal file
File diff suppressed because it is too large
Load diff
|
@ -31,11 +31,12 @@
|
|||
#include <boost/dynamic_bitset.hpp>
|
||||
#include <vector>
|
||||
|
||||
//See OS/2 table, i.e. http://www.microsoft.com/typography/otspec/os2.htm#ur
|
||||
namespace vcl
|
||||
{
|
||||
struct UnicodeCoverage
|
||||
namespace UnicodeCoverage
|
||||
{
|
||||
enum
|
||||
enum UnicodeCoverageEnum
|
||||
{
|
||||
BASIC_LATIN = 0,
|
||||
LATIN_1_SUPPLEMENT = 1,
|
||||
|
@ -169,9 +170,9 @@ namespace vcl
|
|||
};
|
||||
};
|
||||
|
||||
struct CodePageCoverage
|
||||
namespace CodePageCoverage
|
||||
{
|
||||
enum
|
||||
enum CodePageCoverageEnum
|
||||
{
|
||||
CP1252 = 0,
|
||||
CP1250 = 1,
|
||||
|
|
Loading…
Reference in a new issue