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
fc711de3
Kaydet (Commit)
fc711de3
authored
Şub 20, 2017
tarafından
Khaled Hosny
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
IGNORE_HINTS have never been defined
Change-Id: I35d08f6ff1ff3e78a5078062cef89304fa782489
üst
0ca9be49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
23 deletions
+1
-23
cff.cxx
vcl/source/fontsubset/cff.cxx
+1
-23
No files found.
vcl/source/fontsubset/cff.cxx
Dosyayı görüntüle @
fc711de3
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
#include <vcl/strhelper.hxx>
#include <vcl/strhelper.hxx>
//#define IGNORE_HINTS
typedef
unsigned
char
U8
;
typedef
unsigned
char
U8
;
typedef
unsigned
short
U16
;
typedef
unsigned
short
U16
;
typedef
long
long
S64
;
typedef
long
long
S64
;
...
@@ -473,15 +471,12 @@ void CffSubsetterContext::addHints( bool bVerticalHints)
...
@@ -473,15 +471,12 @@ void CffSubsetterContext::addHints( bool bVerticalHints)
assert
(
(
mnHintSize
+
mnStackIdx
)
<=
2
*
NMAXHINTS
);
assert
(
(
mnHintSize
+
mnStackIdx
)
<=
2
*
NMAXHINTS
);
#ifdef IGNORE_HINTS
mnHintSize
+=
mnStackIdx
;
#else
ValType
nHintOfs
=
0
;
ValType
nHintOfs
=
0
;
for
(
int
i
=
0
;
i
<
mnStackIdx
;
++
i
)
{
for
(
int
i
=
0
;
i
<
mnStackIdx
;
++
i
)
{
nHintOfs
+=
mnValStack
[
i
];
nHintOfs
+=
mnValStack
[
i
];
mnHintStack
[
mnHintSize
++
]
=
nHintOfs
;
mnHintStack
[
mnHintSize
++
]
=
nHintOfs
;
}
}
#endif // IGNORE_HINTS
if
(
!
bVerticalHints
)
if
(
!
bVerticalHints
)
mnHorzHintSize
=
mnHintSize
;
mnHorzHintSize
=
mnHintSize
;
...
@@ -760,13 +755,11 @@ void CffSubsetterContext::convertOneTypeOp()
...
@@ -760,13 +755,11 @@ void CffSubsetterContext::convertOneTypeOp()
case
TYPE2OP
:
:
HSTEM
:
case
TYPE2OP
:
:
HSTEM
:
case
TYPE2OP
:
:
VSTEM
:
case
TYPE2OP
:
:
VSTEM
:
addHints
(
nType2Op
==
TYPE2OP
::
VSTEM
);
addHints
(
nType2Op
==
TYPE2OP
::
VSTEM
);
#ifndef IGNORE_HINTS
for
(
i
=
0
;
i
<
mnHintSize
;
i
+=
2
)
{
for
(
i
=
0
;
i
<
mnHintSize
;
i
+=
2
)
{
writeType1Val
(
mnHintStack
[
i
]);
writeType1Val
(
mnHintStack
[
i
]);
writeType1Val
(
mnHintStack
[
i
+
1
]
-
mnHintStack
[
i
]);
writeType1Val
(
mnHintStack
[
i
+
1
]
-
mnHintStack
[
i
]);
writeTypeOp
(
nType2Op
);
writeTypeOp
(
nType2Op
);
}
}
#endif // IGNORE_HINTS
break
;
break
;
case
TYPE2OP
:
:
HSTEMHM
:
case
TYPE2OP
:
:
HSTEMHM
:
case
TYPE2OP
:
:
VSTEMHM
:
case
TYPE2OP
:
:
VSTEMHM
:
...
@@ -775,10 +768,6 @@ void CffSubsetterContext::convertOneTypeOp()
...
@@ -775,10 +768,6 @@ void CffSubsetterContext::convertOneTypeOp()
case
TYPE2OP
:
:
CNTRMASK
:
case
TYPE2OP
:
:
CNTRMASK
:
// TODO: replace cntrmask with vstem3/hstem3
// TODO: replace cntrmask with vstem3/hstem3
addHints
(
true
);
addHints
(
true
);
#ifdef IGNORE_HINTS
mpReadPtr
+=
(
mnHintSize
+
15
)
/
16
;
mbIgnoreHints
=
true
;
#else
{
{
U8
nMaskBit
=
0
;
U8
nMaskBit
=
0
;
U8
nMaskByte
=
0
;
U8
nMaskByte
=
0
;
...
@@ -796,13 +785,9 @@ void CffSubsetterContext::convertOneTypeOp()
...
@@ -796,13 +785,9 @@ void CffSubsetterContext::convertOneTypeOp()
mnCntrMask
|=
(
1U
<<
i
);
mnCntrMask
|=
(
1U
<<
i
);
}
}
}
}
#endif
break
;
break
;
case
TYPE2OP
:
:
HINTMASK
:
case
TYPE2OP
:
:
HINTMASK
:
addHints
(
true
);
addHints
(
true
);
#ifdef IGNORE_HINTS
mpReadPtr
+=
(
mnHintSize
+
15
)
/
16
;
#else
{
{
sal_Int32
nHintMask
=
0
;
sal_Int32
nHintMask
=
0
;
int
nCntrBits
[
2
]
=
{
0
,
0
};
int
nCntrBits
[
2
]
=
{
0
,
0
};
...
@@ -840,7 +825,6 @@ void CffSubsetterContext::convertOneTypeOp()
...
@@ -840,7 +825,6 @@ void CffSubsetterContext::convertOneTypeOp()
writeTypeEsc
(
bHorz
?
TYPE1OP
::
HSTEM3
:
TYPE1OP
::
VSTEM3
);
writeTypeEsc
(
bHorz
?
TYPE1OP
::
HSTEM3
:
TYPE1OP
::
VSTEM3
);
}
}
}
}
#endif
break
;
break
;
case
TYPE2OP
:
:
CALLSUBR
:
case
TYPE2OP
:
:
CALLSUBR
:
case
TYPE2OP
:
:
CALLGSUBR
:
case
TYPE2OP
:
:
CALLGSUBR
:
...
@@ -1934,7 +1918,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
...
@@ -1934,7 +1918,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
// which always starts with a privdict
// which always starts with a privdict
// count the privdict entries
// count the privdict entries
int
nPrivEntryCount
=
9
;
int
nPrivEntryCount
=
9
;
#if !defined(IGNORE_HINTS)
// emit blue hints only if non-default values
// emit blue hints only if non-default values
nPrivEntryCount
+=
int
(
!
mpCffLocal
->
maOtherBlues
.
empty
());
nPrivEntryCount
+=
int
(
!
mpCffLocal
->
maOtherBlues
.
empty
());
nPrivEntryCount
+=
int
(
!
mpCffLocal
->
maFamilyBlues
.
empty
());
nPrivEntryCount
+=
int
(
!
mpCffLocal
->
maFamilyBlues
.
empty
());
...
@@ -1952,7 +1935,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
...
@@ -1952,7 +1935,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
nPrivEntryCount
+=
int
(
mpCffLocal
->
mnLangGroup
!=
0
);
nPrivEntryCount
+=
int
(
mpCffLocal
->
mnLangGroup
!=
0
);
nPrivEntryCount
+=
int
(
mpCffLocal
->
mnLangGroup
==
1
);
nPrivEntryCount
+=
int
(
mpCffLocal
->
mnLangGroup
==
1
);
nPrivEntryCount
+=
int
(
mpCffLocal
->
mbForceBold
);
nPrivEntryCount
+=
int
(
mpCffLocal
->
mbForceBold
);
#endif // IGNORE_HINTS
// emit the privdict header
// emit the privdict header
pOut
+=
sprintf
(
pOut
,
pOut
+=
sprintf
(
pOut
,
"
\110\104\125
"
"
\110\104\125
"
...
@@ -1964,9 +1946,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
...
@@ -1964,9 +1946,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
"/password 5839 def
\n
"
,
// TODO: mnRDCryptSeed?
"/password 5839 def
\n
"
,
// TODO: mnRDCryptSeed?
nPrivEntryCount
);
nPrivEntryCount
);
#if defined(IGNORE_HINTS)
pOut
+=
sprintf
(
pOut
,
"/BlueValues []ND
\n
"
);
// BlueValues are mandatory
#else
// emit blue hint related privdict entries
// emit blue hint related privdict entries
if
(
!
mpCffLocal
->
maBlueValues
.
empty
())
if
(
!
mpCffLocal
->
maBlueValues
.
empty
())
rEmitter
.
emitValVector
(
"/BlueValues ["
,
"]ND
\n
"
,
mpCffLocal
->
maBlueValues
);
rEmitter
.
emitValVector
(
"/BlueValues ["
,
"]ND
\n
"
,
mpCffLocal
->
maBlueValues
);
...
@@ -2018,7 +1997,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
...
@@ -2018,7 +1997,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut
+=
dbl2str
(
pOut
,
mpCffLocal
->
mfExpFactor
);
pOut
+=
dbl2str
(
pOut
,
mpCffLocal
->
mfExpFactor
);
pOut
+=
sprintf
(
pOut
,
" def
\n
"
);
pOut
+=
sprintf
(
pOut
,
" def
\n
"
);
}
}
#endif // IGNORE_HINTS
// emit remaining privdict entries
// emit remaining privdict entries
pOut
+=
sprintf
(
pOut
,
"/UniqueID %d def
\n
"
,
nUniqueId
);
pOut
+=
sprintf
(
pOut
,
"/UniqueID %d def
\n
"
,
nUniqueId
);
...
...
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