diff --git a/gfx/src/gtk/nsFontMetricsGTK.cpp b/gfx/src/gtk/nsFontMetricsGTK.cpp index c9a60cc0dfb..ababf8d2267 100644 --- a/gfx/src/gtk/nsFontMetricsGTK.cpp +++ b/gfx/src/gtk/nsFontMetricsGTK.cpp @@ -350,6 +350,9 @@ static nsFontCharSetInfo ISO106461 = static nsFontCharSetInfo AdobeSymbol = { "Adobe-Symbol-Encoding", SingleByteConvert, 0, TT_OS2_CPR1_SYMBOL, 0 }; +static nsFontCharSetInfo AdobeEuro = + { "x-adobe-euro", SingleByteConvert, 0, + 0, 0 }; #ifdef MOZ_MATHML static nsFontCharSetInfo CMCMEX = @@ -553,6 +556,9 @@ static nsFontCharSetMap gNoneCharSetMap[] = { { nsnull }, }; static nsFontCharSetMap gSpecialCharSetMap[] = { { "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 { "cmex10-adobe-fontspecific", &FLG_NONE, &CMCMEX }, @@ -621,11 +627,34 @@ static PRUint16* gDoubleByteSpecialCharsCCMap = nsnull; // fonts are too large to use is western fonts. // Here we define those characters. // -static PRUnichar gDoubleByteSpecialChars[] = { - 0x0152, 0x0153, 0x0160, 0x0161, 0x0178, 0x017D, 0x017E, 0x0192, - 0x02C6, 0x02DC, 0x2013, 0x2014, 0x2018, 0x2019, 0x201A, 0x201C, - 0x201D, 0x201E, 0x2020, 0x2021, 0x2022, 0x2026, 0x2030, 0x2039, - 0x203A, 0x20AC, 0x2122, +static const PRUnichar gDoubleByteSpecialChars[] = { + 0x0152, /* LATIN CAPITAL LIGATURE OE */ + 0x0153, /* LATIN SMALL LIGATURE OE */ + 0x0160, /* LATIN CAPITAL LETTER S WITH CARON */ + 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 }; @@ -4612,8 +4641,12 @@ if (gAllowDoubleByteSpecialChars) { // add the symbol font before the early transliterator // to get the bullet (hack) - nsCAutoString ffre("*-symbol-adobe-fontspecific"); - nsFontGTK* symbol_font = TryNodes(ffre, 0x0030); + nsCAutoString symbol_ffre("*-symbol-adobe-fontspecific"); + 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 // 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)) { 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)) { FIND_FONT_PRINTF((" transliterate special chars for single byte docs")); return sub_font; diff --git a/intl/uconv/macbuild/uconv.xml b/intl/uconv/macbuild/uconv.xml index 7a6da14d103..143d1a60749 100644 --- a/intl/uconv/macbuild/uconv.xml +++ b/intl/uconv/macbuild/uconv.xml @@ -2557,6 +2557,13 @@ Text Debug + + Name + nsUnicodeToAdobeEuro.cpp + MacOS + Text + Debug + @@ -3659,6 +3666,11 @@ nsUCRegUtils.cpp MacOS + + Name + nsUnicodeToAdobeEuro.cpp + MacOS + @@ -6165,6 +6177,13 @@ Text Debug + + Name + nsUnicodeToAdobeEuro.cpp + MacOS + Text + Debug + @@ -7267,6 +7286,11 @@ nsUCRegUtils.cpp MacOS + + Name + nsUnicodeToAdobeEuro.cpp + MacOS + @@ -7995,6 +8019,12 @@ nsUnicodeToGEOSTD8.cpp MacOS + + uconv.shlb + Name + nsUnicodeToAdobeEuro.cpp + MacOS + Mac Decoder diff --git a/intl/uconv/src/nsUConvModule.cpp b/intl/uconv/src/nsUConvModule.cpp index 7306105c893..f7a4bca5ac6 100644 --- a/intl/uconv/src/nsUConvModule.cpp +++ b/intl/uconv/src/nsUConvModule.cpp @@ -186,6 +186,7 @@ #include "nsUnicodeToUserDefined.h" #include "nsUnicodeToSymbol.h" #include "nsUnicodeToZapfDingbat.h" +#include "nsUnicodeToAdobeEuro.h" #include "nsMacArabicToUnicode.h" #include "nsMacDevanagariToUnicode.h" #include "nsMacFarsiToUnicode.h" @@ -1281,6 +1282,11 @@ static const nsModuleComponentInfo components[] = NS_UNICODEENCODER_CONTRACTID_BASE "x-zapf-dingbats", 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, NS_UNICODEENCODER_CONTRACTID_BASE "x-mac-arabic", diff --git a/intl/uconv/ucvlatin/Makefile.in b/intl/uconv/ucvlatin/Makefile.in index 81689dc470b..61fc91c34e7 100644 --- a/intl/uconv/ucvlatin/Makefile.in +++ b/intl/uconv/ucvlatin/Makefile.in @@ -160,6 +160,7 @@ CPPSRCS = \ nsUnicodeToUserDefined.cpp \ nsUnicodeToSymbol.cpp \ nsUnicodeToZapfDingbat.cpp \ + nsUnicodeToAdobeEuro.cpp \ $(NULL) EXPORTS = nsUCvLatinCID.h diff --git a/intl/uconv/ucvlatin/nsUCvLatinCID.h b/intl/uconv/ucvlatin/nsUCvLatinCID.h index e9bccd89694..f67c1eada00 100644 --- a/intl/uconv/ucvlatin/nsUCvLatinCID.h +++ b/intl/uconv/ucvlatin/nsUCvLatinCID.h @@ -585,6 +585,10 @@ #define NS_UNICODETOZAPFDINGBATS_CID \ { 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} #define NS_UNICODETOTIS620WIN_CID \ { 0x4f26b731, 0x46cb, 0x11d3, {0xb3, 0xc3, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70}}