mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 05:30:29 +00:00
backing out bustage caused by jshin
This commit is contained in:
parent
77e77d4c51
commit
3d21aea27f
@ -67,7 +67,7 @@ extern PRUint16* CreateEmptyCCMap();
|
||||
extern PRUint16* MapToCCMap(PRUint32* aMap);
|
||||
extern PRUint16* MapperToCCMap(nsICharRepresentable *aMapper);
|
||||
extern void FreeCCMap(PRUint16* &aMap);
|
||||
extern PRBool NextNonEmptyCCMapPage(const PRUint16 *, PRUint32 *);
|
||||
extern PRBool NextNonEmptyCCMapPage(PRUint16 *, PRUint32 *);
|
||||
extern PRBool IsSameCCMap(PRUint16* ccmap1, PRUint16* ccmap2);
|
||||
#ifdef DEBUG
|
||||
void printCCMap(PRUint16* aCCMap);
|
||||
|
@ -627,14 +627,42 @@ atomToName(nsIAtom* aAtom)
|
||||
|
||||
static PRUint16* gUserDefinedCCMap = nsnull;
|
||||
static PRUint16* gEmptyCCMap = nsnull;
|
||||
static PRUint16* gDoubleByteSpecialCharsCCMap = nsnull;
|
||||
|
||||
//
|
||||
// smart quotes (and other special chars) in Asian (double byte)
|
||||
// fonts are too large to use is western fonts.
|
||||
// Here we define those characters.
|
||||
//
|
||||
static const PRUint16 gDoubleByteSpecialCharsCCMap[] = {
|
||||
#include "dbyte_special_chars.ccmap"
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
@ -821,6 +849,7 @@ FreeGlobals(void)
|
||||
}
|
||||
FreeCCMap(gUserDefinedCCMap);
|
||||
FreeCCMap(gEmptyCCMap);
|
||||
FreeCCMap(gDoubleByteSpecialCharsCCMap);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -864,6 +893,15 @@ InitGlobals(nsIDeviceContext *aDevice)
|
||||
if (NS_SUCCEEDED(rv))
|
||||
gAllowDoubleByteSpecialChars = val;
|
||||
|
||||
// setup the double byte font special chars glyph map
|
||||
nsCompressedCharMap specialchars_ccmapObj;
|
||||
for (int i=0; gDoubleByteSpecialChars[i]; i++) {
|
||||
specialchars_ccmapObj.SetChar(gDoubleByteSpecialChars[i]);
|
||||
}
|
||||
gDoubleByteSpecialCharsCCMap = specialchars_ccmapObj.NewCCMap();
|
||||
if (!gDoubleByteSpecialCharsCCMap)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
PRInt32 scale_minimum = 0;
|
||||
rv = gPref->GetIntPref("font.scale.outline.min", &scale_minimum);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@ -2215,15 +2253,8 @@ SetUpFontCharSetInfo(nsFontCharSetInfo* aSelf)
|
||||
if ((aSelf->Convert == DoubleByteConvert)
|
||||
&& (!gAllowDoubleByteSpecialChars)) {
|
||||
PRUint16* ccmap = aSelf->mCCMap;
|
||||
PRUint32 page = CCMAP_BEGIN_AT_START_OF_MAP;
|
||||
const PRUint16* specialmap = gDoubleByteSpecialCharsCCMap;
|
||||
while (NextNonEmptyCCMapPage(specialmap, &page)) {
|
||||
PRUint32 pagechar = page;
|
||||
for (int i=0; i < CCMAP_BITS_PER_PAGE; i++) {
|
||||
if (CCMAP_HAS_CHAR(specialmap, pagechar))
|
||||
CCMAP_UNSET_CHAR(ccmap, pagechar);
|
||||
pagechar++;
|
||||
}
|
||||
for (int i=0; gDoubleByteSpecialChars[i]; i++) {
|
||||
CCMAP_UNSET_CHAR(ccmap, gDoubleByteSpecialChars[i]);
|
||||
}
|
||||
}
|
||||
return PR_TRUE;
|
||||
|
@ -111,13 +111,13 @@ MapperToCCMap(nsICharRepresentable *aMapper)
|
||||
}
|
||||
|
||||
PRBool
|
||||
NextNonEmptyCCMapPage(const PRUint16* aCCMap, PRUint32 *aPageStart)
|
||||
NextNonEmptyCCMapPage(PRUint16* aCCMap, PRUint32 *aPageStart)
|
||||
{
|
||||
int i, j, l;
|
||||
int planeend = 0;
|
||||
int planestart = 0;
|
||||
unsigned int k;
|
||||
const PRUint16* ccmap;
|
||||
PRUint16* ccmap;
|
||||
PRUint32 pagestart = *aPageStart;
|
||||
|
||||
if(CCMAP_FLAG(aCCMap) & CCMAP_SURROGATE_FLAG) {
|
||||
@ -154,20 +154,20 @@ NextNonEmptyCCMapPage(const PRUint16* aCCMap, PRUint32 *aPageStart)
|
||||
}
|
||||
|
||||
// walk thru the upper pointers
|
||||
const PRUint16 *upper = &ccmap[0];
|
||||
PRUint16 *upper = &ccmap[0];
|
||||
for (i=upper_index; i<CCMAP_NUM_UPPER_POINTERS; i++, mid_index=0) {
|
||||
if (upper[i] == CCMAP_EMPTY_MID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// walk the mid array
|
||||
const PRUint16 *mid = &ccmap[upper[i]];
|
||||
PRUint16 *mid = &ccmap[upper[i]];
|
||||
for (j=mid_index; j<CCMAP_NUM_MID_POINTERS; j++) {
|
||||
if (mid[j] == CCMAP_EMPTY_PAGE)
|
||||
continue;
|
||||
|
||||
// walk the page
|
||||
const ALU_TYPE *page = (ALU_TYPE*)&ccmap[mid[j]];
|
||||
ALU_TYPE *page = (ALU_TYPE*)&ccmap[mid[j]];
|
||||
for (k=0; k<CCMAP_NUM_ALUS_PER_PAGE; k++) {
|
||||
if (page[k] != 0) {
|
||||
PRUint32 base = (i*CCMAP_NUM_UCHARS_PER_MID) + (j*CCMAP_NUM_UCHARS_PER_PAGE);
|
||||
|
@ -67,7 +67,7 @@ extern PRUint16* CreateEmptyCCMap();
|
||||
extern PRUint16* MapToCCMap(PRUint32* aMap);
|
||||
extern PRUint16* MapperToCCMap(nsICharRepresentable *aMapper);
|
||||
extern void FreeCCMap(PRUint16* &aMap);
|
||||
extern PRBool NextNonEmptyCCMapPage(const PRUint16 *, PRUint32 *);
|
||||
extern PRBool NextNonEmptyCCMapPage(PRUint16 *, PRUint32 *);
|
||||
extern PRBool IsSameCCMap(PRUint16* ccmap1, PRUint16* ccmap2);
|
||||
#ifdef DEBUG
|
||||
void printCCMap(PRUint16* aCCMap);
|
||||
|
@ -1,204 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* Contributor(s): Jungshik Shin <jshin@mailaps.org> (Original developer)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*========================================================
|
||||
This file contains a precompiled CCMap for a class of Unicode
|
||||
characters (blank_glyph) to be identified quickly by Mozilla.
|
||||
It was generated by ccmapbin.pl which you can find under
|
||||
mozilla/intl/unicharutil/tools.
|
||||
|
||||
Enumerated below are characters included in the precompiled CCMap
|
||||
which is human-readable but not so human-friendly. If you
|
||||
needs to modify the list of characters belonging to "blank_glyph",
|
||||
you have to make a new file (with the name of your choice)
|
||||
listing characters (one character per line) you want to put
|
||||
into "blank_glyph" in the format
|
||||
|
||||
0xuuuu // comment
|
||||
|
||||
In addition, the input file can have the following optional lines that
|
||||
read
|
||||
|
||||
CLASS::blank_glyph
|
||||
DESCRIPTION:: description of a character class
|
||||
FILE:: mozilla source file to include output files
|
||||
|
||||
|
||||
Then, run the following in the current directory.
|
||||
|
||||
perl ccmapbin.pl input_file [blank_glyph]
|
||||
|
||||
which will generate blank_glyph.ccmap.
|
||||
|
||||
(see bug 180266 and bug 167136)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
CLASS:: blank_glyph
|
||||
|
||||
0X3000 : IDEOGRAPHIC SPACE
|
||||
0X3164 : HANGUL COMPATIBILITY JAMO FILLER
|
||||
0X00A0 : NO-BREAK SPACE
|
||||
0X0020 : SPACE
|
||||
0X115F : HANGUL LEADING CONSONANT FILLER
|
||||
0X1160 : HANGUL VOWEL FILLER
|
||||
0XFEFF : BYTE ORDER MARK^L
|
||||
0XFFA0 : HALFWIDTH HANGUL FILLER
|
||||
0XFFF9 : INTERLINEAR ANNOTATION ANCHOR
|
||||
0XFFFA : INTERLINEAR ANNOTATION SEPERATOR
|
||||
0XFFFB : INTERLINEAR ANNOTATION TERMINATOR
|
||||
0X2000 : EN QUAD
|
||||
0X2001 : EM QUAD
|
||||
0X2002 : EN SPACE
|
||||
0X2003 : EM SPACE
|
||||
0X2004 : THREE-PER-EM SPACE
|
||||
0X2005 : FOUR-PER-EM SPACE
|
||||
0X2006 : SIX-PER-EM SPACE
|
||||
0X2007 : FIGURE SPACE
|
||||
0X2008 : PUNCTUATION SPACE
|
||||
0X2009 : THIN SPACE
|
||||
0X200A : HAIR SPACE
|
||||
0X200B : ZERO WIDTH SPACE
|
||||
0X200C : ZERO WIDTH NON-JOINER
|
||||
0X200D : ZERO WIDTH JOINER
|
||||
0X200E : LEFT-TO-RIGHT MARK
|
||||
0X200F : RIGHT-TO-LEFT MARK
|
||||
0X202A : LEFT-TO-RIGHT EMBEDDING
|
||||
0X202B : RIGHT-TO-LEFT EMBEDDING
|
||||
0X202C : POP DIRECTIONAL FORMATTING
|
||||
0X202D : LEFT-TO-RIGHT OVERRIDE
|
||||
0X202E : RIGHT-TO-LEFT OVERRIDE
|
||||
0X202F : NARROW NO-BREAK SPACE
|
||||
*/
|
||||
|
||||
#if (defined(IS_LITTLE_ENDIAN) || ALU_SIZE == 16)
|
||||
// Precompiled CCMap for Big Endian(16bit)/Little Endian(16/32/64bit)
|
||||
/* 0000 */ 0x0030,0x0050,0x0070,0x0090,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x00C0,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0020,0x0060,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0001,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0080 */ 0xFFFF,0x0000,0xFC00,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x00A0,0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0010,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x00D0,0x00E0,
|
||||
/* 00d0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8000,
|
||||
/* 00e0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0E00,
|
||||
#elif (ALU_SIZE == 32)
|
||||
// Precompiled CCMap for Big Endian(32bit)
|
||||
/* 0000 */ 0x0030,0x0050,0x0070,0x0090,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x00C0,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0020,0x0060,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0001,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0080 */ 0x0000,0xFFFF,0x0000,0xFC00,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x00A0,0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0010,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x00D0,0x00E0,
|
||||
/* 00d0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,
|
||||
/* 00e0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0E00,0x0000,
|
||||
#elif (ALU_SIZE == 64)
|
||||
// Precompiled CCMap for Big Endian(64bit)
|
||||
/* 0000 */ 0x0030,0x0050,0x0070,0x0090,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x00C0,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0020,0x0060,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x8000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0080 */ 0x0000,0xFC00,0x0000,0xFFFF,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x00A0,0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0001,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0010,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x00D0,0x00E0,
|
||||
/* 00d0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0001,0x0000,0x0000,0x0E00,0x0000,0x0000,0x0000,
|
||||
#else
|
||||
#error "We don't support this architecture."
|
||||
#endif
|
||||
|
@ -1347,17 +1347,7 @@ PLHashAllocOps fontmap_HashAllocOps = {
|
||||
fontmap_AllocEntry, fontmap_FreeEntry
|
||||
};
|
||||
|
||||
// See bug 167136. Characters included in the list (see one of included
|
||||
// files for the list) is the union of the set included in
|
||||
// SHOULD_BE_SPACE macro replaced by this list and the set compiled by
|
||||
// Keith Packard to use in fonts.conf of fontconfig package.
|
||||
// Some of this may not have to be here because they're filtered out before
|
||||
// reaching here. Needs further investigation.
|
||||
static const PRUint16 gCharsWithBlankGlyphCCMap[] = {
|
||||
#include "blank_glyph.ccmap"
|
||||
};
|
||||
|
||||
#define SHOULD_BE_SPACE_CHAR(ch) (CCMAP_HAS_CHAR(gCharsWithBlankGlyphCCMap,ch))
|
||||
#define SHOULD_BE_SPACE_CHAR(ch) ((ch)==0x0020 || (ch)==0x00A0 || ((ch)>=0x2000 && ((ch)<=0x200B || (ch)==0x3000)))
|
||||
|
||||
enum {
|
||||
eTTPlatformIDUnicode = 0,
|
||||
|
@ -1,161 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* Contributor(s): Jungshik Shin <jshin@mailaps.org> (Original developer)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*========================================================
|
||||
This file contains a precompiled CCMap for a class of Unicode
|
||||
characters (dbyte_special_chars) to be identified quickly by Mozilla.
|
||||
It was generated by ccmapbin.pl which you can find under
|
||||
mozilla/intl/unicharutil/tools.
|
||||
|
||||
Enumerated below are characters included in the precompiled CCMap
|
||||
which is human-readable but not so human-friendly. If you
|
||||
needs to modify the list of characters belonging to "dbyte_special_chars",
|
||||
you have to make a new file (with the name of your choice)
|
||||
listing characters (one character per line) you want to put
|
||||
into "dbyte_special_chars" in the format
|
||||
|
||||
0xuuuu // comment
|
||||
|
||||
In addition, the input file can have the following optional lines that
|
||||
read
|
||||
|
||||
CLASS::dbyte_special_chars
|
||||
DESCRIPTION:: description of a character class
|
||||
FILE:: mozilla source file to include output files
|
||||
|
||||
|
||||
Then, run the following in the current directory.
|
||||
|
||||
perl ccmapbin.pl input_file [dbyte_special_chars]
|
||||
|
||||
which will generate dbyte_special_chars.ccmap.
|
||||
|
||||
(see bug 180266 and bug 167136)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
#if (defined(IS_LITTLE_ENDIAN) || ALU_SIZE == 16)
|
||||
// Precompiled CCMap for Big Endian(16bit)/Little Endian(16/32/64bit)
|
||||
/* 0000 */ 0x0030,0x0010,0x0060,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0020,0x0040,0x0050,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x000C,0x0003,0x6100,
|
||||
0x0000,0x0004,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0040,0x1000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0070,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0070 */ 0x0000,0x7718,0x0047,0x0601,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x1000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0004,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#elif (ALU_SIZE == 32)
|
||||
// Precompiled CCMap for Big Endian(32bit)
|
||||
/* 0000 */ 0x0030,0x0010,0x0060,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0020,0x0040,0x0050,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0000,0x0000,0x000C,0x0000,0x6100,0x0003,
|
||||
0x0004,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x1000,0x0040,0x0000,0x0000,
|
||||
/* 0060 */ 0x0070,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0070 */ 0x7718,0x0000,0x0601,0x0047,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x1000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0004,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#elif (ALU_SIZE == 64)
|
||||
// Precompiled CCMap for Big Endian(64bit)
|
||||
/* 0000 */ 0x0030,0x0010,0x0060,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0020,0x0040,0x0050,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0000,0x0000,0x6100,0x0003,0x000C,0x0000,
|
||||
0x0000,0x0000,0x0004,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1000,0x0040,
|
||||
/* 0060 */ 0x0070,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0070 */ 0x0601,0x0047,0x7718,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x1000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0004,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#else
|
||||
#error "We don't support this architecture."
|
||||
#endif
|
||||
|
@ -861,12 +861,40 @@ atomToName(nsIAtom* aAtom)
|
||||
//
|
||||
// smart quotes (and other special chars) in Asian (double byte)
|
||||
// fonts are too large to use is western fonts.
|
||||
// To update the list, see one of files included below. (bug 180266)
|
||||
// Here we define those characters.
|
||||
//
|
||||
static const PRUint16 gDoubleByteSpecialCharsCCMap[] = {
|
||||
#include "dbyte_special_chars.ccmap"
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
|
||||
static PRBool
|
||||
FreeCharSetMap(nsHashKey* aKey, void* aData, void* aClosure)
|
||||
{
|
||||
@ -1006,7 +1034,7 @@ nsFontMetricsXlibContext::~nsFontMetricsXlibContext()
|
||||
}
|
||||
FreeCCMap(mUserDefinedCCMap);
|
||||
FreeCCMap(mEmptyCCMap);
|
||||
PR_Free(mDoubleByteSpecialCharsCCMap);
|
||||
FreeCCMap(mDoubleByteSpecialCharsCCMap);
|
||||
|
||||
/* Free memory allocated by |CopyFontCharSetMapXlib()| */
|
||||
if (mCharSetMap) {
|
||||
@ -1159,11 +1187,14 @@ nsFontMetricsXlibContext::Init(nsIDeviceContext *aDevice, PRBool aPrintermode)
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mAllowDoubleByteSpecialChars = val;
|
||||
|
||||
PRUint32 dbmapSize = sizeof(gDoubleByteSpecialCharsCCMap);
|
||||
mDoubleByteSpecialCharsCCMap = (PRUint16*)PR_Malloc(dbmapSize);
|
||||
// setup the double byte font special chars glyph map
|
||||
nsCompressedCharMap specialchars_ccmapObj;
|
||||
for (int i=0; gDoubleByteSpecialChars[i]; i++) {
|
||||
specialchars_ccmapObj.SetChar(gDoubleByteSpecialChars[i]);
|
||||
}
|
||||
mDoubleByteSpecialCharsCCMap = specialchars_ccmapObj.NewCCMap();
|
||||
if (!mDoubleByteSpecialCharsCCMap)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
memcpy(mDoubleByteSpecialCharsCCMap, gDoubleByteSpecialCharsCCMap, dbmapSize);
|
||||
|
||||
PRInt32 scale_minimum = 0;
|
||||
rv = mPref->GetIntPref("font.scale.outline.min", &scale_minimum);
|
||||
@ -2571,15 +2602,8 @@ SetUpFontCharSetInfo(nsFontMetricsXlibContext *aFmctx, nsFontCharSetInfoXlib* aS
|
||||
if ((aSelf->Convert == DoubleByteConvert)
|
||||
&& (!aFmctx->mAllowDoubleByteSpecialChars)) {
|
||||
PRUint16* ccmap = aSelf->mCCMap;
|
||||
PRUint32 page = CCMAP_BEGIN_AT_START_OF_MAP;
|
||||
const PRUint16* specialmap = aFmctx->mDoubleByteSpecialCharsCCMap;
|
||||
while (NextNonEmptyCCMapPage(specialmap, &page)) {
|
||||
PRUint32 pagechar = page;
|
||||
for (int i=0; i < CCMAP_BITS_PER_PAGE; i++) {
|
||||
if (CCMAP_HAS_CHAR(specialmap, pagechar))
|
||||
CCMAP_UNSET_CHAR(ccmap, pagechar);
|
||||
pagechar++;
|
||||
}
|
||||
for (int i=0; gDoubleByteSpecialChars[i]; i++) {
|
||||
CCMAP_UNSET_CHAR(ccmap, gDoubleByteSpecialChars[i]);
|
||||
}
|
||||
}
|
||||
return PR_TRUE;
|
||||
|
@ -1,385 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
# This script is used to generate precompiled CCMap files.
|
||||
# See bug 180266 for details.
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw($fill_fmt $fu_sz);
|
||||
use vars qw($e_mid_offset $e_pg_offset $f_mid_offset $f_pg_offset);
|
||||
|
||||
(@ARGV < 1 ) and usage();
|
||||
|
||||
my $ifn = $ARGV[0];
|
||||
|
||||
my ($ifh, $class);
|
||||
open $ifh , "< $ifn" or die "Cannot open $ifn";
|
||||
|
||||
if (@ARGV >= 2) {
|
||||
$class = $ARGV[1];
|
||||
printf STDERR
|
||||
"$0:\n\t CLASS $class is specified in the command line.\n" .
|
||||
"\t The class spec. in the input file will be ignored.\n";
|
||||
}
|
||||
|
||||
use constant PLANE_SZ => 0x10000;
|
||||
use constant MID_SZ => PLANE_SZ / 16;
|
||||
use constant PG_SZ => MID_SZ / 16;
|
||||
|
||||
# Unlike FillInfo() method in Mozilla, let's use 16bit integer
|
||||
# to pack the character coverage/representability. This way,
|
||||
# we can just copy fillinfo to fill up page maps later.
|
||||
use constant {
|
||||
FILL_SZ => PLANE_SZ / 16,
|
||||
MID_FILL_SZ => MID_SZ / 16,
|
||||
PG_FILL_SZ => PG_SZ / 16
|
||||
};
|
||||
|
||||
|
||||
|
||||
# network byte order short. actually, byte order doesn't matter.
|
||||
$fill_fmt = "n1";
|
||||
$fu_sz = length(pack $fill_fmt, 0); # fillinfo unit size in byte (size of short)
|
||||
|
||||
$e_mid_offset = 16;
|
||||
$e_pg_offset = 32;
|
||||
$f_pg_offset = 0;
|
||||
$f_mid_offset = 0;
|
||||
|
||||
my @ccmap = ();
|
||||
my %pg_offsets = ();
|
||||
my @fillinfo = ();
|
||||
my %comments = ();
|
||||
|
||||
#get all upper pointers to point at empty mid pointers
|
||||
push @ccmap, ($e_mid_offset) x 16;
|
||||
#get all mid-pointers to point at empty page.
|
||||
push @ccmap, ($e_pg_offset) x 16;
|
||||
push @ccmap, (0) x 16; # empty pg
|
||||
|
||||
|
||||
&read_input(\@fillinfo,$ifh,\%comments);
|
||||
|
||||
if (!defined($class) && !defined($comments{'CLASS'}))
|
||||
{
|
||||
printf STDERR "Class name is not specified in the cmd line. " .
|
||||
"Neither is it found in the input file.\n\n" ;
|
||||
usage();
|
||||
}
|
||||
|
||||
$class = $comments{'CLASS'} if (! defined($class));
|
||||
|
||||
foreach my $mid (0 .. 15)
|
||||
{
|
||||
my(@mid_fill) = splice @fillinfo, 0, MID_FILL_SZ;
|
||||
# convert 256(MID_FILL_SZ) 16bit integers to a string of 256 * $fu_sz
|
||||
# characters.
|
||||
my($mid_str) = pack $fill_fmt x MID_FILL_SZ, @mid_fill;
|
||||
|
||||
# for an empty mid, upper-pointer is already pointing to the empty mid.
|
||||
next if ($mid_str eq "\0" x ($fu_sz * MID_FILL_SZ));
|
||||
|
||||
# for a full mid, add full mid if necessary.
|
||||
if ($mid_str eq "\xff" x ($fu_sz * MID_FILL_SZ)) {
|
||||
($f_mid_offset, $f_pg_offset) =
|
||||
add_full_mid(\@ccmap, $f_pg_offset) unless ($f_mid_offset);
|
||||
$ccmap[$mid] = $f_mid_offset;
|
||||
next;
|
||||
}
|
||||
|
||||
my $mid_offset = add_new_mid(\@ccmap,$mid);
|
||||
|
||||
foreach my $pg (0 .. 15) {
|
||||
my(@pg_fill) = splice @mid_fill, 0, PG_FILL_SZ;
|
||||
my($pg_str) = pack $fill_fmt x PG_FILL_SZ, @pg_fill;
|
||||
|
||||
# for an empty pg, mid-pointer is already pointing to the empty page.
|
||||
next if ($pg_str eq "\x0" x ($fu_sz * PG_FILL_SZ));
|
||||
|
||||
# for a full pg, add the full pg if necessary.
|
||||
# and set the mid-pointer to the full pg offset.
|
||||
if ($pg_str eq "\xff" x ($fu_sz * PG_FILL_SZ)) {
|
||||
if (! $f_pg_offset) {
|
||||
$f_pg_offset = @ccmap;
|
||||
#for the full pg, endianess and ALU size are immaterial.
|
||||
push @ccmap, (0xffff) x 16;
|
||||
}
|
||||
$ccmap[$mid_offset + $pg ] = $f_pg_offset;
|
||||
next;
|
||||
}
|
||||
|
||||
$ccmap[$mid_offset + $pg] = @ccmap;
|
||||
|
||||
# 'Flag' the offset as the beginning of a page with actual data as
|
||||
# opposed to pointer sections.
|
||||
$pg_offsets{scalar @ccmap} = @ccmap;
|
||||
|
||||
push @ccmap, @pg_fill;
|
||||
}
|
||||
}
|
||||
|
||||
&print_ccmap(\@ccmap, \%pg_offsets, $class . ".ccmap", \%comments);
|
||||
#&print_ccmap(\@ccmap, "32BE", \%pg_offsets, $class . ".32be", \%comments);
|
||||
#&print_ccmap(\@ccmap, "64BE", \%pg_offsets, $class . ".64be", \%comments);
|
||||
|
||||
exit 0;
|
||||
|
||||
# END of Main
|
||||
|
||||
sub usage
|
||||
{
|
||||
print STDERR <<USAGE;
|
||||
Usage: $0 input_file [class]
|
||||
|
||||
The output file "class.ccmap" will be generated with
|
||||
all three cases LE(16/32/64bit)/BE(16bit), BE(32bit), and BE(64bit)
|
||||
put together.
|
||||
|
||||
When 'class' is omitted, it has to be specified in the input file with
|
||||
the following syntax
|
||||
|
||||
CLASS:: class_name
|
||||
|
||||
USAGE
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
||||
sub read_input
|
||||
{
|
||||
my($fillinfo_p, $input, $comments_p) = @_;
|
||||
@$fillinfo_p = (0) x FILL_SZ;
|
||||
my($lc)=0;
|
||||
while (<$input>)
|
||||
{
|
||||
$lc++;
|
||||
chomp;
|
||||
/^CLASS::/ and
|
||||
($comments_p->{'CLASS'} = $_) =~ s/^CLASS::\s*([a-zA-Z0-9_]+).*$/$1/,
|
||||
next;
|
||||
/^DESCRIPTION::/ and
|
||||
($comments_p->{'DESC'} = $_) =~ s/^DESCRIPTION::\s*//, next;
|
||||
/^FILE::/ and
|
||||
($comments_p->{'FILE'} = $_) =~ s/^FILE::\s*//, next;
|
||||
|
||||
next unless /^\s*0[Xx][0-9A-Fa-f]{4}/;
|
||||
|
||||
/^\s*(.*)\s*$/;
|
||||
my ($u, $comment) = split /\s+/, $1, 2;
|
||||
$u =~ s/,//g;
|
||||
$u =~ tr/A-Z/a-z/;
|
||||
next if /^0x.*[^0-9a-f]+.*/;
|
||||
|
||||
my $usv = oct $u;
|
||||
if ( 0xd800 <= $usv && $usv <= 0xdfff) { #surrogate pair
|
||||
printf STDERR "Invalid input $u at %4d\n", $lc;
|
||||
}
|
||||
$fillinfo_p->[($usv >> 4) & 0xfff] |= (1 << ($usv & 0x0f));
|
||||
# printf STDERR "input %s(%04x) \@line %d : put %04x @ %04x\n",
|
||||
# $u,$usv, $lc, (1 << ($usv & 0x0f)), ($usv >> 4) & 0xfff;
|
||||
|
||||
$comments_p->{$usv} = "";
|
||||
|
||||
# Remove '/*' and '*/' (C style comment) or '//' (C++ style comment)
|
||||
# or ':' and store only the textual content of the comment.
|
||||
if (defined($comment)) {
|
||||
($comments_p->{$usv} = $comment)
|
||||
=~ s !
|
||||
(?:/\*|//|:)? # '/*', '//' or ':' or NULL. Do not store.
|
||||
\s* # zero or more of white space(s)
|
||||
([^*]+) # one or more of non-white space(s).Store it
|
||||
# in $1 for the reference in replace part.
|
||||
\s* # zero or more of white space(s)
|
||||
(?:\*/)? # '*/' or NONE. Do not store
|
||||
!$1!sx # replace the whole match with $1 stored above.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub add_full_mid
|
||||
{
|
||||
my($ccmap_p, $f_pg_offset) = @_;
|
||||
# add a full page if not yet added.
|
||||
if (! $f_pg_offset) {
|
||||
$f_pg_offset = @$ccmap_p;
|
||||
push @$ccmap_p, (0xffff) x 16;
|
||||
}
|
||||
# add the full mid-pointer array with all the pointers pointing to the full page.
|
||||
my $f_mid_offset = @$ccmap_p;
|
||||
push @$ccmap_p, ($f_pg_offset) x 16;
|
||||
return ($f_mid_offset, $f_pg_offset);
|
||||
}
|
||||
|
||||
sub add_new_mid
|
||||
{
|
||||
my($ccmap_p, $mid) = @_;
|
||||
my $mid_offset = @$ccmap_p;
|
||||
$ccmap_p->[$mid] = $mid_offset;
|
||||
#by default, all mid-pointers point to the empty page.
|
||||
push @$ccmap_p, ($e_pg_offset) x 16;
|
||||
return $mid_offset;
|
||||
}
|
||||
|
||||
sub print_ccmap
|
||||
{
|
||||
my($ccmap_p,$pg_offset_p, $ofn, $comments_p) = @_;
|
||||
|
||||
my(@idxlist);
|
||||
|
||||
open OUT, "> $ofn" or
|
||||
die "cannot open $ofn for output\n";
|
||||
|
||||
print OUT print_preamble($class);
|
||||
|
||||
print OUT "\n/*\n";
|
||||
defined ($comments_p->{'CLASS'}) and
|
||||
print OUT " CLASS:: $comments_p->{'CLASS'}\n";
|
||||
defined ($comments_p->{'DESC'}) and
|
||||
print OUT " DESCRIPTION:: $comments_p->{'DESC'}\n";
|
||||
defined ($comments_p->{'FILE'}) and
|
||||
print OUT " FILE:: $comments_p->{'FILE'}\n";
|
||||
|
||||
print OUT "\n";
|
||||
|
||||
for my $usv (sort keys %$comments_p) {
|
||||
next if ($usv =~ /CLASS/);
|
||||
printf OUT " 0X%04X : %s\n", $usv, $comments_p->{$usv};
|
||||
}
|
||||
|
||||
printf OUT "*/\n\n";
|
||||
|
||||
|
||||
|
||||
# When CCMap is accessed, (PRUint16 *) is casted to
|
||||
# the pointer type of the ALU of a machine.
|
||||
# For little endian machines, the size of the ALU
|
||||
# doesn't matter (16, 32, 64). For Big endian
|
||||
# machines with 32/64 bit ALU, two/four 16bit words
|
||||
# have to be rearranged to be interpreted correctly
|
||||
# as 32bit or 64bit integers with the 16bit word
|
||||
# at the lowest addr. taking the highest place value.
|
||||
# This shuffling is NOT necessary for the upper pointer section
|
||||
# and mid-pointer sections.
|
||||
|
||||
foreach my $fmt ("LE", "32BE", "64BE")
|
||||
{
|
||||
for ($fmt) {
|
||||
/LE/ and do {
|
||||
@idxlist = (0, 1, 2, 3);
|
||||
print OUT "#if (defined(IS_LITTLE_ENDIAN) || ALU_SIZE == 16)\n" .
|
||||
"// Precompiled CCMap for Big Endian(16bit)/Little" .
|
||||
" Endian(16/32/64bit) \n";
|
||||
last;
|
||||
};
|
||||
/32BE/ and do {
|
||||
@idxlist = (1, 0, 3, 2);
|
||||
print OUT "#elif (ALU_SIZE == 32)\n" .
|
||||
"// Precompiled CCMap for Big Endian(32bit)\n";
|
||||
last;
|
||||
};
|
||||
/64BE/ and do {
|
||||
@idxlist = (3, 2, 1, 0);
|
||||
print OUT "#elif (ALU_SIZE == 64)\n" .
|
||||
"// Precompiled CCMap for Big Endian(64bit)\n";
|
||||
last;
|
||||
};
|
||||
}
|
||||
|
||||
my($offset) = 0;
|
||||
while ($offset < @$ccmap_p) {
|
||||
printf OUT "/* %04x */ ", $offset;
|
||||
for my $i (0 .. 3) {
|
||||
for my $j (defined($pg_offset_p->{$offset}) ? @idxlist : (0,1,2,3)) {
|
||||
printf OUT "0x%04X,", $ccmap_p->[$offset + $i * 4 + $j];
|
||||
}
|
||||
print OUT "\n " if $i==1;
|
||||
}
|
||||
print OUT "\n";
|
||||
$offset += 16;
|
||||
}
|
||||
}
|
||||
|
||||
print OUT <<END;
|
||||
#else
|
||||
#error "We don't support this architecture."
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
close OUT;
|
||||
}
|
||||
|
||||
sub print_preamble
|
||||
{
|
||||
|
||||
my($class) = @_;
|
||||
|
||||
sprintf <<PREAMBLE;
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* Contributor(s): Jungshik Shin <jshin\@mailaps.org> (Original developer)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*========================================================
|
||||
This file contains a precompiled CCMap for a class of Unicode
|
||||
characters ($class) to be identified quickly by Mozilla.
|
||||
It was generated by ccmapbin.pl which you can find under
|
||||
mozilla/intl/unicharutil/tools.
|
||||
|
||||
Enumerated below are characters included in the precompiled CCMap
|
||||
which is human-readable but not so human-friendly. If you
|
||||
needs to modify the list of characters belonging to "$class",
|
||||
you have to make a new file (with the name of your choice)
|
||||
listing characters (one character per line) you want to put
|
||||
into "$class" in the format
|
||||
|
||||
0xuuuu // comment
|
||||
|
||||
In addition, the input file can have the following optional lines that
|
||||
read
|
||||
|
||||
CLASS::$class
|
||||
DESCRIPTION:: description of a character class
|
||||
FILE:: mozilla source file to include output files
|
||||
|
||||
|
||||
Then, run the following in the current directory.
|
||||
|
||||
perl ccmapbin.pl input_file [$class]
|
||||
|
||||
which will generate $class.ccmap.
|
||||
|
||||
(see bug 180266 and bug 167136)
|
||||
|
||||
*/
|
||||
|
||||
PREAMBLE
|
||||
|
||||
}
|
||||
|
@ -111,13 +111,13 @@ MapperToCCMap(nsICharRepresentable *aMapper)
|
||||
}
|
||||
|
||||
PRBool
|
||||
NextNonEmptyCCMapPage(const PRUint16* aCCMap, PRUint32 *aPageStart)
|
||||
NextNonEmptyCCMapPage(PRUint16* aCCMap, PRUint32 *aPageStart)
|
||||
{
|
||||
int i, j, l;
|
||||
int planeend = 0;
|
||||
int planestart = 0;
|
||||
unsigned int k;
|
||||
const PRUint16* ccmap;
|
||||
PRUint16* ccmap;
|
||||
PRUint32 pagestart = *aPageStart;
|
||||
|
||||
if(CCMAP_FLAG(aCCMap) & CCMAP_SURROGATE_FLAG) {
|
||||
@ -154,20 +154,20 @@ NextNonEmptyCCMapPage(const PRUint16* aCCMap, PRUint32 *aPageStart)
|
||||
}
|
||||
|
||||
// walk thru the upper pointers
|
||||
const PRUint16 *upper = &ccmap[0];
|
||||
PRUint16 *upper = &ccmap[0];
|
||||
for (i=upper_index; i<CCMAP_NUM_UPPER_POINTERS; i++, mid_index=0) {
|
||||
if (upper[i] == CCMAP_EMPTY_MID) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// walk the mid array
|
||||
const PRUint16 *mid = &ccmap[upper[i]];
|
||||
PRUint16 *mid = &ccmap[upper[i]];
|
||||
for (j=mid_index; j<CCMAP_NUM_MID_POINTERS; j++) {
|
||||
if (mid[j] == CCMAP_EMPTY_PAGE)
|
||||
continue;
|
||||
|
||||
// walk the page
|
||||
const ALU_TYPE *page = (ALU_TYPE*)&ccmap[mid[j]];
|
||||
ALU_TYPE *page = (ALU_TYPE*)&ccmap[mid[j]];
|
||||
for (k=0; k<CCMAP_NUM_ALUS_PER_PAGE; k++) {
|
||||
if (page[k] != 0) {
|
||||
PRUint32 base = (i*CCMAP_NUM_UCHARS_PER_MID) + (j*CCMAP_NUM_UCHARS_PER_PAGE);
|
||||
|
@ -67,7 +67,7 @@ extern PRUint16* CreateEmptyCCMap();
|
||||
extern PRUint16* MapToCCMap(PRUint32* aMap);
|
||||
extern PRUint16* MapperToCCMap(nsICharRepresentable *aMapper);
|
||||
extern void FreeCCMap(PRUint16* &aMap);
|
||||
extern PRBool NextNonEmptyCCMapPage(const PRUint16 *, PRUint32 *);
|
||||
extern PRBool NextNonEmptyCCMapPage(PRUint16 *, PRUint32 *);
|
||||
extern PRBool IsSameCCMap(PRUint16* ccmap1, PRUint16* ccmap2);
|
||||
#ifdef DEBUG
|
||||
void printCCMap(PRUint16* aCCMap);
|
||||
|
@ -83,8 +83,6 @@
|
||||
|
||||
#include "nsILineIterator.h"
|
||||
|
||||
#include "nsCompressedCharMap.h"
|
||||
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
@ -4639,16 +4637,65 @@ nsTextFrame::EstimateNumChars(PRUint32 aAvailableWidth,
|
||||
PRUint32 estimatedNumChars = aAvailableWidth / aAverageCharWidth;
|
||||
return estimatedNumChars + estimatedNumChars / 20;
|
||||
}
|
||||
|
||||
// Replaced by precompiled CCMap (see bug 180266). To update the list
|
||||
// of characters, see one of files included below. As for the way
|
||||
// the original list of characters was obtained by Frank Tang, see bug 54467.
|
||||
static const PRUint16 gPuncCharsCCMap[] =
|
||||
|
||||
static PRBool
|
||||
IsPunctuationMark(PRUnichar aChar)
|
||||
{
|
||||
#include "punct_marks.ccmap"
|
||||
};
|
||||
//The following table is generated by a method written by Ftang, see bug 54467.
|
||||
//In case we need to add or substract any character (for example, unicode standard got
|
||||
// updated), the character in table must be kept in strict ascending order
|
||||
static const PRUnichar PuncSet[] =
|
||||
{
|
||||
0x0021, 0x0022, 0x0023, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029,
|
||||
0x002A, 0x002C, 0x002E, 0x002F, 0x003A, 0x003B, 0x003F, 0x0040,
|
||||
0x005B, 0x005C, 0x005D, 0x007B, 0x007D, 0x00A1, 0x00B7, 0x00BF,
|
||||
0x0313, 0x037E, 0x0387, 0x055A, 0x055B, 0x055C, 0x055D, 0x055E,
|
||||
0x055F, 0x0589, 0x05BE, 0x05C0, 0x05C3, 0x05F3, 0x05F4, 0x060C,
|
||||
0x061B, 0x061F, 0x066A, 0x066B, 0x066C, 0x066D, 0x06D4, 0x0700,
|
||||
0x0701, 0x0702, 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, 0x0708,
|
||||
0x0709, 0x070A, 0x070B, 0x070C, 0x070D, 0x0964, 0x0965, 0x0970,
|
||||
0x0DF4, 0x0E4F, 0x0E5A, 0x0E5B, 0x0F04, 0x0F05, 0x0F06, 0x0F07,
|
||||
0x0F08, 0x0F09, 0x0F0A, 0x0F0B, 0x0F0C, 0x0F0D, 0x0F0E, 0x0F0F,
|
||||
0x0F10, 0x0F11, 0x0F12, 0x0F3A, 0x0F3B, 0x0F3C, 0x0F3D, 0x0F85,
|
||||
0x104A, 0x104B, 0x104C, 0x104D, 0x104E, 0x104F, 0x10FB, 0x1361,
|
||||
0x1362, 0x1363, 0x1364, 0x1365, 0x1366, 0x1367, 0x1368, 0x166D,
|
||||
0x166E, 0x169B, 0x169C, 0x16EB, 0x16EC, 0x16ED, 0x17D4, 0x17D5,
|
||||
0x17D6, 0x17D7, 0x17D8, 0x17D9, 0x17DA, 0x17DC, 0x1800, 0x1801,
|
||||
0x1802, 0x1803, 0x1804, 0x1805, 0x1807, 0x1808, 0x1809, 0x180A,
|
||||
0x2016, 0x2017, 0x201A, 0x201E, 0x2020, 0x2021, 0x2022, 0x2023,
|
||||
0x2024, 0x2025, 0x2026, 0x2027, 0x2030, 0x2031, 0x2032, 0x2033,
|
||||
0x2034, 0x2035, 0x2036, 0x2037, 0x2038, 0x203B, 0x203C, 0x203D,
|
||||
0x203E, 0x2041, 0x2042, 0x2043, 0x2045, 0x2046, 0x2048, 0x2049,
|
||||
0x204A, 0x204B, 0x204C, 0x204D, 0x207D, 0x207E, 0x208D, 0x208E,
|
||||
0x2329, 0x232A, 0x3001, 0x3002, 0x3003, 0x3008, 0x3009, 0x300A,
|
||||
0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3010, 0x3011, 0x3014,
|
||||
0x3015, 0x3016, 0x3017, 0x3018, 0x3019, 0x301A, 0x301B, 0x301D,
|
||||
0x301E, 0x301F, 0xFD3E, 0xFD3F, 0xFE30, 0xFE35, 0xFE36, 0xFE37,
|
||||
0xFE38, 0xFE39, 0xFE3A, 0xFE3B, 0xFE3C, 0xFE3D, 0xFE3E, 0xFE3F,
|
||||
0xFE40, 0xFE41, 0xFE42, 0xFE43, 0xFE44, 0xFE49, 0xFE4A, 0xFE4B,
|
||||
0xFE4C, 0xFE50, 0xFE51, 0xFE52, 0xFE54, 0xFE55, 0xFE56, 0xFE57,
|
||||
0xFE59, 0xFE5A, 0xFE5B, 0xFE5C, 0xFE5D, 0xFE5E, 0xFE5F, 0xFE60,
|
||||
0xFE61, 0xFE68, 0xFE6A, 0xFE6B, 0xFF01, 0xFF02, 0xFF03, 0xFF05,
|
||||
0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0C, 0xFF0E, 0xFF0F,
|
||||
0xFF1A, 0xFF1B, 0xFF1F, 0xFF20, 0xFF3B, 0xFF3C, 0xFF3D, 0xFF5B,
|
||||
0xFF5D, 0xFF61, 0xFF62, 0xFF63, 0xFF64,
|
||||
};
|
||||
static PRInt32 PuncSetSize = sizeof(PuncSet) / sizeof(PuncSet[0]);
|
||||
|
||||
PRInt32 i = PuncSetSize/2, begin = 0, end = PuncSetSize -1;
|
||||
|
||||
#define IsPunctuationMark(ch) (CCMAP_HAS_CHAR(gPuncCharsCCMap, ch))
|
||||
for (; begin != end; i = (begin + end ) / 2)
|
||||
{
|
||||
if (aChar == PuncSet[i])
|
||||
return PR_TRUE;
|
||||
if (aChar > PuncSet[i])
|
||||
begin = i+1;
|
||||
else
|
||||
end = i;
|
||||
}
|
||||
|
||||
return (aChar == PuncSet[i]);
|
||||
}
|
||||
|
||||
nsReflowStatus
|
||||
nsTextFrame::MeasureText(nsIPresContext* aPresContext,
|
||||
|
@ -1,247 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* Contributor(s): Jungshik Shin <jshin@mailaps.org> (Original developer)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*========================================================
|
||||
This file contains a precompiled CCMap for a class of Unicode
|
||||
characters (punct_marks) to be identified quickly by Mozilla.
|
||||
It was generated by ccmapbin.pl which you can find under
|
||||
mozilla/intl/unicharutil/tools.
|
||||
|
||||
Enumerated below are characters included in the precompiled CCMap
|
||||
which is human-readable but not so human-friendly. If you
|
||||
needs to modify the list of characters belonging to "punct_marks",
|
||||
you have to make a new file (with the name of your choice)
|
||||
listing characters (one character per line) you want to put
|
||||
into "punct_marks" in the format
|
||||
|
||||
0xuuuu // comment
|
||||
|
||||
In addition, the input file can have the following optional lines that
|
||||
read
|
||||
|
||||
CLASS::punct_marks
|
||||
DESCRIPTION:: description of a character class
|
||||
FILE:: mozilla source file to include output files
|
||||
|
||||
|
||||
Then, run the following in the current directory.
|
||||
|
||||
perl ccmapbin.pl input_file [punct_marks]
|
||||
|
||||
which will generate punct_marks.ccmap.
|
||||
|
||||
(see bug 180266 and bug 167136)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
0X3001 :
|
||||
0X3002 :
|
||||
0X3003 :
|
||||
0X3008 :
|
||||
0X3009 :
|
||||
0X3010 :
|
||||
0X3011 :
|
||||
0X3014 :
|
||||
0X3016 :
|
||||
0X3017 :
|
||||
0X3018 :
|
||||
0X3019 :
|
||||
0X0589 :
|
||||
0X0700 :
|
||||
0X0702 :
|
||||
0X0703 :
|
||||
0X0704 :
|
||||
0X0705 :
|
||||
0X0706 :
|
||||
0X0707 :
|
||||
0X0708 :
|
||||
0X0964 :
|
||||
0X0965 :
|
||||
0X0970 :
|
||||
0X0022 :
|
||||
0X0023 :
|
||||
0X0025 :
|
||||
0X0026 :
|
||||
0X0027 :
|
||||
0X0028 :
|
||||
0X0029 :
|
||||
0X1361 :
|
||||
0X1363 :
|
||||
0X1364 :
|
||||
0X1365 :
|
||||
0X1366 :
|
||||
0X1367 :
|
||||
0X1368 :
|
||||
0X1800 :
|
||||
0X1801 :
|
||||
0X1803 :
|
||||
0X1804 :
|
||||
0X1805 :
|
||||
0X1807 :
|
||||
0X1808 :
|
||||
0X1809 :
|
||||
0X0040 :
|
||||
0X2017 :
|
||||
0X2020 :
|
||||
0X2021 :
|
||||
0X2022 :
|
||||
0X2023 :
|
||||
0X2025 :
|
||||
0X2026 :
|
||||
0X2027 :
|
||||
0X2030 :
|
||||
0X2031 :
|
||||
0X2032 :
|
||||
0X2033 :
|
||||
0X2035 :
|
||||
0X2036 :
|
||||
0X2037 :
|
||||
0X2038 :
|
||||
0X2041 :
|
||||
0X2042 :
|
||||
0X2043 :
|
||||
0X2045 :
|
||||
0X2046 :
|
||||
0X2048 :
|
||||
0X2049 :
|
||||
0X0387 :
|
||||
*/
|
||||
|
||||
#if (defined(IS_LITTLE_ENDIAN) || ALU_SIZE == 16)
|
||||
// Precompiled CCMap for Big Endian(16bit)/Little Endian(16/32/64bit)
|
||||
/* 0000 */ 0x0030,0x0090,0x00C0,0x00E0,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0050,0x0020,0x0060,0x0020,0x0070,
|
||||
0x0020,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x03EC,0x0000,0x0001,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0080,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0200,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x01FD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0001,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x0020,0x0020,0x0020,0x00A0,0x0020,0x0020,0x0020,0x0020,
|
||||
0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01FA,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x03BB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x00D0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00d0 */ 0x0000,0x0080,0x00EF,0x01EF,0x036E,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x00F0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00f0 */ 0x030E,0x03D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#elif (ALU_SIZE == 32)
|
||||
// Precompiled CCMap for Big Endian(32bit)
|
||||
/* 0000 */ 0x0030,0x0090,0x00C0,0x00E0,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0050,0x0020,0x0060,0x0020,0x0070,
|
||||
0x0020,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0000,0x03EC,0x0000,0x0001,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0080,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0200,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0000,0x01FD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0030,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x0020,0x0020,0x0020,0x00A0,0x0020,0x0020,0x0020,0x0020,
|
||||
0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01FA,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x03BB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x00D0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00d0 */ 0x0080,0x0000,0x01EF,0x00EF,0x0000,0x036E,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x00F0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00f0 */ 0x03D3,0x030E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#elif (ALU_SIZE == 64)
|
||||
// Precompiled CCMap for Big Endian(64bit)
|
||||
/* 0000 */ 0x0030,0x0090,0x00C0,0x00E0,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0050,0x0020,0x0060,0x0020,0x0070,
|
||||
0x0020,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x03EC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0080,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0200,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0000,0x0000,0x0000,0x01FD,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0000,0x0001,0x0030,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x0020,0x0020,0x0020,0x00A0,0x0020,0x0020,0x0020,0x0020,
|
||||
0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x01FA,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x0000,0x0000,0x03BB,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x00D0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00d0 */ 0x01EF,0x00EF,0x0080,0x0000,0x0000,0x0000,0x0000,0x036E,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x00F0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00f0 */ 0x0000,0x0000,0x03D3,0x030E,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#else
|
||||
#error "We don't support this architecture."
|
||||
#endif
|
||||
|
@ -57,7 +57,6 @@ REQUIRES = xpcom \
|
||||
java \
|
||||
exthandler \
|
||||
intl \
|
||||
uconv \
|
||||
$(NULL)
|
||||
|
||||
# Sun's Complex Text Layout support
|
||||
|
@ -83,8 +83,6 @@
|
||||
|
||||
#include "nsILineIterator.h"
|
||||
|
||||
#include "nsCompressedCharMap.h"
|
||||
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
@ -4639,16 +4637,65 @@ nsTextFrame::EstimateNumChars(PRUint32 aAvailableWidth,
|
||||
PRUint32 estimatedNumChars = aAvailableWidth / aAverageCharWidth;
|
||||
return estimatedNumChars + estimatedNumChars / 20;
|
||||
}
|
||||
|
||||
// Replaced by precompiled CCMap (see bug 180266). To update the list
|
||||
// of characters, see one of files included below. As for the way
|
||||
// the original list of characters was obtained by Frank Tang, see bug 54467.
|
||||
static const PRUint16 gPuncCharsCCMap[] =
|
||||
|
||||
static PRBool
|
||||
IsPunctuationMark(PRUnichar aChar)
|
||||
{
|
||||
#include "punct_marks.ccmap"
|
||||
};
|
||||
//The following table is generated by a method written by Ftang, see bug 54467.
|
||||
//In case we need to add or substract any character (for example, unicode standard got
|
||||
// updated), the character in table must be kept in strict ascending order
|
||||
static const PRUnichar PuncSet[] =
|
||||
{
|
||||
0x0021, 0x0022, 0x0023, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029,
|
||||
0x002A, 0x002C, 0x002E, 0x002F, 0x003A, 0x003B, 0x003F, 0x0040,
|
||||
0x005B, 0x005C, 0x005D, 0x007B, 0x007D, 0x00A1, 0x00B7, 0x00BF,
|
||||
0x0313, 0x037E, 0x0387, 0x055A, 0x055B, 0x055C, 0x055D, 0x055E,
|
||||
0x055F, 0x0589, 0x05BE, 0x05C0, 0x05C3, 0x05F3, 0x05F4, 0x060C,
|
||||
0x061B, 0x061F, 0x066A, 0x066B, 0x066C, 0x066D, 0x06D4, 0x0700,
|
||||
0x0701, 0x0702, 0x0703, 0x0704, 0x0705, 0x0706, 0x0707, 0x0708,
|
||||
0x0709, 0x070A, 0x070B, 0x070C, 0x070D, 0x0964, 0x0965, 0x0970,
|
||||
0x0DF4, 0x0E4F, 0x0E5A, 0x0E5B, 0x0F04, 0x0F05, 0x0F06, 0x0F07,
|
||||
0x0F08, 0x0F09, 0x0F0A, 0x0F0B, 0x0F0C, 0x0F0D, 0x0F0E, 0x0F0F,
|
||||
0x0F10, 0x0F11, 0x0F12, 0x0F3A, 0x0F3B, 0x0F3C, 0x0F3D, 0x0F85,
|
||||
0x104A, 0x104B, 0x104C, 0x104D, 0x104E, 0x104F, 0x10FB, 0x1361,
|
||||
0x1362, 0x1363, 0x1364, 0x1365, 0x1366, 0x1367, 0x1368, 0x166D,
|
||||
0x166E, 0x169B, 0x169C, 0x16EB, 0x16EC, 0x16ED, 0x17D4, 0x17D5,
|
||||
0x17D6, 0x17D7, 0x17D8, 0x17D9, 0x17DA, 0x17DC, 0x1800, 0x1801,
|
||||
0x1802, 0x1803, 0x1804, 0x1805, 0x1807, 0x1808, 0x1809, 0x180A,
|
||||
0x2016, 0x2017, 0x201A, 0x201E, 0x2020, 0x2021, 0x2022, 0x2023,
|
||||
0x2024, 0x2025, 0x2026, 0x2027, 0x2030, 0x2031, 0x2032, 0x2033,
|
||||
0x2034, 0x2035, 0x2036, 0x2037, 0x2038, 0x203B, 0x203C, 0x203D,
|
||||
0x203E, 0x2041, 0x2042, 0x2043, 0x2045, 0x2046, 0x2048, 0x2049,
|
||||
0x204A, 0x204B, 0x204C, 0x204D, 0x207D, 0x207E, 0x208D, 0x208E,
|
||||
0x2329, 0x232A, 0x3001, 0x3002, 0x3003, 0x3008, 0x3009, 0x300A,
|
||||
0x300B, 0x300C, 0x300D, 0x300E, 0x300F, 0x3010, 0x3011, 0x3014,
|
||||
0x3015, 0x3016, 0x3017, 0x3018, 0x3019, 0x301A, 0x301B, 0x301D,
|
||||
0x301E, 0x301F, 0xFD3E, 0xFD3F, 0xFE30, 0xFE35, 0xFE36, 0xFE37,
|
||||
0xFE38, 0xFE39, 0xFE3A, 0xFE3B, 0xFE3C, 0xFE3D, 0xFE3E, 0xFE3F,
|
||||
0xFE40, 0xFE41, 0xFE42, 0xFE43, 0xFE44, 0xFE49, 0xFE4A, 0xFE4B,
|
||||
0xFE4C, 0xFE50, 0xFE51, 0xFE52, 0xFE54, 0xFE55, 0xFE56, 0xFE57,
|
||||
0xFE59, 0xFE5A, 0xFE5B, 0xFE5C, 0xFE5D, 0xFE5E, 0xFE5F, 0xFE60,
|
||||
0xFE61, 0xFE68, 0xFE6A, 0xFE6B, 0xFF01, 0xFF02, 0xFF03, 0xFF05,
|
||||
0xFF06, 0xFF07, 0xFF08, 0xFF09, 0xFF0A, 0xFF0C, 0xFF0E, 0xFF0F,
|
||||
0xFF1A, 0xFF1B, 0xFF1F, 0xFF20, 0xFF3B, 0xFF3C, 0xFF3D, 0xFF5B,
|
||||
0xFF5D, 0xFF61, 0xFF62, 0xFF63, 0xFF64,
|
||||
};
|
||||
static PRInt32 PuncSetSize = sizeof(PuncSet) / sizeof(PuncSet[0]);
|
||||
|
||||
PRInt32 i = PuncSetSize/2, begin = 0, end = PuncSetSize -1;
|
||||
|
||||
#define IsPunctuationMark(ch) (CCMAP_HAS_CHAR(gPuncCharsCCMap, ch))
|
||||
for (; begin != end; i = (begin + end ) / 2)
|
||||
{
|
||||
if (aChar == PuncSet[i])
|
||||
return PR_TRUE;
|
||||
if (aChar > PuncSet[i])
|
||||
begin = i+1;
|
||||
else
|
||||
end = i;
|
||||
}
|
||||
|
||||
return (aChar == PuncSet[i]);
|
||||
}
|
||||
|
||||
nsReflowStatus
|
||||
nsTextFrame::MeasureText(nsIPresContext* aPresContext,
|
||||
|
@ -1,247 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* Contributor(s): Jungshik Shin <jshin@mailaps.org> (Original developer)
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*========================================================
|
||||
This file contains a precompiled CCMap for a class of Unicode
|
||||
characters (punct_marks) to be identified quickly by Mozilla.
|
||||
It was generated by ccmapbin.pl which you can find under
|
||||
mozilla/intl/unicharutil/tools.
|
||||
|
||||
Enumerated below are characters included in the precompiled CCMap
|
||||
which is human-readable but not so human-friendly. If you
|
||||
needs to modify the list of characters belonging to "punct_marks",
|
||||
you have to make a new file (with the name of your choice)
|
||||
listing characters (one character per line) you want to put
|
||||
into "punct_marks" in the format
|
||||
|
||||
0xuuuu // comment
|
||||
|
||||
In addition, the input file can have the following optional lines that
|
||||
read
|
||||
|
||||
CLASS::punct_marks
|
||||
DESCRIPTION:: description of a character class
|
||||
FILE:: mozilla source file to include output files
|
||||
|
||||
|
||||
Then, run the following in the current directory.
|
||||
|
||||
perl ccmapbin.pl input_file [punct_marks]
|
||||
|
||||
which will generate punct_marks.ccmap.
|
||||
|
||||
(see bug 180266 and bug 167136)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
0X3001 :
|
||||
0X3002 :
|
||||
0X3003 :
|
||||
0X3008 :
|
||||
0X3009 :
|
||||
0X3010 :
|
||||
0X3011 :
|
||||
0X3014 :
|
||||
0X3016 :
|
||||
0X3017 :
|
||||
0X3018 :
|
||||
0X3019 :
|
||||
0X0589 :
|
||||
0X0700 :
|
||||
0X0702 :
|
||||
0X0703 :
|
||||
0X0704 :
|
||||
0X0705 :
|
||||
0X0706 :
|
||||
0X0707 :
|
||||
0X0708 :
|
||||
0X0964 :
|
||||
0X0965 :
|
||||
0X0970 :
|
||||
0X0022 :
|
||||
0X0023 :
|
||||
0X0025 :
|
||||
0X0026 :
|
||||
0X0027 :
|
||||
0X0028 :
|
||||
0X0029 :
|
||||
0X1361 :
|
||||
0X1363 :
|
||||
0X1364 :
|
||||
0X1365 :
|
||||
0X1366 :
|
||||
0X1367 :
|
||||
0X1368 :
|
||||
0X1800 :
|
||||
0X1801 :
|
||||
0X1803 :
|
||||
0X1804 :
|
||||
0X1805 :
|
||||
0X1807 :
|
||||
0X1808 :
|
||||
0X1809 :
|
||||
0X0040 :
|
||||
0X2017 :
|
||||
0X2020 :
|
||||
0X2021 :
|
||||
0X2022 :
|
||||
0X2023 :
|
||||
0X2025 :
|
||||
0X2026 :
|
||||
0X2027 :
|
||||
0X2030 :
|
||||
0X2031 :
|
||||
0X2032 :
|
||||
0X2033 :
|
||||
0X2035 :
|
||||
0X2036 :
|
||||
0X2037 :
|
||||
0X2038 :
|
||||
0X2041 :
|
||||
0X2042 :
|
||||
0X2043 :
|
||||
0X2045 :
|
||||
0X2046 :
|
||||
0X2048 :
|
||||
0X2049 :
|
||||
0X0387 :
|
||||
*/
|
||||
|
||||
#if (defined(IS_LITTLE_ENDIAN) || ALU_SIZE == 16)
|
||||
// Precompiled CCMap for Big Endian(16bit)/Little Endian(16/32/64bit)
|
||||
/* 0000 */ 0x0030,0x0090,0x00C0,0x00E0,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0050,0x0020,0x0060,0x0020,0x0070,
|
||||
0x0020,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x03EC,0x0000,0x0001,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0080,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0200,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x01FD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0030,0x0001,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x0020,0x0020,0x0020,0x00A0,0x0020,0x0020,0x0020,0x0020,
|
||||
0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01FA,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x03BB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x00D0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00d0 */ 0x0000,0x0080,0x00EF,0x01EF,0x036E,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x00F0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00f0 */ 0x030E,0x03D3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#elif (ALU_SIZE == 32)
|
||||
// Precompiled CCMap for Big Endian(32bit)
|
||||
/* 0000 */ 0x0030,0x0090,0x00C0,0x00E0,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0050,0x0020,0x0060,0x0020,0x0070,
|
||||
0x0020,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x0000,0x0000,0x03EC,0x0000,0x0001,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0080,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0200,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0000,0x01FD,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0030,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x0020,0x0020,0x0020,0x00A0,0x0020,0x0020,0x0020,0x0020,
|
||||
0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x01FA,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x03BB,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x00D0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00d0 */ 0x0080,0x0000,0x01EF,0x00EF,0x0000,0x036E,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x00F0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00f0 */ 0x03D3,0x030E,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#elif (ALU_SIZE == 64)
|
||||
// Precompiled CCMap for Big Endian(64bit)
|
||||
/* 0000 */ 0x0030,0x0090,0x00C0,0x00E0,0x0010,0x0010,0x0010,0x0010,
|
||||
0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,
|
||||
/* 0010 */ 0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0020 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0030 */ 0x0040,0x0020,0x0020,0x0050,0x0020,0x0060,0x0020,0x0070,
|
||||
0x0020,0x0080,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 0040 */ 0x0000,0x03EC,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0050 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0080,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0060 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0200,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0070 */ 0x0000,0x0000,0x0000,0x01FD,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0080 */ 0x0000,0x0000,0x0000,0x0000,0x0001,0x0030,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 0090 */ 0x0020,0x0020,0x0020,0x00A0,0x0020,0x0020,0x0020,0x0020,
|
||||
0x00B0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00a0 */ 0x0000,0x0000,0x0000,0x0000,0x0000,0x01FA,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00b0 */ 0x0000,0x0000,0x0000,0x03BB,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00c0 */ 0x00D0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00d0 */ 0x01EF,0x00EF,0x0080,0x0000,0x0000,0x0000,0x0000,0x036E,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
/* 00e0 */ 0x00F0,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,0x0020,
|
||||
/* 00f0 */ 0x0000,0x0000,0x03D3,0x030E,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
#else
|
||||
#error "We don't support this architecture."
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user