LibreOffice Module unotools (master) 1
Functions | Variables
fontcfg.cxx File Reference
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/any.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/fontcfg.hxx>
#include <unotools/fontdefs.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <comphelper/propertysequence.hxx>
#include <unotools/syslocale.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <string.h>
#include <algorithm>
Include dependency graph for fontcfg.cxx:

Go to the source code of this file.

Functions

static const char * getKeyType (DefaultFontType nKeyType)
 
static bool ImplKillLeading (OUString &rName, const char *const *ppStr)
 
static sal_Int32 ImplIsTrailing (std::u16string_view rName, const char *pStr)
 
static bool ImplKillTrailing (OUString &rName, const char *const *ppStr)
 
static bool ImplKillTrailingWithExceptions (OUString &rName, const char *const *ppStr)
 
static bool ImplFindAndErase (OUString &rName, const char *pStr)
 

Variables

const char *const aImplKillLeadingList []
 
const char *const aImplKillTrailingList []
 
const char *const aImplKillTrailingWithExceptionsList []
 
ImplFontAttrWeightSearchData const aImplWeightAttrSearchList []
 
ImplFontAttrWidthSearchData const aImplWidthAttrSearchList []
 
ImplFontAttrTypeSearchData const aImplTypeAttrSearchList []
 
const char *const pAttribNames []
 
const enum_convert pWeightNames []
 
const enum_convert pWidthNames []
 

Function Documentation

◆ getKeyType()

static const char * getKeyType ( DefaultFontType  nKeyType)
static

◆ ImplFindAndErase()

static bool ImplFindAndErase ( OUString &  rName,
const char *  pStr 
)
static

Definition at line 659 of file fontcfg.cxx.

References nPos.

◆ ImplIsTrailing()

static sal_Int32 ImplIsTrailing ( std::u16string_view  rName,
const char *  pStr 
)
static

Definition at line 604 of file fontcfg.cxx.

Referenced by ImplKillTrailing(), and ImplKillTrailingWithExceptions().

◆ ImplKillLeading()

static bool ImplKillLeading ( OUString &  rName,
const char *const *  ppStr 
)
static

Definition at line 572 of file fontcfg.cxx.

◆ ImplKillTrailing()

static bool ImplKillTrailing ( OUString &  rName,
const char *const *  ppStr 
)
static

Definition at line 619 of file fontcfg.cxx.

References ImplIsTrailing().

◆ ImplKillTrailingWithExceptions()

static bool ImplKillTrailingWithExceptions ( OUString &  rName,
const char *const *  ppStr 
)
static

Definition at line 634 of file fontcfg.cxx.

References ImplIsTrailing().

Variable Documentation

◆ aImplKillLeadingList

const char* const aImplKillLeadingList[]
Initial value:
=
{
"microsoft",
"monotype",
"linotype",
"baekmuk",
"adobe",
"nimbus",
"zycjk",
"itc",
"sun",
"amt",
"ms",
"mt",
"cg",
"hg",
"fz",
"ipa",
"sazanami",
"kochi",
nullptr
}

Definition at line 363 of file fontcfg.cxx.

◆ aImplKillTrailingList

const char* const aImplKillTrailingList[]

Definition at line 386 of file fontcfg.cxx.

◆ aImplKillTrailingWithExceptionsList

const char* const aImplKillTrailingWithExceptionsList[]
Initial value:
=
{
"ce", "monospace", "oldface", nullptr,
"ps", "caps", nullptr,
nullptr
}

Definition at line 436 of file fontcfg.cxx.

◆ aImplTypeAttrSearchList

ImplFontAttrTypeSearchData const aImplTypeAttrSearchList[]

Definition at line 508 of file fontcfg.cxx.

◆ aImplWeightAttrSearchList

