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
0947d09c
Kaydet (Commit)
0947d09c
authored
May 09, 2012
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
GCP_KERN_HACK has been hardcoded since 2002, so why bother with ifdefs
Change-Id: I7e37289aba503310c54026d5a8bcbf8e4d51fb6c
üst
7a3061db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
37 deletions
+3
-37
salgdi.h
vcl/inc/win/salgdi.h
+0
-1
salgdi3.cxx
vcl/win/source/gdi/salgdi3.cxx
+0
-9
winlayout.cxx
vcl/win/source/gdi/winlayout.cxx
+3
-27
No files found.
vcl/inc/win/salgdi.h
Dosyayı görüntüle @
0947d09c
...
...
@@ -55,7 +55,6 @@ class ImplFontAttrCache;
// win32 platform specific options. Move them to the PMK file?
#define GCP_KERN_HACK
#define GNG_VERT_HACK
#ifdef ENABLE_GRAPHITE
...
...
vcl/win/source/gdi/salgdi3.cxx
Dosyayı görüntüle @
0947d09c
...
...
@@ -69,9 +69,7 @@
#include "outdev.h" // for ImplGlyphFallbackFontSubstitution
#include "sft.hxx"
#ifdef GCP_KERN_HACK
#include <algorithm>
#endif
#ifdef ENABLE_GRAPHITE
#include <graphite2/Font.h>
...
...
@@ -1797,17 +1795,10 @@ sal_uLong WinSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKer
int
nCount
=
::
GetKerningPairsW
(
mhDC
,
0
,
NULL
);
if
(
nCount
)
{
#ifdef GCP_KERN_HACK
pPairs
=
new
KERNINGPAIR
[
nCount
+
1
];
mpFontKernPairs
=
pPairs
;
mnFontKernPairCount
=
nCount
;
::
GetKerningPairsW
(
mhDC
,
nCount
,
pPairs
);
#else // GCP_KERN_HACK
pPairs
=
pKernPairs
;
nCount
=
(
nCount
<
nPairs
)
:
nCount
:
nPairs
;
::
GetKerningPairsW
(
mhDC
,
nCount
,
pPairs
);
return
nCount
;
#endif // GCP_KERN_HACK
}
mbFontKernInit
=
FALSE
;
...
...
vcl/win/source/gdi/winlayout.cxx
Dosyayı görüntüle @
0947d09c
...
...
@@ -48,9 +48,7 @@
#define alloca _alloca
#endif
#ifdef GCP_KERN_HACK
#include <algorithm>
#endif // GCP_KERN_HACK
#include <algorithm>
#include <usp10.h>
#include <shlwapi.h>
...
...
@@ -87,7 +85,6 @@ public:
private
:
// TODO: also add HFONT??? Watch out for issues with too many active fonts...
#ifdef GCP_KERN_HACK
public
:
bool
HasKernData
()
const
;
void
SetKernData
(
int
,
const
KERNINGPAIR
*
);
...
...
@@ -95,7 +92,6 @@ public:
private
:
KERNINGPAIR
*
mpKerningPairs
;
int
mnKerningPairs
;
#endif // GCP_KERN_HACK
public
:
SCRIPT_CACHE
&
GetScriptCache
()
const
...
...
@@ -389,13 +385,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
if
(
rArgs
.
mnFlags
&
(
SAL_LAYOUT_KERNING_PAIRS
|
SAL_LAYOUT_KERNING_ASIAN
)
)
mpGlyphOrigAdvs
=
new
int
[
mnGlyphCount
];
#ifndef GCP_KERN_HACK
DWORD
nGcpOption
=
0
;
// enable kerning if requested
if
(
rArgs
.
mnFlags
&
SAL_LAYOUT_KERNING_PAIRS
)
nGcpOption
|=
GCP_USEKERNING
;
#endif // GCP_KERN_HACK
for
(
i
=
0
;
i
<
mnGlyphCount
;
++
i
)
mpOutGlyphs
[
i
]
=
pBidiStr
[
i
];
mnWidth
=
0
;
...
...
@@ -478,18 +467,11 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
mpGlyphOrigAdvs
[
i
]
=
mnNotdefWidth
;
}
#ifdef GCP_KERN_HACK
// apply kerning if the layout engine has not yet done it
if
(
rArgs
.
mnFlags
&
(
SAL_LAYOUT_KERNING_ASIAN
|
SAL_LAYOUT_KERNING_PAIRS
)
)
{
#else // GCP_KERN_HACK
// apply just asian kerning
if
(
rArgs
.
mnFlags
&
SAL_LAYOUT_KERNING_ASIAN
)
{
if
(
!
(
rArgs
.
mnFlags
&
SAL_LAYOUT_KERNING_PAIRS
)
)
#endif // GCP_KERN_HACK
for
(
i
=
0
;
i
<
mnGlyphCount
;
++
i
)
mpGlyphOrigAdvs
[
i
]
=
mpGlyphAdvances
[
i
];
for
(
i
=
0
;
i
<
mnGlyphCount
;
++
i
)
mpGlyphOrigAdvs
[
i
]
=
mpGlyphAdvances
[
i
];
// #99658# also apply asian kerning on the substring border
int
nLen
=
mnGlyphCount
;
...
...
@@ -497,7 +479,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
++
nLen
;
for
(
i
=
1
;
i
<
nLen
;
++
i
)
{
#ifdef GCP_KERN_HACK
if
(
rArgs
.
mnFlags
&
SAL_LAYOUT_KERNING_PAIRS
)
{
int
nKernAmount
=
mrWinFontEntry
.
GetKerning
(
pBidiStr
[
i
-
1
],
pBidiStr
[
i
]
);
...
...
@@ -505,7 +486,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
mnWidth
+=
nKernAmount
;
}
else
if
(
rArgs
.
mnFlags
&
SAL_LAYOUT_KERNING_ASIAN
)
#endif // GCP_KERN_HACK
if
(
(
(
0x3000
==
(
0xFF00
&
pBidiStr
[
i
-
1
]))
||
(
0x2010
==
(
0xFFF0
&
pBidiStr
[
i
-
1
]))
||
(
0xFF00
==
(
0xFF00
&
pBidiStr
[
i
-
1
])))
&&
(
(
0x3000
==
(
0xFF00
&
pBidiStr
[
i
]))
||
(
0x2010
==
(
0xFFF0
&
pBidiStr
[
i
]))
||
(
0xFF00
==
(
0xFF00
&
pBidiStr
[
i
]))
)
)
...
...
@@ -2927,7 +2907,6 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
}
else
{
#ifdef GCP_KERN_HACK
if
(
(
rArgs
.
mnFlags
&
SAL_LAYOUT_KERNING_PAIRS
)
&&
!
rFontInstance
.
HasKernData
()
)
{
// TODO: directly cache kerning info in the rFontInstance
...
...
@@ -2935,7 +2914,6 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
GetKernPairs
(
0
,
NULL
);
rFontInstance
.
SetKernData
(
mnFontKernPairCount
,
mpFontKernPairs
);
}
#endif // GCP_KERN_HACK
BYTE
eCharSet
=
ANSI_CHARSET
;
if
(
mpLogFont
)
...
...
@@ -2984,9 +2962,7 @@ ImplWinFontEntry::~ImplWinFontEntry()
{
if
(
maScriptCache
!=
NULL
)
ScriptFreeCache
(
&
maScriptCache
);
#ifdef GCP_KERN_HACK
delete
[]
mpKerningPairs
;
#endif // GCP_KERN_HACK
}
// -----------------------------------------------------------------------
...
...
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