diff options
Diffstat (limited to 'src/3rdparty/harfbuzz')
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-gpos.c | 25 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-open-private.h | 2 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-open.c | 14 |
3 files changed, 8 insertions, 33 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index d71a85e..31b9ae1 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -500,34 +500,24 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi, { /* pixel -> fractional pixel */ - if ( format & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES ) - { - if ( ALLOC_ARRAY( vr->DeviceTables, 4, HB_Device ) ) - return error; - vr->DeviceTables[VR_X_ADVANCE_DEVICE] = 0; - vr->DeviceTables[VR_Y_ADVANCE_DEVICE] = 0; - vr->DeviceTables[VR_X_PLACEMENT_DEVICE] = 0; - vr->DeviceTables[VR_Y_PLACEMENT_DEVICE] = 0; - } - if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE ) { - _HB_OPEN_Get_Device( &vr->DeviceTables[VR_X_PLACEMENT_DEVICE], x_ppem, &pixel_value ); + _HB_OPEN_Get_Device( vr->DeviceTables[VR_X_PLACEMENT_DEVICE], x_ppem, &pixel_value ); gd->x_pos += pixel_value << 6; } if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE ) { - _HB_OPEN_Get_Device( &vr->DeviceTables[VR_Y_PLACEMENT_DEVICE], y_ppem, &pixel_value ); + _HB_OPEN_Get_Device( vr->DeviceTables[VR_Y_PLACEMENT_DEVICE], y_ppem, &pixel_value ); gd->y_pos += pixel_value << 6; } if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE ) { - _HB_OPEN_Get_Device( &vr->DeviceTables[VR_X_ADVANCE_DEVICE], x_ppem, &pixel_value ); + _HB_OPEN_Get_Device( vr->DeviceTables[VR_X_ADVANCE_DEVICE], x_ppem, &pixel_value ); gd->x_advance += pixel_value << 6; } if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE ) { - _HB_OPEN_Get_Device( &vr->DeviceTables[VR_Y_ADVANCE_DEVICE], y_ppem, &pixel_value ); + _HB_OPEN_Get_Device( vr->DeviceTables[VR_Y_ADVANCE_DEVICE], y_ppem, &pixel_value ); gd->y_advance += pixel_value << 6; } } @@ -779,12 +769,9 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi, case 3: if ( !gpi->dvi ) { - if ( ALLOC_ARRAY( an->af.af3.DeviceTables, 2, HB_Device ) ) - return error; - - _HB_OPEN_Get_Device( &an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], x_ppem, &pixel_value ); + _HB_OPEN_Get_Device( an->af.af3.DeviceTables[AF3_X_DEVICE_TABLE], x_ppem, &pixel_value ); *x_value = pixel_value << 6; - _HB_OPEN_Get_Device( &an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE], y_ppem, &pixel_value ); + _HB_OPEN_Get_Device( an->af.af3.DeviceTables[AF3_Y_DEVICE_TABLE], y_ppem, &pixel_value ); *y_value = pixel_value << 6; } else diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h index 1f7b353..65ca453 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h @@ -93,7 +93,7 @@ _HB_OPEN_Get_Class( HB_ClassDefinition* cd, HB_UShort* klass, HB_UShort* index ); HB_INTERNAL HB_Error -_HB_OPEN_Get_Device( HB_Device** d, +_HB_OPEN_Get_Device( HB_Device* d, HB_UShort size, HB_Short* value ); diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.c b/src/3rdparty/harfbuzz/src/harfbuzz-open.c index 255b7e6..adc6cec 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-open.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.c @@ -1399,21 +1399,11 @@ _HB_OPEN_Free_Device( HB_Device** d ) mask = 0x00FF */ HB_INTERNAL HB_Error -_HB_OPEN_Get_Device( HB_Device** device, +_HB_OPEN_Get_Device( HB_Device* d, HB_UShort size, HB_Short* value ) { - HB_Device* d; HB_UShort byte, bits, mask, f, s; - HB_Error error; - - if ( ALLOC( *device, sizeof(HB_Device)) ) - { - *device = 0; - return error; - } - - d = *device; f = d->DeltaFormat; @@ -1436,8 +1426,6 @@ _HB_OPEN_Get_Device( HB_Device** device, else { *value = 0; - FREE( *device ); - *device = 0; return HB_Err_Not_Covered; } } |