From ce252d129476aa848e67f2dbfa9cc19569b922a0 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 1 Sep 2003 07:06:06 +0000 Subject: [PATCH] * src/bdf/bdflib.c (_bdf_readstream): Don't use FT_MEM_COPY but FT_MEM_MOVE. * include/freetype/freetype.h (FT_ENCODING_SJIS, FT_ENCODING_GB2312, FT_ENCODING_BIG5, FT_ENCODING_WANSUNG, FT_ENCODING_JOHAB): New enumerations of FT_Encoding. The FT_ENCODING_MS_* variants except FT_ENCODING_MS_SYMBOL are now deprecated. Updated all users. * docs/CHANGES: Document it. --- ChangeLog | 14 +++++++ docs/CHANGES | 4 ++ include/freetype/freetype.h | 78 +++++++++++++++++++++++-------------- include/freetype/ttnameid.h | 19 +++++---- src/bdf/bdfdrivr.c | 2 +- src/bdf/bdflib.c | 2 +- src/sfnt/sfobjs.c | 10 ++--- 7 files changed, 83 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44daf295e..62aca83ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2003-08-31 Manish Singh + + * src/bdf/bdflib.c (_bdf_readstream): Don't use FT_MEM_COPY but + FT_MEM_MOVE. + +2003-08-30 Werner Lemberg + + * include/freetype/freetype.h (FT_ENCODING_SJIS, FT_ENCODING_GB2312, + FT_ENCODING_BIG5, FT_ENCODING_WANSUNG, FT_ENCODING_JOHAB): New + enumerations of FT_Encoding. The FT_ENCODING_MS_* variants except + FT_ENCODING_MS_SYMBOL are now deprecated. + Updated all users. + * docs/CHANGES: Document it. + 2003-08-27 Werner Lemberg * src/bdf/bdfdrivr.c (BDF_Face_Init): Accept lowercase characters diff --git a/docs/CHANGES b/docs/CHANGES index e74b07707..4d0d218c7 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -64,6 +64,10 @@ LATEST CHANGES BETWEEN 2.1.5 and 2.1.4 - ft_module_xxx flags are now deprecated in favour of FT_MODULE_XXX. + - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now deprecated + in favour of FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB} -- those + encodings are not specific to Microsoft. + III. MISCELLANEOUS diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 5745dd030..413e6c6b2 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -509,30 +509,28 @@ FT_BEGIN_HEADER /* mathematical symbols in the 32..255 character code range. For */ /* more information, see `http://www.ceviz.net/symbol.htm'. */ /* */ - /* FT_ENCODING_MS_SJIS :: */ - /* Corresponds to Microsoft's Japanese SJIS encoding. More info */ + /* FT_ENCODING_SJIS :: */ + /* Corresponds to Japanese SJIS encoding. More info at */ /* at `http://langsupport.japanreference.com/encoding.shtml'. */ /* See note on multi-byte encodings below. */ /* */ - /* FT_ENCODING_MS_GB2312 :: */ - /* Corresponds to the encoding system for Simplified Chinese, as */ - /* used in China. Only found in some TrueType fonts. */ + /* FT_ENCODING_GB2312 :: */ + /* Corresponds to an encoding system for Simplified Chinese as used */ + /* used in mainland China. */ /* */ - /* FT_ENCODING_MS_BIG5 :: */ - /* Corresponds to the encoding system for Traditional Chinese, as */ - /* used in Taiwan and Hong Kong. Only found in some TrueType fonts. */ + /* FT_ENCODING_BIG5 :: */ + /* Corresponds to an encoding system for Traditional Chinese as used */ + /* in Taiwan and Hong Kong. */ /* */ - /* FT_ENCODING_MS_WANSUNG :: */ + /* FT_ENCODING_WANSUNG :: */ /* Corresponds to the Korean encoding system known as Wansung. */ - /* This is a Microsoft encoding that is only found in some TrueType */ - /* fonts. For more information, see */ + /* For more information see */ /* `http://www.microsoft.com/typography/unicode/949.txt'. */ /* */ - /* FT_ENCODING_MS_JOHAB :: */ + /* FT_ENCODING_JOHAB :: */ /* The Korean standard character set (KS C-5601-1992), which */ - /* corresponds to Windows code page 1361. This character set */ + /* corresponds to MS Windows code page 1361. This character set */ /* includes all possible Hangeul character combinations. */ - /* Only found on some rare TrueType fonts. */ /* */ /* FT_ENCODING_ADOBE_LATIN_1 :: */ /* Corresponds to a Latin-1 encoding as defined in a Type 1 */ @@ -561,6 +559,21 @@ FT_BEGIN_HEADER /* This value is deprecated and was never used nor reported by */ /* FreeType. Don't use or test for it. */ /* */ + /* FT_ENCODING_MS_SJIS :: */ + /* Same as FT_ENCODING_SJIS. Deprecated. */ + /* */ + /* FT_ENCODING_MS_GB2312 :: */ + /* Same as FT_ENCODING_GB2312. Deprecated. */ + /* */ + /* FT_ENCODING_MS_BIG5 :: */ + /* Same as FT_ENCODING_BIG5. Deprecated. */ + /* */ + /* FT_ENCODING_MS_WANSUNG :: */ + /* Same as FT_ENCODING_WANSUNG. Deprecated. */ + /* */ + /* FT_ENCODING_MS_JOHAB :: */ + /* Same as FT_ENCODING_JOHAB. Deprecated. */ + /* */ /* */ /* By default, FreeType automatically synthetizes a Unicode charmap */ /* for Postscript fonts, using their glyph names dictionaries. */ @@ -575,11 +588,18 @@ FT_BEGIN_HEADER FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), - FT_ENC_TAG( FT_ENCODING_MS_SJIS, 's', 'j', 'i', 's' ), - FT_ENC_TAG( FT_ENCODING_MS_GB2312, 'g', 'b', ' ', ' ' ), - FT_ENC_TAG( FT_ENCODING_MS_BIG5, 'b', 'i', 'g', '5' ), - FT_ENC_TAG( FT_ENCODING_MS_WANSUNG, 'w', 'a', 'n', 's' ), - FT_ENC_TAG( FT_ENCODING_MS_JOHAB, 'j', 'o', 'h', 'a' ), + FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), + FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), + FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), + FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), + + /* for backwards compatibility */ + FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, + FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, + FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, + FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, + FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), @@ -607,11 +627,11 @@ FT_BEGIN_HEADER /* ft_encoding_unicode :: see @FT_ENCODING_UNICODE */ /* ft_encoding_latin_2 :: see @FT_ENCODING_OLD_LATIN_2 */ /* ft_encoding_symbol :: see @FT_ENCODING_MS_SYMBOL */ - /* ft_encoding_sjis :: see @FT_ENCODING_MS_SJIS */ - /* ft_encoding_gb2312 :: see @FT_ENCODING_MS_GB2312 */ - /* ft_encoding_big5 :: see @FT_ENCODING_MS_BIG5 */ - /* ft_encoding_wansung :: see @FT_ENCODING_MS_WANSUNG */ - /* ft_encoding_johab :: see @FT_ENCODING_MS_JOHAB */ + /* ft_encoding_sjis :: see @FT_ENCODING_SJIS */ + /* ft_encoding_gb2312 :: see @FT_ENCODING_GB2312 */ + /* ft_encoding_big5 :: see @FT_ENCODING_BIG5 */ + /* ft_encoding_wansung :: see @FT_ENCODING_WANSUNG */ + /* ft_encoding_johab :: see @FT_ENCODING_JOHAB */ /* */ /* ft_encoding_adobe_standard :: see @FT_ENCODING_ADOBE_STANDARD */ /* ft_encoding_adobe_expert :: see @FT_ENCODING_ADOBE_EXPERT */ @@ -625,11 +645,11 @@ FT_BEGIN_HEADER #define ft_encoding_symbol FT_ENCODING_MS_SYMBOL #define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 #define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 -#define ft_encoding_sjis FT_ENCODING_MS_SJIS -#define ft_encoding_gb2312 FT_ENCODING_MS_GB2312 -#define ft_encoding_big5 FT_ENCODING_MS_BIG5 -#define ft_encoding_wansung FT_ENCODING_MS_WANSUNG -#define ft_encoding_johab FT_ENCODING_MS_JOHAB +#define ft_encoding_sjis FT_ENCODING_SJIS +#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_big5 FT_ENCODING_BIG5 +#define ft_encoding_wansung FT_ENCODING_WANSUNG +#define ft_encoding_johab FT_ENCODING_JOHAB #define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD #define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT diff --git a/include/freetype/ttnameid.h b/include/freetype/ttnameid.h index afb21b84c..8b56686bb 100644 --- a/include/freetype/ttnameid.h +++ b/include/freetype/ttnameid.h @@ -231,30 +231,29 @@ FT_BEGIN_HEADER * * @values: * TT_MS_ID_SYMBOL_CS :: - * Corresponds to symbol encodings. see @FT_ENCODING_MS_SYMBOL. + * Corresponds to Microsoft symbol encoding. See + * @FT_ENCODING_MS_SYMBOL. * * TT_MS_ID_UNICODE_CS :: * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See * @FT_ENCODING_UNICODE. * * TT_MS_ID_SJIS :: - * Corresponds to Microsoft SJIS Japanese encoding. - * See @FT_ENCODING_MS_SJIS. + * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. * * TT_MS_ID_GB2312 :: - * Corresponds to Microsoft Simplified Chinese as used in Mainland - * China. See @FT_ENCODING_MS_GB2312. + * Corresponds to Simplified Chinese as used in Mainland China. See + * @FT_ENCODING_GB2312. * * TT_MS_ID_BIG_5 :: - * Corresponds to Microsoft Traditional Chinese as used in Taiwan and - * Hong Kong. See @FT_ENCODING_MS_BIG5. + * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. + * See @FT_ENCODING_BIG5. * * TT_MS_ID_WANSUNG :: - * Corresponds to Microsoft Korean Wansung encoding. See - * @FT_ENCODING_MS_WANSUNG. + * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. * * TT_MS_ID_JOHAB :: - * Corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB. + * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. * * TT_MS_ID_UCS_4 :: * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c index 79576c530..dbd4a2f64 100644 --- a/src/bdf/bdfdrivr.c +++ b/src/bdf/bdfdrivr.c @@ -326,7 +326,7 @@ THE SOFTWARE. prop = bdf_get_font_property( font, "POINT_SIZE" ); if ( prop != NULL ) - /* convert from 722,7 decipoints to 72 points per inch */ + /* convert from 722.7 decipoints to 72 points per inch */ bsize->size = (FT_Pos)( ( prop->value.int32 * 64 * 7200 + 36135L ) / 72270L ); diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index 9d6cc52fb..2d90b4c5b 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -696,7 +696,7 @@ le -= n; n = pe - pp; - FT_MEM_COPY( buf, pp, n ); + FT_MEM_MOVE( buf, pp, n ); pp = buf + n; bytes = 65536L - n; diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index bfb079459..33a71ae3f 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -307,11 +307,11 @@ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, FT_ENCODING_MS_SYMBOL }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE }, { TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE }, - { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_MS_SJIS }, - { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_MS_GB2312 }, - { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_MS_BIG5 }, - { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_MS_WANSUNG }, - { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_MS_JOHAB } + { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_SJIS }, + { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_GB2312 }, + { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_BIG5 }, + { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_WANSUNG }, + { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_JOHAB } }; const TEncoding *cur, *limit;