diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-07-02 04:44:43 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-07-02 04:44:43 +0000 |
commit | ad5ffc75cdf78f6cf6160e4334d45be15dd48221 (patch) | |
tree | 7ca04b88be84c859c9d5f235758b69387929d667 /Build/source/libs/freetype2/freetype-src/src/type1/t1load.c | |
parent | 5d1e6f4aeb765d13edda3c5c77f55614ff27c7fc (diff) |
freetype 2.10.1
git-svn-id: svn://tug.org/texlive/trunk@51529 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/type1/t1load.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/type1/t1load.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c b/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c index 3896af70ba1..5cffdfaac47 100644 --- a/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c +++ b/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c @@ -1507,12 +1507,7 @@ /* We need to `zero' out encoding_table.elements */ for ( n = 0; n < array_size; n++ ) - { - char* notdef = (char *)".notdef"; - - - (void)T1_Add_Table( char_table, n, notdef, 8 ); - } + (void)T1_Add_Table( char_table, n, ".notdef", 8 ); /* Now we need to read records of the form */ /* */ @@ -2147,7 +2142,6 @@ /* 0 333 hsbw endchar */ FT_Byte notdef_glyph[] = { 0x8B, 0xF7, 0xE1, 0x0D, 0x0E }; - char* notdef_name = (char *)".notdef"; error = T1_Add_Table( swap_table, 0, @@ -2162,7 +2156,7 @@ if ( error ) goto Fail; - error = T1_Add_Table( name_table, 0, notdef_name, 8 ); + error = T1_Add_Table( name_table, 0, ".notdef", 8 ); if ( error ) goto Fail; @@ -2633,8 +2627,7 @@ /* we must now build type1.encoding when we have a custom array */ if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY ) { - FT_Int charcode, idx, min_char, max_char; - FT_Byte* glyph_name; + FT_Int charcode, idx, min_char, max_char; /* OK, we do the following: for each element in the encoding */ @@ -2648,27 +2641,27 @@ charcode = 0; for ( ; charcode < loader.encoding_table.max_elems; charcode++ ) { - FT_Byte* char_name; + const FT_String* char_name = + (const FT_String*)loader.encoding_table.elements[charcode]; type1->encoding.char_index[charcode] = 0; - type1->encoding.char_name [charcode] = (char *)".notdef"; + type1->encoding.char_name [charcode] = ".notdef"; - char_name = loader.encoding_table.elements[charcode]; if ( char_name ) for ( idx = 0; idx < type1->num_glyphs; idx++ ) { - glyph_name = (FT_Byte*)type1->glyph_names[idx]; - if ( ft_strcmp( (const char*)char_name, - (const char*)glyph_name ) == 0 ) + const FT_String* glyph_name = type1->glyph_names[idx]; + + + if ( ft_strcmp( char_name, glyph_name ) == 0 ) { type1->encoding.char_index[charcode] = (FT_UShort)idx; - type1->encoding.char_name [charcode] = (char*)glyph_name; + type1->encoding.char_name [charcode] = glyph_name; /* Change min/max encoded char only if glyph name is */ /* not /.notdef */ - if ( ft_strcmp( (const char*)".notdef", - (const char*)glyph_name ) != 0 ) + if ( ft_strcmp( ".notdef", glyph_name ) != 0 ) { if ( charcode < min_char ) min_char = charcode; |