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
225539ab
Kaydet (Commit)
225539ab
authored
Eki 05, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CID#736943 clamp no of ttc entries to physical max
Change-Id: Ic63defe9c14c6ee2b86bd5b7730a570238ca3981
üst
54250655
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
fontmanager.cxx
vcl/generic/fontmanager/fontmanager.cxx
+33
-0
No files found.
vcl/generic/fontmanager/fontmanager.cxx
Dosyayı görüntüle @
225539ab
...
@@ -1175,6 +1175,39 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
...
@@ -1175,6 +1175,39 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
#if OSL_DEBUG_LEVEL > 1
#if OSL_DEBUG_LEVEL > 1
fprintf
(
stderr
,
"ttc: %s contains %d fonts
\n
"
,
aFullPath
.
getStr
(),
nLength
);
fprintf
(
stderr
,
"ttc: %s contains %d fonts
\n
"
,
aFullPath
.
getStr
(),
nLength
);
#endif
#endif
sal_uInt64
fileSize
;
OUString
aURL
;
if
(
!
osl
::
File
::
getFileURLFromSystemPath
(
OStringToOUString
(
aFullPath
,
osl_getThreadTextEncoding
()),
aURL
))
{
fileSize
=
0
;
}
else
{
osl
::
File
aFile
(
aURL
);
if
(
aFile
.
open
(
osl_File_OpenFlag_Read
|
osl_File_OpenFlag_NoLock
)
!=
osl
::
File
::
E_None
)
fileSize
=
0
;
else
{
osl
::
DirectoryItem
aItem
;
osl
::
DirectoryItem
::
get
(
aURL
,
aItem
);
osl
::
FileStatus
aFileStatus
(
osl_FileStatus_Mask_FileSize
);
aItem
.
getFileStatus
(
aFileStatus
);
fileSize
=
aFileStatus
.
getFileSize
();
}
}
//Feel free to calc the exact max possible number of fonts a file
//could contain given its physical size. But this will clamp it to
//a sane starting point
//http://processingjs.nihongoresources.com/the_smallest_font/
//https://github.com/grzegorzrolek/null-ttf
int
nMaxFontsPossible
=
fileSize
/
528
;
nLength
=
std
::
min
(
nLength
,
nMaxFontsPossible
);
for
(
int
i
=
0
;
i
<
nLength
;
i
++
)
for
(
int
i
=
0
;
i
<
nLength
;
i
++
)
{
{
TrueTypeFontFile
*
pFont
=
new
TrueTypeFontFile
();
TrueTypeFontFile
*
pFont
=
new
TrueTypeFontFile
();
...
...
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