|
|
|
@ -4,7 +4,7 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* TrueType character mapping table (cmap) support (body). */ |
|
|
|
|
/* */ |
|
|
|
|
/* Copyright 1996-2001 by */ |
|
|
|
|
/* Copyright 1996-2001, 2002 by */ |
|
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
|
|
|
|
/* */ |
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */ |
|
|
|
@ -35,52 +35,52 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index0( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_index0( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next0( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_next0( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index2( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_index2( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next2( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_next2( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index4( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_index4( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next4( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_next4( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index6( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_index6( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next6( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_next6( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index8_12( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_index8_12( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next8_12( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_next8_12( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index10( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_index10( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next10( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
code_to_next10( TT_CMapTable charmap, |
|
|
|
|
FT_ULong char_code ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/ |
|
|
|
@ -93,6 +93,7 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* face :: A handle to the parent face object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* stream :: A handle to the current stream object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <InOut> */ |
|
|
|
@ -107,27 +108,27 @@ |
|
|
|
|
/* released. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
TT_CharMap_Load( TT_Face face, |
|
|
|
|
TT_CMapTable cmap, |
|
|
|
|
FT_Stream stream ) |
|
|
|
|
TT_CharMap_Load( TT_Face face, |
|
|
|
|
TT_CMapTable cmap, |
|
|
|
|
FT_Stream stream ) |
|
|
|
|
{ |
|
|
|
|
FT_Error error; |
|
|
|
|
FT_Memory memory; |
|
|
|
|
FT_UShort num_SH, num_Seg, i; |
|
|
|
|
FT_ULong j, n; |
|
|
|
|
FT_Error error; |
|
|
|
|
FT_Memory memory; |
|
|
|
|
FT_UShort num_SH, num_Seg, i; |
|
|
|
|
FT_ULong j, n; |
|
|
|
|
|
|
|
|
|
FT_UShort u, l; |
|
|
|
|
FT_UShort u, l; |
|
|
|
|
|
|
|
|
|
TT_CMap0 cmap0; |
|
|
|
|
TT_CMap2 cmap2; |
|
|
|
|
TT_CMap4 cmap4; |
|
|
|
|
TT_CMap6 cmap6; |
|
|
|
|
TT_CMap0 cmap0; |
|
|
|
|
TT_CMap2 cmap2; |
|
|
|
|
TT_CMap4 cmap4; |
|
|
|
|
TT_CMap6 cmap6; |
|
|
|
|
TT_CMap8_12 cmap8_12; |
|
|
|
|
TT_CMap10 cmap10; |
|
|
|
|
|
|
|
|
|
TT_CMap2SubHeader cmap2sub; |
|
|
|
|
TT_CMap4Segment segments; |
|
|
|
|
TT_CMapGroup groups; |
|
|
|
|
TT_CMap2SubHeader cmap2sub; |
|
|
|
|
TT_CMap4Segment segments; |
|
|
|
|
TT_CMapGroup groups; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( cmap->loaded ) |
|
|
|
@ -143,12 +144,12 @@ |
|
|
|
|
case 0: |
|
|
|
|
cmap0 = &cmap->c.cmap0; |
|
|
|
|
|
|
|
|
|
if ( FT_READ_USHORT( cmap0->language ) || |
|
|
|
|
FT_ALLOC( cmap0->glyphIdArray, 256L ) || |
|
|
|
|
if ( FT_READ_USHORT( cmap0->language ) || |
|
|
|
|
FT_ALLOC( cmap0->glyphIdArray, 256L ) || |
|
|
|
|
FT_STREAM_READ( cmap0->glyphIdArray, 256L ) ) |
|
|
|
|
goto Fail; |
|
|
|
|
|
|
|
|
|
cmap->get_index = code_to_index0; |
|
|
|
|
cmap->get_index = code_to_index0; |
|
|
|
|
cmap->get_next_char = code_to_next0; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
@ -159,7 +160,7 @@ |
|
|
|
|
/* allocate subheader keys */ |
|
|
|
|
|
|
|
|
|
if ( FT_NEW_ARRAY( cmap2->subHeaderKeys, 256 ) || |
|
|
|
|
FT_FRAME_ENTER( 2L + 512L ) ) |
|
|
|
|
FT_FRAME_ENTER( 2L + 512L ) ) |
|
|
|
|
goto Fail; |
|
|
|
|
|
|
|
|
|
cmap2->language = FT_GET_USHORT(); |
|
|
|
@ -178,10 +179,10 @@ |
|
|
|
|
/* load subheaders */ |
|
|
|
|
|
|
|
|
|
cmap2->numGlyphId = l = (FT_UShort)( |
|
|
|
|
( ( cmap->length - 2L * ( 256 + 3 ) - num_SH * 8L ) & 0xFFFF ) / 2 ); |
|
|
|
|
( ( cmap->length - 2L * ( 256 + 3 ) - num_SH * 8L ) & 0xFFFFU ) / 2 ); |
|
|
|
|
|
|
|
|
|
if ( FT_NEW_ARRAY( cmap2->subHeaders, num_SH + 1 ) || |
|
|
|
|
FT_FRAME_ENTER( ( num_SH + 1 ) * 8L ) ) |
|
|
|
|
if ( FT_NEW_ARRAY( cmap2->subHeaders, num_SH + 1 ) || |
|
|
|
|
FT_FRAME_ENTER( ( num_SH + 1 ) * 8L ) ) |
|
|
|
|
{ |
|
|
|
|
FT_FREE( cmap2->subHeaderKeys ); |
|
|
|
|
goto Fail; |
|
|
|
@ -249,15 +250,15 @@ |
|
|
|
|
segments = cmap4->segments; |
|
|
|
|
|
|
|
|
|
for ( i = 0; i < num_Seg; i++ ) |
|
|
|
|
segments[i].endCount = FT_GET_USHORT(); |
|
|
|
|
segments[i].endCount = FT_GET_USHORT(); |
|
|
|
|
|
|
|
|
|
(void)FT_GET_USHORT(); |
|
|
|
|
|
|
|
|
|
for ( i = 0; i < num_Seg; i++ ) |
|
|
|
|
segments[i].startCount = FT_GET_USHORT(); |
|
|
|
|
segments[i].startCount = FT_GET_USHORT(); |
|
|
|
|
|
|
|
|
|
for ( i = 0; i < num_Seg; i++ ) |
|
|
|
|
segments[i].idDelta = FT_GET_SHORT(); |
|
|
|
|
segments[i].idDelta = FT_GET_SHORT(); |
|
|
|
|
|
|
|
|
|
for ( i = 0; i < num_Seg; i++ ) |
|
|
|
|
segments[i].idRangeOffset = FT_GET_USHORT(); |
|
|
|
@ -265,7 +266,7 @@ |
|
|
|
|
FT_FRAME_EXIT(); |
|
|
|
|
|
|
|
|
|
cmap4->numGlyphId = l = (FT_UShort)( |
|
|
|
|
( ( cmap->length - ( 16L + 8L * num_Seg ) ) & 0xFFFF ) / 2 ); |
|
|
|
|
( ( cmap->length - ( 16L + 8L * num_Seg ) ) & 0xFFFFU ) / 2 ); |
|
|
|
|
|
|
|
|
|
/* load IDs */ |
|
|
|
|
|
|
|
|
@ -283,7 +284,7 @@ |
|
|
|
|
|
|
|
|
|
cmap4->last_segment = cmap4->segments; |
|
|
|
|
|
|
|
|
|
cmap->get_index = code_to_index4; |
|
|
|
|
cmap->get_index = code_to_index4; |
|
|
|
|
cmap->get_next_char = code_to_next4; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
@ -309,7 +310,7 @@ |
|
|
|
|
cmap6->glyphIdArray[i] = FT_GET_USHORT(); |
|
|
|
|
|
|
|
|
|
FT_FRAME_EXIT(); |
|
|
|
|
cmap->get_index = code_to_index6; |
|
|
|
|
cmap->get_index = code_to_index6; |
|
|
|
|
cmap->get_next_char = code_to_next6; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
@ -351,7 +352,7 @@ |
|
|
|
|
|
|
|
|
|
cmap8_12->last_group = cmap8_12->groups; |
|
|
|
|
|
|
|
|
|
cmap->get_index = code_to_index8_12; |
|
|
|
|
cmap->get_index = code_to_index8_12; |
|
|
|
|
cmap->get_next_char = code_to_next8_12; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
@ -378,7 +379,7 @@ |
|
|
|
|
cmap10->glyphs[j] = FT_GET_USHORT(); |
|
|
|
|
|
|
|
|
|
FT_FRAME_EXIT(); |
|
|
|
|
cmap->get_index = code_to_index10; |
|
|
|
|
cmap->get_index = code_to_index10; |
|
|
|
|
cmap->get_next_char = code_to_next10; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
@ -405,14 +406,15 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* face :: A handle to the parent face object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap :: A handle to a cmap object. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* FreeType error code. 0 means success. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_LOCAL_DEF( FT_Error ) |
|
|
|
|
TT_CharMap_Free( TT_Face face, |
|
|
|
|
TT_CMapTable cmap ) |
|
|
|
|
TT_CharMap_Free( TT_Face face, |
|
|
|
|
TT_CMapTable cmap ) |
|
|
|
|
{ |
|
|
|
|
FT_Memory memory; |
|
|
|
|
|
|
|
|
@ -478,16 +480,17 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap0 :: A pointer to a cmap table in format 0. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index0( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_index0( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap0 cmap0 = &cmap->c.cmap0; |
|
|
|
|
TT_CMap0 cmap0 = &cmap->c.cmap0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( charCode <= 0xFF ? cmap0->glyphIdArray[charCode] : 0 ); |
|
|
|
@ -506,16 +509,17 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap0 :: A pointer to a cmap table in format 0. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Next char code. 0 if no higher one is encoded. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next0( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_next0( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap0 cmap0 = &cmap->c.cmap0; |
|
|
|
|
TT_CMap0 cmap0 = &cmap->c.cmap0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ( ++charCode <= 0xFF ) |
|
|
|
@ -535,20 +539,21 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap2 :: A pointer to a cmap table in format 2. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index2( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_index2( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
FT_UInt result, index1, offset; |
|
|
|
|
FT_UInt char_lo; |
|
|
|
|
FT_ULong char_hi; |
|
|
|
|
TT_CMap2SubHeader sh2; |
|
|
|
|
TT_CMap2 cmap2; |
|
|
|
|
FT_UInt result, index1, offset; |
|
|
|
|
FT_UInt char_lo; |
|
|
|
|
FT_ULong char_hi; |
|
|
|
|
TT_CMap2SubHeader sh2; |
|
|
|
|
TT_CMap2 cmap2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmap2 = &cmap->c.cmap2; |
|
|
|
@ -582,7 +587,7 @@ |
|
|
|
|
{ |
|
|
|
|
result = cmap2->glyphIdArray[offset]; |
|
|
|
|
if ( result ) |
|
|
|
|
result = ( result + sh2->idDelta ) & 0xFFFF; |
|
|
|
|
result = ( result + sh2->idDelta ) & 0xFFFFU; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -600,20 +605,21 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap2 :: A pointer to a cmap table in format 2. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Next encoded character. 0 if none exists. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next2( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_next2( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
FT_UInt index1, offset; |
|
|
|
|
FT_UInt char_lo; |
|
|
|
|
FT_ULong char_hi; |
|
|
|
|
TT_CMap2SubHeader sh2; |
|
|
|
|
TT_CMap2 cmap2; |
|
|
|
|
FT_UInt index1, offset; |
|
|
|
|
FT_UInt char_lo; |
|
|
|
|
FT_ULong char_hi; |
|
|
|
|
TT_CMap2SubHeader sh2; |
|
|
|
|
TT_CMap2 cmap2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmap2 = &cmap->c.cmap2; |
|
|
|
@ -683,17 +689,18 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap4 :: A pointer to a cmap table in format 4. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index4( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_index4( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
FT_UInt result, index1, segCount; |
|
|
|
|
TT_CMap4 cmap4; |
|
|
|
|
FT_UInt result, index1, segCount; |
|
|
|
|
TT_CMap4 cmap4; |
|
|
|
|
TT_CMap4SegmentRec *seg4, *limit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -739,7 +746,7 @@ |
|
|
|
|
/* directly */ |
|
|
|
|
|
|
|
|
|
if ( seg4->idRangeOffset == 0 ) |
|
|
|
|
result = ( charCode + seg4->idDelta ) & 0xFFFF; |
|
|
|
|
result = ( charCode + seg4->idDelta ) & 0xFFFFU; |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
/* otherwise, we must use the glyphIdArray to do it */ |
|
|
|
@ -750,7 +757,7 @@ |
|
|
|
|
|
|
|
|
|
if ( index1 < (FT_UInt)cmap4->numGlyphId && |
|
|
|
|
cmap4->glyphIdArray[index1] != 0 ) |
|
|
|
|
result = ( cmap4->glyphIdArray[index1] + seg4->idDelta ) & 0xFFFF; |
|
|
|
|
result = ( cmap4->glyphIdArray[index1] + seg4->idDelta ) & 0xFFFFU; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
@ -767,17 +774,18 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap :: A pointer to a cmap table in format 4. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Next encoded character. 0 if none exists. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next4( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_next4( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
FT_UInt index1, segCount; |
|
|
|
|
TT_CMap4 cmap4; |
|
|
|
|
FT_UInt index1, segCount; |
|
|
|
|
TT_CMap4 cmap4; |
|
|
|
|
TT_CMap4SegmentRec *seg4, *limit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -834,17 +842,18 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap6 :: A pointer to a cmap table in format 6. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index6( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_index6( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap6 cmap6; |
|
|
|
|
FT_UInt result = 0; |
|
|
|
|
TT_CMap6 cmap6; |
|
|
|
|
FT_UInt result = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmap6 = &cmap->c.cmap6; |
|
|
|
@ -867,16 +876,17 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap :: A pointer to a cmap table in format 6. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Next encoded character. 0 if none exists. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next6( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_next6( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap6 cmap6; |
|
|
|
|
TT_CMap6 cmap6; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
charCode++; |
|
|
|
@ -910,16 +920,17 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap8_12 :: A pointer to a cmap table in format 8 or 12. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index8_12( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_index8_12( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap8_12 cmap8_12; |
|
|
|
|
TT_CMap8_12 cmap8_12; |
|
|
|
|
TT_CMapGroupRec *group, *limit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -974,16 +985,17 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap :: A pointer to a cmap table in format 8 or 12. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Next encoded character. 0 if none exists. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next8_12( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_next8_12( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap8_12 cmap8_12; |
|
|
|
|
TT_CMap8_12 cmap8_12; |
|
|
|
|
TT_CMapGroupRec *group, *limit; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1020,17 +1032,18 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap10 :: A pointer to a cmap table in format 10. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_UInt ) |
|
|
|
|
code_to_index10( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_index10( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap10 cmap10; |
|
|
|
|
FT_UInt result = 0; |
|
|
|
|
FT_UInt result = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmap10 = &cmap->c.cmap10; |
|
|
|
@ -1057,14 +1070,15 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* <Input> */ |
|
|
|
|
/* charCode :: The wanted character code. */ |
|
|
|
|
/* */ |
|
|
|
|
/* cmap :: A pointer to a cmap table in format 10. */ |
|
|
|
|
/* */ |
|
|
|
|
/* <Return> */ |
|
|
|
|
/* Next encoded character. 0 if none exists. */ |
|
|
|
|
/* */ |
|
|
|
|
FT_CALLBACK_DEF( FT_ULong ) |
|
|
|
|
code_to_next10( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
code_to_next10( TT_CMapTable cmap, |
|
|
|
|
FT_ULong charCode ) |
|
|
|
|
{ |
|
|
|
|
TT_CMap10 cmap10; |
|
|
|
|
|
|
|
|
|