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
1ee8a779
Kaydet (Commit)
1ee8a779
authored
Agu 19, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
now cairo is the only way to render text under X
üst
8e64e571
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
31 deletions
+11
-31
glyphcache.hxx
vcl/inc/unx/glyphcache.hxx
+1
-1
salgdi.h
vcl/inc/unx/salgdi.h
+4
-2
salgdi3.cxx
vcl/unx/generic/gdi/salgdi3.cxx
+5
-27
gcach_ftyp.cxx
vcl/unx/generic/glyphs/gcach_ftyp.cxx
+1
-1
No files found.
vcl/inc/unx/glyphcache.hxx
Dosyayı görüntüle @
1ee8a779
...
@@ -194,7 +194,7 @@ public:
...
@@ -194,7 +194,7 @@ public:
const
::
rtl
::
OString
*
GetFontFileName
()
const
;
const
::
rtl
::
OString
*
GetFontFileName
()
const
;
int
GetFontFaceNumber
()
const
;
int
GetFontFaceNumber
()
const
;
bool
TestFont
()
const
;
bool
TestFont
()
const
;
void
*
GetFtFace
()
const
;
FT_Face
GetFtFace
()
const
;
int
GetLoadFlags
()
const
{
return
(
mnLoadFlags
&
~
FT_LOAD_IGNORE_TRANSFORM
);
}
int
GetLoadFlags
()
const
{
return
(
mnLoadFlags
&
~
FT_LOAD_IGNORE_TRANSFORM
);
}
void
SetFontOptions
(
boost
::
shared_ptr
<
ImplFontOptions
>
);
void
SetFontOptions
(
boost
::
shared_ptr
<
ImplFontOptions
>
);
boost
::
shared_ptr
<
ImplFontOptions
>
GetFontOptions
()
const
;
boost
::
shared_ptr
<
ImplFontOptions
>
GetFontOptions
()
const
;
...
...
vcl/inc/unx/salgdi.h
Dosyayı görüntüle @
1ee8a779
...
@@ -64,18 +64,20 @@ namespace basegfx {
...
@@ -64,18 +64,20 @@ namespace basegfx {
// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
typedef
struct
FT_FaceRec_
*
FT_Face
;
class
CairoFontsCache
class
CairoFontsCache
{
{
public
:
public
:
struct
CacheId
struct
CacheId
{
{
const
void
*
mp
Face
;
FT_Face
ma
Face
;
const
void
*
mpOptions
;
const
void
*
mpOptions
;
bool
mbEmbolden
;
bool
mbEmbolden
;
bool
mbVerticalMetrics
;
bool
mbVerticalMetrics
;
bool
operator
==
(
const
CacheId
&
rOther
)
const
bool
operator
==
(
const
CacheId
&
rOther
)
const
{
{
return
m
pFace
==
rOther
.
mp
Face
&&
return
m
aFace
==
rOther
.
ma
Face
&&
mpOptions
==
rOther
.
mpOptions
&&
mpOptions
==
rOther
.
mpOptions
&&
mbEmbolden
==
rOther
.
mbEmbolden
&&
mbEmbolden
==
rOther
.
mbEmbolden
&&
mbVerticalMetrics
==
rOther
.
mbVerticalMetrics
;
mbVerticalMetrics
==
rOther
.
mbVerticalMetrics
;
...
...
vcl/unx/generic/gdi/salgdi3.cxx
Dosyayı görüntüle @
1ee8a779
...
@@ -235,14 +235,6 @@ void ImplServerFontEntry::HandleFontOptions( void )
...
@@ -235,14 +235,6 @@ void ImplServerFontEntry::HandleFontOptions( void )
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
namespace
{
bool
isCairoRenderable
(
const
ServerFont
&
rFont
)
{
return
rFont
.
GetFtFace
();
}
}
//namespace
CairoFontsCache
::
LRUFonts
CairoFontsCache
::
maLRUFonts
;
CairoFontsCache
::
LRUFonts
CairoFontsCache
::
maLRUFonts
;
int
CairoFontsCache
::
mnRefCount
=
0
;
int
CairoFontsCache
::
mnRefCount
=
0
;
...
@@ -370,9 +362,9 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
...
@@ -370,9 +362,9 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
ServerFont
&
rFont
=
rLayout
.
GetServerFont
();
ServerFont
&
rFont
=
rLayout
.
GetServerFont
();
void
*
p
Face
=
rFont
.
GetFtFace
();
FT_Face
a
Face
=
rFont
.
GetFtFace
();
CairoFontsCache
::
CacheId
aId
;
CairoFontsCache
::
CacheId
aId
;
aId
.
m
pFace
=
p
Face
;
aId
.
m
aFace
=
a
Face
;
aId
.
mpOptions
=
rFont
.
GetFontOptions
().
get
();
aId
.
mpOptions
=
rFont
.
GetFontOptions
().
get
();
aId
.
mbEmbolden
=
rFont
.
NeedsArtificialBold
();
aId
.
mbEmbolden
=
rFont
.
NeedsArtificialBold
();
...
@@ -398,11 +390,11 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
...
@@ -398,11 +390,11 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
if
(
!
font_face
)
if
(
!
font_face
)
{
{
const
ImplFontOptions
*
pOptions
=
rFont
.
GetFontOptions
().
get
();
const
ImplFontOptions
*
pOptions
=
rFont
.
GetFontOptions
().
get
();
void
*
pPattern
=
pOptions
?
pOptions
->
GetPattern
(
p
Face
,
aId
.
mbEmbolden
,
aId
.
mbVerticalMetrics
)
:
NULL
;
void
*
pPattern
=
pOptions
?
pOptions
->
GetPattern
(
a
Face
,
aId
.
mbEmbolden
,
aId
.
mbVerticalMetrics
)
:
NULL
;
if
(
pPattern
)
if
(
pPattern
)
font_face
=
cairo_ft_font_face_create_for_pattern
(
reinterpret_cast
<
FcPattern
*>
(
pPattern
));
font_face
=
cairo_ft_font_face_create_for_pattern
(
reinterpret_cast
<
FcPattern
*>
(
pPattern
));
if
(
!
font_face
)
if
(
!
font_face
)
font_face
=
cairo_ft_font_face_create_for_ft_face
(
reinterpret_cast
<
FT_Face
>
(
p
Face
),
rFont
.
GetLoadFlags
());
font_face
=
cairo_ft_font_face_create_for_ft_face
(
reinterpret_cast
<
FT_Face
>
(
a
Face
),
rFont
.
GetLoadFlags
());
m_aCairoFontsCache
.
CacheFont
(
font_face
,
aId
);
m_aCairoFontsCache
.
CacheFont
(
font_face
,
aId
);
}
}
cairo_set_font_face
(
cr
,
font_face
);
cairo_set_font_face
(
cr
,
font_face
);
...
@@ -427,7 +419,6 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
...
@@ -427,7 +419,6 @@ void X11SalGraphics::DrawCairoAAFontString( const ServerFontLayout& rLayout )
cairo_matrix_init_identity
(
&
em_square
);
cairo_matrix_init_identity
(
&
em_square
);
cairo_get_matrix
(
cr
,
&
em_square
);
cairo_get_matrix
(
cr
,
&
em_square
);
FT_Face
aFace
=
reinterpret_cast
<
FT_Face
>
(
pFace
);
cairo_matrix_scale
(
&
em_square
,
aFace
->
units_per_EM
,
cairo_matrix_scale
(
&
em_square
,
aFace
->
units_per_EM
,
aFace
->
units_per_EM
);
aFace
->
units_per_EM
);
cairo_set_matrix
(
cr
,
&
em_square
);
cairo_set_matrix
(
cr
,
&
em_square
);
...
@@ -832,20 +823,7 @@ void X11SalGraphics::DrawServerSimpleFontString( const ServerFontLayout& rSalLay
...
@@ -832,20 +823,7 @@ void X11SalGraphics::DrawServerSimpleFontString( const ServerFontLayout& rSalLay
void
X11SalGraphics
::
DrawServerFontLayout
(
const
ServerFontLayout
&
rLayout
)
void
X11SalGraphics
::
DrawServerFontLayout
(
const
ServerFontLayout
&
rLayout
)
{
{
// draw complex text
DrawCairoAAFontString
(
rLayout
);
ServerFont
&
rFont
=
rLayout
.
GetServerFont
();
if
(
isCairoRenderable
(
rFont
)
)
DrawCairoAAFontString
(
rLayout
);
else
{
X11GlyphPeer
&
rGlyphPeer
=
X11GlyphCache
::
GetInstance
().
GetPeer
();
if
(
rGlyphPeer
.
GetGlyphSet
(
rFont
,
m_nScreen
)
)
DrawServerAAFontString
(
rLayout
);
else
if
(
!
rGlyphPeer
.
ForcedAntialiasing
(
rFont
,
m_nScreen
)
)
DrawServerSimpleFontString
(
rLayout
);
else
DrawServerAAForcedString
(
rLayout
);
}
}
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
...
...
vcl/unx/generic/glyphs/gcach_ftyp.cxx
Dosyayı görüntüle @
1ee8a779
...
@@ -577,7 +577,7 @@ FreetypeManager::FreetypeManager()
...
@@ -577,7 +577,7 @@ FreetypeManager::FreetypeManager()
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
void
*
ServerFont
::
GetFtFace
()
const
FT_Face
ServerFont
::
GetFtFace
()
const
{
{
if
(
maSizeFT
)
if
(
maSizeFT
)
pFTActivateSize
(
maSizeFT
);
pFTActivateSize
(
maSizeFT
);
...
...
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