* src/psaux/t1cmap.c (t1_cmap_custom_char_index,
t1_cmap_custom_char_next): Fix index computation -- indices start with 0 and not with cmap->first. Provide default charmaps. * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c (PCF_Face_Init), src/pfr/pfrobjs.c (pfr_face_init), src/type1/t1objs (T1_Face_Init), src/winfonts/winfnt.c (FNT_Face_Init): Implement it.
This commit is contained in:
parent
73ffc7a0ea
commit
d594a7012b
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2002-06-18 Detlef Würkner <TetiSoft@apg.lahn.de>
|
||||
|
||||
* src/psaux/t1cmap.c (t1_cmap_custom_char_index,
|
||||
t1_cmap_custom_char_next): Fix index computation -- indices start
|
||||
with 0 and not with cmap->first.
|
||||
|
||||
Provide default charmaps.
|
||||
|
||||
* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
|
||||
(PCF_Face_Init), src/pfr/pfrobjs.c (pfr_face_init),
|
||||
src/type1/t1objs (T1_Face_Init), src/winfonts/winfnt.c
|
||||
(FNT_Face_Init): Implement it.
|
||||
|
||||
2002-06-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* src/pfr/pfrobjs.c (pfr_face_init): Fix typo.
|
||||
|
@ -43,7 +56,7 @@
|
|||
|
||||
2002-06-14 Detlef Würkner <TetiSoft@apg.lahn.de>
|
||||
|
||||
Add new cmap support to BDF driver
|
||||
Add new cmap support to BDF driver.
|
||||
|
||||
* src/bdf/bdfdrivr.c (BDF_CMapRec) [FT_CONFIG_OPTION_USE_CMAPS]:
|
||||
New structure.
|
||||
|
|
|
@ -448,6 +448,10 @@ THE SOFTWARE.
|
|||
}
|
||||
|
||||
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
|
||||
|
||||
/* Select default charmap */
|
||||
if (root->num_charmaps)
|
||||
root->charmap = root->charmaps[0];
|
||||
}
|
||||
|
||||
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
|
||||
|
@ -481,11 +485,15 @@ THE SOFTWARE.
|
|||
|
||||
|
||||
charmap.face = FT_FACE( face );
|
||||
charmap.encoding = ft_encoding_none;
|
||||
charmap.platform_id = 0;
|
||||
charmap.encoding = ft_encoding_adobe_standard;
|
||||
charmap.platform_id = 7;
|
||||
charmap.encoding_id = 0;
|
||||
|
||||
error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
|
||||
|
||||
/* Select default charmap */
|
||||
if (root->num_charmaps)
|
||||
root->charmap = root->charmaps[0];
|
||||
}
|
||||
|
||||
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
|
||||
|
|
|
@ -340,6 +340,10 @@ THE SOFTWARE.
|
|||
}
|
||||
|
||||
error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
|
||||
|
||||
/* Select default charmap */
|
||||
if (face->root.num_charmaps)
|
||||
face->root.charmap = face->root.charmaps[0];
|
||||
}
|
||||
|
||||
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
|
||||
|
|
|
@ -175,6 +175,10 @@
|
|||
charmap.encoding = ft_encoding_unicode;
|
||||
|
||||
FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
|
||||
|
||||
/* Select default charmap */
|
||||
if (root->num_charmaps)
|
||||
root->charmap = root->charmaps[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -197,12 +197,11 @@
|
|||
FT_UInt32 char_code )
|
||||
{
|
||||
FT_UInt result = 0;
|
||||
FT_UInt32 idx;
|
||||
|
||||
|
||||
idx = (FT_UInt32)( char_code - cmap->first );
|
||||
if ( idx < cmap->count )
|
||||
result = cmap->indices[idx];
|
||||
if ( ( char_code >= cmap->first ) &&
|
||||
( char_code < ( cmap->first + cmap->count ) ) )
|
||||
result = cmap->indices[char_code];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -214,7 +213,6 @@
|
|||
{
|
||||
FT_UInt result = 0;
|
||||
FT_UInt32 char_code = *pchar_code;
|
||||
FT_UInt32 idx;
|
||||
|
||||
|
||||
++char_code;
|
||||
|
@ -222,10 +220,9 @@
|
|||
if ( char_code < cmap->first )
|
||||
char_code = cmap->first;
|
||||
|
||||
idx = (FT_UInt32)( char_code - cmap->first );
|
||||
for ( ; idx < cmap->count; idx++, char_code++ )
|
||||
for ( ; char_code < ( cmap->first + cmap->count ); char_code++ )
|
||||
{
|
||||
result = cmap->indices[idx];
|
||||
result = cmap->indices[char_code];
|
||||
if ( result != 0 )
|
||||
goto Exit;
|
||||
}
|
||||
|
|
|
@ -485,6 +485,10 @@
|
|||
|
||||
if ( clazz )
|
||||
FT_CMap_New( clazz, NULL, &charmap, NULL );
|
||||
|
||||
/* Select default charmap */
|
||||
if (root->num_charmaps)
|
||||
root->charmap = root->charmaps[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -548,7 +548,12 @@
|
|||
NULL,
|
||||
&charmap,
|
||||
NULL );
|
||||
if (error) goto Fail;
|
||||
if ( error )
|
||||
goto Fail;
|
||||
|
||||
/* Select default charmap */
|
||||
if ( root->num_charmaps )
|
||||
root->charmap = root->charmaps[0];
|
||||
}
|
||||
|
||||
#else /* !FT_CONFIG_OPTION_USE_CMAPS */
|
||||
|
|
Loading…
Reference in New Issue