ImplFontAttrWeightSearchData const aImplWeightAttrSearchList[]
Initial value:
=
{
{ "extrablack", WEIGHT_BLACK },
{ "ultrablack", WEIGHT_BLACK },
{ "ultrabold", WEIGHT_ULTRABOLD },
{ "semibold", WEIGHT_SEMIBOLD },
{ "semilight", WEIGHT_SEMILIGHT },
{ "semi", WEIGHT_SEMIBOLD },
{ "demi", WEIGHT_SEMIBOLD },
{ "black", WEIGHT_BLACK },
{ "bold", WEIGHT_BOLD },
{ "heavy", WEIGHT_BLACK },
{ "ultralight", WEIGHT_ULTRALIGHT },
{ "light", WEIGHT_LIGHT },
{ "medium", WEIGHT_MEDIUM },
{ nullptr, WEIGHT_DONTKNOW },
}
WEIGHT_ULTRALIGHT
WEIGHT_ULTRABOLD
WEIGHT_BOLD
WEIGHT_LIGHT
WEIGHT_DONTKNOW
WEIGHT_SEMIBOLD
WEIGHT_SEMILIGHT
WEIGHT_MEDIUM
WEIGHT_BLACK

Definition at line 453 of file fontcfg.cxx.

◆ aImplWidthAttrSearchList

ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[]
Initial value:
=
{
{ "narrow", WIDTH_CONDENSED },
{ "semicondensed", WIDTH_SEMI_CONDENSED },
{ "ultracondensed", WIDTH_ULTRA_CONDENSED },
{ "semiexpanded", WIDTH_SEMI_EXPANDED },
{ "ultraexpanded", WIDTH_ULTRA_EXPANDED },
{ "expanded", WIDTH_EXPANDED },
{ "condensed", WIDTH_CONDENSED },
{ "cond", WIDTH_CONDENSED },
{ "cn", WIDTH_CONDENSED },
{ nullptr, WIDTH_DONTKNOW },
}
WIDTH_CONDENSED
WIDTH_EXPANDED
WIDTH_ULTRA_EXPANDED
WIDTH_SEMI_CONDENSED
WIDTH_ULTRA_CONDENSED
WIDTH_DONTKNOW
WIDTH_SEMI_EXPANDED

Definition at line 483 of file fontcfg.cxx.

◆ pAttribNames

const char* const pAttribNames[]

Definition at line 753 of file fontcfg.cxx.

◆ pWeightNames

const enum_convert pWeightNames[]
Initial value:
=
{
{ "normal", WEIGHT_NORMAL },
{ "medium", WEIGHT_MEDIUM },
{ "bold", WEIGHT_BOLD },
{ "black", WEIGHT_BLACK },
{ "semibold", WEIGHT_SEMIBOLD },
{ "light", WEIGHT_LIGHT },
{ "semilight", WEIGHT_SEMILIGHT },
{ "ultrabold", WEIGHT_ULTRABOLD },
{ "semi", WEIGHT_SEMIBOLD },
{ "demi", WEIGHT_SEMIBOLD },
{ "heavy", WEIGHT_BLACK },
{ "unknown", WEIGHT_DONTKNOW },
{ "thin", WEIGHT_THIN },
{ "ultralight", WEIGHT_ULTRALIGHT }
}
WEIGHT_THIN
WEIGHT_NORMAL

Definition at line 799 of file fontcfg.cxx.

◆ pWidthNames

const enum_convert pWidthNames[]
Initial value:
=
{
{ "normal", WIDTH_NORMAL },
{ "condensed", WIDTH_CONDENSED },
{ "expanded", WIDTH_EXPANDED },
{ "unknown", WIDTH_DONTKNOW },
{ "ultracondensed", WIDTH_ULTRA_CONDENSED },
{ "extracondensed", WIDTH_EXTRA_CONDENSED },
{ "semicondensed", WIDTH_SEMI_CONDENSED },
{ "semiexpanded", WIDTH_SEMI_EXPANDED },
{ "extraexpanded", WIDTH_EXTRA_EXPANDED },
{ "ultraexpanded", WIDTH_ULTRA_EXPANDED }
}
WIDTH_EXTRA_CONDENSED
WIDTH_EXTRA_EXPANDED
WIDTH_NORMAL

Definition at line 817 of file fontcfg.cxx.