Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
60e659ae
Kaydet (Commit)
60e659ae
authored
May 04, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert IMPL_FONT_ATTR constants to scoped enum
Change-Id: I2b5986ea69dc09e6ba18b23a80029f6551b48152
üst
96471119
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
168 additions
and
163 deletions
+168
-163
fontcfg.hxx
include/unotools/fontcfg.hxx
+70
-65
fontcfg.cxx
unotools/source/config/fontcfg.cxx
+66
-66
PhysicalFontCollection.hxx
vcl/inc/PhysicalFontCollection.hxx
+1
-1
PhysicalFontFamily.hxx
vcl/inc/PhysicalFontFamily.hxx
+4
-4
PhysicalFontCollection.cxx
vcl/source/font/PhysicalFontCollection.cxx
+0
-0
PhysicalFontFamily.cxx
vcl/source/font/PhysicalFontFamily.cxx
+14
-14
font.cxx
vcl/source/gdi/font.cxx
+12
-12
salgdi3.cxx
vcl/win/source/gdi/salgdi3.cxx
+1
-1
No files found.
include/unotools/fontcfg.hxx
Dosyayı görüntüle @
60e659ae
...
@@ -26,11 +26,74 @@
...
@@ -26,11 +26,74 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <o3tl/typed_flags_set.hxx>
#include <unordered_map>
#include <unordered_map>
#include <unordered_set>
#include <unordered_set>
#include <vector>
#include <vector>
// DEFAULT - Default-Font like Andale Sans UI, Palace Script, Albany, Thorndale, Cumberland, ...
// STANDARD - Standard-Font like Arial, Times, Courier, ...
// NORMAL - normal Font for writing text like Arial, Verdana, Arial Narrow, Trebuchet, Times, Courier, ...
// SYMBOL - Font with symbols
// DECORATIVE - Readable and normally used for drawings
// SPECIAL - very special design
// TITLING - only uppercase characters
// FONT_ATTR_FULL - Font with normally all characters
// CAPITALS - only uppercase characters, but lowercase characters smaller as the uppercase characters
// TYPEWRITER - like a typewriter: Courier, ...
// SCRIPT - Handwriting or Script
// HANDWRITING - More Handwriting with normal letters
// CHANCERY - Like Zapf Chancery
// COMIC - Like Comic Sans MS
// BRUSHSCRIPT - More Script
// OTHERSTYLE - OldStyle, ... so negativ points
enum
class
ImplFontAttrs
:
sal_uLong
{
None
=
0x00000000
,
Default
=
0x00000001
,
Standard
=
0x00000002
,
Normal
=
0x00000004
,
Symbol
=
0x00000008
,
Fixed
=
0x00000010
,
SansSerif
=
0x00000020
,
Serif
=
0x00000040
,
Decorative
=
0x00000080
,
Special
=
0x00000100
,
Italic
=
0x00000200
,
Titling
=
0x00000400
,
Capitals
=
0x00000800
,
CJK
=
0x00001000
,
CJK_JP
=
0x00002000
,
CJK_SC
=
0x00004000
,
CJK_TC
=
0x00008000
,
CJK_KR
=
0x00010000
,
CTL
=
0x00020000
,
NoneLatin
=
0x00040000
,
Full
=
0x00080000
,
Outline
=
0x00100000
,
Shadow
=
0x00200000
,
Rounded
=
0x00400000
,
Typewriter
=
0x00800000
,
Script
=
0x01000000
,
Handwriting
=
0x02000000
,
Chancery
=
0x04000000
,
Comic
=
0x08000000
,
BrushScript
=
0x10000000
,
Gothic
=
0x20000000
,
Schoolbook
=
0x40000000
,
OtherStyle
=
0x80000000
,
CJK_AllLang
=
CJK_JP
|
CJK_SC
|
CJK_TC
|
CJK_KR
,
AllScript
=
Script
|
Handwriting
|
Chancery
|
Comic
|
BrushScript
,
AllSubscript
=
Handwriting
|
Chancery
|
Comic
|
BrushScript
,
AllSerifStyle
=
AllScript
|
SansSerif
|
Serif
|
Fixed
|
Italic
|
Gothic
|
Schoolbook
|
Shadow
|
Outline
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
ImplFontAttrs
>
:
is_typed_flags
<
ImplFontAttrs
,
0xffffffff
>
{};
}
namespace
utl
namespace
utl
{
{
...
@@ -64,74 +127,16 @@ class UNOTOOLS_DLLPUBLIC DefaultFontConfiguration
...
@@ -64,74 +127,16 @@ class UNOTOOLS_DLLPUBLIC DefaultFontConfiguration
OUString
getUserInterfaceFont
(
const
LanguageTag
&
rLanguageTag
)
const
;
OUString
getUserInterfaceFont
(
const
LanguageTag
&
rLanguageTag
)
const
;
};
};
// IMPL_FONT_ATTR_DEFAULT - Default-Font like Andale Sans UI, Palace Script, Albany, Thorndale, Cumberland, ...
// IMPL_FONT_ATTR_STANDARD - Standard-Font like Arial, Times, Courier, ...
// IMPL_FONT_ATTR_NORMAL - normal Font for writing text like Arial, Verdana, Arial Narrow, Trebuchet, Times, Courier, ...
// IMPL_FONT_ATTR_SYMBOL - Font with symbols
// IMPL_FONT_ATTR_DECORATIVE - Readable and normally used for drawings
// IMPL_FONT_ATTR_SPECIAL - very special design
// IMPL_FONT_ATTR_TITLING - only uppercase characters
// IMPL_FONT_ATTR_FULL - Font with normally all characters
// IMPL_FONT_ATTR_CAPITALS - only uppercase characters, but lowercase characters smaller as the uppercase characters
// IMPL_FONT_ATTR_TYPEWRITER - like a typewriter: Courier, ...
// IMPL_FONT_ATTR_SCRIPT - Handwriting or Script
// IMPL_FONT_ATTR_HANDWRITING - More Handwriting with normal letters
// IMPL_FONT_ATTR_CHANCERY - Like Zapf Chancery
// IMPL_FONT_ATTR_COMIC - Like Comic Sans MS
// IMPL_FONT_ATTR_BRUSHSCRIPT - More Script
// IMPL_FONT_ATTR_OTHERSTYLE - OldStyle, ... so negativ points
#define IMPL_FONT_ATTR_DEFAULT ((sal_uLong)0x00000001)
#define IMPL_FONT_ATTR_STANDARD ((sal_uLong)0x00000002)
#define IMPL_FONT_ATTR_NORMAL ((sal_uLong)0x00000004)
#define IMPL_FONT_ATTR_SYMBOL ((sal_uLong)0x00000008)
#define IMPL_FONT_ATTR_FIXED ((sal_uLong)0x00000010)
#define IMPL_FONT_ATTR_SANSSERIF ((sal_uLong)0x00000020)
#define IMPL_FONT_ATTR_SERIF ((sal_uLong)0x00000040)
#define IMPL_FONT_ATTR_DECORATIVE ((sal_uLong)0x00000080)
#define IMPL_FONT_ATTR_SPECIAL ((sal_uLong)0x00000100)
#define IMPL_FONT_ATTR_ITALIC ((sal_uLong)0x00000200)
#define IMPL_FONT_ATTR_TITLING ((sal_uLong)0x00000400)
#define IMPL_FONT_ATTR_CAPITALS ((sal_uLong)0x00000800)
#define IMPL_FONT_ATTR_CJK ((sal_uLong)0x00001000)
#define IMPL_FONT_ATTR_CJK_JP ((sal_uLong)0x00002000)
#define IMPL_FONT_ATTR_CJK_SC ((sal_uLong)0x00004000)
#define IMPL_FONT_ATTR_CJK_TC ((sal_uLong)0x00008000)
#define IMPL_FONT_ATTR_CJK_KR ((sal_uLong)0x00010000)
#define IMPL_FONT_ATTR_CTL ((sal_uLong)0x00020000)
#define IMPL_FONT_ATTR_NONELATIN ((sal_uLong)0x00040000)
#define IMPL_FONT_ATTR_FULL ((sal_uLong)0x00080000)
#define IMPL_FONT_ATTR_OUTLINE ((sal_uLong)0x00100000)
#define IMPL_FONT_ATTR_SHADOW ((sal_uLong)0x00200000)
#define IMPL_FONT_ATTR_ROUNDED ((sal_uLong)0x00400000)
#define IMPL_FONT_ATTR_TYPEWRITER ((sal_uLong)0x00800000)
#define IMPL_FONT_ATTR_SCRIPT ((sal_uLong)0x01000000)
#define IMPL_FONT_ATTR_HANDWRITING ((sal_uLong)0x02000000)
#define IMPL_FONT_ATTR_CHANCERY ((sal_uLong)0x04000000)
#define IMPL_FONT_ATTR_COMIC ((sal_uLong)0x08000000)
#define IMPL_FONT_ATTR_BRUSHSCRIPT ((sal_uLong)0x10000000)
#define IMPL_FONT_ATTR_GOTHIC ((sal_uLong)0x20000000)
#define IMPL_FONT_ATTR_SCHOOLBOOK ((sal_uLong)0x40000000)
#define IMPL_FONT_ATTR_OTHERSTYLE ((sal_uLong)0x80000000)
#define IMPL_FONT_ATTR_CJK_ALLLANG (IMPL_FONT_ATTR_CJK_JP | IMPL_FONT_ATTR_CJK_SC | IMPL_FONT_ATTR_CJK_TC | IMPL_FONT_ATTR_CJK_KR)
#define IMPL_FONT_ATTR_ALLSCRIPT (IMPL_FONT_ATTR_SCRIPT | IMPL_FONT_ATTR_HANDWRITING | IMPL_FONT_ATTR_CHANCERY | IMPL_FONT_ATTR_COMIC | IMPL_FONT_ATTR_BRUSHSCRIPT)
#define IMPL_FONT_ATTR_ALLSUBSCRIPT (IMPL_FONT_ATTR_HANDWRITING | IMPL_FONT_ATTR_CHANCERY | IMPL_FONT_ATTR_COMIC | IMPL_FONT_ATTR_BRUSHSCRIPT)
#define IMPL_FONT_ATTR_ALLSERIFSTYLE (IMPL_FONT_ATTR_ALLSCRIPT |\
IMPL_FONT_ATTR_SANSSERIF | IMPL_FONT_ATTR_SERIF |\
IMPL_FONT_ATTR_FIXED | IMPL_FONT_ATTR_ITALIC |\
IMPL_FONT_ATTR_GOTHIC | IMPL_FONT_ATTR_SCHOOLBOOK |\
IMPL_FONT_ATTR_SHADOW | IMPL_FONT_ATTR_OUTLINE)
struct
UNOTOOLS_DLLPUBLIC
FontNameAttr
struct
UNOTOOLS_DLLPUBLIC
FontNameAttr
{
{
OUString
Name
;
OUString
Name
;
::
std
::
vector
<
OUString
>
Substitutions
;
::
std
::
vector
<
OUString
>
Substitutions
;
::
std
::
vector
<
OUString
>
MSSubstitutions
;
::
std
::
vector
<
OUString
>
MSSubstitutions
;
::
std
::
vector
<
OUString
>
PSSubstitutions
;
::
std
::
vector
<
OUString
>
PSSubstitutions
;
::
std
::
vector
<
OUString
>
HTMLSubstitutions
;
::
std
::
vector
<
OUString
>
HTMLSubstitutions
;
FontWeight
Weight
;
FontWeight
Weight
;
FontWidth
Width
;
FontWidth
Width
;
unsigned
long
Type
;
// bitfield of IMPL_FONT_ATTR_*
ImplFontAttrs
Type
;
};
};
class
UNOTOOLS_DLLPUBLIC
FontSubstConfiguration
class
UNOTOOLS_DLLPUBLIC
FontSubstConfiguration
...
@@ -164,7 +169,7 @@ private:
...
@@ -164,7 +169,7 @@ private:
const
OUString
&
rType
)
const
;
const
OUString
&
rType
)
const
;
FontWidth
getSubstWidth
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XNameAccess
>&
rFont
,
FontWidth
getSubstWidth
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XNameAccess
>&
rFont
,
const
OUString
&
rType
)
const
;
const
OUString
&
rType
)
const
;
unsigned
long
getSubstType
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XNameAccess
>&
rFont
,
ImplFontAttrs
getSubstType
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XNameAccess
>&
rFont
,
const
OUString
&
rType
)
const
;
const
OUString
&
rType
)
const
;
void
readLocaleSubst
(
const
OUString
&
rBcp47
)
const
;
void
readLocaleSubst
(
const
OUString
&
rBcp47
)
const
;
public
:
public
:
...
@@ -177,7 +182,7 @@ public:
...
@@ -177,7 +182,7 @@ public:
const
OUString
&
rFontName
,
const
OUString
&
rFontName
,
const
LanguageTag
&
rLanguageTag
=
LanguageTag
(
OUString
(
"en"
))
const
LanguageTag
&
rLanguageTag
=
LanguageTag
(
OUString
(
"en"
))
)
const
;
)
const
;
static
void
getMapName
(
const
OUString
&
rOrgName
,
OUString
&
rShortName
,
OUString
&
rFamilyName
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
sal_uLong
&
rType
);
static
void
getMapName
(
const
OUString
&
rOrgName
,
OUString
&
rShortName
,
OUString
&
rFamilyName
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
ImplFontAttrs
&
rType
);
};
};
}
// namespace utl
}
// namespace utl
...
...
unotools/source/config/fontcfg.cxx
Dosyayı görüntüle @
60e659ae
...
@@ -554,71 +554,71 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] =
...
@@ -554,71 +554,71 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] =
struct
ImplFontAttrTypeSearchData
struct
ImplFontAttrTypeSearchData
{
{
const
char
*
mpStr
;
const
char
*
mpStr
;
sal_uLong
mnType
;
ImplFontAttrs
mnType
;
};
};
static
ImplFontAttrTypeSearchData
const
aImplTypeAttrSearchList
[]
=
static
ImplFontAttrTypeSearchData
const
aImplTypeAttrSearchList
[]
=
{
{
{
"monotype"
,
0
},
{
"monotype"
,
ImplFontAttrs
::
None
},
{
"linotype"
,
0
},
{
"linotype"
,
ImplFontAttrs
::
None
},
{
"titling"
,
I
MPL_FONT_ATTR_TITLING
},
{
"titling"
,
I
mplFontAttrs
::
Titling
},
{
"captitals"
,
I
MPL_FONT_ATTR_CAPITALS
},
{
"captitals"
,
I
mplFontAttrs
::
Capitals
},
{
"captital"
,
I
MPL_FONT_ATTR_CAPITALS
},
{
"captital"
,
I
mplFontAttrs
::
Capitals
},
{
"caps"
,
I
MPL_FONT_ATTR_CAPITALS
},
{
"caps"
,
I
mplFontAttrs
::
Capitals
},
{
"italic"
,
I
MPL_FONT_ATTR_ITALIC
},
{
"italic"
,
I
mplFontAttrs
::
Italic
},
{
"oblique"
,
I
MPL_FONT_ATTR_ITALIC
},
{
"oblique"
,
I
mplFontAttrs
::
Italic
},
{
"rounded"
,
I
MPL_FONT_ATTR_ROUNDED
},
{
"rounded"
,
I
mplFontAttrs
::
Rounded
},
{
"outline"
,
I
MPL_FONT_ATTR_OUTLINE
},
{
"outline"
,
I
mplFontAttrs
::
Outline
},
{
"shadow"
,
I
MPL_FONT_ATTR_SHADOW
},
{
"shadow"
,
I
mplFontAttrs
::
Shadow
},
{
"handwriting"
,
I
MPL_FONT_ATTR_HANDWRITING
|
IMPL_FONT_ATTR_SCRIPT
},
{
"handwriting"
,
I
mplFontAttrs
::
Handwriting
|
ImplFontAttrs
::
Script
},
{
"hand"
,
I
MPL_FONT_ATTR_HANDWRITING
|
IMPL_FONT_ATTR_SCRIPT
},
{
"hand"
,
I
mplFontAttrs
::
Handwriting
|
ImplFontAttrs
::
Script
},
{
"signet"
,
I
MPL_FONT_ATTR_HANDWRITING
|
IMPL_FONT_ATTR_SCRIPT
},
{
"signet"
,
I
mplFontAttrs
::
Handwriting
|
ImplFontAttrs
::
Script
},
{
"script"
,
I
MPL_FONT_ATTR_BRUSHSCRIPT
|
IMPL_FONT_ATTR_SCRIPT
},
{
"script"
,
I
mplFontAttrs
::
BrushScript
|
ImplFontAttrs
::
Script
},
{
"calligraphy"
,
I
MPL_FONT_ATTR_CHANCERY
|
IMPL_FONT_ATTR_SCRIPT
},
{
"calligraphy"
,
I
mplFontAttrs
::
Chancery
|
ImplFontAttrs
::
Script
},
{
"chancery"
,
I
MPL_FONT_ATTR_CHANCERY
|
IMPL_FONT_ATTR_SCRIPT
},
{
"chancery"
,
I
mplFontAttrs
::
Chancery
|
ImplFontAttrs
::
Script
},
{
"corsiva"
,
I
MPL_FONT_ATTR_CHANCERY
|
IMPL_FONT_ATTR_SCRIPT
},
{
"corsiva"
,
I
mplFontAttrs
::
Chancery
|
ImplFontAttrs
::
Script
},
{
"gothic"
,
I
MPL_FONT_ATTR_SANSSERIF
|
IMPL_FONT_ATTR_GOTHIC
},
{
"gothic"
,
I
mplFontAttrs
::
SansSerif
|
ImplFontAttrs
::
Gothic
},
{
"schoolbook"
,
I
MPL_FONT_ATTR_SERIF
|
IMPL_FONT_ATTR_SCHOOLBOOK
},
{
"schoolbook"
,
I
mplFontAttrs
::
Serif
|
ImplFontAttrs
::
Schoolbook
},
{
"schlbk"
,
I
MPL_FONT_ATTR_SERIF
|
IMPL_FONT_ATTR_SCHOOLBOOK
},
{
"schlbk"
,
I
mplFontAttrs
::
Serif
|
ImplFontAttrs
::
Schoolbook
},
{
"typewriter"
,
I
MPL_FONT_ATTR_TYPEWRITER
|
IMPL_FONT_ATTR_FIXED
},
{
"typewriter"
,
I
mplFontAttrs
::
Typewriter
|
ImplFontAttrs
::
Fixed
},
{
"lineprinter"
,
I
MPL_FONT_ATTR_TYPEWRITER
|
IMPL_FONT_ATTR_FIXED
},
{
"lineprinter"
,
I
mplFontAttrs
::
Typewriter
|
ImplFontAttrs
::
Fixed
},
{
"monospaced"
,
I
MPL_FONT_ATTR_FIXED
},
{
"monospaced"
,
I
mplFontAttrs
::
Fixed
},
{
"monospace"
,
I
MPL_FONT_ATTR_FIXED
},
{
"monospace"
,
I
mplFontAttrs
::
Fixed
},
{
"mono"
,
I
MPL_FONT_ATTR_FIXED
},
{
"mono"
,
I
mplFontAttrs
::
Fixed
},
{
"fixed"
,
I
MPL_FONT_ATTR_FIXED
},
{
"fixed"
,
I
mplFontAttrs
::
Fixed
},
{
"sansserif"
,
I
MPL_FONT_ATTR_SANSSERIF
},
{
"sansserif"
,
I
mplFontAttrs
::
SansSerif
},
{
"sans"
,
I
MPL_FONT_ATTR_SANSSERIF
},
{
"sans"
,
I
mplFontAttrs
::
SansSerif
},
{
"swiss"
,
I
MPL_FONT_ATTR_SANSSERIF
},
{
"swiss"
,
I
mplFontAttrs
::
SansSerif
},
{
"serif"
,
I
MPL_FONT_ATTR_SERIF
},
{
"serif"
,
I
mplFontAttrs
::
Serif
},
{
"bright"
,
I
MPL_FONT_ATTR_SERIF
},
{
"bright"
,
I
mplFontAttrs
::
Serif
},
{
"symbols"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"symbols"
,
I
mplFontAttrs
::
Symbol
},
{
"symbol"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"symbol"
,
I
mplFontAttrs
::
Symbol
},
{
"dingbats"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"dingbats"
,
I
mplFontAttrs
::
Symbol
},
{
"dings"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"dings"
,
I
mplFontAttrs
::
Symbol
},
{
"ding"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"ding"
,
I
mplFontAttrs
::
Symbol
},
{
"bats"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"bats"
,
I
mplFontAttrs
::
Symbol
},
{
"math"
,
I
MPL_FONT_ATTR_SYMBOL
},
{
"math"
,
I
mplFontAttrs
::
Symbol
},
{
"oldstyle"
,
I
MPL_FONT_ATTR_OTHERSTYLE
},
{
"oldstyle"
,
I
mplFontAttrs
::
OtherStyle
},
{
"oldface"
,
I
MPL_FONT_ATTR_OTHERSTYLE
},
{
"oldface"
,
I
mplFontAttrs
::
OtherStyle
},
{
"old"
,
I
MPL_FONT_ATTR_OTHERSTYLE
},
{
"old"
,
I
mplFontAttrs
::
OtherStyle
},
{
"new"
,
0
},
{
"new"
,
ImplFontAttrs
::
None
},
{
"modern"
,
0
},
{
"modern"
,
ImplFontAttrs
::
None
},
{
"lucida"
,
0
},
{
"lucida"
,
ImplFontAttrs
::
None
},
{
"regular"
,
0
},
{
"regular"
,
ImplFontAttrs
::
None
},
{
"extended"
,
0
},
{
"extended"
,
ImplFontAttrs
::
None
},
{
"extra"
,
I
MPL_FONT_ATTR_OTHERSTYLE
},
{
"extra"
,
I
mplFontAttrs
::
OtherStyle
},
{
"ext"
,
0
},
{
"ext"
,
ImplFontAttrs
::
None
},
{
"scalable"
,
0
},
{
"scalable"
,
ImplFontAttrs
::
None
},
{
"scale"
,
0
},
{
"scale"
,
ImplFontAttrs
::
None
},
{
"nimbus"
,
0
},
{
"nimbus"
,
ImplFontAttrs
::
None
},
{
"adobe"
,
0
},
{
"adobe"
,
ImplFontAttrs
::
None
},
{
"itc"
,
0
},
{
"itc"
,
ImplFontAttrs
::
None
},
{
"amt"
,
0
},
{
"amt"
,
ImplFontAttrs
::
None
},
{
"mt"
,
0
},
{
"mt"
,
ImplFontAttrs
::
None
},
{
"ms"
,
0
},
{
"ms"
,
ImplFontAttrs
::
None
},
{
"cpi"
,
0
},
{
"cpi"
,
ImplFontAttrs
::
None
},
{
"no"
,
0
},
{
"no"
,
ImplFontAttrs
::
None
},
{
NULL
,
0
},
{
NULL
,
ImplFontAttrs
::
None
},
};
};
static
bool
ImplKillLeading
(
OUString
&
rName
,
const
char
*
const
*
ppStr
)
static
bool
ImplKillLeading
(
OUString
&
rName
,
const
char
*
const
*
ppStr
)
...
@@ -723,7 +723,7 @@ static bool ImplFindAndErase( OUString& rName, const char* pStr )
...
@@ -723,7 +723,7 @@ static bool ImplFindAndErase( OUString& rName, const char* pStr )
void
FontSubstConfiguration
::
getMapName
(
const
OUString
&
rOrgName
,
OUString
&
rShortName
,
void
FontSubstConfiguration
::
getMapName
(
const
OUString
&
rOrgName
,
OUString
&
rShortName
,
OUString
&
rFamilyName
,
FontWeight
&
rWeight
,
OUString
&
rFamilyName
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
sal_uLong
&
rType
)
FontWidth
&
rWidth
,
ImplFontAttrs
&
rType
)
{
{
rShortName
=
rOrgName
;
rShortName
=
rOrgName
;
...
@@ -767,7 +767,7 @@ void FontSubstConfiguration::getMapName( const OUString& rOrgName, OUString& rSh
...
@@ -767,7 +767,7 @@ void FontSubstConfiguration::getMapName( const OUString& rOrgName, OUString& rSh
}
}
// Type
// Type
rType
=
0
;
rType
=
ImplFontAttrs
::
None
;
const
ImplFontAttrTypeSearchData
*
pTypeList
=
aImplTypeAttrSearchList
;
const
ImplFontAttrTypeSearchData
*
pTypeList
=
aImplTypeAttrSearchList
;
while
(
pTypeList
->
mpStr
)
while
(
pTypeList
->
mpStr
)
{
{
...
@@ -983,10 +983,10 @@ FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Refe
...
@@ -983,10 +983,10 @@ FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Refe
return
(
FontWidth
)(
width
>=
0
?
pWidthNames
[
width
].
nEnum
:
WIDTH_DONTKNOW
);
return
(
FontWidth
)(
width
>=
0
?
pWidthNames
[
width
].
nEnum
:
WIDTH_DONTKNOW
);
}
}
unsigned
long
FontSubstConfiguration
::
getSubstType
(
const
com
::
sun
::
star
::
uno
::
Reference
<
XNameAccess
>&
rFont
,
ImplFontAttrs
FontSubstConfiguration
::
getSubstType
(
const
com
::
sun
::
star
::
uno
::
Reference
<
XNameAccess
>&
rFont
,
const
OUString
&
rType
)
const
const
OUString
&
rType
)
const
{
{
unsigned
l
ong
type
=
0
;
sal_uL
ong
type
=
0
;
try
try
{
{
Any
aAny
=
rFont
->
getByName
(
rType
);
Any
aAny
=
rFont
->
getByName
(
rType
);
...
@@ -1016,7 +1016,7 @@ unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::R
...
@@ -1016,7 +1016,7 @@ unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::R
{
{
}
}
return
type
;
return
static_cast
<
ImplFontAttrs
>
(
type
)
;
}
}
void
FontSubstConfiguration
::
readLocaleSubst
(
const
OUString
&
rBcp47
)
const
void
FontSubstConfiguration
::
readLocaleSubst
(
const
OUString
&
rBcp47
)
const
...
...
vcl/inc/PhysicalFontCollection.hxx
Dosyayı görüntüle @
60e659ae
...
@@ -80,7 +80,7 @@ protected:
...
@@ -80,7 +80,7 @@ protected:
PhysicalFontFamily
*
ImplFindByAliasName
(
const
OUString
&
rSearchName
,
PhysicalFontFamily
*
ImplFindByAliasName
(
const
OUString
&
rSearchName
,
const
OUString
&
rShortName
)
const
;
const
OUString
&
rShortName
)
const
;
PhysicalFontFamily
*
ImplFindBySubstFontAttr
(
const
utl
::
FontNameAttr
&
)
const
;
PhysicalFontFamily
*
ImplFindBySubstFontAttr
(
const
utl
::
FontNameAttr
&
)
const
;
PhysicalFontFamily
*
ImplFindByAttributes
(
sal_uLong
nSearchType
,
FontWeight
,
FontWidth
,
PhysicalFontFamily
*
ImplFindByAttributes
(
ImplFontAttrs
nSearchType
,
FontWeight
,
FontWidth
,
FontItalic
,
const
OUString
&
rSearchFamily
)
const
;
FontItalic
,
const
OUString
&
rSearchFamily
)
const
;
PhysicalFontFamily
*
FindDefaultFont
()
const
;
PhysicalFontFamily
*
FindDefaultFont
()
const
;
...
...
vcl/inc/PhysicalFontFamily.hxx
Dosyayı görüntüle @
60e659ae
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
class
PhysicalFontFace
;
class
PhysicalFontFace
;
class
PhysicalFontCollection
;
class
PhysicalFontCollection
;
// flags for mn
MatchType
member
// flags for mn
TypeFaces
member
#define FONT_FAMILY_SCALABLE (1<<0)
#define FONT_FAMILY_SCALABLE (1<<0)
#define FONT_FAMILY_SYMBOL (1<<1)
#define FONT_FAMILY_SYMBOL (1<<1)
#define FONT_FAMILY_NONESYMBOL (1<<2)
#define FONT_FAMILY_NONESYMBOL (1<<2)
...
@@ -49,7 +49,7 @@ public:
...
@@ -49,7 +49,7 @@ public:
const
OUString
&
GetSearchName
()
const
{
return
maSearchName
;
}
const
OUString
&
GetSearchName
()
const
{
return
maSearchName
;
}
const
OUString
&
GetAliasNames
()
const
{
return
maMapNames
;
}
const
OUString
&
GetAliasNames
()
const
{
return
maMapNames
;
}
const
OUString
&
GetMatchFamilyName
()
const
{
return
maMatchFamilyName
;
}
const
OUString
&
GetMatchFamilyName
()
const
{
return
maMatchFamilyName
;
}
sal_uLong
GetMatchType
()
const
{
return
mnMatchType
;
}
ImplFontAttrs
GetMatchType
()
const
{
return
mnMatchType
;
}
FontWeight
GetMatchWeight
()
const
{
return
meMatchWeight
;
}
FontWeight
GetMatchWeight
()
const
{
return
meMatchWeight
;
}
FontWidth
GetMatchWidth
()
const
{
return
meMatchWidth
;
}
FontWidth
GetMatchWidth
()
const
{
return
meMatchWidth
;
}
bool
IsScalable
()
const
{
return
mpFirst
->
IsScalable
();
}
bool
IsScalable
()
const
{
return
mpFirst
->
IsScalable
();
}
...
@@ -65,7 +65,7 @@ public:
...
@@ -65,7 +65,7 @@ public:
void
UpdateCloneFontList
(
PhysicalFontCollection
&
,
void
UpdateCloneFontList
(
PhysicalFontCollection
&
,
bool
bScalable
,
bool
bEmbeddable
)
const
;
bool
bScalable
,
bool
bEmbeddable
)
const
;
static
void
CalcType
(
sal_uLong
&
rType
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
static
void
CalcType
(
ImplFontAttrs
&
rType
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
FontFamily
eFamily
,
const
utl
::
FontNameAttr
*
pFontAttr
);
FontFamily
eFamily
,
const
utl
::
FontNameAttr
*
pFontAttr
);
private
:
private
:
...
@@ -74,7 +74,7 @@ private:
...
@@ -74,7 +74,7 @@ private:
OUString
maSearchName
;
// normalized font family name
OUString
maSearchName
;
// normalized font family name
OUString
maMapNames
;
// fontname aliases
OUString
maMapNames
;
// fontname aliases
int
mnTypeFaces
;
// Typeface Flags
int
mnTypeFaces
;
// Typeface Flags
sal_uLong
mnMatchType
;
// MATCH - Type
ImplFontAttrs
mnMatchType
;
// MATCH - Type
OUString
maMatchFamilyName
;
// MATCH - FamilyName
OUString
maMatchFamilyName
;
// MATCH - FamilyName
FontWeight
meMatchWeight
;
// MATCH - Weight
FontWeight
meMatchWeight
;
// MATCH - Weight
FontWidth
meMatchWidth
;
// MATCH - Width
FontWidth
meMatchWidth
;
// MATCH - Width
...
...
vcl/source/font/PhysicalFontCollection.cxx
Dosyayı görüntüle @
60e659ae
This diff is collapsed.
Click to expand it.
vcl/source/font/PhysicalFontFamily.cxx
Dosyayı görüntüle @
60e659ae
...
@@ -27,21 +27,21 @@
...
@@ -27,21 +27,21 @@
#include "PhysicalFontFamily.hxx"
#include "PhysicalFontFamily.hxx"
void
PhysicalFontFamily
::
CalcType
(
sal_uLong
&
rType
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
void
PhysicalFontFamily
::
CalcType
(
ImplFontAttrs
&
rType
,
FontWeight
&
rWeight
,
FontWidth
&
rWidth
,
FontFamily
eFamily
,
const
utl
::
FontNameAttr
*
pFontAttr
)
FontFamily
eFamily
,
const
utl
::
FontNameAttr
*
pFontAttr
)
{
{
if
(
eFamily
!=
FAMILY_DONTKNOW
)
if
(
eFamily
!=
FAMILY_DONTKNOW
)
{
{
if
(
eFamily
==
FAMILY_SWISS
)
if
(
eFamily
==
FAMILY_SWISS
)
rType
|=
I
MPL_FONT_ATTR_SANSSERIF
;
rType
|=
I
mplFontAttrs
::
SansSerif
;
else
if
(
eFamily
==
FAMILY_ROMAN
)
else
if
(
eFamily
==
FAMILY_ROMAN
)
rType
|=
I
MPL_FONT_ATTR_SERIF
;
rType
|=
I
mplFontAttrs
::
Serif
;
else
if
(
eFamily
==
FAMILY_SCRIPT
)
else
if
(
eFamily
==
FAMILY_SCRIPT
)
rType
|=
I
MPL_FONT_ATTR_SCRIPT
;
rType
|=
I
mplFontAttrs
::
Script
;
else
if
(
eFamily
==
FAMILY_MODERN
)
else
if
(
eFamily
==
FAMILY_MODERN
)
rType
|=
I
MPL_FONT_ATTR_FIXED
;
rType
|=
I
mplFontAttrs
::
Fixed
;
else
if
(
eFamily
==
FAMILY_DECORATIVE
)
else
if
(
eFamily
==
FAMILY_DECORATIVE
)
rType
|=
I
MPL_FONT_ATTR_DECORATIVE
;
rType
|=
I
mplFontAttrs
::
Decorative
;
}
}
if
(
pFontAttr
)
if
(
pFontAttr
)
...
@@ -57,7 +57,7 @@ void PhysicalFontFamily::CalcType( sal_uLong& rType, FontWeight& rWeight, FontWi
...
@@ -57,7 +57,7 @@ void PhysicalFontFamily::CalcType( sal_uLong& rType, FontWeight& rWeight, FontWi
}
}
}
}
static
unsigned
lcl_IsCJKFont
(
const
OUString
&
rFontName
)
static
ImplFontAttrs
lcl_IsCJKFont
(
const
OUString
&
rFontName
)
{
{
// Test, if Fontname includes CJK characters --> In this case we
// Test, if Fontname includes CJK characters --> In this case we
// mention that it is a CJK font
// mention that it is a CJK font
...
@@ -67,33 +67,33 @@ static unsigned lcl_IsCJKFont( const OUString& rFontName )
...
@@ -67,33 +67,33 @@ static unsigned lcl_IsCJKFont( const OUString& rFontName )
// japanese
// japanese
if
(
((
ch
>=
0x3040
)
&&
(
ch
<=
0x30FF
))
||
if
(
((
ch
>=
0x3040
)
&&
(
ch
<=
0x30FF
))
||
((
ch
>=
0x3190
)
&&
(
ch
<=
0x319F
))
)
((
ch
>=
0x3190
)
&&
(
ch
<=
0x319F
))
)
return
I
MPL_FONT_ATTR_CJK
|
IMPL_FONT_ATTR_
CJK_JP
;
return
I
mplFontAttrs
::
CJK
|
ImplFontAttrs
::
CJK_JP
;
// korean
// korean
if
(
((
ch
>=
0xAC00
)
&&
(
ch
<=
0xD7AF
))
||
if
(
((
ch
>=
0xAC00
)
&&
(
ch
<=
0xD7AF
))
||
((
ch
>=
0x3130
)
&&
(
ch
<=
0x318F
))
||
((
ch
>=
0x3130
)
&&
(
ch
<=
0x318F
))
||
((
ch
>=
0x1100
)
&&
(
ch
<=
0x11FF
))
)
((
ch
>=
0x1100
)
&&
(
ch
<=
0x11FF
))
)
return
I
MPL_FONT_ATTR_CJK
|
IMPL_FONT_ATTR_
CJK_KR
;
return
I
mplFontAttrs
::
CJK
|
ImplFontAttrs
::
CJK_KR
;
// chinese
// chinese
if
(
((
ch
>=
0x3400
)
&&
(
ch
<=
0x9FFF
))
)
if
(
((
ch
>=
0x3400
)
&&
(
ch
<=
0x9FFF
))
)
return
I
MPL_FONT_ATTR_CJK
|
IMPL_FONT_ATTR_CJK_TC
|
IMPL_FONT_ATTR_
CJK_SC
;
return
I
mplFontAttrs
::
CJK
|
ImplFontAttrs
::
CJK_TC
|
ImplFontAttrs
::
CJK_SC
;
// cjk
// cjk
if
(
((
ch
>=
0x3000
)
&&
(
ch
<=
0xD7AF
))
||
if
(
((
ch
>=
0x3000
)
&&
(
ch
<=
0xD7AF
))
||
((
ch
>=
0xFF00
)
&&
(
ch
<=
0xFFEE
))
)
((
ch
>=
0xFF00
)
&&
(
ch
<=
0xFFEE
))
)
return
I
MPL_FONT_ATTR_
CJK
;
return
I
mplFontAttrs
::
CJK
;
}
}
return
0
;
return
ImplFontAttrs
::
None
;
}
}
PhysicalFontFamily
::
PhysicalFontFamily
(
const
OUString
&
rSearchName
)
PhysicalFontFamily
::
PhysicalFontFamily
(
const
OUString
&
rSearchName
)
:
mpFirst
(
NULL
),
:
mpFirst
(
NULL
),
maSearchName
(
rSearchName
),
maSearchName
(
rSearchName
),
mnTypeFaces
(
0
),
mnTypeFaces
(
0
),
mnMatchType
(
0
),
mnMatchType
(
ImplFontAttrs
::
None
),
meMatchWeight
(
WEIGHT_DONTKNOW
),
meMatchWeight
(
WEIGHT_DONTKNOW
),
meMatchWidth
(
WIDTH_DONTKNOW
),
meMatchWidth
(
WIDTH_DONTKNOW
),
meFamily
(
FAMILY_DONTKNOW
),
meFamily
(
FAMILY_DONTKNOW
),
...
@@ -161,7 +161,7 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewData )
...
@@ -161,7 +161,7 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewData )
if
(
(
meMatchWeight
==
WEIGHT_DONTKNOW
)
if
(
(
meMatchWeight
==
WEIGHT_DONTKNOW
)
||
(
meMatchWidth
==
WIDTH_DONTKNOW
)
||
(
meMatchWidth
==
WIDTH_DONTKNOW
)
||
(
mnMatchType
==
0
)
)
||
(
mnMatchType
==
ImplFontAttrs
::
None
)
)
{
{
// TODO: is it cheaper to calc matching attributes now or on demand?
// TODO: is it cheaper to calc matching attributes now or on demand?
// calc matching attributes if other entries are already initialized
// calc matching attributes if other entries are already initialized
...
...
vcl/source/gdi/font.cxx
Dosyayı görüntüle @
60e659ae
...
@@ -152,7 +152,7 @@ void Impl_Font::AskConfig()
...
@@ -152,7 +152,7 @@ void Impl_Font::AskConfig()
OUString
aShortName
;
OUString
aShortName
;
OUString
aFamilyName
;
OUString
aFamilyName
;
sal_uLong
nType
=
0
;
ImplFontAttrs
nType
=
ImplFontAttrs
::
None
;
FontWeight
eWeight
=
WEIGHT_DONTKNOW
;
FontWeight
eWeight
=
WEIGHT_DONTKNOW
;
FontWidth
eWidthType
=
WIDTH_DONTKNOW
;
FontWidth
eWidthType
=
WIDTH_DONTKNOW
;
OUString
aMapName
=
GetEnglishSearchFontName
(
maFamilyName
);
OUString
aMapName
=
GetEnglishSearchFontName
(
maFamilyName
);
...
@@ -172,21 +172,21 @@ void Impl_Font::AskConfig()
...
@@ -172,21 +172,21 @@ void Impl_Font::AskConfig()
// the font was found in the configuration
// the font was found in the configuration
if
(
meFamily
==
FAMILY_DONTKNOW
)
if
(
meFamily
==
FAMILY_DONTKNOW
)
{
{
if
(
pFontAttr
->
Type
&
I
MPL_FONT_ATTR_SERIF
)
if
(
pFontAttr
->
Type
&
I
mplFontAttrs
::
Serif
)
meFamily
=
FAMILY_ROMAN
;
meFamily
=
FAMILY_ROMAN
;
else
if
(
pFontAttr
->
Type
&
I
MPL_FONT_ATTR_SANSSERIF
)
else
if
(
pFontAttr
->
Type
&
I
mplFontAttrs
::
SansSerif
)
meFamily
=
FAMILY_SWISS
;
meFamily
=
FAMILY_SWISS
;
else
if
(
pFontAttr
->
Type
&
I
MPL_FONT_ATTR_TYPEWRITER
)
else
if
(
pFontAttr
->
Type
&
I
mplFontAttrs
::
Typewriter
)
meFamily
=
FAMILY_MODERN
;
meFamily
=
FAMILY_MODERN
;
else
if
(
pFontAttr
->
Type
&
I
MPL_FONT_ATTR_ITALIC
)
else
if
(
pFontAttr
->
Type
&
I
mplFontAttrs
::
Italic
)
meFamily
=
FAMILY_SCRIPT
;
meFamily
=
FAMILY_SCRIPT
;
else
if
(
pFontAttr
->
Type
&
I
MPL_FONT_ATTR_DECORATIVE
)
else
if
(
pFontAttr
->
Type
&
I
mplFontAttrs
::
Decorative
)
meFamily
=
FAMILY_DECORATIVE
;
meFamily
=
FAMILY_DECORATIVE
;
}
}
if
(
mePitch
==
PITCH_DONTKNOW
)
if
(
mePitch
==
PITCH_DONTKNOW
)
{
{
if
(
pFontAttr
->
Type
&
I
MPL_FONT_ATTR_FIXED
)
if
(
pFontAttr
->
Type
&
I
mplFontAttrs
::
Fixed
)
mePitch
=
PITCH_FIXED
;
mePitch
=
PITCH_FIXED
;
}
}
}
}
...
@@ -194,15 +194,15 @@ void Impl_Font::AskConfig()
...
@@ -194,15 +194,15 @@ void Impl_Font::AskConfig()
// if some attributes are still unknown then use the FontSubst magic
// if some attributes are still unknown then use the FontSubst magic
if
(
meFamily
==
FAMILY_DONTKNOW
)
if
(
meFamily
==
FAMILY_DONTKNOW
)
{
{
if
(
nType
&
I
MPL_FONT_ATTR_SERIF
)
if
(
nType
&
I
mplFontAttrs
::
Serif
)
meFamily
=
FAMILY_ROMAN
;
meFamily
=
FAMILY_ROMAN
;
else
if
(
nType
&
I
MPL_FONT_ATTR_SANSSERIF
)
else
if
(
nType
&
I
mplFontAttrs
::
SansSerif
)
meFamily
=
FAMILY_SWISS
;
meFamily
=
FAMILY_SWISS
;
else
if
(
nType
&
I
MPL_FONT_ATTR_TYPEWRITER
)
else
if
(
nType
&
I
mplFontAttrs
::
Typewriter
)
meFamily
=
FAMILY_MODERN
;
meFamily
=
FAMILY_MODERN
;
else
if
(
nType
&
I
MPL_FONT_ATTR_ITALIC
)
else
if
(
nType
&
I
mplFontAttrs
::
Italic
)
meFamily
=
FAMILY_SCRIPT
;
meFamily
=
FAMILY_SCRIPT
;
else
if
(
nType
&
I
MPL_FONT_ATTR_DECORATIVE
)
else
if
(
nType
&
I
mplFontAttrs
::
Decorative
)
meFamily
=
FAMILY_DECORATIVE
;
meFamily
=
FAMILY_DECORATIVE
;
}
}
...
...
vcl/win/source/gdi/salgdi3.cxx
Dosyayı görüntüle @
60e659ae
...
@@ -543,7 +543,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon
...
@@ -543,7 +543,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon
}
}
// are the missing characters symbols?
// are the missing characters symbols?
pFontFamily
=
pFontCollection
->
ImplFindByAttributes
(
I
MPL_FONT_ATTR_SYMBOL
,
pFontFamily
=
pFontCollection
->
ImplFindByAttributes
(
I
mplFontAttrs
::
Symbol
,
rFontSelData
.
GetWeight
(),
rFontSelData
.
GetWeight
(),
rFontSelData
.
GetWidthType
(),
rFontSelData
.
GetWidthType
(),
rFontSelData
.
GetSlant
(),
rFontSelData
.
GetSlant
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment