diff options
Diffstat (limited to 'src/pcf/pcfdrivr.c')
-rw-r--r-- | src/pcf/pcfdrivr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c index ac83918bc..bfa6eacca 100644 --- a/src/pcf/pcfdrivr.c +++ b/src/pcf/pcfdrivr.c @@ -104,7 +104,8 @@ THE SOFTWARE. pcf_cmap_char_index( FT_CMap pcfcmap, /* PCF_CMap */ FT_UInt32 charcode ) { - PCF_Enc enc = ( (PCF_CMap)pcfcmap )->enc; + PCF_Enc enc = ( (PCF_CMap)pcfcmap )->enc; + FT_UInt32 i = ( charcode >> 8 ) - enc->firstRow; FT_UInt32 j = ( charcode & 0xFF ) - enc->firstCol; FT_UInt32 h = enc->lastRow - enc->firstRow + 1; @@ -125,11 +126,13 @@ THE SOFTWARE. { PCF_Enc enc = ( (PCF_CMap)pcfcmap )->enc; FT_UInt32 charcode = *acharcode + 1; + FT_UInt32 i = ( charcode >> 8 ) - enc->firstRow; FT_UInt32 j = ( charcode & 0xFF ) - enc->firstCol; FT_UInt32 h = enc->lastRow - enc->firstRow + 1; FT_UInt32 w = enc->lastCol - enc->firstCol + 1; - FT_UInt result = 0; + + FT_UInt result = 0; /* adjust wrapped around "negative" values */ |