LibreOffice Module unotools (master) 1
Classes | Namespaces | Enumerations | Functions | Variables
fontdefs.hxx File Reference
#include <sal/config.h>
#include <string_view>
#include <unotools/unotoolsdllapi.h>
#include <sal/types.h>
#include <rtl/ustring.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <config_options.h>
Include dependency graph for fontdefs.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  o3tl::typed_flags< SubsFontFlags >
 

Namespaces

namespace  o3tl
 

Enumerations

enum class  SubsFontFlags {
  ONLYONE = 0x01 ,
  MS = 0x02
}
 
enum class  DefaultFontType {
  SANS_UNICODE = 1 ,
  SANS = 2 ,
  SERIF = 3 ,
  FIXED = 4 ,
  SYMBOL = 5 ,
  UI_SANS = 1000 ,
  UI_FIXED = 1001 ,
  LATIN_TEXT = 2000 ,
  LATIN_PRESENTATION = 2001 ,
  LATIN_SPREADSHEET = 2002 ,
  LATIN_HEADING = 2003 ,
  LATIN_DISPLAY = 2004 ,
  LATIN_FIXED = 2005 ,
  CJK_TEXT = 3000 ,
  CJK_PRESENTATION = 3001 ,
  CJK_SPREADSHEET = 3002 ,
  CJK_HEADING = 3003 ,
  CJK_DISPLAY = 3004 ,
  CTL_TEXT = 4000 ,
  CTL_PRESENTATION = 4001 ,
  CTL_SPREADSHEET = 4002 ,
  CTL_HEADING = 4003 ,
  CTL_DISPLAY = 4004
}
 

Functions

UNOTOOLS_DLLPUBLIC OUString GetSubsFontName (std::u16string_view rName, SubsFontFlags nFlags)
 
 UNLESS_MERGELIBS (UNOTOOLS_DLLPUBLIC) void AddTokenFontName(OUString &rName
 
class UNLESS_MERGELIBS (UNOTOOLS_DLLPUBLIC) ConvertChar
 
UNOTOOLS_DLLPUBLIC std::u16string_view GetNextFontToken (std::u16string_view rTokenStr, sal_Int32 &rIndex)
 
UNOTOOLS_DLLPUBLIC OUString GetEnglishSearchFontName (std::u16string_view rName)
 
UNOTOOLS_DLLPUBLIC OUString StripScriptFromName (const OUString &rName)
 Strip any "script font suffix" from the font name. More...
 
UNOTOOLS_DLLPUBLIC bool IsOpenSymbol (std::u16string_view rFontName)
 Determine if the font is the special Open|Star Symbol font. More...
 

Variables

std::u16string_view rNewToken
 

Enumeration Type Documentation

◆ DefaultFontType

enum class DefaultFontType
strong
Enumerator
SANS_UNICODE 
SANS 
SERIF 
FIXED 
SYMBOL 
UI_SANS 
UI_FIXED 
LATIN_TEXT 
LATIN_PRESENTATION 
LATIN_SPREADSHEET 
LATIN_HEADING 
LATIN_DISPLAY 
LATIN_FIXED 
CJK_TEXT 
CJK_PRESENTATION 
CJK_SPREADSHEET 
CJK_HEADING 
CJK_DISPLAY 
CTL_TEXT 
CTL_PRESENTATION 
CTL_SPREADSHEET 
CTL_HEADING 
CTL_DISPLAY 

Definition at line 60 of file fontdefs.hxx.

◆ SubsFontFlags

enum class SubsFontFlags
strong
Enumerator
ONLYONE 
MS 

Definition at line 32 of file fontdefs.hxx.

Function Documentation

◆ GetEnglishSearchFontName()

UNOTOOLS_DLLPUBLIC OUString GetEnglishSearchFontName ( std::u16string_view  rName)

Definition at line 86 of file fontdefs.cxx.

References i, toOnlyLowerAsciiOrStrip(), and u.

Referenced by CreateFontToSubsFontConverter(), and GetSubsFontName().

◆ GetNextFontToken()

UNOTOOLS_DLLPUBLIC std::u16string_view GetNextFontToken ( std::u16string_view  rTokenStr,
sal_Int32 &  rIndex 
)

Definition at line 301 of file fontdefs.cxx.

References o3tl::make_unsigned().

Referenced by GetSubsFontName(), ImplIsFontToken(), and IsOpenSymbol().

◆ GetSubsFontName()

UNOTOOLS_DLLPUBLIC OUString GetSubsFontName ( std::u16string_view  rName,
SubsFontFlags  nFlags 
)

◆ IsOpenSymbol()

UNOTOOLS_DLLPUBLIC bool IsOpenSymbol ( std::u16string_view  rFontName)

Determine if the font is the special Open|Star Symbol font.

Parameters
rFontNameThe FontName to test for being Open|Star Symbol
Returns
true if this is Open|Star Symbol

Definition at line 406 of file fontdefs.cxx.

References o3tl::equalsIgnoreAsciiCase(), GetNextFontToken(), and nIndex.

◆ StripScriptFromName()

UNOTOOLS_DLLPUBLIC OUString StripScriptFromName ( const OUString &  rName)

Strip any "script font suffix" from the font name.

Related: fdo#49271 RTF files often contain weird-ass Win 3.1/Win95 style fontnames which attempt to put the charset encoding into the filename http://www.webcenter.ru/~kazarn/eng/fonts_ttf.htm

Definition at line 29 of file fontdefs.cxx.

References aName.

◆ UNLESS_MERGELIBS() [1/2]

class UNLESS_MERGELIBS ( UNOTOOLS_DLLPUBLIC  )

Definition at line 45 of file fontdefs.hxx.

◆ UNLESS_MERGELIBS() [2/2]

UNLESS_MERGELIBS ( UNOTOOLS_DLLPUBLIC  ) &

Variable Documentation

◆ rNewToken

std::u16string_view rNewToken

Definition at line 45 of file fontdefs.hxx.

Referenced by AddTokenFontName(), ImplAppendFontToken(), and SvtUserOptions::SetToken().