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
8e64e571
Kaydet (Commit)
8e64e571
authored
Agu 19, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge FreetypeServerFont and ServerFont now its split out into unx
üst
2f800d90
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
147 deletions
+63
-147
glyphcache.hxx
vcl/inc/unx/glyphcache.hxx
+61
-34
gcach_ftyp.cxx
vcl/unx/generic/glyphs/gcach_ftyp.cxx
+0
-0
gcach_ftyp.hxx
vcl/unx/generic/glyphs/gcach_ftyp.hxx
+1
-75
gcach_layout.cxx
vcl/unx/generic/glyphs/gcach_layout.cxx
+1
-1
glyphcache.cxx
vcl/unx/generic/glyphs/glyphcache.cxx
+0
-37
No files found.
vcl/inc/unx/glyphcache.hxx
Dosyayı görüntüle @
8e64e571
...
...
@@ -183,69 +183,74 @@ private:
// =======================================================================
class
FtFontInfo
;
class
VCL_PLUGIN_PUBLIC
ServerFont
{
public
:
virtual
const
::
rtl
::
OString
*
GetFontFileName
()
const
=
0
;
virtual
int
GetFontFaceNumber
()
const
=
0
;
virtual
bool
TestFont
()
const
=
0
;
virtual
void
*
GetFtFace
()
const
=
0
;
virtual
int
GetLoadFlags
()
const
=
0
;
virtual
void
SetFontOptions
(
boost
::
shared_ptr
<
ImplFontOptions
>
)
=
0
;
virtual
boost
::
shared_ptr
<
ImplFontOptions
>
GetFontOptions
()
const
=
0
;
virtual
bool
NeedsArtificialBold
()
const
=
0
;
virtual
bool
NeedsArtificialItalic
()
const
=
0
;
ServerFont
(
const
ImplFontSelectData
&
,
FtFontInfo
*
);
virtual
~
ServerFont
();
const
::
rtl
::
OString
*
GetFontFileName
()
const
;
int
GetFontFaceNumber
()
const
;
bool
TestFont
()
const
;
void
*
GetFtFace
()
const
;
int
GetLoadFlags
()
const
{
return
(
mnLoadFlags
&
~
FT_LOAD_IGNORE_TRANSFORM
);
}
void
SetFontOptions
(
boost
::
shared_ptr
<
ImplFontOptions
>
);
boost
::
shared_ptr
<
ImplFontOptions
>
GetFontOptions
()
const
;
bool
NeedsArtificialBold
()
const
{
return
mbArtBold
;
}
bool
NeedsArtificialItalic
()
const
{
return
mbArtItalic
;
}
const
ImplFontSelectData
&
GetFontSelData
()
const
{
return
maFontSelData
;
}
v
irtual
void
FetchFontMetric
(
ImplFontMetricData
&
,
long
&
rFactor
)
const
=
0
;
virtual
sal_uLong
GetKernPairs
(
ImplKernPairData
**
)
const
=
0
;
virtual
const
unsigned
char
*
GetTable
(
const
char
*
pName
,
sal_uLong
*
pLength
)
=
0
;
virtual
int
GetEmUnits
()
const
=
0
;
virtual
const
FT_Size_Metrics
&
GetMetricsFT
()
const
=
0
;
virtual
int
GetGlyphKernValue
(
int
,
int
)
const
=
0
;
virtual
const
ImplFontCharMap
*
GetImplFontCharMap
()
const
=
0
;
virtual
bool
GetFontCapabilities
(
vcl
::
FontCapabilities
&
)
const
=
0
;
v
oid
FetchFontMetric
(
ImplFontMetricData
&
,
long
&
rFactor
)
const
;
sal_uLong
GetKernPairs
(
ImplKernPairData
**
)
const
;
const
unsigned
char
*
GetTable
(
const
char
*
pName
,
sal_uLong
*
pLength
)
;
int
GetEmUnits
()
const
;
const
FT_Size_Metrics
&
GetMetricsFT
()
const
{
return
maSizeFT
->
metrics
;
}
int
GetGlyphKernValue
(
int
,
int
)
const
;
const
ImplFontCharMap
*
GetImplFontCharMap
()
const
;
bool
GetFontCapabilities
(
vcl
::
FontCapabilities
&
)
const
;
Point
TransformPoint
(
const
Point
&
)
const
;
GlyphData
&
GetGlyphData
(
int
nGlyphIndex
);
const
GlyphMetric
&
GetGlyphMetric
(
int
nGlyphIndex
)
{
return
GetGlyphData
(
nGlyphIndex
).
GetMetric
();
}
#ifdef ENABLE_GRAPHITE
virtual
GraphiteFaceWrapper
*
GetGraphiteFace
()
const
=
0
;
virtual
GraphiteFaceWrapper
*
GetGraphiteFace
()
const
;
#endif
virtual
int
GetGlyphIndex
(
sal_UCS4
)
const
=
0
;
virtual
int
GetRawGlyphIndex
(
sal_UCS4
)
const
=
0
;
virtual
int
FixupGlyphIndex
(
int
nGlyphIndex
,
sal_UCS4
)
const
=
0
;
virtual
bool
GetGlyphOutline
(
int
nGlyphIndex
,
::
basegfx
::
B2DPolyPolygon
&
)
const
=
0
;
virtual
bool
GetAntialiasAdvice
(
void
)
const
=
0
;
int
GetGlyphIndex
(
sal_UCS4
)
const
;
int
GetRawGlyphIndex
(
sal_UCS4
)
const
;
int
FixupGlyphIndex
(
int
nGlyphIndex
,
sal_UCS4
)
const
;
bool
GetGlyphOutline
(
int
nGlyphIndex
,
::
basegfx
::
B2DPolyPolygon
&
)
const
;
bool
GetAntialiasAdvice
(
void
)
const
;
bool
IsGlyphInvisible
(
int
nGlyphIndex
);
virtual
bool
GetGlyphBitmap1
(
int
nGlyphIndex
,
RawBitmap
&
)
const
=
0
;
virtual
bool
GetGlyphBitmap8
(
int
nGlyphIndex
,
RawBitmap
&
)
const
=
0
;
bool
GetGlyphBitmap1
(
int
nGlyphIndex
,
RawBitmap
&
)
const
;
bool
GetGlyphBitmap8
(
int
nGlyphIndex
,
RawBitmap
&
)
const
;
void
SetExtended
(
int
nInfo
,
void
*
ppVoid
);
int
GetExtInfo
()
{
return
mnExtInfo
;
}
void
*
GetExtPointer
()
{
return
mpExtData
;
}
pr
otected
:
pr
ivate
:
friend
class
GlyphCache
;
friend
class
ServerFontLayout
;
explicit
ServerFont
(
const
ImplFontSelectData
&
);
virtual
~
ServerFont
();
void
AddRef
()
const
{
++
mnRefCount
;
}
long
GetRefCount
()
const
{
return
mnRefCount
;
}
long
Release
()
const
;
sal_uLong
GetByteCount
()
const
{
return
mnBytesUsed
;
}
v
irtual
void
InitGlyphData
(
int
nGlyphIndex
,
GlyphData
&
)
const
=
0
;
v
irtual
v
oid
GarbageCollect
(
long
);
v
oid
InitGlyphData
(
int
nGlyphIndex
,
GlyphData
&
)
const
;
void
GarbageCollect
(
long
);
void
ReleaseFromGarbageCollect
();
virtual
ServerFontLayoutEngine
*
GetLayoutEngine
()
=
0
;
int
ApplyGlyphTransform
(
int
nGlyphFlags
,
FT_GlyphRec_
*
,
bool
)
const
;
bool
ApplyGSUB
(
const
ImplFontSelectData
&
);
ServerFontLayoutEngine
*
GetLayoutEngine
();
private
:
typedef
::
boost
::
unordered_map
<
int
,
GlyphData
>
GlyphList
;
mutable
GlyphList
maGlyphList
;
...
...
@@ -262,14 +267,36 @@ private:
ServerFont
*
mpPrevGCFont
;
ServerFont
*
mpNextGCFont
;
protected
:
// 16.16 fixed point values used for a rotated font
long
mnCos
;
long
mnSin
;
private
:
int
mnZWJ
;
int
mnZWNJ
;
bool
mbCollectedZW
;
int
mnWidth
;
int
mnPrioEmbedded
;
int
mnPrioAntiAlias
;
int
mnPrioAutoHint
;
FtFontInfo
*
mpFontInfo
;
FT_Int
mnLoadFlags
;
double
mfStretch
;
FT_FaceRec_
*
maFaceFT
;
FT_SizeRec_
*
maSizeFT
;
boost
::
shared_ptr
<
ImplFontOptions
>
mpFontOptions
;
bool
mbFaceOk
;
bool
mbArtItalic
;
bool
mbArtBold
;
bool
mbUseGamma
;
typedef
::
boost
::
unordered_map
<
int
,
int
>
GlyphSubstitution
;
GlyphSubstitution
maGlyphSubstitution
;
rtl_UnicodeToTextConverter
maRecodeConverter
;
ServerFontLayoutEngine
*
mpLayoutEngine
;
};
// =======================================================================
...
...
vcl/unx/generic/glyphs/gcach_ftyp.cxx
Dosyayı görüntüle @
8e64e571
This diff is collapsed.
Click to expand it.
vcl/unx/generic/glyphs/gcach_ftyp.hxx
Dosyayı görüntüle @
8e64e571
...
...
@@ -164,7 +164,7 @@ public:
void
AnnounceFonts
(
ImplDevFontList
*
)
const
;
void
ClearFontList
();
Freetype
ServerFont
*
CreateFont
(
const
ImplFontSelectData
&
);
ServerFont
*
CreateFont
(
const
ImplFontSelectData
&
);
private
:
typedef
::
boost
::
unordered_map
<
sal_IntPtr
,
FtFontInfo
*>
FontList
;
...
...
@@ -176,80 +176,6 @@ private:
// -----------------------------------------------------------------------
class
FreetypeServerFont
:
public
ServerFont
{
public
:
FreetypeServerFont
(
const
ImplFontSelectData
&
,
FtFontInfo
*
);
virtual
~
FreetypeServerFont
();
virtual
const
::
rtl
::
OString
*
GetFontFileName
()
const
{
return
mpFontInfo
->
GetFontFileName
();
}
virtual
int
GetFontFaceNumber
()
const
{
return
mpFontInfo
->
GetFaceNum
();
}
virtual
bool
TestFont
()
const
;
virtual
void
*
GetFtFace
()
const
;
virtual
void
SetFontOptions
(
boost
::
shared_ptr
<
ImplFontOptions
>
);
virtual
boost
::
shared_ptr
<
ImplFontOptions
>
GetFontOptions
()
const
;
virtual
int
GetLoadFlags
()
const
{
return
(
mnLoadFlags
&
~
FT_LOAD_IGNORE_TRANSFORM
);
}
virtual
bool
NeedsArtificialBold
()
const
{
return
mbArtBold
;
}
virtual
bool
NeedsArtificialItalic
()
const
{
return
mbArtItalic
;
}
virtual
void
FetchFontMetric
(
ImplFontMetricData
&
,
long
&
rFactor
)
const
;
virtual
const
ImplFontCharMap
*
GetImplFontCharMap
(
void
)
const
;
virtual
int
GetGlyphIndex
(
sal_UCS4
)
const
;
virtual
int
GetRawGlyphIndex
(
sal_UCS4
)
const
;
virtual
int
FixupGlyphIndex
(
int
nGlyphIndex
,
sal_UCS4
)
const
;
virtual
bool
GetAntialiasAdvice
(
void
)
const
;
virtual
bool
GetGlyphBitmap1
(
int
nGlyphIndex
,
RawBitmap
&
)
const
;
virtual
bool
GetGlyphBitmap8
(
int
nGlyphIndex
,
RawBitmap
&
)
const
;
virtual
bool
GetGlyphOutline
(
int
nGlyphIndex
,
::
basegfx
::
B2DPolyPolygon
&
)
const
;
virtual
int
GetGlyphKernValue
(
int
nLeftGlyph
,
int
nRightGlyph
)
const
;
virtual
sal_uLong
GetKernPairs
(
ImplKernPairData
**
)
const
;
virtual
const
unsigned
char
*
GetTable
(
const
char
*
pName
,
sal_uLong
*
pLength
)
{
return
mpFontInfo
->
GetTable
(
pName
,
pLength
);
}
virtual
int
GetEmUnits
()
const
;
virtual
const
FT_Size_Metrics
&
GetMetricsFT
()
const
{
return
maSizeFT
->
metrics
;
}
#ifdef ENABLE_GRAPHITE
virtual
GraphiteFaceWrapper
*
GetGraphiteFace
()
const
{
return
mpFontInfo
->
GetGraphiteFace
();
}
#endif
protected
:
friend
class
GlyphCache
;
int
ApplyGlyphTransform
(
int
nGlyphFlags
,
FT_GlyphRec_
*
,
bool
)
const
;
virtual
void
InitGlyphData
(
int
nGlyphIndex
,
GlyphData
&
)
const
;
virtual
bool
GetFontCapabilities
(
vcl
::
FontCapabilities
&
)
const
;
bool
ApplyGSUB
(
const
ImplFontSelectData
&
);
virtual
ServerFontLayoutEngine
*
GetLayoutEngine
();
private
:
int
mnWidth
;
int
mnPrioEmbedded
;
int
mnPrioAntiAlias
;
int
mnPrioAutoHint
;
FtFontInfo
*
mpFontInfo
;
FT_Int
mnLoadFlags
;
double
mfStretch
;
FT_FaceRec_
*
maFaceFT
;
FT_SizeRec_
*
maSizeFT
;
boost
::
shared_ptr
<
ImplFontOptions
>
mpFontOptions
;
bool
mbFaceOk
;
bool
mbArtItalic
;
bool
mbArtBold
;
bool
mbUseGamma
;
typedef
::
boost
::
unordered_map
<
int
,
int
>
GlyphSubstitution
;
GlyphSubstitution
maGlyphSubstitution
;
rtl_UnicodeToTextConverter
maRecodeConverter
;
ServerFontLayoutEngine
*
mpLayoutEngine
;
};
// -----------------------------------------------------------------------
class
ImplFTSFontData
:
public
ImplFontData
{
private
:
...
...
vcl/unx/generic/glyphs/gcach_layout.cxx
Dosyayı görüntüle @
8e64e571
...
...
@@ -653,7 +653,7 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
// =======================================================================
ServerFontLayoutEngine
*
Freetype
ServerFont
::
GetLayoutEngine
()
ServerFontLayoutEngine
*
ServerFont
::
GetLayoutEngine
()
{
// find best layout engine for font, platform, script and language
#ifdef ENABLE_ICU_LAYOUT
...
...
vcl/unx/generic/glyphs/glyphcache.cxx
Dosyayı görüntüle @
8e64e571
...
...
@@ -345,43 +345,6 @@ inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGly
--
mnGlyphCount
;
}
// =======================================================================
// ServerFont
// =======================================================================
ServerFont
::
ServerFont
(
const
ImplFontSelectData
&
rFSD
)
:
maGlyphList
(
0
),
maFontSelData
(
rFSD
),
mnExtInfo
(
0
),
mnRefCount
(
1
),
mnBytesUsed
(
sizeof
(
ServerFont
)
),
mpPrevGCFont
(
NULL
),
mpNextGCFont
(
NULL
),
mnCos
(
0x10000
),
mnSin
(
0
),
mnZWJ
(
0
),
mnZWNJ
(
0
),
mbCollectedZW
(
false
)
{
// TODO: move update of mpFontEntry into FontEntry class when
// it becomes reponsible for the ServerFont instantiation
((
ImplServerFontEntry
*
)
rFSD
.
mpFontEntry
)
->
SetServerFont
(
this
);
if
(
rFSD
.
mnOrientation
!=
0
)
{
const
double
dRad
=
rFSD
.
mnOrientation
*
(
F_2PI
/
3600.0
);
mnCos
=
static_cast
<
long
>
(
0x10000
*
cos
(
dRad
)
+
0.5
);
mnSin
=
static_cast
<
long
>
(
0x10000
*
sin
(
dRad
)
+
0.5
);
}
}
// -----------------------------------------------------------------------
ServerFont
::~
ServerFont
()
{
ReleaseFromGarbageCollect
();
}
// -----------------------------------------------------------------------
void
ServerFont
::
ReleaseFromGarbageCollect
()
...
...
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