зеркало из https://github.com/mozilla/pjs.git
Bug 158129 Add support for Adobe's Type1 Euro fonts
patch by Roland.Mainz@informatik.med.uni-giessen.de r=bstell@ix.netcom.com sr=roc+moz
This commit is contained in:
Родитель
8ea69a78ef
Коммит
6f6b802dd3
|
@ -350,6 +350,9 @@ static nsFontCharSetInfo ISO106461 =
|
||||||
static nsFontCharSetInfo AdobeSymbol =
|
static nsFontCharSetInfo AdobeSymbol =
|
||||||
{ "Adobe-Symbol-Encoding", SingleByteConvert, 0,
|
{ "Adobe-Symbol-Encoding", SingleByteConvert, 0,
|
||||||
TT_OS2_CPR1_SYMBOL, 0 };
|
TT_OS2_CPR1_SYMBOL, 0 };
|
||||||
|
static nsFontCharSetInfo AdobeEuro =
|
||||||
|
{ "x-adobe-euro", SingleByteConvert, 0,
|
||||||
|
0, 0 };
|
||||||
|
|
||||||
#ifdef MOZ_MATHML
|
#ifdef MOZ_MATHML
|
||||||
static nsFontCharSetInfo CMCMEX =
|
static nsFontCharSetInfo CMCMEX =
|
||||||
|
@ -553,6 +556,9 @@ static nsFontCharSetMap gNoneCharSetMap[] = { { nsnull }, };
|
||||||
static nsFontCharSetMap gSpecialCharSetMap[] =
|
static nsFontCharSetMap gSpecialCharSetMap[] =
|
||||||
{
|
{
|
||||||
{ "symbol-adobe-fontspecific", &FLG_NONE, &AdobeSymbol },
|
{ "symbol-adobe-fontspecific", &FLG_NONE, &AdobeSymbol },
|
||||||
|
{ "euromono-adobe-fontspecific", &FLG_NONE, &AdobeEuro },
|
||||||
|
{ "eurosans-adobe-fontspecific", &FLG_NONE, &AdobeEuro },
|
||||||
|
{ "euroserif-adobe-fontspecific", &FLG_NONE, &AdobeEuro },
|
||||||
|
|
||||||
#ifdef MOZ_MATHML
|
#ifdef MOZ_MATHML
|
||||||
{ "cmex10-adobe-fontspecific", &FLG_NONE, &CMCMEX },
|
{ "cmex10-adobe-fontspecific", &FLG_NONE, &CMCMEX },
|
||||||
|
@ -621,11 +627,34 @@ static PRUint16* gDoubleByteSpecialCharsCCMap = nsnull;
|
||||||
// fonts are too large to use is western fonts.
|
// fonts are too large to use is western fonts.
|
||||||
// Here we define those characters.
|
// Here we define those characters.
|
||||||
//
|
//
|
||||||
static PRUnichar gDoubleByteSpecialChars[] = {
|
static const PRUnichar gDoubleByteSpecialChars[] = {
|
||||||
0x0152, 0x0153, 0x0160, 0x0161, 0x0178, 0x017D, 0x017E, 0x0192,
|
0x0152, /* LATIN CAPITAL LIGATURE OE */
|
||||||
0x02C6, 0x02DC, 0x2013, 0x2014, 0x2018, 0x2019, 0x201A, 0x201C,
|
0x0153, /* LATIN SMALL LIGATURE OE */
|
||||||
0x201D, 0x201E, 0x2020, 0x2021, 0x2022, 0x2026, 0x2030, 0x2039,
|
0x0160, /* LATIN CAPITAL LETTER S WITH CARON */
|
||||||
0x203A, 0x20AC, 0x2122,
|
0x0161, /* LATIN SMALL LETTER S WITH CARON */
|
||||||
|
0x0178, /* LATIN CAPITAL LETTER Y WITH DIAERESIS */
|
||||||
|
0x017D, /* LATIN CAPITAL LETTER Z WITH CARON */
|
||||||
|
0x017E, /* LATIN SMALL LETTER Z WITH CARON */
|
||||||
|
0x0192, /* LATIN SMALL LETTER F WITH HOOK */
|
||||||
|
0x02C6, /* MODIFIER LETTER CIRCUMFLEX ACCENT */
|
||||||
|
0x02DC, /* SMALL TILDE */
|
||||||
|
0x2013, /* EN DASH */
|
||||||
|
0x2014, /* EM DASH */
|
||||||
|
0x2018, /* LEFT SINGLE QUOTATION MARK */
|
||||||
|
0x2019, /* RIGHT SINGLE QUOTATION MARK */
|
||||||
|
0x201A, /* SINGLE LOW-9 QUOTATION MARK */
|
||||||
|
0x201C, /* LEFT DOUBLE QUOTATION MARK */
|
||||||
|
0x201D, /* RIGHT DOUBLE QUOTATION MARK */
|
||||||
|
0x201E, /* DOUBLE LOW-9 QUOTATION MARK */
|
||||||
|
0x2020, /* DAGGER */
|
||||||
|
0x2021, /* DOUBLE DAGGER */
|
||||||
|
0x2022, /* BULLET */
|
||||||
|
0x2026, /* HORIZONTAL ELLIPSIS */
|
||||||
|
0x2030, /* PER MILLE SIGN */
|
||||||
|
0x2039, /* SINGLE LEFT-POINTING ANGLE QUOTATION MARK */
|
||||||
|
0x203A, /* SINGLE RIGHT-POINTING ANGLE QUOTATION MARK */
|
||||||
|
0x20AC, /* EURO SIGN */
|
||||||
|
0x2122, /* TRADE MARK SIGN */
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4612,8 +4641,12 @@ if (gAllowDoubleByteSpecialChars) {
|
||||||
|
|
||||||
// add the symbol font before the early transliterator
|
// add the symbol font before the early transliterator
|
||||||
// to get the bullet (hack)
|
// to get the bullet (hack)
|
||||||
nsCAutoString ffre("*-symbol-adobe-fontspecific");
|
nsCAutoString symbol_ffre("*-symbol-adobe-fontspecific");
|
||||||
nsFontGTK* symbol_font = TryNodes(ffre, 0x0030);
|
nsFontGTK* symbol_font = TryNodes(symbol_ffre, 0x0030);
|
||||||
|
|
||||||
|
// Add the Adobe Euro fonts before the early transliterator
|
||||||
|
nsCAutoString euro_ffre("*-euro*-adobe-fontspecific");
|
||||||
|
nsFontGTK* euro_font = TryNodes(euro_ffre, 0x20AC);
|
||||||
|
|
||||||
// add the early transliterator
|
// add the early transliterator
|
||||||
// to avoid getting Japanese "special chars" such as smart
|
// to avoid getting Japanese "special chars" such as smart
|
||||||
|
@ -4630,6 +4663,9 @@ if (gAllowDoubleByteSpecialChars) {
|
||||||
else if (symbol_font && CCMAP_HAS_CHAR(symbol_font->mCCMap, aChar)) {
|
else if (symbol_font && CCMAP_HAS_CHAR(symbol_font->mCCMap, aChar)) {
|
||||||
return symbol_font;
|
return symbol_font;
|
||||||
}
|
}
|
||||||
|
else if (euro_font && CCMAP_HAS_CHAR(euro_font->mCCMap, aChar)) {
|
||||||
|
return euro_font;
|
||||||
|
}
|
||||||
else if (sub_font && CCMAP_HAS_CHAR(sub_font->mCCMap, aChar)) {
|
else if (sub_font && CCMAP_HAS_CHAR(sub_font->mCCMap, aChar)) {
|
||||||
FIND_FONT_PRINTF((" transliterate special chars for single byte docs"));
|
FIND_FONT_PRINTF((" transliterate special chars for single byte docs"));
|
||||||
return sub_font;
|
return sub_font;
|
||||||
|
|
|
@ -2557,6 +2557,13 @@
|
||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
<FILE>
|
||||||
|
<PATHTYPE>Name</PATHTYPE>
|
||||||
|
<PATH>nsUnicodeToAdobeEuro.cpp</PATH>
|
||||||
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
|
<FILEKIND>Text</FILEKIND>
|
||||||
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
|
</FILE>
|
||||||
</FILELIST>
|
</FILELIST>
|
||||||
<LINKORDER>
|
<LINKORDER>
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
|
@ -3659,6 +3666,11 @@
|
||||||
<PATH>nsUCRegUtils.cpp</PATH>
|
<PATH>nsUCRegUtils.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
|
<FILEREF>
|
||||||
|
<PATHTYPE>Name</PATHTYPE>
|
||||||
|
<PATH>nsUnicodeToAdobeEuro.cpp</PATH>
|
||||||
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
|
</FILEREF>
|
||||||
</LINKORDER>
|
</LINKORDER>
|
||||||
</TARGET>
|
</TARGET>
|
||||||
<TARGET>
|
<TARGET>
|
||||||
|
@ -6165,6 +6177,13 @@
|
||||||
<FILEKIND>Text</FILEKIND>
|
<FILEKIND>Text</FILEKIND>
|
||||||
<FILEFLAGS>Debug</FILEFLAGS>
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
<FILE>
|
||||||
|
<PATHTYPE>Name</PATHTYPE>
|
||||||
|
<PATH>nsUnicodeToAdobeEuro.cpp</PATH>
|
||||||
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
|
<FILEKIND>Text</FILEKIND>
|
||||||
|
<FILEFLAGS>Debug</FILEFLAGS>
|
||||||
|
</FILE>
|
||||||
</FILELIST>
|
</FILELIST>
|
||||||
<LINKORDER>
|
<LINKORDER>
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
|
@ -7267,6 +7286,11 @@
|
||||||
<PATH>nsUCRegUtils.cpp</PATH>
|
<PATH>nsUCRegUtils.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
|
<FILEREF>
|
||||||
|
<PATHTYPE>Name</PATHTYPE>
|
||||||
|
<PATH>nsUnicodeToAdobeEuro.cpp</PATH>
|
||||||
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
|
</FILEREF>
|
||||||
</LINKORDER>
|
</LINKORDER>
|
||||||
</TARGET>
|
</TARGET>
|
||||||
</TARGETLIST>
|
</TARGETLIST>
|
||||||
|
@ -7995,6 +8019,12 @@
|
||||||
<PATH>nsUnicodeToGEOSTD8.cpp</PATH>
|
<PATH>nsUnicodeToGEOSTD8.cpp</PATH>
|
||||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
</FILEREF>
|
</FILEREF>
|
||||||
|
<FILEREF>
|
||||||
|
<TARGETNAME>uconv.shlb</TARGETNAME>
|
||||||
|
<PATHTYPE>Name</PATHTYPE>
|
||||||
|
<PATH>nsUnicodeToAdobeEuro.cpp</PATH>
|
||||||
|
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||||
|
</FILEREF>
|
||||||
</GROUP>
|
</GROUP>
|
||||||
<GROUP><NAME>Mac Decoder</NAME>
|
<GROUP><NAME>Mac Decoder</NAME>
|
||||||
<FILEREF>
|
<FILEREF>
|
||||||
|
|
|
@ -186,6 +186,7 @@
|
||||||
#include "nsUnicodeToUserDefined.h"
|
#include "nsUnicodeToUserDefined.h"
|
||||||
#include "nsUnicodeToSymbol.h"
|
#include "nsUnicodeToSymbol.h"
|
||||||
#include "nsUnicodeToZapfDingbat.h"
|
#include "nsUnicodeToZapfDingbat.h"
|
||||||
|
#include "nsUnicodeToAdobeEuro.h"
|
||||||
#include "nsMacArabicToUnicode.h"
|
#include "nsMacArabicToUnicode.h"
|
||||||
#include "nsMacDevanagariToUnicode.h"
|
#include "nsMacDevanagariToUnicode.h"
|
||||||
#include "nsMacFarsiToUnicode.h"
|
#include "nsMacFarsiToUnicode.h"
|
||||||
|
@ -1281,6 +1282,11 @@ static const nsModuleComponentInfo components[] =
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-zapf-dingbats",
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-zapf-dingbats",
|
||||||
nsUnicodeToZapfDingbatConstructor,
|
nsUnicodeToZapfDingbatConstructor,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ENCODER_NAME_BASE "x-adobe-euro", NS_UNICODETOADOBEEURO_CID,
|
||||||
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-adobe-euro",
|
||||||
|
nsUnicodeToAdobeEuroConstructor,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ENCODER_NAME_BASE "x-mac-arabic" , NS_UNICODETOMACARABIC_CID,
|
ENCODER_NAME_BASE "x-mac-arabic" , NS_UNICODETOMACARABIC_CID,
|
||||||
NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-arabic",
|
NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-arabic",
|
||||||
|
|
|
@ -160,6 +160,7 @@ CPPSRCS = \
|
||||||
nsUnicodeToUserDefined.cpp \
|
nsUnicodeToUserDefined.cpp \
|
||||||
nsUnicodeToSymbol.cpp \
|
nsUnicodeToSymbol.cpp \
|
||||||
nsUnicodeToZapfDingbat.cpp \
|
nsUnicodeToZapfDingbat.cpp \
|
||||||
|
nsUnicodeToAdobeEuro.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
EXPORTS = nsUCvLatinCID.h
|
EXPORTS = nsUCvLatinCID.h
|
||||||
|
|
|
@ -585,6 +585,10 @@
|
||||||
#define NS_UNICODETOZAPFDINGBATS_CID \
|
#define NS_UNICODETOZAPFDINGBATS_CID \
|
||||||
{ 0x21dd6a03, 0x413c, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0x21dd6a03, 0x413c, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
|
// Class ID for our UnicodeToAscii charset converter
|
||||||
|
#define NS_UNICODETOADOBEEURO_CID \
|
||||||
|
{ 0x822cb9ae, 0x6421, 0x4484, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
||||||
// {4F26B731-46CB-11d3-B3C3-00805F8A6670}
|
// {4F26B731-46CB-11d3-B3C3-00805F8A6670}
|
||||||
#define NS_UNICODETOTIS620WIN_CID \
|
#define NS_UNICODETOTIS620WIN_CID \
|
||||||
{ 0x4f26b731, 0x46cb, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
{ 0x4f26b731, 0x46cb, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче