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
7a416820
Kaydet (Commit)
7a416820
authored
Mar 17, 2010
tarafından
Herbert Duerr [hdu]
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i110078# cache dynamic font options
üst
9fd50490
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
glyphcache.hxx
vcl/inc/vcl/glyphcache.hxx
+5
-0
glyphcache.cxx
vcl/source/glyphs/glyphcache.cxx
+4
-2
salgdi3.cxx
vcl/unx/source/gdi/salgdi3.cxx
+21
-7
No files found.
vcl/inc/vcl/glyphcache.hxx
Dosyayı görüntüle @
7a416820
...
...
@@ -51,6 +51,7 @@ class RawBitmap;
class
CmapResult
;
#include <vcl/outfont.hxx>
#include <vcl/impfont.hxx>
class
ServerFontLayout
;
#include <vcl/sallayout.hxx>
...
...
@@ -258,11 +259,15 @@ class VCL_DLLPUBLIC ImplServerFontEntry : public ImplFontEntry
{
private
:
ServerFont
*
mpServerFont
;
ImplFontOptions
maFontOptions
;
bool
mbGotFontOptions
;
bool
mbValidFontOptions
;
public
:
ImplServerFontEntry
(
ImplFontSelectData
&
);
virtual
~
ImplServerFontEntry
();
void
SetServerFont
(
ServerFont
*
p
)
{
mpServerFont
=
p
;
}
void
HandleFontOptions
();
};
// =======================================================================
...
...
vcl/source/glyphs/glyphcache.cxx
Dosyayı görüntüle @
7a416820
...
...
@@ -519,8 +519,10 @@ bool ServerFont::IsGlyphInvisible( int nGlyphIndex )
// =======================================================================
ImplServerFontEntry
::
ImplServerFontEntry
(
ImplFontSelectData
&
rFSD
)
:
ImplFontEntry
(
rFSD
),
mpServerFont
(
NULL
)
:
ImplFontEntry
(
rFSD
)
,
mpServerFont
(
NULL
)
,
mbGotFontOptions
(
false
)
,
mbValidFontOptions
(
false
)
{}
// -----------------------------------------------------------------------
...
...
vcl/unx/source/gdi/salgdi3.cxx
Dosyayı görüntüle @
7a416820
...
...
@@ -641,13 +641,11 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev
mpServerFont
[
nFallbackLevel
]
=
pServerFont
;
// apply font specific-hint settings if needed
// TODO: also disable it for reference devices
if
(
!
bPrinter_
)
{
// TODO: is it worth it to cache the hint settings, e.g. in the ImplFontEntry?
ImplFontOptions
aFontOptions
;
bool
GetFCFontOptions
(
const
ImplFontAttributes
&
,
int
nSize
,
ImplFontOptions
&
);
if
(
GetFCFontOptions
(
*
pEntry
->
mpFontData
,
pEntry
->
mnHeight
,
aFontOptions
)
)
pServerFont
->
SetFontOptions
(
aFontOptions
);
ImplServerFontEntry
*
pSFE
=
static_cast
<
ImplServerFontEntry
*>
(
pEntry
->
mpFontEntry
);
pSFE
->
HandleFontOptions
();
}
return
true
;
...
...
@@ -656,6 +654,24 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev
return
false
;
}
void
ImplServerFontEntry
::
HandleFontOptions
(
void
)
{
bool
GetFCFontOptions
(
const
ImplFontAttributes
&
,
int
nSize
,
ImplFontOptions
&
);
if
(
!
mpServerFont
)
return
;
if
(
!
mbGotFontOptions
)
{
// get and cache the font options
mbGotFontOptions
=
true
;
mbValidFontOptions
=
GetFCFontOptions
(
*
maFontSelData
.
mpFontData
,
maFontSelData
.
mnHeight
,
maFontOptions
);
}
// apply the font options
if
(
mbValidFontOptions
)
mpServerFont
->
SetFontOptions
(
maFontOptions
);
}
//--------------------------------------------------------------------------
inline
sal_Unicode
SwapBytes
(
const
sal_Unicode
nIn
)
...
...
@@ -1666,7 +1682,6 @@ bool GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize,
default
:
aInfo
.
m_eItalic
=
psp
::
italic
::
Unknown
;
break
;
}
// set weight
switch
(
rFontAttributes
.
GetWeight
()
)
...
...
@@ -1742,7 +1757,6 @@ bool GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize,
const
psp
::
PrintFontManager
&
rPFM
=
psp
::
PrintFontManager
::
get
();
bool
bOK
=
rPFM
.
getFontOptions
(
aInfo
,
nSize
,
cairosubcallback
,
rFontOptions
);
return
bOK
;
}
...
...
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