22#include <rtl/ustring.hxx>
38 rType |= ImplFontAttrs::SansSerif;
40 rType |= ImplFontAttrs::Serif;
42 rType |= ImplFontAttrs::Script;
44 rType |= ImplFontAttrs::Fixed;
46 rType |= ImplFontAttrs::Decorative;
51 rType |= pFontAttr->
Type;
55 rWeight = pFontAttr->
Weight;
58 rWidth = pFontAttr->
Width;
66 for(
size_t i = 0;
i < rFontName.size();
i++)
70 if ( ((
ch >= 0x3040) && (
ch <= 0x30FF)) ||
71 ((
ch >= 0x3190) && (
ch <= 0x319F)) )
72 return ImplFontAttrs::CJK|ImplFontAttrs::CJK_JP;
75 if ( ((
ch >= 0xAC00) && (
ch <= 0xD7AF)) ||
76 ((
ch >= 0xA960) && (
ch <= 0xA97F)) ||
77 ((
ch >= 0xD7B0) && (
ch <= 0xD7FF)) ||
78 ((
ch >= 0x3130) && (
ch <= 0x318F)) ||
79 ((
ch >= 0x1100) && (
ch <= 0x11FF)) )
80 return ImplFontAttrs::CJK|ImplFontAttrs::CJK_KR;
83 if ( (
ch >= 0x3400) && (
ch <= 0x9FFF) )
84 return ImplFontAttrs::CJK|ImplFontAttrs::CJK_TC|ImplFontAttrs::CJK_SC;
87 if ( ((
ch >= 0x3000) && (
ch <= 0xD7AF)) ||
88 ((
ch >= 0xFF00) && (
ch <= 0xFFEE)) )
89 return ImplFontAttrs::CJK;
93 return ImplFontAttrs::None;
97: maSearchName(
std::move( aSearchName )),
189 const OUString& rSearchName )
194 utl::FontSubstConfiguration::getMapName( rSearchName, aShortName, aMatchFamilyName,
200 if( aShortName != rSearchName )
201 pFontAttr = rFontSubst.getSubstInfo( aShortName );
215 OUString aTargetStyleName;
216 const OUString* pTargetStyleName =
nullptr;
220 aTargetStyleName = rSearchName.copy(
maSearchName.getLength() + 1);
221 pTargetStyleName = &aTargetStyleName;
230 if( pFoundFontFace->
IsBetterMatch( rFSD, aFontMatchStatus ) )
231 pBestFontFace = pFoundFontFace;
234 return pBestFontFace;
246 rDevFontList.
Add( pFoundFontFace );
247 pPrevFace = pFoundFontFace;
const OUString & GetMapNames() const
bool IsMicrosoftSymbolEncoded() const
FontFamily GetFamilyType() const
FontItalic GetItalic() const
FontWeight GetWeight() const
const OUString & GetFamilyName() const
void SetFamilyName(const OUString &sFamilyName)
FontPitch GetPitch() const
vcl::font::PhysicalFontFamily * FindOrCreateFontFamily(const OUString &rFamilyName)
void Add(PhysicalFontFace *pFace)
abstract base class for physical font faces
sal_Int32 CompareIgnoreSize(const PhysicalFontFace &) const
bool IsBetterMatch(const vcl::font::FontSelectPattern &, FontMatchStatus &) const
void AddFontFace(PhysicalFontFace *)
PhysicalFontFace * FindBestFontFace(const vcl::font::FontSelectPattern &rFSD) const
void UpdateDevFontList(PhysicalFontFaceCollection &) const
const OUString & GetFamilyName() const
void UpdateCloneFontList(PhysicalFontCollection &) const
PhysicalFontFamily(OUString aSearchName)
OUString maMatchFamilyName
FontTypeFaces mnTypeFaces
ImplFontAttrs mnMatchType
void InitMatchData(const utl::FontSubstConfiguration &, const OUString &rSearchName)
static void CalcType(ImplFontAttrs &rType, FontWeight &rWeight, FontWidth &rWidth, FontFamily eFamily, const utl::FontNameAttr *pFontAttr)
std::vector< rtl::Reference< PhysicalFontFace > > maFontFaces
UNOTOOLS_DLLPUBLIC OUString GetEnglishSearchFontName(std::u16string_view rName)
A PhysicalFontFaceCollection is created by a PhysicalFontCollection and becomes invalid when original...
static ImplFontAttrs lcl_IsCJKFont(std::u16string_view rFontName)