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
34d1c9f9
Kaydet (Commit)
34d1c9f9
authored
Ock 11, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves:fdo#44078 fix unfortunate name alias mixups with DejaVu fonts
üst
806dce17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
fontconfig.cxx
vcl/generic/fontmanager/fontconfig.cxx
+15
-4
No files found.
vcl/generic/fontmanager/fontconfig.cxx
Dosyayı görüntüle @
34d1c9f9
...
...
@@ -124,7 +124,7 @@ public:
boost
::
unordered_map
<
rtl
::
OString
,
rtl
::
OString
,
rtl
::
OStringHash
>
m_aFontNameToLocalized
;
boost
::
unordered_map
<
rtl
::
OString
,
rtl
::
OString
,
rtl
::
OStringHash
>
m_aLocalizedToCanonical
;
private
:
void
cacheLocalizedFontNames
(
FcChar8
*
origfontname
,
FcChar8
*
bestfontname
,
const
std
::
vector
<
lang_and_element
>
&
lang_and_elements
);
void
cacheLocalizedFontNames
(
const
FcChar8
*
origfontname
,
const
FcChar8
*
bestfontname
,
const
std
::
vector
<
lang_and_element
>
&
lang_and_elements
);
};
FontCfgWrapper
::
FontCfgWrapper
()
...
...
@@ -296,6 +296,7 @@ namespace
std
::
vector
<
lang_and_element
>::
const_iterator
aEnd
=
elements
.
end
();
bool
alreadyclosematch
=
false
;
bool
found_fallback_englishname
=
false
;
for
(
std
::
vector
<
lang_and_element
>::
const_iterator
aIter
=
elements
.
begin
();
aIter
!=
aEnd
;
++
aIter
)
{
const
char
*
pLang
=
(
const
char
*
)
aIter
->
first
;
...
...
@@ -307,7 +308,8 @@ namespace
}
else
if
(
alreadyclosematch
)
{
// override candidate only if there is a perfect match
// current candidate matches lang of lang-TERRITORY
// override candidate only if there is a full match
continue
;
}
else
if
(
rtl_str_compare
(
pLang
,
sLangMatch
.
getStr
())
==
0
)
...
...
@@ -316,10 +318,18 @@ namespace
candidate
=
aIter
->
second
;
alreadyclosematch
=
true
;
}
else
if
(
found_fallback_englishname
)
{
// already found an english fallback, don't override candidate
// unless there is a better language match
continue
;
}
else
if
(
rtl_str_compare
(
pLang
,
"en"
)
==
0
)
{
// fallback to the english element name
// select a fallback candidate of the first english element
// name
candidate
=
aIter
->
second
;
found_fallback_englishname
=
true
;
}
}
return
candidate
;
...
...
@@ -327,7 +337,8 @@ namespace
}
//Set up maps to quickly map between a fonts best UI name and all the rest of its names, and vice versa
void
FontCfgWrapper
::
cacheLocalizedFontNames
(
FcChar8
*
origfontname
,
FcChar8
*
bestfontname
,
const
std
::
vector
<
lang_and_element
>
&
lang_and_elements
)
void
FontCfgWrapper
::
cacheLocalizedFontNames
(
const
FcChar8
*
origfontname
,
const
FcChar8
*
bestfontname
,
const
std
::
vector
<
lang_and_element
>
&
lang_and_elements
)
{
std
::
vector
<
lang_and_element
>::
const_iterator
aEnd
=
lang_and_elements
.
end
();
for
(
std
::
vector
<
lang_and_element
>::
const_iterator
aIter
=
lang_and_elements
.
begin
();
aIter
!=
aEnd
;
++
aIter
)
...
...
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